Jinnai
Sergeant at Arms
So I got bored a couple weeks ago and wrote some code which has been immensely helpful in testing mission triggers and troop or item changes, so I thought I would share with everyone.
What this code does is let you create customizable sparring matches. When you go to a town and talk to the arena master there will be a new option to spar with your troops. You then get to select how many teams will be fighting (2 to 4) and you are assigned to the first team. Then you get to choose which troops from your party will fill out the rest of each team with up to 8 people per team. Once you've selected it all you get thrown into the arena and the battle commences. No damage is permanent and everyone has their standard gear. If the player is knocked out, the battle does not end, that way you can watch how the battle goes between the remaining troops. Hit tab to end the scene.
The code segments below are in two colors. The black text is what should already exist in your file, and will help people who don't fully understand the module system to place the new code correctly. The blue text is what to add.
module_mission_templates.py:
module_dialogs.py: (Yeah I could have done some of this in a loop, but I didn't so people would be able to see what's going on easier)
module_particle_systems.py:
I think those are the only three files you need to edit, but it's been a while since I wrote this. Let me know if it works or if I left something out and I'll fix it. And if I'm in a good mood later I'll even share the code I use to let the player move the camera around after death to watch the fight from a better view.
EDIT: I added little flame clouds above the heads of all combatants. The colors depict what team they're on. The player is always red, but feel free to play around with the team colors in the particle system thingy.
What this code does is let you create customizable sparring matches. When you go to a town and talk to the arena master there will be a new option to spar with your troops. You then get to select how many teams will be fighting (2 to 4) and you are assigned to the first team. Then you get to choose which troops from your party will fill out the rest of each team with up to 8 people per team. Once you've selected it all you get thrown into the arena and the battle commences. No damage is permanent and everyone has their standard gear. If the player is knocked out, the battle does not end, that way you can watch how the battle goes between the remaining troops. Hit tab to end the scene.
The code segments below are in two colors. The black text is what should already exist in your file, and will help people who don't fully understand the module system to place the new code correctly. The blue text is what to add.
module_mission_templates.py:
tournament_triggers
),
## Created a new template for sparring, just for simplicity - Jinnai
("arena_spar_fight",mtf_arena_fight,-1,
"You enter a sparring match in the arena.",
[
(0,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]),
(1,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]),
(2,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]),
(3,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]),
(4,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]),
(5,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]),
(6,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]),
(7,mtef_visitor_source|mtef_team_0,0,aif_start_alarmed,1,[]),
(8,mtef_visitor_source|mtef_team_1,0,aif_start_alarmed,1,[]),
(9,mtef_visitor_source|mtef_team_1,0,aif_start_alarmed,1,[]),
(10,mtef_visitor_source|mtef_team_1,0,aif_start_alarmed,1,[]),
(11,mtef_visitor_source|mtef_team_1,0,aif_start_alarmed,1,[]),
(12,mtef_visitor_source|mtef_team_1,0,aif_start_alarmed,1,[]),
(13,mtef_visitor_source|mtef_team_1,0,aif_start_alarmed,1,[]),
(14,mtef_visitor_source|mtef_team_1,0,aif_start_alarmed,1,[]),
(15,mtef_visitor_source|mtef_team_1,0,aif_start_alarmed,1,[]),
(16,mtef_visitor_source|mtef_team_2,0,aif_start_alarmed,1,[]),
(17,mtef_visitor_source|mtef_team_2,0,aif_start_alarmed,1,[]),
(18,mtef_visitor_source|mtef_team_2,0,aif_start_alarmed,1,[]),
(19,mtef_visitor_source|mtef_team_2,0,aif_start_alarmed,1,[]),
(20,mtef_visitor_source|mtef_team_2,0,aif_start_alarmed,1,[]),
(21,mtef_visitor_source|mtef_team_2,0,aif_start_alarmed,1,[]),
(22,mtef_visitor_source|mtef_team_2,0,aif_start_alarmed,1,[]),
(23,mtef_visitor_source|mtef_team_2,0,aif_start_alarmed,1,[]),
(24,mtef_visitor_source|mtef_team_3,0,aif_start_alarmed,1,[]),
(25,mtef_visitor_source|mtef_team_3,0,aif_start_alarmed,1,[]),
(26,mtef_visitor_source|mtef_team_3,0,aif_start_alarmed,1,[]),
(27,mtef_visitor_source|mtef_team_3,0,aif_start_alarmed,1,[]),
(28,mtef_visitor_source|mtef_team_3,0,aif_start_alarmed,1,[]),
(29,mtef_visitor_source|mtef_team_3,0,aif_start_alarmed,1,[]),
(30,mtef_visitor_source|mtef_team_3,0,aif_start_alarmed,1,[]),
(31,mtef_visitor_source|mtef_team_3,0,aif_start_alarmed,1,[]),
(50, mtef_scene_source,af_override_horse|af_override_weapons|af_override_head,0,1,[]),
(52, mtef_scene_source,af_override_horse,0,1,[]),
(53, mtef_scene_source,af_override_horse,0,1,[]),
(54, mtef_scene_source,af_override_horse,0,1,[]),
(55, mtef_scene_source,af_override_horse,0,1,[]),
],
[
(ti_before_mission_start, 0, 0, [], [(call_script, "script_change_banners_and_chest")]),
(ti_inventory_key_pressed, 0, 0, [(display_message,"str_cant_use_inventory_arena")], []),
(ti_tab_pressed, 0, 0, [],
[(question_box,"@End the sparring match?")]),
(ti_question_answered, 0, 0, [],
[(store_trigger_param_1,":answer"),
(eq,":answer",0),
(assign, "$g_mt_mode", abm_visit),
(set_jump_mission, "mt_arena_melee_fight"),
(party_get_slot, ":arena_scene", "$current_town", slot_town_arena),
(modify_visitors_at_site, ":arena_scene"),
(reset_visitors),
(set_visitor, 35, "trp_veteran_fighter"),
(set_visitor, 36, "trp_hired_blade"),
(set_jump_entry, 50),
(jump_to_scene, ":arena_scene"),
]),
(0, 0, ti_once, [],
[(play_sound, "snd_arena_ambiance", sf_looping),
(call_script, "script_music_set_situation_with_culture", mtf_sit_arena),
]),
(0.1, 0, 0, [],
[
(try_for_agents,":agent"),
(agent_is_alive,":agent"),
(agent_is_human,":agent"),
(agent_get_position,pos1,":agent"),
(position_set_z_to_ground_level, pos1),
(agent_get_horse,":horse",":agent"),
(try_begin),
(gt,":horse",0),
(position_move_z,pos1,300),
(else_try),
(position_move_z,pos1,225),
(try_end),
(agent_get_team, ":team", ":agent"),
(try_begin),
(eq,":team",0),
(particle_system_burst,"psys_team_0",pos1,30),
(else_try),
(eq,":team",1),
(particle_system_burst,"psys_team_1",pos1,30),
(else_try),
(eq,":team",2),
(particle_system_burst,"psys_team_2",pos1,30),
(else_try),
(eq,":team",3),
(particle_system_burst,"psys_team_3",pos1,30),
(try_end),
(try_end),
]),
(1, 4, ti_once, [(num_active_teams_le, 1)],
[
(try_begin),
(neg|main_hero_fallen),
(call_script, "script_play_victorious_sound"),
(try_end),
(assign, "$g_mt_mode", abm_visit),
(set_jump_mission, "mt_arena_melee_fight"),
(party_get_slot, ":arena_scene", "$current_town", slot_town_arena),
(modify_visitors_at_site, ":arena_scene"),
(reset_visitors),
(set_visitor, 35, "trp_veteran_fighter"),
(set_visitor, 36, "trp_hired_blade"),
(set_jump_entry, 50),
(jump_to_scene, ":arena_scene"),
]),
],
),
(
"arena_challenge_fight",mtf_arena_fight|mtf_commit_casualties,-1,
"You enter a melee fight in the arena.",
[
(56, mtef_visitor_source|mtef_team_0, 0, aif_start_alarmed, 1, []),
(58, mtef_visitor_source|mtef_team_2, 0, aif_start_alarmed, 1, []),
module_dialogs.py: (Yeah I could have done some of this in a loop, but I didn't so people would be able to see what's going on easier)
[anyone|plyr,"arena_master_talk", [], "About the melee fights...", "arena_master_melee_pretalk",[]],
[anyone|plyr,"arena_master_talk", [(party_get_num_companions,":troops","p_main_party"),(gt,":troops",1)], "I would like to spar with some of my men.", "arena_master_spar_teams",[]], # Jinnai
[anyone|plyr,"arena_master_talk", [(eq, "$arena_tournaments_asked", 0)], "Will there be a tournament in nearby towns soon?", "arena_master_ask_tournaments",[(assign, "$arena_tournaments_asked", 1)]],
[anyone|plyr,"arena_master_talk", [], "I need to leave now. Good bye.", "close_window",[]],
## Arena sparring begin - Jinnai
[anyone,"arena_master_spar_teams", [], "Certainly. The arena is currently available. Of course, you will have to supply your own gear, which means there will be no team uniforms. But that aside, how many teams would you like?",
"arena_master_spar_teams_choose",[(try_for_range,":slot",1,33),(troop_set_slot, "trp_temp_array_a", ":slot", -1),(try_end),(troop_set_slot, "trp_temp_array_a", 1, "trp_player"),(assign,"$temp",1)]],
[anyone|plyr,"arena_master_spar_teams_choose", [], "Two.", "arena_master_spar_team_one",[(assign, "$g_tournament_next_num_teams", 2),]],
[anyone|plyr,"arena_master_spar_teams_choose", [(party_get_num_companions,":troops","p_main_party"),(gt,":troops",2)], "Three.", "arena_master_spar_team_one",[(assign, "$g_tournament_next_num_teams", 3),]],
[anyone|plyr,"arena_master_spar_teams_choose", [(party_get_num_companions,":troops","p_main_party"),(gt,":troops",3)], "Four.", "arena_master_spar_team_one",[(assign, "$g_tournament_next_num_teams", 4),]],
[anyone|plyr,"arena_master_spar_teams_choose", [], "Never mind. I've changed my mind.", "arena_master_pre_talk",[]],
[anyone,"arena_master_spar_team_one", [(eq,"$temp",], "Team One is full. Team Two is next.", "arena_master_spar_team_two",[(assign,"$temp",0)]],
[anyone,"arena_master_spar_team_one", [(assign,reg0,"$temp"),(store_sub,reg1,reg0,1)], "There {reg1?are:is} currently {reg0} {reg1?troops:troop} on Team One. Which troop would you like to add?", "arena_master_spar_team_one_choose",[]],
[anyone|plyr|repeat_for_troops, "arena_master_spar_team_one_choose",
[
(store_repeat_object, ":troop"),
(party_get_num_companion_stacks,":num_stacks","p_main_party"),
(assign,":include",0),
(try_for_range,":stack",0,":num_stacks"),
(eq,":include",0),
(party_stack_get_troop_id,":troop_id","p_main_party",":stack"),
(ge,":troop_id",0),
(eq,":troop_id",":troop"),
(assign,":num_in",0),
(try_for_range,":counting",1,33),
(troop_get_slot,":already_in","trp_temp_array_a",":counting"),
(eq,":already_in",":troop"),
(val_add,":num_in",1),
(try_end),
(party_stack_get_size,":available","p_main_party",":stack"),
(gt,":available",":num_in"),
(assign,":include",1),
(try_end),
(eq,":include",1),
(store_sub,reg0,":available",":num_in"),
(str_store_troop_name,s11,":troop"),
],
"{s11}. ({reg0} left.)", "arena_master_spar_team_one_add",
[
(store_repeat_object, "$temp_2"),
(val_add,"$temp",1),
(store_add,"ffset","$temp",0),
(troop_set_slot, "trp_temp_array_a", "ffset", "$temp_2"),
(str_store_troop_name,s11,"$temp_2")
]],
[anyone,"arena_master_spar_team_one_add", [], "{s11} has been added to Team One.", "arena_master_spar_team_one",[]],
[anyone|plyr,"arena_master_spar_team_one_choose", [], "I am finished with Team One. Let's move on to Team Two.", "arena_master_spar_team_two",[(assign,"$temp",0)]],
[anyone|plyr,"arena_master_spar_team_one_choose", [], "Never mind. I'm calling the whole thing off.", "arena_master_pre_talk",[]],
[anyone,"arena_master_spar_team_two", [(gt,"$g_tournament_next_num_teams",2),(eq,"$temp",], "Team Two is full. Team Three is next.", "arena_master_spar_team_three",[(assign,"$temp",0)]],
[anyone,"arena_master_spar_team_two", [(eq,"$g_tournament_next_num_teams",2),(eq,"$temp",], "Team Two is full. Let the match begin!", "arena_master_spar_start_it_up",[]],
[anyone,"arena_master_spar_team_two", [(assign,reg0,"$temp"),(store_sub,reg1,reg0,1)], "There {reg1?are:is} currently {reg0} {reg1?troops:troop} on Team Two. Which troop would you like to add?", "arena_master_spar_team_two_choose",[]],
[anyone|plyr|repeat_for_troops, "arena_master_spar_team_two_choose",
[
(store_repeat_object, ":troop"),
(party_get_num_companion_stacks,":num_stacks","p_main_party"),
(assign,":include",0),
(try_for_range,":stack",0,":num_stacks"),
(eq,":include",0),
(party_stack_get_troop_id,":troop_id","p_main_party",":stack"),
(ge,":troop_id",0),
(eq,":troop_id",":troop"),
(assign,":num_in",0),
(try_for_range,":counting",1,33),
(troop_get_slot,":already_in","trp_temp_array_a",":counting"),
(eq,":already_in",":troop"),
(val_add,":num_in",1),
(try_end),
(party_stack_get_size,":available","p_main_party",":stack"),
(gt,":available",":num_in"),
(assign,":include",1),
(try_end),
(eq,":include",1),
(store_sub,reg0,":available",":num_in"),
(str_store_troop_name,s11,":troop"),
],
"{s11}. ({reg0} left.)", "arena_master_spar_team_two_add",
[
(store_repeat_object, "$temp_2"),
(val_add,"$temp",1),
(store_add,"ffset","$temp",,
(troop_set_slot, "trp_temp_array_a", "ffset", "$temp_2"),
(str_store_troop_name,s11,"$temp_2")
]],
[anyone,"arena_master_spar_team_two_add", [], "{s11} has been added to Team Two.", "arena_master_spar_team_two",[]],
[anyone|plyr,"arena_master_spar_team_two_choose", [(gt,"$g_tournament_next_num_teams",2)], "I am finished with Team Two. Let's move on to Team Three.", "arena_master_spar_team_three",[(assign,"$temp",0)]],
[anyone|plyr,"arena_master_spar_team_two_choose", [(eq,"$g_tournament_next_num_teams",2)], "I am finished with Team Two. Let's begin the match.", "arena_master_spar_start_it_up",[]],
[anyone|plyr,"arena_master_spar_team_two_choose", [], "Never mind. I'm calling the whole thing off.", "arena_master_pre_talk",[]],
[anyone,"arena_master_spar_team_three", [(gt,"$g_tournament_next_num_teams",3),(eq,"$temp",], "Team Three is full. Team Four is next.", "arena_master_spar_team_four",[(assign,"$temp",0)]],
[anyone,"arena_master_spar_team_three", [(eq,"$g_tournament_next_num_teams",3),(eq,"$temp",], "Team Three is full. Let the match begin!", "arena_master_spar_start_it_up",[]],
[anyone,"arena_master_spar_team_three", [(assign,reg0,"$temp"),(store_sub,reg1,reg0,1)], "There {reg1?are:is} currently {reg0} {reg1?troops:troop} on Team Three. Which troop would you like to add?", "arena_master_spar_team_three_choose",[]],
[anyone|plyr|repeat_for_troops, "arena_master_spar_team_three_choose",
[
(store_repeat_object, ":troop"),
(party_get_num_companion_stacks,":num_stacks","p_main_party"),
(assign,":include",0),
(try_for_range,":stack",0,":num_stacks"),
(eq,":include",0),
(party_stack_get_troop_id,":troop_id","p_main_party",":stack"),
(ge,":troop_id",0),
(eq,":troop_id",":troop"),
(assign,":num_in",0),
(try_for_range,":counting",1,33),
(troop_get_slot,":already_in","trp_temp_array_a",":counting"),
(eq,":already_in",":troop"),
(val_add,":num_in",1),
(try_end),
(party_stack_get_size,":available","p_main_party",":stack"),
(gt,":available",":num_in"),
(assign,":include",1),
(try_end),
(eq,":include",1),
(store_sub,reg0,":available",":num_in"),
(str_store_troop_name,s11,":troop"),
],
"{s11}. ({reg0} left.)", "arena_master_spar_team_three_add",
[
(store_repeat_object, "$temp_2"),
(val_add,"$temp",1),
(store_add,"ffset","$temp",16),
(troop_set_slot, "trp_temp_array_a", "ffset", "$temp_2"),
(str_store_troop_name,s11,"$temp_2")
]],
[anyone,"arena_master_spar_team_three_add", [], "{s11} has been added to Team Three.", "arena_master_spar_team_three",[]],
[anyone|plyr,"arena_master_spar_team_three_choose", [(gt,"$g_tournament_next_num_teams",3)], "I am finished with Team Three. Let's move on to Team Four.", "arena_master_spar_team_four",[(assign,"$temp",0)]],
[anyone|plyr,"arena_master_spar_team_three_choose", [(eq,"$g_tournament_next_num_teams",3)], "I am finished with Team Three. Let's begin the match.", "arena_master_spar_start_it_up",[]],
[anyone|plyr,"arena_master_spar_team_three_choose", [], "Never mind. I'm calling the whole thing off.", "arena_master_pre_talk",[]],
[anyone,"arena_master_spar_team_four", [(eq,"$temp",], "Team Four is full. Let the match begin!", "arena_master_spar_start_it_up",[]],
[anyone,"arena_master_spar_team_four", [(assign,reg0,"$temp"),(store_sub,reg1,reg0,1)], "There {reg1?are:is} currently {reg0} {reg1?troops:troop} on Team Four. Which troop would you like to add?", "arena_master_spar_team_four_choose",[]],
[anyone|plyr|repeat_for_troops, "arena_master_spar_team_four_choose",
[
(store_repeat_object, ":troop"),
(party_get_num_companion_stacks,":num_stacks","p_main_party"),
(assign,":include",0),
(try_for_range,":stack",0,":num_stacks"),
(eq,":include",0),
(party_stack_get_troop_id,":troop_id","p_main_party",":stack"),
(ge,":troop_id",0),
(eq,":troop_id",":troop"),
(assign,":num_in",0),
(try_for_range,":counting",1,33),
(troop_get_slot,":already_in","trp_temp_array_a",":counting"),
(eq,":already_in",":troop"),
(val_add,":num_in",1),
(try_end),
(party_stack_get_size,":available","p_main_party",":stack"),
(gt,":available",":num_in"),
(assign,":include",1),
(try_end),
(eq,":include",1),
(store_sub,reg0,":available",":num_in"),
(str_store_troop_name,s11,":troop"),
],
"{s11}. ({reg0} left.)", "arena_master_spar_team_four_add",
[
(store_repeat_object, "$temp_2"),
(val_add,"$temp",1),
(store_add,"ffset","$temp",24),
(troop_set_slot, "trp_temp_array_a", "ffset", "$temp_2"),
(str_store_troop_name,s11,"$temp_2")
]],
[anyone,"arena_master_spar_team_four_add", [], "{s11} has been added to Team Four.", "arena_master_spar_team_four",[]],
[anyone|plyr,"arena_master_spar_team_four_choose", [], "I am finished with Team Four. Let's begin the match.", "arena_master_spar_start_it_up",[]],
[anyone|plyr,"arena_master_spar_team_four_choose", [], "Never mind. I'm calling the whole thing off.", "arena_master_pre_talk",[]],
[anyone,"arena_master_spar_start_it_up", [], "Here you go then. Good luck.", "close_window",
[
(party_get_slot, ":arena_scene", "$current_town", slot_town_arena),
(modify_visitors_at_site, ":arena_scene"),
(reset_visitors),
(try_for_range,":num",1,33),
(troop_get_slot,":troop","trp_temp_array_a",":num"),
(ge,":troop",0),
(store_sub,"ffset",":num",1), #Oops, easier to add this than go back and fix all the other instances
(set_visitor, "ffset", ":troop"),
(try_end),
(set_jump_mission, "mt_arena_spar_fight"),
(jump_to_scene, ":arena_scene"),
(change_screen_mission),
]],
## Arena sparring end
[anyone,"arena_master_ask_tournaments", [], "{reg2?There won't be any tournaments any time soon.:{reg1?Tournaments are:A tournament is} going to be held at {s15}.}", "arena_master_talk",
module_particle_systems.py:
("game_water_splash_3", psf_emit_at_water_level , "prt_mesh_water_wave_1",
5, 2.0, 0, 0.0, 10.0, 0.0, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength
(0.03, 0.2), (1, 0.0), #alpha keys
(1.0, 1.0), (1, 1.0), #red keys
(1.0, 1.0), (1, 1.0), #green keys
(1.0, 1.0), (1, 1.0), #blue keys
(0.0, 3), (1.0, 10), #scale keys
(0.0, 0.0, 0.0), #emit box size
(0, 0, 0), #emit velocity
0.0, #emit dir randomness
0, #rotation speed
0.5 #rotation damping
),
("team_0", psf_billboard_3d|psf_global_emit_dir|psf_always_emit, "prt_mesh_fire_1",
50, 0.35, 0.2, 0.03, 10.0, 0.0, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength
(0.0, 0., (1, 0), #alpha keys
(0.0, 0.1), (1, 0., #red keys
(0.0, 0.0),(1, 0.0), #green keys
(0.0, 0), (1, 0.0), #blue keys
(0, 0.15), (0.4, 0.3), #scale keys
(0.04, 0.04, 0.04), #emit box size
(0, 0, 0.5), #emit velocity
0.0, #emit dir randomness
200, #rotation speed
0.5 #rotation damping
),
("team_1", psf_billboard_3d|psf_global_emit_dir|psf_always_emit, "prt_mesh_fire_1",
50, 0.35, 0.2, 0.03, 10.0, 0.0, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength
(0.0, 0., (1, 0), #alpha keys
(0.0, 0.0), (1, 0.0), #red keys
(0.0, 0.0),(1, 0.0), #green keys
(0.0, 1), (1, 0., #blue keys
(0, 0.15), (0.4, 0.3), #scale keys
(0.04, 0.04, 0.04), #emit box size
(0, 0, 0.5), #emit velocity
0.0, #emit dir randomness
200, #rotation speed
0.5 #rotation damping
),
("team_2", psf_billboard_3d|psf_global_emit_dir|psf_always_emit, "prt_mesh_fire_1",
50, 0.35, 0.2, 0.03, 10.0, 0.0, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength
(0.0, 0., (1, 0), #alpha keys
(0.0, 0.0), (1, 0.0), #red keys
(0.0, 1),(1, 0., #green keys
(0.0, 0), (1, 0.0), #blue keys
(0, 0.15), (0.4, 0.3), #scale keys
(0.04, 0.04, 0.04), #emit box size
(0, 0, 0.5), #emit velocity
0.0, #emit dir randomness
200, #rotation speed
0.5 #rotation damping
),
("team_3", psf_billboard_3d|psf_global_emit_dir|psf_always_emit, "prt_mesh_fire_1",
50, 0.35, 0.2, 0.03, 10.0, 0.0, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength
(0.0, 0., (1, 0), #alpha keys
(0.0, 1), (1, 0., #red keys
(0.0, 1),(1, 0., #green keys
(0.0, 1), (1, 0., #blue keys
(0, 0.15), (0.4, 0.3), #scale keys
(0.04, 0.04, 0.04), #emit box size
(0, 0, 0.5), #emit velocity
0.0, #emit dir randomness
200, #rotation speed
0.5 #rotation damping
),
("torch_fire", psf_billboard_3d|psf_global_emit_dir|psf_always_emit|psf_randomize_size|psf_randomize_rotation, "prt_mesh_fire_1",
50, 0.35, 0.2, 0.03, 10.0, 0.0, #num_particles, life, damping, gravity_strength, turbulance_size, turbulance_strength
(0.5, 0., (1, 0), #alpha keys
(0.5, 1.0), (1, 0.9), #red keys
(0.5, 0.7),(1, 0.3), #green keys
(0.5, 0.2), (1, 0.0), #blue keys
(0, 0.15), (0.4, 0.3), #scale keys
(0.04, 0.04, 0.01), #emit box size
(0, 0, 0.5), #emit velocity
0.0, #emit dir randomness
200, #rotation speed
0.5 #rotation damping
),
I think those are the only three files you need to edit, but it's been a while since I wrote this. Let me know if it works or if I left something out and I'll fix it. And if I'm in a good mood later I'll even share the code I use to let the player move the camera around after death to watch the fight from a better view.
EDIT: I added little flame clouds above the heads of all combatants. The colors depict what team they're on. The player is always red, but feel free to play around with the team colors in the particle system thingy.