Trying To Get a Simple Trigger to Work

Users who are viewing this thread

http://forums.taleworlds.com/index.php/topic,87239.msg2254183.html#msg2254183


Code:
################################################################################
(24*90,[#Every three months a massive campaign begins.

   (try_for_range, ":kingdom_hero", kingdom_heroes_begin, kingdom_heroes_end),##All this trigger does is make lords more likely to form armies
       (troop_slot_eq, ":kingdom_hero", slot_troop_occupation, slto_kingdom_hero), ##It also makes yours more obedient.
       (troop_set_slot, ":kingdom_hero", slot_troop_readiness_to_join_army, 90),
       (troop_set_slot, ":kingdom_hero", slot_troop_readiness_to_follow_orders, 100),##Does this for just your lords
   (try_end),
   (display_message,"@A time of war is upon you. The lords have mobilized their forces!",0xFFFFFFAA),
   ]),
################################################################################


When I put this at the end of module_simple_triggers.py and compile it, I get a HUGE amount of 'Warning: xxx not in use!' messages - I think it breaks every variable in the game. I noticed the code was from 2009, is it the code's problem or am I doing something wrong?
(I am using Warband 1.131)
 
Theses constants are no longer used:
active_npcs_begin replaces kingdom_heroes_begin
#slot_troop_readiness_to_join_army    = 57 #possibly deprecate
#slot_troop_readiness_to_follow_orders = 58 #possibly deprecate

To do what you want, I would start by looking at "script_npc_decision_checklist_troop_follow_or_not" to see what can be modified.
 
Back
Top Bottom