Hi,
I have been looking into using the custom button options for the new Napoleonic Wars Patch, but have run into a couple of problems (primarily with getting them to work from a server side).
In Module_Scene_Props I noticed 2 separate custom buttons options.
Five different versions of this, listed 1 second, 2 second and so on....
]),
]),
("custom_button_1_second",spr_use_time(1),"0","cannon_button_collision", [
(ti_on_scene_prop_use,
[ #add custom server side code here..
]),
]),
These I managed to get working fine from the server side by just adding the (multiplayer_is_server) command.
However when i use these ones and upload to my server they don't work--as in there is no 'use' label or anything...
# ("custom_button_1_4seconds",spr_use_time(4),"0","cannon_button_collision", [
# (ti_on_init_scene_prop,
# [
# (troop_set_name, "trp_custom_button_1_4seconds", "@Use Me"), # Set custom use string here, displayed when looking at button
# ]),
# (ti_on_scene_prop_use,
# [ #add custom server side code here..
# ]),
# ]),
I'm assuming you are meant to take away the # which I have done. I also took away the # in front of all the 4 seconds ones in Module Troops.
["custom_button_1_4seconds","{!}custom_button_1_4seconds","{!}custom_button_1_4seconds",tf_hero|tf_inactive,0,reserved,fac_neutral,[],def_attrib,0,knows_common,0],
Yet nothing appears to make them show up on the server.
I can only think it is somehow connected to this part of the script:
# (ti_on_init_scene_prop,
# [
# (troop_set_name, "trp_custom_button_1_4seconds", "@Use Me"), # Set custom use string here, displayed when looking at button
And this leads to my second question: How do you create custom labels?
In Module_troops it talks about changing the troop name....but is the one you change in the custom_strings_[] section, or in this part....
["custom_button_1_4seconds","{!}custom_button_1_4seconds","{!}custom_button_1_4seconds",tf_hero|tf_inactive,0,reserved,fac_neutral,[],def_attrib,0,knows_common,0],
Finally, what exactly would you add/change in this line in the scene_props to make this custom label come into effect?
# (troop_set_name, "trp_custom_button_1_4seconds", "@Use Me"), # Set custom use string here, displayed when looking at button
Would greatly appreciate any help on these issues and questions.