Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Hi guys, I'm having a wee problem with switching some locations to new map icons (certain villages, towns and castles). When I start a game the parties that use them are gone completely, no names, flags or icons.

I created the entries at the end of module_map_icons:
Code:
  ("bandit_lair",mcn_no_shadow,"map_bandit_lair", 0.45, 0),
  ("pictish_keep",mcn_no_shadow,"pictish_keep", 0.55,0), 
  ("lake_fort",mcn_no_shadow,"lake_fort", 0.60,0), 
  ("kolba_village",mcn_no_shadow,"kolba_village", 0.50,0), 
  ("stone_fort",mcn_no_shadow,"stone_fort", 0.6,0), 
  ("roman_fort",mcn_no_shadow,"roman_fort", 0.25,0),
  ("trench_fort",mcn_no_shadow,"trench_fort", 0.6,0), 
  ("square_fort",mcn_no_shadow,"square_fort", 0.25,0),
]

Compiled it so the entries were added to ID_map_icons:
Code:
icon_bandit_lair = 281
icon_pictish_keep = 282
icon_lake_fort = 283
icon_kolba_village = 284
icon_stone_fort = 285
icon_roman_fort = 286
icon_trench_fort = 287
icon_square_fort = 288

Changed the entries in module parties:
Code:
("town_9","Caer_Went",   icon_roman_fort|pf_town, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-12.89,113.50),[],90),
etc

If I place the new entries in module_map_icons  earlier in the file (rather than at the very end) then they show up fine in game as intended, but other icons/banners are switched around. Can't seem to figure it out!

 
Try placing all flags at the end of the map icons file, so all icons that you use for parties and party templates are within the first 256. Restriction of 256 map icons is related to module system and txt-file format, not necessarily to engine and savegame files.
 
Anyone who's familiar with openBRF and texturing who can help me out? Would really be appreciated.

So, I have two things I need help with here. First things first, I exported a model, using openBRF, as I need to re-scale it and create multiple versions of said model. Although, I'd love to keep the same texture. Did the texture export with the model, or is there some way to export it seperately, so I can add it to the model again?

Second thing, does anyone know a good place to find textures? I need some nice stonebrick textures for a model I've made, but all I can find are textures that are either too small, or need to be paid for.

Sorry to bother people this close to christmas.
 
Reus said:
So, I have two things I need help with here. First things first, I exported a model, using openBRF, as I need to re-scale it and create multiple versions of said model. Although, I'd love to keep the same texture. Did the texture export with the model, or is there some way to export it seperately, so I can add it to the model again?
Exported model retains it's uv-mapping. So if you modify it, re-import and assign it's previous material, everything should be fine for as long as you don't do any heavy editing of the mesh itself (scaling and stretching should be fine).

Note that for uniform scaling it's easier to scale the model directly in openBrf.
 
Lav said:
Exported model retains it's uv-mapping. So if you modify it, re-import and assign it's previous material, everything should be fine for as long as you don't do any heavy editing of the mesh itself (scaling and stretching should be fine).

Note that for uniform scaling it's easier to scale the model directly in openBrf.
So the texture scales with the model?
 
So I just made a scene (yay me), but I seem to have a problem when I pull it from the multiplayer maps to a town map: there is no sound made by actors. Like I can hear music and ambient town stuff, but no sword swings, bow and arrow, shouting, etc. Where did I go wrong?
 
