Party Templates and Lords' Parties

正在查看此主题的用户

Lord_Cheap

Squire
Would it be possible to add troops directly to a lord's party, rather than through party templates?
Party templates gives the troops to castles and towns as well, but I want some troops to go to vassals only. I think it has something to do with "script_create_kingdom_hero_party" but I'm not too sure. Thanks :grin:.
 
插入代码块:
(troop_get_slot, ":party_id", ":troop_id", slot_troop_leaded_party),
(neq, ":party_id", -1),
<another conditions and troop added selection based on troop_id>
(party_add_members,  ":party_id", <troop added>),
put the code in triggers that reinforce  kingdom heroes troops.
 
dunde 说:
插入代码块:
(troop_get_slot, ":party_id", ":troop_id", slot_troop_leaded_party),
(neq, ":party_id", -1),
<another conditions and troop added selection based on troop_id>
(party_add_members,  ":party_id", <troop added>),
put the code in triggers that reinforce  kingdom heroes troops.

Sorry, I don't really have any knowledge or skill modding/scripting, what does that mean? And where do i put this? Thanks.
 
Open module_scripts.py, find "hire_men_to_kingdom_hero_party" script.
In the script, find this line :
  (call_script, "script_cf_reinforce_party", ":party_no"),
That make the kingdom heroes get additional troops from kingdom_#_reinforcements_x party templates just like towns/castles. Change the line with other code as you wish.
 
Oh i see, thanks. What do I do with "<another conditions and troop added selection based on troop_id>"?

Sorry for being a nuisance  :oops:
 
You must add your code there, to check what faction the hero is, how many troops he has, etc. to decide what troops and how many troops you will give him.
 
后退
顶部 底部