Exilian

Game Design and Project Resources: The Workshops Quarter => Mods, Maps & Game Add-Ons - The Bazaar => M&B Mods - The Explorer's Society => Topic started by: Pentagathus on March 21, 2008, 06:07:39 PM

Title: Assigning fiefs to factions
Post by: Pentagathus 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.
Title: Assigning fiefs to factions
Post by: Jubal 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.
Title: Assigning fiefs to factions
Post by: Pentagathus 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?
Title: Assigning fiefs to factions
Post by: Jubal 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.
Title: Assigning fiefs to factions
Post by: Jubal on March 22, 2008, 07:29:44 AM
Moved to Workshop
Title: Assigning fiefs to factions
Post by: Pentagathus 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),
Title: Assigning fiefs to factions
Post by: Jubal 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"),
Title: Assigning fiefs to factions
Post by: Pentagathus on March 22, 2008, 02:27:24 PM
I cant find that bit.
Title: Assigning fiefs to factions
Post by: Jubal on March 22, 2008, 05:20:11 PM
It's quite near the top...
Title: Assigning fiefs to factions
Post by: Pentagathus 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?
Title: Assigning fiefs to factions
Post by: Jubal 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?
Title: Assigning fiefs to factions
Post by: Pentagathus 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.
Title: Assigning fiefs to factions
Post by: Jubal on March 22, 2008, 07:53:02 PM
Nicht gut.

Check your PM inbox btw, I sent you a message.