Ikaguia said:
also, another thing that is bugging me out, for some reason, only the first button after the player names is clickable, I can't click on any of the others after it:
Code:
		(ti_on_presentation_load,[
			(set_fixed_point_multiplier, 1000),

			(create_mesh_overlay, reg0, "mesh_mp_ingame_menu"),
			(position_set_x, pos1, 250),
			(position_set_y, pos1, 80),
			(overlay_set_position, reg0, pos1),
			(position_set_x, pos1, 1000),
			(position_set_y, pos1, 1000),
			(overlay_set_size, reg0, pos1),

			(str_clear, s0),
			(create_text_overlay, "$g_presentation_obj_show_players_1", s0, tf_scrollable_style_2),
			(position_set_x, pos1, 285),
			(position_set_y, pos1, 125),
			(overlay_set_position, "$g_presentation_obj_show_players_1", pos1),
			(position_set_x, pos1, 405),
			(position_set_y, pos1, 500),
			(overlay_set_area_size, "$g_presentation_obj_show_players_1", pos1),
			(set_container_overlay, "$g_presentation_obj_show_players_1"),

			#(assign, ":cur_y", 450),
			(multiplayer_get_my_player, ":my_player_no"),

			(assign, ":cur_y", 10),
			(get_max_players, ":num_players"),
			(try_for_range, ":player_no", 1, ":num_players"), #0 is server no need to write it
				(player_is_active, ":player_no"),

				(assign, ":continue", 0),
				(try_begin),
					(neq, "$g_multiplayer_players_list_action_type", 5),
					(neq, "$g_multiplayer_players_list_action_type", 6),
					(assign, ":continue", 1),
				(else_try),
					(eq, "$g_multiplayer_players_list_action_type", 5),
					(neq, ":player_no", ":my_player_no"),
					(player_get_is_muted, ":is_muted", ":player_no"),
					(eq, ":is_muted", 0),
					(assign, ":continue", 1),
				(else_try),
					(eq, "$g_multiplayer_players_list_action_type", 6),
					(neq, ":player_no", ":my_player_no"),
					(player_get_is_muted, ":is_muted", ":player_no"),
					(eq, ":is_muted", 1),
					(assign, ":continue", 1),
				(try_end),
				(eq, ":continue", 1),

				(val_add, ":cur_y", escape_menu_item_height),
			(try_end),

			(create_text_overlay, reg0, "str_choose_a_player", 0),
			(overlay_set_color, reg0, 0xFFFFFF),
			(position_set_x, pos1, 0),
			(position_set_y, pos1, ":cur_y"),
			(overlay_set_position, reg0, pos1),
			(val_sub, ":cur_y", escape_menu_item_height),

			(get_max_players, ":num_players"),
			(try_for_range, ":player_no", 1, ":num_players"), #0 is server no need to write it
				(player_is_active, ":player_no"),
				(player_set_slot, ":player_no", slot_player_button_index, -1),

				(assign, ":continue", 0),
				(try_begin),
					(neq, "$g_multiplayer_players_list_action_type", 5),
					(neq, "$g_multiplayer_players_list_action_type", 6),
					(assign, ":continue", 1),
				(else_try),
					(eq, "$g_multiplayer_players_list_action_type", 5),
					(neq, ":player_no", ":my_player_no"),
					(player_get_is_muted, ":is_muted", ":player_no"),
					(eq, ":is_muted", 0),
					(assign, ":continue", 1),
				(else_try),
					(eq, "$g_multiplayer_players_list_action_type", 6),
					(neq, ":player_no", ":my_player_no"),
					(player_get_is_muted, ":is_muted", ":player_no"),
					(eq, ":is_muted", 1),
					(assign, ":continue", 1),
				(try_end),
				##LWBR
				(try_begin),#Can't use admin cheats on other admins
					(is_between, "$g_multiplayer_players_list_action_type", lwbr_player_list__last, lwbr_player_list__slay + 1),
					(multiplayer_get_my_player, ":my_player_no"),
					(neq, ":player_no", ":my_player_no"),
					(player_is_admin, ":player_no"),
					(assign, ":continue", 0),
				(try_end),
				(try_begin),#you can give gold or heal another admin as you wish
					(this_or_next|eq, "$g_multiplayer_players_list_action_type", lwbr_player_list__heal),
					(eq, "$g_multiplayer_players_list_action_type", lwbr_player_list__last, lwbr_player_list__gold),
					(this_or_next|eq, "$g_multiplayer_players_list_action_type", lwbr_player_list__heal),
					(gt, "$g_lwbr_give_gold", 0),#can't remove gold from other admins
					(assign, ":continue", 1),
				(try_end),
				(try_begin),#These cheats do not work on spectators
					(this_or_next|eq, "$g_multiplayer_players_list_action_type", lwbr_player_list__swap_team),
					(eq, "$g_multiplayer_players_list_action_type", lwbr_player_list__spec),
					(player_get_team_no, ":team", ":player_no"),
					(eq, ":team", 2),
					(assign, ":continue", 0),
				(try_end),
				(try_begin),#These cheats require a living valid agent
					(this_or_next|eq, "$g_multiplayer_players_list_action_type", lwbr_player_list__slay),
					(this_or_next|eq, "$g_multiplayer_players_list_action_type", lwbr_player_list__freeze),
					(this_or_next|eq, "$g_multiplayer_players_list_action_type", lwbr_player_list__heal),
					(this_or_next|eq, "$g_multiplayer_players_list_action_type", lwbr_player_list__invul),
					(this_or_next|eq, "$g_multiplayer_players_list_action_type", lwbr_player_list__freeze),
					(this_or_next|eq, "$g_multiplayer_players_list_action_type", lwbr_player_list__tp_player_to),#can't tp bodies
					(eq, "$g_multiplayer_players_list_action_type", lwbr_player_list__fadeout),
					(player_get_agent_id, ":agent", ":player_no"),
					(try_begin),
						(neg|agent_is_active, ":agent"),
						(assign, ":continue", 0),
					(try_end),
					(try_begin),
						(agent_is_active, ":agent"),
						(neg|agent_is_alive, ":agent"),
						(assign, ":continue", 0),
					(try_end),
				(try_end),
				(try_begin),#These cheats require a dead valid agent
					#(this_or_next|eq, "$g_multiplayer_players_list_action_type", lwbr_player_list__),
					(eq, "$g_multiplayer_players_list_action_type", lwbr_player_list__respawn),
					(player_get_agent_id, ":agent", ":player_no"),
					(try_begin),
						(neg|agent_is_active, ":agent"),
						(assign, ":continue", 0),
					(try_end),
					(try_begin),
						(agent_is_active, ":agent"),
						(agent_is_alive, ":agent"),
						(assign, ":continue", 0),
					(try_end),
				(try_end),
				(try_begin),#These cheats require a valid agent
					#(this_or_next|eq, "$g_multiplayer_players_list_action_type", lwbr_player_list__),
					(eq, "$g_multiplayer_players_list_action_type", lwbr_player_list__tp_to_player),#you can tp to the bodies
					(player_get_agent_id, ":agent", ":player_no"),
					(try_begin),
						(neg|agent_is_active, ":agent"),
						(assign, ":continue", 0),
					(try_end),
				(try_end),
				##LWBR
				(eq, ":continue", 1),
				(str_store_player_username, s0, ":player_no"),
				(create_button_overlay, ":overlay_id", s0, 0),
				(overlay_set_color, ":overlay_id", 0xFFFFFF),
				(position_set_x, pos1, 130),
				(position_set_y, pos1, ":cur_y"),
				(overlay_set_position, ":overlay_id", pos1),
				(val_sub, ":cur_y", escape_menu_item_height),
				(player_set_slot, ":player_no", slot_player_button_index, ":overlay_id"),
			(try_end),
			##LWBR
			(assign, "$lwbr_overlay1", -1),
			(assign, "$lwbr_overlay2", -1),
			(assign, "$lwbr_overlay3", -1),
			(assign, "$lwbr_overlay4", -1),
			(assign, "$lwbr_overlay5", -1),
			(try_begin),
				(eq, "$g_multiplayer_players_list_action_type", lwbr_player_list__tp_to_player),
				(create_game_button_overlay, "$lwbr_overlay2", "@Team 1 Spawn", 0),
				(overlay_set_color, "$lwbr_overlay2", 0xFFFFFF),
				(position_set_x, pos1, 130),
				(position_set_y, pos1, ":cur_y"),
				(overlay_set_position, "$lwbr_overlay2", pos1),
				(val_sub, ":cur_y", escape_menu_item_height),
				(create_game_button_overlay, "$lwbr_overlay3", "@Team 2 Spawn", 0),
				(overlay_set_color, "$lwbr_overlay3", 0xFFFFFF),
				(position_set_x, pos1, 130),
				(position_set_y, pos1, ":cur_y"),
				(overlay_set_position, "$lwbr_overlay3", pos1),
				(val_sub, ":cur_y", escape_menu_item_height),
			(try_end),
			(try_begin),
				(neq, "$g_multiplayer_players_list_action_type", lwbr_player_list__tp_to_player),
				#
				(create_game_button_overlay, "$lwbr_overlay1", "@All players", 0),
				(overlay_set_color, "$lwbr_overlay1", 0xFFFFFF),
				(position_set_x, pos1, 130),
				(position_set_y, pos1, ":cur_y"),
				(overlay_set_position, "$lwbr_overlay1", pos1),
				(val_sub, ":cur_y", escape_menu_item_height),
				#
				(create_game_button_overlay, "$lwbr_overlay4", "@Team 1", 0),
				(overlay_set_color, "$lwbr_overlay4", 0xFFFFFF),
				(position_set_x, pos1, 130),
				(position_set_y, pos1, ":cur_y"),
				(overlay_set_position, "$lwbr_overlay4", pos1),
				(val_sub, ":cur_y", escape_menu_item_height),
				#
				(create_game_button_overlay, "$lwbr_overlay5", "@Team 2", 0),
				(overlay_set_color, "$lwbr_overlay5", 0xFFFFFF),
				(position_set_x, pos1, 130),
				(position_set_y, pos1, ":cur_y"),
				(overlay_set_position, "$lwbr_overlay5", pos1),
				(val_sub, ":cur_y", escape_menu_item_height),
			(try_end),
			##LWBR

			(presentation_set_duration, 999999),
			]),
