WB Coding Troops Equipmant

Currently viewing this thread:

Best answers
0
In module_dialogs, I want to change a troop equipmant, I used this

[anyone|plyr,"regular_member_talk", [(this_or_next|is_between, "$g_talk_troop","trp_kingdom_recruit","trp_harzem1"),(is_between,"$g_talk_troop",mercenary_troops_begin, mercenary_troops_end),], "I want to manage your equipments", "do_regular_member_view_char",[change_screen_trade]],

change_screen_trade and change_screen_equip_other, troop equipmants changed but when I save game and load save game troop equipmant is old equipmat.
 

Tocan

Sergeant Knight at Arms
Best answers
14
In module_dialogs, I want to change a troop equipmant, I used this

[anyone|plyr,"regular_member_talk", [(this_or_next|is_between, "$g_talk_troop","trp_kingdom_recruit","trp_harzem1"),(is_between,"$g_talk_troop",mercenary_troops_begin, mercenary_troops_end),], "I want to manage your equipments", "do_regular_member_view_char",[change_screen_trade]],

change_screen_trade and change_screen_equip_other, troop equipmants changed but when I save game and load save game troop equipmant is old equipmat.
You need to memorize the equipment. It would be easier if troop is a hero...

There was a script from somebody in the osp section.
 
Best answers
0
Worked, very simple :grin:
dont_load_regular_troop_inventories = 0

here dialogs
[anyone|plyr,"regular_member_talk", [(this_or_next|is_between, "$g_talk_troop","trp_kingdom_recruit","trp_harzem1"),(is_between,"$g_talk_troop",mercenary_troops_begin, mercenary_troops_end),], "I want to manage your equipments", "do_regular_member_view_char",[(change_screen_trade, "$g_talk_troop"),(troop_equip_items,"$g_talk_troop"),]],
[anyone,"view_regular_char_requested", [], "Aye {sir/madam}. Let me tell you all there is to know about me.", "do_regular_member_view_char",[[change_screen_view_character]]],
[anyone,"do_regular_member_view_char", [], "Anything else?", "regular_member_talk",[]],
[anyone|plyr,"regular_member_talk", [], "Nothing. Keep moving.", "close_window",[(troop_equip_items,"$g_talk_troop"),]],
 

Tocan

Sergeant Knight at Arms
Best answers
14
Cool! I need to check the module.ini options. Any drawbacks?
 

Eärendil Ardamírë

Subforum Moderator
WBWF&SM&B
Best answers
91
The equipment for normal troops gets normally not memorized by the save game since the default settings only save the hero equipment inside it. Changing the default value to 0 (or adding that line in module.ini if not present already) changes that.
 

Tocan

Sergeant Knight at Arms
Best answers
14
Thanks for the info! So no drawbacks except if you still testing, equipment changes to troops are not recognized.
 

Eärendil Ardamírë

Subforum Moderator
WBWF&SM&B
Best answers
91
No, in you don't use it or have it set to 1, then equipment changes to troops are not recognized if getting loaded later again in a save game. The drawback of having it set to 0 is that the file size of the save game will get bigger and might take longer to load.
 

Tocan

Sergeant Knight at Arms
Best answers
14
No I mean if you have it on 1 or don't use it, you still can add new items to troops via morghs or ms and the changes are recognized by the save game!