hello...can someone help me? I I play this module and it work well, and now I want my own mod have decapitated mod it self. I search the web and find this code on wiki, I put it right after pilgrim disguise in module_mision_template.py just like this:
pilgrim_disguise = [itm_pilgrim_hood,itm_pilgrim_disguise,itm_practice_staff, itm_throwing_daggers]
af_castle_lord = af_override_horse | af_override_weapons| af_require_civilian
decap_mod_common = (ti_on_agent_hit, 0, 0, [],
[
(store_trigger_param_1, ":agent"),
(agent_is_human, ":agent"),
(store_trigger_param_3, ":damage"),
(ge, ":damage", 30), # Strong blow
(store_agent_hit_points, ":hp", ":agent", 1),
(val_add, ":hp", 5),
(ge, ":damage", ":hp"), # Damage > HP + 5 (account for armour soak)
(agent_get_position, pos1, ":agent"),
(get_distance_between_positions, ":distance", pos1, pos0),
(is_between, ":distance", 160, 176), # If neck hit
(agent_get_item_slot, ":item", ":agent", 4),
(try_begin),
(ge, ":item", 1),
(agent_unequip_item, ":agent", ":item"),
(try_end),
(agent_equip_item, ":agent", "itm_invisible_head"), # Replace with invisible head
(particle_system_burst, "psys_game_blood_2", pos1, 150), # Blood
(set_spawn_position, pos1),
(spawn_scene_prop, "spr_physics_head"), # Flying head, SP only
]),
and this on module_scene_props.py above ("ctf_flag_kingdom_1", sokf_moveable|sokf_face_player, "ctf_flag_kingdom_1", "0", []),
:
("spr_physics_head",sokf_moveable|sokf_dynamic_physics,"head","bo_bo_cut_off_head", [
(ti_on_init_scene_prop,
[
(store_trigger_param_1, ":prop_instance_no"),
(set_fixed_point_multiplier, 100),
(position_set_x, pos0, 2500), #mass=25.0
(position_set_y, pos0, 80), #friction coefficient = 0.8
(position_set_z, pos0, 0), #reserved variable
(prop_instance_dynamics_set_properties, ":prop_instance_no", pos0),
(position_set_x, pos0, 0),
(position_set_y, pos0, 0),
(position_set_z, pos0, 10000),
(prop_instance_dynamics_set_omega, ":prop_instance_no", pos0), #spin around fast
(position_set_x, pos0, 0),
(position_set_y, pos0, 0),
(position_set_z, pos0, 10000),
(prop_instance_dynamics_apply_impulse, ":prop_instance_no", pos0), # and jump
]),
]),
and then I put common_decap_mod in almost every battle in module_mission_template.py. I already have brf and dds from decap mod, I put it on the right place, I made 1 item invisible head. also put load_mod_resource in module.ini.
but when I compile module system, it show error. tuple index out of range followed by many warning variable never used.
next I copy and paste the whole first code in every battle in module_mission_template, compile it and got only 2 error "unable to find object : spr_physics_head". and " illegal identifier : spr_physics_head"
next I disable these two code: (set_spawn_position, pos1),
(spawn_scene_prop, "spr_physics_head"), # Flying head, SP only
compile it and no error. so I test the game and manage to cut some head and you might figure it already...no head rolling down.
I have no Idea how to make this spr_physics_head work. I search DecapitateandDismember mod file but still can find it. did I miss something here? I will really appreciated if anyone could help me here...and sorry for my bad English.