Sinisterius
Can anyone tell me what is the name of the main menu sound file?
Oh, crap, I guess I shouldn't be digging for answers when I'm tired. No, I don't have Thorgrim's map editor, is there a way to get the location codes without it?GetAssista said:You sure you tried map editor? Thorgrim's oneHannibalTheCannibal said:I tried both of these (yes cheat mode is enabled as is cheatmenu and edit mode) and neither worked.
("encounter_attack",
[
(eq, "$encountered_party_friendly", 0),
(neg|troop_is_wounded, "trp_player"),
],
"Charge the enemy.",
[
(assign, "$g_battle_result", 0),
(assign, "$g_engaged_enemy", 1),
(party_get_template_id, ":encountered_party_template", "$g_encountered_party"),
(try_begin),
(eq, ":encountered_party_template", "pt_village_farmers"),
(unlock_achievement, ACHIEVEMENT_HELP_HELP_IM_BEING_REPRESSED),
(try_end),
(call_script, "script_calculate_renown_value"),
(call_script, "script_calculate_battle_advantage"),
(set_battle_advantage, reg0),
(set_party_battle_mode),
(try_begin),
(eq, "$g_encounter_type", enctype_fighting_against_village_raid),
(assign, "$g_village_raid_evil", 0),
(set_jump_mission,"mt_village_raid"),
(party_get_slot, ":scene_to_use", "$g_encounter_is_in_village", slot_castle_exterior),
(jump_to_scene, ":scene_to_use"),
(else_try),
(eq, "$g_encounter_type", enctype_catched_during_village_raid),
(assign, "$g_village_raid_evil", 0),
(set_jump_mission,"mt_village_raid"),
(party_get_slot, ":scene_to_use", "$g_encounter_is_in_village", slot_castle_exterior),
(jump_to_scene, ":scene_to_use"),
(else_try),
(set_jump_mission,"mt_lead_charge"),
(call_script, "script_setup_random_scene"),
(try_end),
(assign, "$g_next_menu", "mnu_simple_encounter"),
(jump_to_menu, "mnu_battle_debrief"),
(change_screen_mission),
]),
("encounter_attack_2",
[
(eq, "$encountered_party_friendly", 0),
(neg|troop_is_wounded, "trp_player"),
(neq, "$g_encounter_type", enctype_fighting_against_village_raid),
(neq, "$g_encounter_type", enctype_catched_during_village_raid),
],
"TEST.",
[
(assign, "$g_battle_result", 0),
(assign, "$g_engaged_enemy", 1),
(assign, "$g_next_menu", "mnu_simple_encounter"),
(start_presentation, "prsnt_prebattle_orders"),
]),
("prebattle",0, mesh_load_window,[
(ti_on_presentation_load,
(position_set_y, pos1, 700),
(create_text_overlay, reg1, "@TESTING...", tf_center_justify|tf_single_line|tf_with_outline),
(overlay_set_color, reg1, 0xFFAAAAAA),
(position_set_x, pos1, 270),
(overlay_set_position, reg1, pos1),
(presentation_set_duration, 999999),
]),
(ti_on_presentation_run,
[
(try_begin),
(this_or_next|key_clicked, key_space),
(this_or_next|key_clicked, key_enter),
(key_clicked, key_left_mouse_button),
(presentation_set_duration, 0),
(call_script, "script_calculate_renown_value"),
(call_script, "script_calculate_battle_advantage"),
(set_battle_advantage, reg0),
(set_party_battle_mode),
(set_jump_mission,"mt_lead_charge"),
(jump_to_menu, "mnu_battle_debrief"),
(call_script, "script_setup_random_scene"),
(change_screen_mission),
(else_try),
(this_or_next|key_clicked, key_escape),
(this_or_next|key_clicked, key_back_space),
(key_clicked, key_right_mouse_button),
(jump_to_menu, "$g_next_menu"),
(presentation_set_duration, 0),
(try_end),
]),
]),
check_damage_self = (ti_on_scene_prop_use,
[
(store_trigger_param_1, ":agent_id"),
(multiplayer_is_server),
(agent_get_player_id,":player_no",":agent_id"),
(try_begin),
(player_get_team_no, ":team", ":player_no"),
(team_get_faction, ":faction_no", ":team" ),
(eq, ":faction_no", "fac_kingdom_1"),
(try_begin),
(player_is_active, ":player_no"),
(store_agent_hit_points, ":player_hp", ":agent_id", 1),
(val_sub, ":player_hp", 10), #hp to subtract
(agent_set_hit_points, ":agent_id", ":player_hp", 1),
(display_message, "@You were damaged!"),
(try_end),
(try_end),
])
No problem. Next time indent your code. In addition, since none of the code should fail above the faction check with a valid player, put the try_begin statement above that. player_is_active should be directly after agent_get_player_id, so you don't need the additional try_begin/end statement.Grendal-777 said:Finally got a working code on my faction specific prop problem, thank you Somebody for your help!
Caba`drin said:But, of course I am back with another question that I've been beating my head against a wall about for a good number of hours.
I am trying to add a presentation to fire prior to a field battle that is triggered by the selection of one of the options from the menu that comes up from the party encounter...once finished with the presentation, the player would begin the battle/mission as before.
(else_try),
(eq, "$g_battle_result", 0),
(str_store_string, s11, "@You have retreated from the fight."),
(try_end),
And your code being ...?Turanien said:Hail! I am struggling to set the fog colour correctly with this parameter:
(set_fog_distance, <distance_in_meters>, [fog_color]),
GetAssista said:And your code being ...?Turanien said:Hail! I am struggling to set the fog colour correctly with this parameter:
(set_fog_distance, <distance_in_meters>, [fog_color]),
Fog works great here, both in MB and WB.
(ti_before_mission_start, 5, 0, [],
[
#(assign,reg1,"$g_daytime"),
#(display_message,"@client time is: {reg1}"),
#(scene_set_day_time, "$g_daytime"),
(store_current_scene,":current_scene"),
(try_begin),
(eq,":current_scene","scn_dnieper"),
(set_fog_distance,1),
(set_rain,2,100),
(assign,"$g_time_of_day",1),
(else_try),
....
1) you did not put color.Turanien said:(set_fog_distance,1),
GetAssista said:1) you did not put color.Turanien said:(set_fog_distance,1),
2) it does not work from ti_before_mission_start AFAIR, it works right inside mission, dynamically.
In fact, it's pretty convenient in scenebuilding to make a set of invis scene props that generate specific fog in their ti_on_scene_prop_init trigger. Then just place needed prop in edit mode and fog is there instantly, so you can choose which one is better
Somebody said:Caba`drin said:But, of course I am back with another question that I've been beating my head against a wall about for a good number of hours.
I am trying to add a presentation to fire prior to a field battle that is triggered by the selection of one of the options from the menu that comes up from the party encounter...once finished with the presentation, the player would begin the battle/mission as before.
Does this show up when you "retreat"? If so, you've messed up some variables when returning to the menu. Try (assign, "$g_engaged_enemy", 0), if you cancel the presentation - which might make the game think it's a new encounter or something.
Code:(else_try), (eq, "$g_battle_result", 0), (str_store_string, s11, "@You have retreated from the fight."), (try_end),
Sinisterius said:Can anyone tell me what is the name of the main menu sound file?
Sinisterius said:Sinisterius said:Can anyone tell me what is the name of the main menu sound file?