Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
how can i check "this item is using by troops(or someone special)" ?

because,i wanna to make flag system in wars(like empire total war)(someone is moving the flag,and if ally troops is near of flag,they will maybe run faster,or more damaging :smile:.
 
Code:
(try_for_agents,":agent"),
(agent_get_wielded_item,":item",":agent", <hand_no>),#dunno which hand it is    this will also require the agent to be holding the banner
(eq,":item", "itm_flag_msbonus"),
...
(try_end),


EDIT:
Code:
(try_for_agents,":agent"),
(agent_get_wielded_item,":item",":agent", <hand_no>),#dunno which hand it is    this will also require the agent to be holding the banner
(eq,":item", "itm_flag_msbonus"),
(agent_get_team, ":team1",":agent1"),
(agent_get_position,pos1,":agent1"),
(try_for_agents,":agent2"),
(agent_get_team, ":team2",":agent2"),
(this_or_next|eq,":team1", ":team2"),#dunno if you need this but better safe than sorry
(neg|teams_are_enemies,":team1",":team2"),
(agent_get_position,pos2,":agent2"),
(get_distance_between_positions,":dist",pos1,pos2),
(le,":dist", <distance>),
...
(try_end),
(try_end),
 
Ikaguia said:
Code:
(try_for_agents,":agent"),
(agent_get_wielded_item,":item",":agent", <hand_no>),#dunno which hand it is    this will also require the agent to be holding the banner
(eq,":item", "itm_flag_msbonus"),
...
(try_end),

Thank you! :smile:
 
Ikaguia said:
EDIT:
Code:
(try_for_agents,":agent"),
(agent_get_wielded_item,":item",":agent", <hand_no>),#dunno which hand it is    this will also require the agent to be holding the banner
(eq,":item", "itm_flag_msbonus"),
(agent_get_team, ":team1",":agent1"),
(agent_get_position,pos1,":agent1"),
(try_for_agents,":agent2"),
(agent_get_team, ":team2",":agent2"),
(this_or_next|eq,":team1", ":team2"),#dunno if you need this but better safe than sorry
(neg|teams_are_enemies,":team1",":team2"),
(agent_get_position,pos2,":agent2"),
(get_distance_between_positions,":dist",pos1,pos2),
(le,":dist", <distance>),
...
(try_end),
(try_end),

as for dmg, you need to look into "ti_on_agent_killed_or_wounded"
 
Neodrako said:
Thank you

In the global map
Do you have to be somewhere special?

O replace something that already exists?

thank you very much
Just add a new simple trigger. Something along the lines:
Code:
  (0, [
    (key_clicked, key_1), # Run only when '1' button is clicked
    (map_free), # Run only if player is not busy
    # insert any code to execute
  ]),
 
I have a problem with Modmerger.
I have added arrays (array_scripts and array_simple_triggers) to my mod recently. And now, when I try to add any other modmerge mod (Freelancer for example), i get bunch of Illegal Identifier errors for arrays:

Code:
...
Exporting scene props...
Exporting tableau materials data...
Exporting presentations...
Error: Unable to find object:script_cf_array_is_array
ERROR: Illegal Identifier:script_cf_array_is_array
Error: Unable to find object:script_array_get_element
ERROR: Illegal Identifier:script_array_get_element
Error: Unable to find object:script_array_get_element
ERROR: Illegal Identifier:script_array_get_element
Error: Unable to find object:script_array_get_element
ERROR: Illegal Identifier:script_array_get_element
Error: Unable to find object:script_array_get_element
ERROR: Illegal Identifier:script_array_get_element
Error: Unable to find object:script_array_get_element
ERROR: Illegal Identifier:script_array_get_element
Error: Unable to find object:script_array_get_size
ERROR: Illegal Identifier:script_array_get_size
Error: Unable to find object:script_cf_array_get_element
ERROR: Illegal Identifier:script_cf_array_get_element
Error: Unable to find object:script_cf_array_get_element
ERROR: Illegal Identifier:script_cf_array_get_element
Error: Unable to find object:script_cf_array_get_element
ERROR: Illegal Identifier:script_cf_array_get_element
Error: Unable to find object:script_cf_array_get_element
ERROR: Illegal Identifier:script_cf_array_get_element
Error: Unable to find object:script_cf_array_get_element
ERROR: Illegal Identifier:script_cf_array_get_element
Error: Unable to find object:script_cf_array_get_element
ERROR: Illegal Identifier:script_cf_array_get_element
Error: Unable to find object:script_cf_array_get_element
ERROR: Illegal Identifier:script_cf_array_get_element
Error: Unable to find object:script_cf_array_get_element
ERROR: Illegal Identifier:script_cf_array_get_element
Error: Unable to find object:script_cf_array_get_element
ERROR: Illegal Identifier:script_cf_array_get_element
Error: Unable to find object:script_cf_array_get_element
ERROR: Illegal Identifier:script_cf_array_get_element
Error: Unable to find object:script_cf_array_get_element
ERROR: Illegal Identifier:script_cf_array_get_element
Error: Unable to find object:script_cf_array_get_element
ERROR: Illegal Identifier:script_cf_array_get_element
Error: Unable to find object:script_cf_array_get_element
ERROR: Illegal Identifier:script_cf_array_get_element
Error: Unable to find object:script_cf_array_get_element
ERROR: Illegal Identifier:script_cf_array_get_element
Error: Unable to find object:script_cf_array_get_element
ERROR: Illegal Identifier:script_cf_array_get_element
Error: Unable to find object:script_cf_array_get_element
ERROR: Illegal Identifier:script_cf_array_get_element
Error: Unable to find object:script_cf_array_get_element
ERROR: Illegal Identifier:script_cf_array_get_element
Error: Unable to find object:script_cf_array_get_element
ERROR: Illegal Identifier:script_cf_array_get_element
Error: Unable to find object:script_cf_array_get_element
ERROR: Illegal Identifier:script_cf_array_get_element
Error: Unable to find object:script_cf_array_get_element
ERROR: Illegal Identifier:script_cf_array_get_element
Error: Unable to find object:script_cf_array_get_element
ERROR: Illegal Identifier:script_cf_array_get_element
Error: Unable to find object:script_cf_array_get_element
ERROR: Illegal Identifier:script_cf_array_get_element
Error: Unable to find object:script_cf_array_get_element
ERROR: Illegal Identifier:script_cf_array_get_element
Error: Unable to find object:script_cf_array_get_element
ERROR: Illegal Identifier:script_cf_array_get_element
Error: Unable to find object:script_cf_array_get_element
ERROR: Illegal Identifier:script_cf_array_get_element
Error: Unable to find object:script_cf_array_get_element
ERROR: Illegal Identifier:script_cf_array_get_element
Error: Unable to find object:script_cf_array_get_element
ERROR: Illegal Identifier:script_cf_array_get_element
Error: Unable to find object:script_cf_array_get_element
ERROR: Illegal Identifier:script_cf_array_get_element
Error: Unable to find object:script_array_get_size
ERROR: Illegal Identifier:script_array_get_size
Error: Unable to find object:script_array_pushback
ERROR: Illegal Identifier:script_array_pushback
Error: Unable to find object:script_cf_array_get_element
ERROR: Illegal Identifier:script_cf_array_get_element
Error: Unable to find object:script_array_get_element
ERROR: Illegal Identifier:script_array_get_element
Error: Unable to find object:script_array_get_element
ERROR: Illegal Identifier:script_array_get_element
Error: Unable to find object:script_array_get_size
ERROR: Illegal Identifier:script_array_get_size
Exporting party template data...
Exporting parties...
Exporting quest data...
Exporting info page data...
Exporting scripts...
Error: Unable to find object:script_array_create
ERROR: Illegal Identifier:script_array_create
Error: Unable to find object:script_array_set_owner
ERROR: Illegal Identifier:script_array_set_owner
Error: Unable to find object:script_array_create
ERROR: Illegal Identifier:script_array_create
Error: Unable to find object:script_array_pushback
ERROR: Illegal Identifier:script_array_pushback
Error: Unable to find object:script_array_set_owner
ERROR: Illegal Identifier:script_array_set_owner
Error: Unable to find object:script_cf_array_is_array
ERROR: Illegal Identifier:script_cf_array_is_array
Error: Unable to find object:script_array_get_element
ERROR: Illegal Identifier:script_array_get_element
Error: Unable to find object:script_array_get_element
ERROR: Illegal Identifier:script_array_get_element
Error: Unable to find object:script_array_get_element
ERROR: Illegal Identifier:script_array_get_element
Error: Unable to find object:script_array_get_element
ERROR: Illegal Identifier:script_array_get_element
Error: Unable to find object:script_array_get_element
ERROR: Illegal Identifier:script_array_get_element
Error: Unable to find object:script_array_insert
ERROR: Illegal Identifier:script_array_insert
Error: Unable to find object:script_array_insert
ERROR: Illegal Identifier:script_array_insert
Error: Unable to find object:script_array_insert
ERROR: Illegal Identifier:script_array_insert
Error: Unable to find object:script_array_insert
ERROR: Illegal Identifier:script_array_insert
Error: Unable to find object:script_array_insert
ERROR: Illegal Identifier:script_array_insert
Error: Unable to find object:script_cf_array_is_array
ERROR: Illegal Identifier:script_cf_array_is_array
Error: Unable to find object:script_array_get_element
ERROR: Illegal Identifier:script_array_get_element
Error: Unable to find object:script_array_get_element
ERROR: Illegal Identifier:script_array_get_element
Error: Unable to find object:script_array_get_element
ERROR: Illegal Identifier:script_array_get_element
Error: Unable to find object:script_array_get_element
ERROR: Illegal Identifier:script_array_get_element
Error: Unable to find object:script_array_get_element
ERROR: Illegal Identifier:script_array_get_element
Error: Unable to find object:script_array_get_size
ERROR: Illegal Identifier:script_array_get_size
Error: Unable to find object:script_array_get_element
ERROR: Illegal Identifier:script_array_get_element
Error: Unable to find object:script_cf_array_get_element
ERROR: Illegal Identifier:script_cf_array_get_element
Error: Unable to find object:script_cf_array_remove
ERROR: Illegal Identifier:script_cf_array_remove
Error: Unable to find object:script_cf_array_remove
ERROR: Illegal Identifier:script_cf_array_remove
Error: Unable to find object:script_cf_array_remove
ERROR: Illegal Identifier:script_cf_array_remove
Error: Unable to find object:script_cf_array_remove
ERROR: Illegal Identifier:script_cf_array_remove
Error: Unable to find object:script_cf_array_remove
ERROR: Illegal Identifier:script_cf_array_remove
Error: Unable to find object:script_cf_array_get_element
ERROR: Illegal Identifier:script_cf_array_get_element
Error: Unable to find object:script_cf_array_remove
ERROR: Illegal Identifier:script_cf_array_remove
Error: Unable to find object:script_cf_array_remove
ERROR: Illegal Identifier:script_cf_array_remove
Error: Unable to find object:script_cf_array_remove
ERROR: Illegal Identifier:script_cf_array_remove
Error: Unable to find object:script_cf_array_remove
ERROR: Illegal Identifier:script_cf_array_remove
Error: Unable to find object:script_cf_array_remove
ERROR: Illegal Identifier:script_cf_array_remove
Error: Unable to find object:script_array_get_size
ERROR: Illegal Identifier:script_array_get_size
Error: Unable to find object:script_cf_array_is_array
ERROR: Illegal Identifier:script_cf_array_is_array
Error: Unable to find object:script_cf_array_get_element
ERROR: Illegal Identifier:script_cf_array_get_element
Error: Unable to find object:script_cf_array_set_element
ERROR: Illegal Identifier:script_cf_array_set_element
Error: Unable to find object:script_cf_array_insert
ERROR: Illegal Identifier:script_cf_array_insert
Error: Unable to find object:script_cf_array_is_array
ERROR: Illegal Identifier:script_cf_array_is_array
Error: Unable to find object:script_cf_array_get_element
ERROR: Illegal Identifier:script_cf_array_get_element
Error: Unable to find object:script_cf_array_get_element
ERROR: Illegal Identifier:script_cf_array_get_element
Error: Unable to find object:script_cf_array_remove
ERROR: Illegal Identifier:script_cf_array_remove
Exporting mission template data...
Exporting game menus data...
Error: Unable to find object:script_cf_array_is_array
ERROR: Illegal Identifier:script_cf_array_is_array
Error: Unable to find object:script_array_get_size
ERROR: Illegal Identifier:script_array_get_size
Error: Unable to find object:script_cf_array_get_element
ERROR: Illegal Identifier:script_cf_array_get_element
Exporting simple triggers...
Exporting triggers...
Exporting dialogs...
...
Can someone tell me why is this happening? I'm pretty sure I did everything correctly. :???:
Nevermind. I'm stupid. Fixed. :lol:
 
Lav said:
Neodrako said:
Thank you

In the global map
Do you have to be somewhere special?

O replace something that already exists?

thank you very much
Just add a new simple trigger. Something along the lines:
Code:
  (0, [
    (key_clicked, key_1), # Run only when '1' button is clicked
    (map_free), # Run only if player is not busy
    # insert any code to execute
  ]),

Thanks already in use and compiles fine

But as I see the coordinates?
 
I posted this on another thread but I think it belongs here:

Do Achievement related operations work on mods?
ie: get_achievement_stat, set_achievement_stat, unlock_achievement

or should I remove it from my admin tools mod.
 
Hello. Wanted to ask, how to make a higher strength value than 30? If i set it to something like str_40 it says "NameError: name 'str_40' is not defined" when compiling. What should i do?
 
Code:
str_3            = bignum | 0x00000003
str_4            = bignum | 0x00000004
str_5            = bignum | 0x00000005
str_6            = bignum | 0x00000006
str_7            = bignum | 0x00000007
str_8            = bignum | 0x00000008
str_9            = bignum | 0x00000009
str_10           = bignum | 0x0000000a
str_11           = bignum | 0x0000000b
str_12           = bignum | 0x0000000c
str_13           = bignum | 0x0000000d
str_14           = bignum | 0x0000000e
str_15           = bignum | 0x0000000f
str_16           = bignum | 0x00000010
str_17           = bignum | 0x00000011
str_18           = bignum | 0x00000012
str_19           = bignum | 0x00000013
str_20           = bignum | 0x00000014
str_21           = bignum | 0x00000015
str_22           = bignum | 0x00000016
str_23           = bignum | 0x00000017
str_24           = bignum | 0x00000018
str_25           = bignum | 0x00000019
str_26           = bignum | 0x0000001a
str_27           = bignum | 0x0000001b
str_28           = bignum | 0x0000001c
str_29           = bignum | 0x0000001d
str_30           = bignum | 0x0000001e

you need to add the new definitions there but I dunno how
 
Please, i want make new buildings type for the world map.

the first is a gold mine (like in age of wonders  :mrgreen:)

please i need for an information.
the gold mine is based on a castle, the scene is a mine entry, a worker house and a simple wood wall with the garrison script attached to the current castles scripts.(maybe with interrior "enter to the castle" : a cavern)

my question is, how to change the income tax  for a specific castle, i want double it.
with a
(try_for_range, ":cur_castle", castles_begin, castles_end),
(eq, ":cur_castle", "castle_48"),
something like that...

I just need for infos about  the tax scripts only.

Thank you  :grin:
 
Ikaguia said:
Code:
str_3            = bignum | 0x00000003
str_4            = bignum | 0x00000004
str_5            = bignum | 0x00000005
str_6            = bignum | 0x00000006
str_7            = bignum | 0x00000007
str_8            = bignum | 0x00000008
str_9            = bignum | 0x00000009
str_10           = bignum | 0x0000000a
str_11           = bignum | 0x0000000b
str_12           = bignum | 0x0000000c
str_13           = bignum | 0x0000000d
str_14           = bignum | 0x0000000e
str_15           = bignum | 0x0000000f
str_16           = bignum | 0x00000010
str_17           = bignum | 0x00000011
str_18           = bignum | 0x00000012
str_19           = bignum | 0x00000013
str_20           = bignum | 0x00000014
str_21           = bignum | 0x00000015
str_22           = bignum | 0x00000016
str_23           = bignum | 0x00000017
str_24           = bignum | 0x00000018
str_25           = bignum | 0x00000019
str_26           = bignum | 0x0000001a
str_27           = bignum | 0x0000001b
str_28           = bignum | 0x0000001c
str_29           = bignum | 0x0000001d
str_30           = bignum | 0x0000001e

you need to add the new definitions there but I dunno how
It's an arithmetic series. AFAIK you can calculate the values up to the first agility bit, which is supposed to be bignum | 0x00000100 (256).
 
Dusk Voyager said:
Ikaguia said:
It's an arithmetic series. AFAIK you can calculate the values up to the first agility bit, which is supposed to be bignum | 0x00000100 (256).

So the next 30 would be this:

Code:
str_31           = bignum | 0x0000001f
str_32           = bignum | 0x00000020
str_33           = bignum | 0x00000021
str_34           = bignum | 0x00000022
str_35           = bignum | 0x00000023
str_36           = bignum | 0x00000024
str_37           = bignum | 0x00000025
str_38           = bignum | 0x00000026
str_39           = bignum | 0x00000027
str_40           = bignum | 0x00000028
str_41           = bignum | 0x00000029
str_42           = bignum | 0x0000002a
str_43           = bignum | 0x0000002b
str_44           = bignum | 0x0000002c
str_45           = bignum | 0x0000002d
str_46           = bignum | 0x0000002e
str_47           = bignum | 0x0000002f
str_48           = bignum | 0x00000030
str_49           = bignum | 0x00000031
str_50           = bignum | 0x00000032
str_51           = bignum | 0x00000033
str_52           = bignum | 0x00000034
str_53           = bignum | 0x00000035
str_54           = bignum | 0x00000036
str_55           = bignum | 0x00000037
str_56           = bignum | 0x00000038
str_57           = bignum | 0x00000039
str_58           = bignum | 0x0000003a
str_59           = bignum | 0x0000003b
str_60           = bignum | 0x0000003c

Correct?
 
FantasyWarrior said:
Please, i want make new buildings type for the world map.

the first is a gold mine (like in age of wonders  :mrgreen:)

please i need for an information.
the gold mine is based on a castle, the scene is a mine entry, a worker house and a simple wood wall with the garrison script attached to the current castles scripts.(maybe with interrior "enter to the castle" : a cavern)

my question is, how to change the income tax  for a specific castle, i want double it.
with a
(try_for_range, ":cur_castle", castles_begin, castles_end),
(eq, ":cur_castle", "castle_48"),
something like that...

I just need for infos about  the tax scripts only.

Thank you  :grin:

Look for "#Accumulate taxes" in module_simple_triggers.py, then find this try block:

          (assign, ":cur_rents", 0),
          (try_begin),
            (party_slot_eq, ":center_no", slot_party_type, spt_village),
            (try_begin),
              (party_slot_eq, ":center_no", slot_village_state, svs_normal),
              (assign, ":cur_rents", 1200),
            (try_end),
          (else_try),
            (party_slot_eq, ":center_no", slot_party_type, spt_castle),
            (assign, ":cur_rents", 1200),
          (else_try),
            (party_slot_eq, ":center_no", slot_party_type, spt_town),
            (assign, ":cur_rents", 2400),
          (try_end),

And add this:

          (assign, ":cur_rents", 0),
          (try_begin),

(eq, ":center_no", "p_town_6"),
#this is part of my code; it can be a castle or a city or even a village.
(assign, ":cur_rents", 4000),
#can be any number; be aware that prosperity might make it fluctuate.
          (else_try),

            (party_slot_eq, ":center_no", slot_party_type, spt_village),
            (try_begin),
              (party_slot_eq, ":center_no", slot_village_state, svs_normal),
              (assign, ":cur_rents", 1200),
            (try_end),
          (else_try),
            (party_slot_eq, ":center_no", slot_party_type, spt_castle),
            (assign, ":cur_rents", 1200),
          (else_try),
            (party_slot_eq, ":center_no", slot_party_type, spt_town),
            (assign, ":cur_rents", 2400),
          (try_end),
 
can someone help me with a presentation?

Code:
	("lwbr_menu", prsntf_manual_end_only, 0, [
		(ti_on_presentation_load, [
			(set_fixed_point_multiplier, 1000),
			(assign, "$lwbr_overlay1", 0),
			(assign, "$lwbr_overlay2", 0),
			(assign, "$lwbr_overlay3", 0),
			(assign, "$lwbr_overlay4", 0),
			(assign, "$lwbr_overlay5", 0),
			#Little Pos Helper by Kuba begin
			(create_text_overlay, "$g_little_pos_helper", "@00,00"),
				(overlay_set_color, "$g_little_pos_helper", 0xFFFFFFFF),
				(position_set_x, pos1, 10),
				(position_set_y, pos1, 700),
				(overlay_set_position, "$g_little_pos_helper", pos1),
			#Little Pos Helper by Kuba end
			(str_clear, s0),
			(create_text_overlay, "$g_presentation_obj_admin_panel_container", s0, tf_scrollable),
				(position_set_x, pos1, 59),
				(position_set_y, pos1, 50),
				(overlay_set_position, "$g_presentation_obj_admin_panel_container", pos1),
				(position_set_x, pos1, 640),
				(position_set_y, pos1, 520),
				(overlay_set_area_size, "$g_presentation_obj_admin_panel_container", pos1),
				(position_set_x, pos1, 640),
				(position_set_y, pos1, 1000),
				(overlay_set_size, "$g_presentation_obj_admin_panel_container", pos1),
			(set_container_overlay, "$g_presentation_obj_admin_panel_container"),
				(assign, ":cur_y", 850),
				(create_text_overlay, "$lwbr_overlay1", "@LWBR WarForge menu."),
					(position_set_x, pos1, 200),
					(position_set_y, pos1, ":cur_y"),
					(overlay_set_position, "$lwbr_overlay1", pos1),
					(overlay_set_color, "$lwbr_overlay1", 0xf0371e),
					#(overlay_set_size, "$lwbr_overlay1", pos2),
				(try_begin),
					(eq,"$g_server_is_native",1),
					#
					(val_sub, ":cur_y", escape_menu_item_height),
					(val_sub, ":cur_y", escape_menu_item_height),
					(position_set_y, pos1, ":cur_y"),
					(create_text_overlay, "$lwbr_overlay2","@Server is not runing LWBR WarForge."),
					(overlay_set_position, "$lwbr_overlay2", pos1),
					(overlay_set_color, "$lwbr_overlay2", 0xf0371e),
					#
					(val_sub, ":cur_y", escape_menu_item_height),
					(position_set_y, pos1, ":cur_y"),
					(create_text_overlay, reg1,"@No options available for this yet."),
					(overlay_set_position, reg1, pos1),
					(overlay_set_color, reg1, 0xFFFFFF),
					#set weather client side
				(else_try),
					#
					(val_sub, ":cur_y", escape_menu_item_height),
					(val_sub, ":cur_y", escape_menu_item_height),
					(position_set_y, pos1, ":cur_y"),
					(create_text_overlay, "$lwbr_overlay3","@Server is runing LWBR WarForge."),
						(overlay_set_position, "$lwbr_overlay3", pos1),
						(overlay_set_color, "$lwbr_overlay3", 0xf0371e),
					#
					(val_sub, ":cur_y", escape_menu_item_height),
					(position_set_y, pos1, ":cur_y"),
					(create_button_overlay, reg1, "@Set Hotkeys."),
						(overlay_set_position, reg1, pos1),
						(overlay_set_color, reg1, 0xFFFFFF),
					#
					#random stuff like custom poll and hotkeys
				(try_end),
				(try_begin),
					(eq,"$g_server_is_native",0),
					(multiplayer_get_my_player, ":player"),
					(player_is_admin, ":player"),
					#
					(val_sub, ":cur_y", escape_menu_item_height),
					(val_sub, ":cur_y", escape_menu_item_height),
					(position_set_y, pos1, ":cur_y"),
					(create_text_overlay, "$lwbr_overlay4", "@Admin options."),
						(overlay_set_position, "$lwbr_overlay4", pos1),
						(overlay_set_color, "$lwbr_overlay4", 0xf0371e),
					#
					(val_sub, ":cur_y", escape_menu_item_height),
					(position_set_y, pos1, ":cur_y"),
					(create_button_overlay, reg1, "@Admin Message."),
						(overlay_set_position, reg1, pos1),
						(overlay_set_color, reg1, 0xFFFFFF),
					#
					(val_sub, ":cur_y", escape_menu_item_height),
					(position_set_y, pos1, ":cur_y"),
					(create_text_overlay, reg1, "@Firearms Enabled."),
						(overlay_set_position,	reg1, pos1),
						(overlay_set_color,		reg1, 0xFFFFFF),
					(val_sub, ":cur_y", escape_menu_item_height / 2),
					(position_set_y, pos1, ":cur_y"),
					(create_check_box_overlay, reg1),
						(overlay_set_position, reg1, pos1),
						(overlay_set_val, reg1, "$g_lwbr_firearms_enabled"),
					#
					(val_sub, ":cur_y", escape_menu_item_height),
					(position_set_y, pos1, ":cur_y"),
					(create_text_overlay, reg1, "@Persistent Stats."),
						(overlay_set_position,	reg1, pos1),
						(overlay_set_color,		reg1, 0xFFFFFF),
					(val_sub, ":cur_y", escape_menu_item_height / 2),
					(position_set_y, pos1, ":cur_y"),
					(create_check_box_overlay, reg1),
						(overlay_set_position, reg1, pos1),
						(overlay_set_val, reg1, "$g_lwbr_persistant_stats"),
					#
					(val_sub, ":cur_y", escape_menu_item_height),
					(position_set_y, pos1, ":cur_y"),
					(create_text_overlay, reg1, "@Jumping from horse Enabled."),
						(overlay_set_position,	reg1, pos1),
						(overlay_set_color,		reg1, 0xFFFFFF),
					(val_sub, ":cur_y", escape_menu_item_height / 2),
					(position_set_y, pos1, ":cur_y"),
					(create_check_box_overlay, reg1),
						(overlay_set_position, reg1, pos1),
						(overlay_set_val, reg1, "$g_jump_from_horse"),
					#
					(val_sub, ":cur_y", escape_menu_item_height),
					(position_set_y, pos1, ":cur_y"),
					(create_text_overlay, reg1, "@Taunting Enabled."),
						(overlay_set_position,	reg1, pos1),
						(overlay_set_color,		reg1, 0xFFFFFF),
					(val_sub, ":cur_y", escape_menu_item_height / 2),
					(position_set_y, pos1, ":cur_y"),
					(create_check_box_overlay, reg1),
						(overlay_set_position, reg1, pos1),
						(overlay_set_val, reg1, "$g_taunt"),
					#
					(val_sub, ":cur_y", escape_menu_item_height),
					(position_set_y, pos1, ":cur_y"),
					(create_text_overlay, reg1, "@Cheering Enabled."),
						(overlay_set_position,	reg1, pos1),
						(overlay_set_color,		reg1, 0xFFFFFF),
					(val_sub, ":cur_y", escape_menu_item_height / 2),
					(position_set_y, pos1, ":cur_y"),
					(create_check_box_overlay, reg1),
						(overlay_set_position, reg1, pos1),
						(overlay_set_val, reg1, "$g_cheer"),
					#
					(val_sub, ":cur_y", escape_menu_item_height),
					(position_set_y, pos1, ":cur_y"),
					(create_text_overlay, reg1, "@Min Mod Version required (-1 for native)."),
						(overlay_set_position,	reg1, pos1),
						(overlay_set_color,		reg1, 0xFFFFFF),
					(val_sub, ":cur_y", escape_menu_item_height),
					(position_set_y, pos1, ":cur_y"),
					(create_number_box_overlay, reg1, -1, lwbr_mod_version),
						(overlay_set_position, reg1, pos1),
						(overlay_set_val, reg1, "$g_min_version_required"),
					#
					(val_sub, ":cur_y", escape_menu_item_height),
					(position_set_y, pos1, ":cur_y"),
					(create_text_overlay, reg1, "@Time between server Messages(min)"),
						(overlay_set_position,	reg1, pos1),
						(overlay_set_color,		reg1, 0xFFFFFF),
					(val_sub, ":cur_y", escape_menu_item_height),
					(position_set_y, pos1, ":cur_y"),
					(create_number_box_overlay, reg1, 0, 61),
						(overlay_set_position, reg1, pos1),
						(overlay_set_val, reg1, "$g_lwbr_sv_messaage_cd_min"),
					#
					(val_sub, ":cur_y", escape_menu_item_height),
					(position_set_x, pos1, 400),
					(position_set_y, pos1, ":cur_y"),
					(create_combo_button_overlay, reg1),
					(overlay_add_item,reg1,"@Only Native items"),
					(overlay_add_item,reg1,"@Native + Warforge"),
					(overlay_add_item,reg1,"@Only Peasant items"),
					(overlay_add_item,reg1,"@Only arena items"),
					(overlay_add_item,reg1,"@No items"),
					(overlay_set_position, reg1, pos1),
					(overlay_set_color, reg1, 0xFFFFFF),
					(try_begin),
						(eq,"$g_lwbr_new_items", -2),
						(overlay_set_val, reg1, 2),
					(else_try),
						(eq,"$g_lwbr_new_items", -1),
						(overlay_set_val, reg1, 4),
					(else_try),
						(eq,"$g_lwbr_new_items", 2),
						(overlay_set_val, reg1, 3),
					(else_try),
						(overlay_set_val, reg1, "$g_lwbr_new_items"),
					(try_end),
					#
					(val_sub, ":cur_y", escape_menu_item_height),
					(position_set_x, pos1, 400),
					(position_set_y, pos1, ":cur_y"),
					(create_combo_button_overlay, reg1),
					(overlay_add_item,reg1,"@Random Weather"),
					(overlay_add_item,reg1,"@Clear Sky"),
					(overlay_add_item,reg1,"@Rainy"),
					(overlay_add_item,reg1,"@Snowy"),
					(overlay_set_position, reg1, pos1),
					(overlay_set_color, reg1, 0xFFFFFF),
					(overlay_set_val, reg1, "$g_menu_rain_type"),
					#
					(val_sub, ":cur_y", escape_menu_item_height),
					(position_set_y, pos1, ":cur_y"),
					(create_combo_button_overlay, reg1),
					(overlay_add_item,reg1,"@Random Time"),
					(overlay_add_item,reg1,"@Random Time no Night"),
					(overlay_add_item,reg1,"@Dawn"),
					(overlay_add_item,reg1,"@Noon"),
					(overlay_add_item,reg1,"@Dusk"),
					(overlay_add_item,reg1,"@Midnight"),
					(overlay_set_position, reg1, pos1),
					(overlay_set_color, reg1, 0xFFFFFF),
					(overlay_set_val, reg1, "$g_menu_round_day_time"),
					#
					(val_sub, ":cur_y", escape_menu_item_height),
					(position_set_y, pos1, ":cur_y"),
					(create_combo_button_overlay, reg1),
					(overlay_add_item, reg1, "@Random Fog"),
					(overlay_add_item, reg1, "@No Fog"),
					(overlay_add_item, reg1, "@Sparse Fog"),
					(overlay_add_item, reg1, "@Thick Fog"),
					(overlay_set_position, reg1, pos1),
					(overlay_set_color, reg1, 0xFFFFFF),
					(overlay_set_val, reg1, "$g_menu_fog_distance"),
				(try_end),
				(val_sub, ":cur_y", escape_menu_item_height),
				(position_set_y, pos1, ":cur_y"),
				(create_button_overlay, "$lwbr_overlay5", "@Done."),
					(overlay_set_position, "$lwbr_overlay5", pos1),
					(overlay_set_color, "$lwbr_overlay5", 0xFFFFFF),
			(presentation_set_duration, 999999),
			]),
		(ti_on_presentation_event_state_change, [
			(store_trigger_param_1, ":overlay"),
			(store_trigger_param_2, ":value"),
			(try_begin), 
				(is_between, ":overlay", "$lwbr_overlay2", "$lwbr_overlay5"),
				(try_begin), 
					#Options for Native server
					(assign,":check", "$lwbr_overlay2"),
					(eq, ":overlay", ":check"),
					(display_message,"@This should not be displayed 1"),#text
				(else_try),
					(val_add,":check", 1),
					(eq, ":overlay", ":check"),
				#Options for LWBR WarForge server
				(else_try),
					(assign,":check", "$lwbr_overlay3"),
					(eq, ":overlay", ":check"),
					(display_message,"@This should not be displayed 2"),#text
				(else_try),
					(val_add,":check", 1),
					(eq, ":overlay", ":check"),
					(presentation_set_duration, 0),
					(start_presentation,"prsnt_lwbr_set_hotkeys"),
				#Admin options for LWBR WarForge server
				(else_try),
					(assign,":check", "$lwbr_overlay4"),
					(eq, ":overlay", ":check"),
					(display_message,"@This should not be displayed 3"),#"Admin options" text
				(else_try),
					(val_add,":check", 1),
					(eq, ":overlay", ":check"),
					(presentation_set_duration, 0),
					(start_presentation,"prsnt_lwbr_admin_chat"),#"@Admin Message." button
				(else_try),
					(val_add,":check", 1),
					(eq, ":overlay", ":check"),
					(display_message,"@This should not be displayed 4"),#"Firearms Enabled" text
				(else_try),
					(val_add,":check", 1),
					(eq, ":overlay", ":check"),
					(assign, "$g_lwbr_firearms_enabled", ":value"),#"Firearms Enabled" checkbox
					(multiplayer_send_3_int_to_server, multiplayer_event_lwbr_server, lwbr_server_set_var, lwbr_server_var_firearms_enabled, ":value"),
				(else_try),
					(val_add,":check", 1),
					(eq, ":overlay", ":check"),
					(display_message,"@This should not be displayed 5"),#"Persistent Stats" text
				(else_try),
					(val_add,":check", 1),
					(eq, ":overlay", ":check"),
					(assign, "$lwbr_g_firearms_enabled", ":value"),#"Persistent Stats" checkbox
					(multiplayer_send_3_int_to_server, multiplayer_event_lwbr_server, lwbr_server_set_var, lwbr_server_var_persistant_stats, ":value"),
				(else_try),
					(val_add,":check", 1),
					(eq, ":overlay", ":check"),
					(display_message,"@This should not be displayed 6"),#"Jumping from horse Enabled" text
				(else_try),
					(val_add,":check", 1),
					(eq, ":overlay", ":check"),
					(assign, "$g_jump_from_horse", ":value"),#"Jumping from horse Enabled" checkbox
					(multiplayer_send_3_int_to_server, multiplayer_event_lwbr_server, lwbr_server_set_var, lwbr_server_var_jump_from_horse, ":value"),
				(else_try),
					(val_add,":check", 1),
					(eq, ":overlay", ":check"),
					(display_message,"@This should not be displayed 7"),#"Taunting Enabled" text
				(else_try),
					(val_add,":check", 1),
					(eq, ":overlay", ":check"),
					(assign, "$g_taunt", ":value"),#"Taunting Enabled" checkbox
					(multiplayer_send_3_int_to_server, multiplayer_event_lwbr_server, lwbr_server_set_var, lwbr_server_var_taunt, ":value"),
				(else_try),
					(val_add,":check", 1),
					(eq, ":overlay", ":check"),
					(display_message,"@This should not be displayed 8"),#"Cheering Enabled" text
				(else_try),
					(val_add,":check", 1),
					(eq, ":overlay", ":check"),
					(assign, "$g_cheer", ":value"),#"Cheering Enabled" checkbox
					(multiplayer_send_3_int_to_server, multiplayer_event_lwbr_server, lwbr_server_set_var, lwbr_server_var_cheer, ":value"),
				(else_try),
					(val_add,":check", 1),
					(eq, ":overlay", ":check"),
					(display_message,"@This should not be displayed 9"),#"Min Version Required" text
				(else_try),
					(val_add,":check", 1),
					(eq, ":overlay", ":check"),
					(assign, "$g_min_version_required", ":value"),#"Min Version Required" numbox
					(multiplayer_send_3_int_to_server, multiplayer_event_lwbr_server, lwbr_server_set_var, lwbr_server_var_min_version_required, ":value"),
				(else_try),
					(val_add,":check", 1),
					(eq, ":overlay", ":check"),
					(display_message,"@This should not be displayed 9"),#"Time between server Messages(min)" text
				(else_try),
					(val_add,":check", 1),
					(eq, ":overlay", ":check"),
					(assign, "$g_lwbr_sv_messaage_cd_min", ":value"),#"Time between server Messages(min)" numbox
					(multiplayer_send_3_int_to_server, multiplayer_event_lwbr_server, lwbr_server_set_var, lwbr_server_var_sv_message_cd_min, ":value"),
				(else_try),
					(val_add,":check", 1),
					(eq, ":overlay", ":check"),#Items available
					(try_begin),
						(eq,":value", 0),
						(str_store_string,s1,"@DEBUG: Only Native items selected"),
						(assign,"$g_lwbr_new_items", 0),
					(else_try),
						(eq,":value", 1),
						(str_store_string,s1,"@DEBUG: Native + Warforge selected"),
						(assign,"$g_lwbr_new_items", 1),
					(else_try),
						(eq,":value", 2),
						(str_store_string,s1,"@DEBUG: Only Peasant items selected"),
						(assign,"$g_lwbr_new_items", -2),
					(else_try),
						(eq,":value", 3),
						(str_store_string,s1,"@DEBUG: Only arena items selected"),
						(assign,"$g_lwbr_new_items", 2),
					(else_try),
						(eq,":value", 4),
						(str_store_string,s1,"@DEBUG: No items selected"),
						(assign,"$g_lwbr_new_items", -1),
					(try_end),
					(multiplayer_send_3_int_to_server, multiplayer_event_lwbr_server, lwbr_server_set_var, lwbr_server_var_new_items, "$g_lwbr_new_items"),
					(try_begin),
						(eq, lwbr_debug_mode, 1),
						(display_message,"@DEBUG: Selecting Allowed Items"),
						(display_message,s1),
					(try_end),
				(else_try),
					(val_add,":check", 1),
					(eq, ":overlay", ":check"),#Weather
					(try_begin),
						(eq,":value", 0),
						(str_store_string,s1,"@DEBUG: Random Weather selected"),
					(else_try),
						(eq,":value", 1),
						(str_store_string,s1,"@DEBUG: Clear Sky selected"),
					(else_try),
						(eq,":value", 2),
						(str_store_string,s1,"@DEBUG: Rainy selected"),
					(else_try),
						(eq,":value", 3),
						(str_store_string,s1,"@DEBUG: Snowy selected"),
					(try_end),
					(assign, "$g_menu_rain_type", ":value"),
					(multiplayer_send_3_int_to_server, multiplayer_event_lwbr_server, lwbr_server_set_var, lwbr_server_var_menu_rain_type, ":value"),
					(try_begin),
						(eq, lwbr_debug_mode, 1),
						(display_message,"@DEBUG: Selecting Weather"),
						(display_message,s1),
					(try_end),
				(else_try),
					(val_add,":check", 1),
					(eq, ":overlay", ":check"),#Time
					(try_begin),
						(eq,":value", 0),
						(str_store_string,s1,"@DEBUG: Random Time selected"),
					(else_try),
						(eq,":value", 1),
						(str_store_string,s1,"@DEBUG: Random Time no Night selected"),
					(else_try),
						(eq,":value", 2),
						(str_store_string,s1,"@DEBUG: Dawn selected"),
					(else_try),
						(eq,":value", 3),
						(str_store_string,s1,"@DEBUG: Noon selected"),
					(else_try),
						(eq,":value", 4),
						(str_store_string,s1,"@DEBUG: Dusk selected"),
					(else_try),
						(eq,":value", 5),
						(str_store_string,s1,"@DEBUG: Midnight selected"),
					(try_end),
					(assign, "$g_menu_round_day_time", ":value"),
					(multiplayer_send_3_int_to_server, multiplayer_event_lwbr_server, lwbr_server_set_var, lwbr_server_var_menu_day_time, ":value"),
					(try_begin),
						(eq, lwbr_debug_mode, 1),
						(display_message,"@DEBUG: Selecting Time"),
						(display_message,s1),
					(try_end),
				(else_try),
					(val_add,":check", 1),
					(eq, ":overlay", ":check"),#Fog
					(try_begin),
						(eq,":value", 0),
						(str_store_string,s1,"@DEBUG: Random Fog selected"),
					(else_try),
						(eq,":value", 1),
						(str_store_string,s1,"@DEBUG: No Fog selected"),
					(else_try),
						(eq,":value", 2),
						(str_store_string,s1,"@DEBUG: Sparse Fog selected"),
					(else_try),
						(eq,":value", 3),
						(str_store_string,s1,"@DEBUG: Thick Fog selected"),
					(try_end),
					(assign, "$g_menu_fog_distance", ":value"),
					(multiplayer_send_3_int_to_server, multiplayer_event_lwbr_server, lwbr_server_set_var, lwbr_server_var_menu_fog_dist, ":value"),
					(try_begin),
						(eq, lwbr_debug_mode, 1),
						(display_message,"@DEBUG: Selecting Fog"),
						(display_message,s1),
					(try_end),
				(try_end),
			(else_try),
				(eq, ":overlay", "$lwbr_overlay5"),
				(presentation_set_duration, 0),
			(try_end),
			]),
		(ti_on_presentation_run,[
			(set_fixed_point_multiplier, 1000),
			(store_trigger_param_1, ":cur_time"),
			(try_begin),
				(this_or_next|key_clicked, key_escape),
				(key_clicked, key_xbox_start),
				(gt, ":cur_time", 200),
				(presentation_set_duration, 0),
			(try_end),
			#Little Pos Helper by Kuba begin
			(mouse_get_position, pos1),
			(position_get_x, reg1, pos1),
			(position_get_y, reg2, pos1),
			(overlay_set_text, "$g_little_pos_helper", "@{reg1},{reg2}"),
			#Little Pos Helper by Kuba end
			]),
		]),
when I log in without being an admin, it works fine, everything shows up properly:
C378D898F04409E0A000815188722C0FC9832E9E
however, when I log in as admin, all the overlays are moved downwards by quite a lot:
A98BE288BD41A27EC8BCD0AAD0D390637CC774D6


also, none of my create_check_box_overlay are working either, they simply don't show up  I just found out I needed
Code:
, "mesh_checkbox_off", "mesh_checkbox_on"
at the end, so this is fixed
 
Status
Not open for further replies.
Back
Top Bottom