regional recruits

正在查看此主题的用户

Dindi

Sergeant Knight
How would i make it so the each village has different troops to recruit.

i think if i edit this it would work but i dont were start as im not very good at scripts.
插入代码块:
       (store_script_param, ":center_no", 1),
       (party_get_slot, ":player_relation", ":center_no", slot_center_player_relation),
       (party_get_slot, ":center_culture", ":center_no", slot_center_culture),
       (faction_get_slot, ":volunteer_troop", ":center_culture", slot_faction_tier_1_troop),
       (assign, ":volunteer_troop_tier", 1),
       (store_div, ":tier_upgrades", ":player_relation", 10),
       (try_for_range, ":unused", 0, ":tier_upgrades"),
         (store_random_in_range, ":random_no", 0, 100),
         (lt, ":random_no", 10),
         (store_random_in_range, ":random_no", 0, 2),
         (troop_get_upgrade_troop, ":upgrade_troop_no", ":volunteer_troop", ":random_no"),

thanks , dindi
 
no it does not, i want different types recruited depending from what village you recruit from.
 
Exactly what do you want to accomplish?

Every village should have their own unique recruit?

At the moment you're center get's the troop it's supposed to have available from these lines primarily:

插入代码块:
       (party_get_slot, ":center_culture", ":center_no", slot_center_culture),
       (faction_get_slot, ":volunteer_troop", ":center_culture", slot_faction_tier_1_troop),

Now, if you want a diffrent troop for each village you might specify the troop for each village much as is done currently for slot_faction_tier_1_troop).
Add this under Party in module_constants.py:

插入代码块:
slot_village_recruits           = 46

Then, in module_scripts.py scroll up to the declarations for villages.
Add your new declarations after this clump of code:
插入代码块:
      (party_set_slot,"p_castle_1", slot_center_siege_with_belfry,   0),
      (party_set_slot,"p_castle_2", slot_center_siege_with_belfry,   1),
      (party_set_slot,"p_castle_3", slot_center_siege_with_belfry,   0),
      (party_set_slot,"p_castle_4", slot_center_siege_with_belfry,   0),
      (party_set_slot,"p_castle_5", slot_center_siege_with_belfry,   0),
      (party_set_slot,"p_castle_6", slot_center_siege_with_belfry,   0),
      (party_set_slot,"p_castle_7", slot_center_siege_with_belfry,   1),
      (party_set_slot,"p_castle_8", slot_center_siege_with_belfry,   1),
      (party_set_slot,"p_castle_9", slot_center_siege_with_belfry,   1),
      (party_set_slot,"p_castle_10", slot_center_siege_with_belfry,   0),
      (party_set_slot,"p_castle_11", slot_center_siege_with_belfry,   1),

Now to what you add here. You're going to have to add each troop as it is done with the faction slots.
Something like this:

插入代码块:
      (party_set_slot, "p_village_1", slot_village_recruits, "trp_your_troop_for_village_1"),
      (party_set_slot, "p_village_2", slot_village_recruits, "trp_your_troop_for_village_2"),
      (party_set_slot, "p_village_3", slot_village_recruits, "trp_your_troop_for_village_3"),
      (party_set_slot, "p_village_4", slot_village_recruits, "trp_your_troop_for_village_4"),
      (party_set_slot, "p_village_5", slot_village_recruits, "trp_your_troop_for_village_5"),
      (party_set_slot, "p_village_6", slot_village_recruits, "trp_your_troop_for_village_6"),
      (party_set_slot, "p_village_7", slot_village_recruits, "trp_your_troop_for_village_7"),
      (party_set_slot, "p_village_8", slot_village_recruits, "trp_your_troop_for_village_8"),
      (party_set_slot, "p_village_9", slot_village_recruits, "trp_your_troop_for_village_9"),
      (party_set_slot, "p_village_10", slot_village_recruits, "trp_your_troop_for_village_10"),
      .......
      (party_set_slot, "p_village_58", slot_village_recruits, "trp_your_troop_for_village_58"),
      (party_set_slot, "p_village_59", slot_village_recruits, "trp_your_troop_for_village_59"),
      (party_set_slot, "p_village_60", slot_village_recruits, "trp_your_troop_for_village_60"),

Now if you modify the code part you talked about changing to what I post below you'll get what you want.

     
插入代码块:
 (store_script_param, ":center_no", 1),
       (party_get_slot, ":player_relation", ":center_no", slot_center_player_relation),
       (party_get_slot, ":volunteer_troop", ":center_no", slot_village_recruits),    #added
       (assign, ":volunteer_troop_tier", 1),
       (store_div, ":tier_upgrades", ":player_relation", 10),
       (try_for_range, ":unused", 0, ":tier_upgrades"),
         (store_random_in_range, ":random_no", 0, 100),
         (lt, ":random_no", 10),
         (store_random_in_range, ":random_no", 0, 2),
         (troop_get_upgrade_troop, ":upgrade_troop_no", ":volunteer_troop", ":random_no"),

Hope that helps!

Zait
 
Hi,

I'm trying to let the player be able to recruit from both villages and town, with having the normal native troop tree in villages, but having a different troop tree for towns for each faction (not for each town unique). So the player can choose from 2 tree's at each faction to choose from (village and town) but how can I implent that the swadian town recruits will be "trp_swadian_townsman" for example, and the village recruits "trp_swadian_recruit"?

插入代码块:
  #script_village_recruit_volunteers_recruit
  # INPUT: none
  # OUTPUT: none
  ("village_recruit_volunteers_recruit",
    [(party_get_slot, ":volunteer_troop", "$current_town", slot_center_volunteer_troop_type),
     (party_get_slot, ":volunteer_amount", "$current_town", slot_center_volunteer_troop_amount),
     (party_get_free_companions_capacity, ":free_capacity", "p_main_party"),
     (val_min, ":volunteer_amount", ":free_capacity"),
     (store_troop_gold, ":gold", "trp_player"),
     (store_div, ":gold_capacity", ":gold", 10),#10 denars per man
     (val_min, ":volunteer_amount", ":gold_capacity"),
     (party_add_members, "p_main_party", ":volunteer_troop", ":volunteer_amount"),
     (party_set_slot, "$current_town", slot_center_volunteer_troop_amount, -1),
     (store_mul, ":cost", ":volunteer_amount", 10),#10 denars per man
     (troop_remove_gold, "trp_player", ":cost"),
     ]),
^ here above is the standard code for villages, what do i have to modify

thanks in advance
 
后退
顶部 底部