Assigning fiefs to factions

Started by Pentagathus, March 21, 2008, 06:07:39 PM

Previous topic - Next topic

Pentagathus

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

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

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

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

The duke, the wanderer, the philosopher, the mariner, the warrior, the strategist, the storyteller, the wizard, the wayfarer...

Pentagathus

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

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


Jubal

The duke, the wanderer, the philosopher, the mariner, the warrior, the strategist, the storyteller, the wizard, the wayfarer...

Pentagathus

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

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

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

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...