Hi everyone. Im trying to make use of this function using WSE2 to allow for body customization with vertex animations.
First i tried to defom the mesh 4, corresponding to the armor or body on mission_templates.py when in town:
I have a body mesh with about 6 vertex animation frames, set to 0=0, 1=10, 2=20 up to 5=50, but when i call
When i call
So i tested this code using something like this flail code, only instead of a flail, im using the same body mesh for the weapon:
With this code, the weapon performs the deformation flawlessly, but nothing happens to the body mesh.
Is it possible to do this with a skinned mesh? kind of what this post shows.
Any insight is appreciated.
First i tried to defom the mesh 4, corresponding to the armor or body on mission_templates.py when in town:
Python:
common_body_build_agent = (
ti_on_agent_spawn, 0, 0, [
(store_trigger_param_1, ":agent_no"),
(get_player_agent_no, ":player_agent"),
(eq, ":agent_no", ":player_agent"),
], [
(store_trigger_param_1, ":agent"),
(agent_body_meta_mesh_get_current_deform_frame, ":frame", ":agent", 4),
(assign, reg5, ":frame"),
(display_log_message, "@Frame = {reg5}"),# Prints 0
#(agent_body_meta_mesh_deform_in_range, ":agent", bmm_armor, 10, 50, 10000),
(agent_body_meta_mesh_set_vertex_keys_time_point, ":agent", bmm_armor, 50),
(agent_body_meta_mesh_get_current_deform_frame, ":frame", ":agent", 4),
(assign, reg5, ":frame"),
(display_log_message, "@Frame = {reg5}"),# Prints 50
])
agent_body_meta_mesh_deform_in_range
at the agent spawn, the game shows a second body mesh flickering performing the animation on t-pose, unnafected by skining while the original body also flickers during the time (10s), after that, it stops and only the original body remains (my character is naked the whole time). When i call
agent_body_meta_mesh_set_vertex_keys_time_point
nothing happens.So i tested this code using something like this flail code, only instead of a flail, im using the same body mesh for the weapon:
Python:
["sword_test_mesh", "Test Blade", [("human_male_body",0),("khergit_sword_b_scabbard", ixmesh_carry)], itp_type_one_handed_wpn|itp_merchandise|itp_primary, itc_scimitar|itcf_carry_sword_left_hip|itcf_show_holster_when_drawn,
105 , weight(1.25)|difficulty(0)|spd_rtng(100) | weapon_length(97)|swing_damage(29 , cut),imodbits_sword_high, [(ti_on_weapon_attack,
[
(get_player_agent_no, ":player_agent"),
(try_begin),
(agent_get_wielded_item_slot_no, ":slot_no", ":player_agent"),
(val_add, ":slot_no", bmm_item_1),
#(agent_body_meta_mesh_set_vertex_keys_time_point, ":player_agent", ":slot_no", 10),
(agent_body_meta_mesh_deform_in_range, ":player_agent", ":slot_no", 10, 50, 10000),
(agent_body_meta_mesh_set_vertex_keys_time_point, ":player_agent", bmm_armor, 50),
(agent_play_sound, ":player_agent", "snd_shield_hit_metal_metal"),# sound to see its beeing called
(try_end),
])]],
Is it possible to do this with a skinned mesh? kind of what this post shows.
Any insight is appreciated.