the buttons I can click are "team 1 spawn" or "all players" but I can never click on "team 2 spawn" or "team 1" or "team 2"

does anyone have any idea at what could be causing this? It looks like there is some invisible presentation blocking the way so I can't click in the lower buttons.
 
Hello everyone! I got a problem that may or may not be complicated.

I wanted to replace a skybox texture with another. Unfortunately, it appears as stretched (vertically) ingame. What do I need to do to fix this? Do I have to edit skyboxes.brf? And if so, in what way?

Appreciate any help, thanks in advance.
 
I am having problems loading my texture on a sword texture, It isn't showing up correctly on open brf, I'm using 3Ds max 2015 and I have the texture and everything it's just not properly lined up on the model...

Please help I spent my whole day trying to get this damn thing to work!

:evil:
 
Ikaguia said:
does anyone have any idea at what could be causing this? It looks like there is some invisible presentation blocking the way so I can't click in the lower buttons.
Add debug messages to check coordinates of the buttons you're placing - do they fit into the container overlay area, or are their y-coordinates in the negatives?
 
hi
i have a question about troop.py

this is a part of script of mine

["militia_cavalry","militia_cavalry","militia_cavalry",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_gloves|tf_guarantee_helmet|tf_guarantee_horse|tf_guarantee_shield,0,0,fac_kingdom_8,

and im wondering whether this works  ->["militia_cavalry","militia_cavalry","militia_cavalry",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_gloves|tf_guarantee_helmet|tf_guarantee_horse|tf_guarantee_shield,0,0,fac_kingdom_7|fac_kingdom_8,

i mean this one fac_kingdom_7|fac_kingdom_8,
i hope this troop have 2 nationality(without reducing morale for player)
is it possible.?
 
Troops only have one faction, you cannot assign two in module_troops.py.

That said, it's perfectly possible to do what you want by tweaking script "game_get_morale_of_troops_from_faction".
 
Lav said:
Troops only have one faction, you cannot assign two in module_troops.py.

That said, it's perfectly possible to do what you want by tweaking script "game_get_morale_of_troops_from_faction".

oh thank u very much
 
dlwnsdn4 said:
hi
i have a question about troop.py

this is a part of script of mine

["militia_cavalry","militia_cavalry","militia_cavalry",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_gloves|tf_guarantee_helmet|tf_guarantee_horse|tf_guarantee_shield,0,0,fac_kingdom_8,

and im wondering whether this works  ->["militia_cavalry","militia_cavalry","militia_cavalry",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_gloves|tf_guarantee_helmet|tf_guarantee_horse|tf_guarantee_shield,0,0,fac_kingdom_7|fac_kingdom_8,

i mean this one fac_kingdom_7|fac_kingdom_8,
i hope this troop have 2 nationality(without reducing morale for player)
is it possible.?

You can't do that, but you can make the exact same troop twice, each one for one of those factions.
 
Status
Not open for further replies.
Back
Top Bottom