Author Topic: Assigning fiefs to factions  (Read 12687 times)

Pentagathus

  • King of the Wibulnibs
  • Posts: 2713
  • Karma: 20
    • View Profile
    • Awards
Assigning fiefs to factions
« on: March 21, 2008, 06:07:39 PM »
Hey everybody. Yep the whole 3 other users on here. :D                                                        How do you assgn a fief to a faction?[By that I mean how do change which faction controlls a town/castle/village.

Jubal

  • Megadux
    Executive Officer
  • Posts: 35596
  • Karma: 140
  • Awards Awarded for oustanding services to Exilian!
    • View Profile
    • Awards
Assigning fiefs to factions
« Reply #1 on: March 21, 2008, 10:06:03 PM »
For towns and castles, go to module_scripts.py, scroll down until you find the script_give_center_to_lord and give_center_to_faction_aux section, then edit which lord (for cities), or which faction (for castles) owns each castle/town. Villages are normally given to the closest town or castle.

For lords, rememebr the faction of the lord determines the faction of the city. Castles will be given to a random lord of the faction.
The duke, the wanderer, the philosopher, the mariner, the warrior, the strategist, the storyteller, the wizard, the wayfarer...

Pentagathus

  • King of the Wibulnibs
  • Posts: 2713
  • Karma: 20
    • View Profile
    • Awards
Assigning fiefs to factions
« Reply #2 on: March 21, 2008, 10:14:49 PM »
Aaah thanks. And for that you are spared dfs.
Could you give me an example?  Like what I write in where:

# script_give_center_to_lord
  # Input: arg1 = center_no, arg2 = lord_troop
  ("give_center_to_lord",
    [
      (store_script_param_1, ":center_no"),
      (store_script_param_2, ":lord_no"),
     

      (party_get_slot, ":lord_no", ":center_no", slot_town_lord),
     
      (store_troop_faction, ":lord_troop_faction", ":lord_troop_id"),
      (try_begin),
        (eq, ":lord_troop_id", "trp_player"),
        (gt, "$players_kingdom", 0),
        (party_set_faction, ":center_no", "$players_kingdom"),
      (else_try),
        (party_set_faction, ":center_no", ":lord_troop_faction"),
      (try_end),
      (party_set_slot, ":center_no", slot_town_lord, ":lord_troop_id"),

So where do I put what. Assuming I want to give  town_11 to kingdom_1_lord?

Jubal

  • Megadux
    Executive Officer
  • Posts: 35596
  • Karma: 140
  • Awards Awarded for oustanding services to Exilian!
    • View Profile
    • Awards
Assigning fiefs to factions
« Reply #3 on: March 22, 2008, 07:29:23 AM »
Wrong bit. Search for the script name (give_center_to_lord), and find the bit where it's called lots and lots of times with parties as the parameters.
The duke, the wanderer, the philosopher, the mariner, the warrior, the strategist, the storyteller, the wizard, the wayfarer...

Jubal

  • Megadux
    Executive Officer
  • Posts: 35596
  • Karma: 140
  • Awards Awarded for oustanding services to Exilian!
    • View Profile
    • Awards
Assigning fiefs to factions
« Reply #4 on: March 22, 2008, 07:29:44 AM »
Moved to Workshop
The duke, the wanderer, the philosopher, the mariner, the warrior, the strategist, the storyteller, the wizard, the wayfarer...

Pentagathus

  • King of the Wibulnibs
  • Posts: 2713
  • Karma: 20
    • View Profile
    • Awards
Assigning fiefs to factions
« Reply #5 on: March 22, 2008, 12:04:35 PM »
Do you mean this bit?
(try_begin),
        (this_or_next|party_slot_eq, ":center_no", slot_party_type, spt_town),
        (party_slot_eq, ":center_no", slot_party_type, spt_castle),
        (troop_get_slot, ":cur_banner", ":lord_troop_id", slot_troop_banner_scene_prop),
        (gt, ":cur_banner", 0),
        (val_sub, ":cur_banner", "spr_banner_a"),
        (val_add, ":cur_banner", "icon_banner_01"),
        (party_set_banner_icon, ":center_no", ":cur_banner"),
      (try_end),

Jubal

  • Megadux
    Executive Officer
  • Posts: 35596
  • Karma: 140
  • Awards Awarded for oustanding services to Exilian!
    • View Profile
    • Awards
Assigning fiefs to factions
« Reply #6 on: March 22, 2008, 01:20:03 PM »
This bit;    

  (call_script, "script_give_center_to_lord", "p_town_1",  "trp_kingdom_4_lord"),
      (call_script, "script_give_center_to_lord", "p_town_2",  "trp_knight_4_1"),
      (call_script, "script_give_center_to_lord", "p_town_3",  "trp_knight_5_1"),
      (call_script, "script_give_center_to_lord", "p_town_4",  "trp_knight_1_1"),
The duke, the wanderer, the philosopher, the mariner, the warrior, the strategist, the storyteller, the wizard, the wayfarer...

Pentagathus

  • King of the Wibulnibs
  • Posts: 2713
  • Karma: 20
    • View Profile
    • Awards
Assigning fiefs to factions
« Reply #7 on: March 22, 2008, 02:27:24 PM »
I cant find that bit.

Jubal

  • Megadux
    Executive Officer
  • Posts: 35596
  • Karma: 140
  • Awards Awarded for oustanding services to Exilian!
    • View Profile
    • Awards
Assigning fiefs to factions
« Reply #8 on: March 22, 2008, 05:20:11 PM »
It's quite near the top...
The duke, the wanderer, the philosopher, the mariner, the warrior, the strategist, the storyteller, the wizard, the wayfarer...

Pentagathus

  • King of the Wibulnibs
  • Posts: 2713
  • Karma: 20
    • View Profile
    • Awards
Assigning fiefs to factions
« Reply #9 on: March 22, 2008, 05:36:57 PM »
it's not working. I put this in (call_script, "script_give_center_to_lord", "p_town_11", "trp_kingdom_1_lord"), but curaw (town 11) still isnt  owned by the right faction. Do I need to givew it to kingdom_1 as wel as the king?

Jubal

  • Megadux
    Executive Officer
  • Posts: 35596
  • Karma: 140
  • Awards Awarded for oustanding services to Exilian!
    • View Profile
    • Awards
Assigning fiefs to factions
« Reply #10 on: March 22, 2008, 05:51:52 PM »
It should work...

1) does the King have any other cities atm? It may be impossible to give him more than 1 city.
2) Did you remember to build the module?
The duke, the wanderer, the philosopher, the mariner, the warrior, the strategist, the storyteller, the wizard, the wayfarer...

Pentagathus

  • King of the Wibulnibs
  • Posts: 2713
  • Karma: 20
    • View Profile
    • Awards
Assigning fiefs to factions
« Reply #11 on: March 22, 2008, 07:46:10 PM »
There was some huge error in the python files which meant I had to wipe all of my m&b files  so I'll try again soon.

Jubal

  • Megadux
    Executive Officer
  • Posts: 35596
  • Karma: 140
  • Awards Awarded for oustanding services to Exilian!
    • View Profile
    • Awards
Assigning fiefs to factions
« Reply #12 on: March 22, 2008, 07:53:02 PM »
Nicht gut.

Check your PM inbox btw, I sent you a message.
The duke, the wanderer, the philosopher, the mariner, the warrior, the strategist, the storyteller, the wizard, the wayfarer...