Add this to module_items:
Code:
["skeleton_stones", "Skeleton Stones", [("throwing_stone",0)], itp_type_thrown |itp_primary ,itcf_throw_stone, 1000 , weight(4)|difficulty(0)|spd_rtng(97) | shoot_speed(30) | thrust_damage(11 , blunt)|max_ammo(18)|weapon_length(8),imodbit_large_bag, [
(ti_on_missile_hit, [
(store_trigger_param_1, ":thrower"),
(play_sound_at_position, "snd_pistol_shot", pos1),
(particle_system_burst, "psys_village_fire_smoke_big", pos1, 15),
(agent_get_team, ":throwerteam", ":thrower"),
(set_spawn_position, pos1),
(spawn_agent, "trp_skeleton_for_necromancy"),
(agent_set_team, reg0, ":throwerteam"),
(agent_set_is_alarmed, reg0, 1),
])
], [] ],
Create a troop that you wish to spawn. I have this:
Code:
["skeleton_for_necromancy","Hernar Ancestor","Hernar Ancestors",tf_skeleton|tf_allways_fall_dead,no_scene,reserved,fac_commoners,
[itm_vaegir_fur_helmet,itm_vaegir_spiked_helmet,itm_vaegir_lamellar_helmet,itm_bone],
def_attrib|level(15),wp(100),knows_common|knows_ironflesh_4|knows_power_strike_4,skeleton_face1, skeleton_face2],
This troop uses Barf's OSP skeleton, so if you are not using that you could use the undead race from Native, or whatever you want really. Just remember to not add this troop to a party as it is not counted in casualties.
In script_count_mission_casualties_from_agents, in the first try for agents block, add:
(neq, ":agent_troop_id", "trp_skeleton_for_necromancy"),
Below this:
(agent_get_troop_id, ":agent_troop_id", ":cur_agent"),
In the second try for agents block add this:
(agent_get_troop_id, ":troop_of_agent", ":cur_agent"),
(neq, ":troop_of_agent", "trp_skeleton_for_necromancy"),
Below this:
(agent_is_human, ":cur_agent"),
This prevents script errors from appearing during casualties and prevents the troops from appearing as casualties in the battle reports. (as they are not part of a party they are not relevant information on the actual damage done to either the player or the enemies)
In script_agent_reassign_team add this:
(agent_get_troop_id, ":troop_of_agent", ":agent_no"),
(neq, ":troop_of_agent", "trp_skeleton_for_necromancy"),
Below:
(agent_is_human, ":agent_no"),
This prevents errors during sieges.
Because this troop is spawned during battle rather than being part of the reinforcement waves, you should replace the first trigger in mt_lead_charge (ti_on_agent_spawn) with this:
Code:
(ti_on_agent_spawn, 0, 0, [],
[
(store_trigger_param_1, ":agent_no"),
(assign, ":initial_courage_score", 5000),
(try_begin),
(agent_get_troop_id, ":troop_of_agent", ":agent_no"),
(neq, ":troop_of_agent", "trp_skeleton_for_necromancy"),
(call_script, "script_agent_reassign_team", ":agent_no"),
(agent_get_troop_id, ":troop_id", ":agent_no"),
(store_character_level, ":troop_level", ":troop_id"),
(val_mul, ":troop_level", 35),
(val_add, ":initial_courage_score", ":troop_level"), #average : 20 * 35 = 700
(store_random_in_range, ":randomized_addition_courage", 0, 3000), #average : 1500
(val_add, ":initial_courage_score", ":randomized_addition_courage"),
(agent_get_party_id, ":agent_party", ":agent_no"),
(party_get_morale, ":cur_morale", ":agent_party"),
(store_sub, ":morale_effect_on_courage", ":cur_morale", 70),
(val_mul, ":morale_effect_on_courage", 30), #this can effect morale with -2100..900
(val_add, ":initial_courage_score", ":morale_effect_on_courage"),
(else_try),
(val_add, ":initial_courage_score", 3000),
(try_end),
(agent_set_slot, ":agent_no", slot_agent_courage_score, ":initial_courage_score"),
]),
For mt_bandits_at_night:
Code:
(ti_on_agent_spawn, 0, 0, [],
[
(store_trigger_param_1, ":agent_no"),
(agent_get_troop_id, ":troop_no", ":agent_no"),
(neq, ":troop_no", "trp_player"),
(neq, ":troop_no", "trp_skeleton_for_necromancy"),
(agent_set_team, ":agent_no", 1),
]),
For mt_town_fight (if you still use this mission)
Code:
(ti_on_agent_spawn, 0, 0, [],
[
(store_trigger_param_1, ":agent_no"),
(agent_get_troop_id, ":troop_of_agent", ":agent_no"),
(neq, ":troop_of_agent", "trp_skeleton_for_necromancy"),
(agent_set_team, ":agent_no", 0),
]),
The
end result will be spawning skeletons, or whatever troop you choose, wherever the rock is thrown.