骑砍战团MOD开发(25)-module_animations.py骨骼动画
2023-12-27 11:54:27
一.引擎固化骨架
? ? ?Data\skeleton_bodies.xml:定义系统骨架skel_human,skel_horse.
<Skeletons>
<Skeleton name="skel_human">
<Skeleton name="skel_horse">
</Skeletons>
? ? CommonRes\skeletons.brf 为skel_human的资源文件,适用BRF打开
? ? CommonRes\horse_skeleton.brf?为skel_horse的资源文件,适用BRF打开
二.自定义骨架
? ? ?通过在module_skins.py添加新的皮肤绑定新的骨架.
# Each skin record contains the following fields:
# 1) Skin id: used for referencing skins.
# 2) Skin flags. Not used yet. Should be 0.
# 3) Body mesh.
# 4) Calf mesh (left one).
# 5) Hand mesh (left one).
# 6) Head mesh.
# 7) Face keys (list)
# 8) List of hair meshes.
# 9) List of beard meshes.
# 10) List of hair textures.
# 11) List of beard textures.
# 12) List of face textures.
# 13) List of voices.
# 14) Skeleton name 定义资源名称
# 15) Scale (doesn't fully work yet)
# 16) Blood particles 1 (do not add this if you wish to use the default particles)
# 17) Blood particles 2 (do not add this if you wish to use the default particles)
# 17) Face key constraints (do not add this if you do not wish to use it)
三.骨骼动画
? ? ?骑砍中的四向攻击,骑马等动作都是采用骨骼动画制作,通过module_animations.py配置不同的动画,部分动画固化至引擎中,如四向攻击,骑马,跳跃等.骑砍中固化的骨骼动画有:
act_unused_horse_anim_100 act_unused_horse_anim_99 act_unused_horse_anim_98 act_unused_horse_anim_97 act_unused_horse_anim_96 act_unused_horse_anim_95 act_unused_horse_anim_94 act_unused_horse_anim_93 act_unused_horse_anim_92 act_unused_horse_anim_91 act_unused_horse_anim_90 act_unused_horse_anim_89 act_unused_horse_anim_88 act_unused_horse_anim_87 act_unused_horse_anim_86 act_unused_horse_anim_85 act_unused_horse_anim_84 act_unused_horse_anim_83 act_unused_horse_anim_82 act_unused_horse_anim_81 act_unused_horse_anim_80 act_unused_horse_anim_79 act_unused_horse_anim_78 act_unused_horse_anim_77 act_unused_horse_anim_76 act_unused_horse_anim_75 act_unused_horse_anim_74 act_unused_horse_anim_73 act_unused_horse_anim_72 act_unused_horse_anim_71 act_unused_horse_anim_70 act_unused_horse_anim_69 act_unused_horse_anim_68 act_unused_horse_anim_67 act_unused_horse_anim_66 act_unused_horse_anim_65 act_unused_horse_anim_64 act_unused_horse_anim_63 act_unused_horse_anim_62 act_unused_horse_anim_61 act_unused_horse_anim_60 act_unused_horse_anim_59 act_unused_horse_anim_58 act_unused_horse_anim_57 act_unused_horse_anim_56 act_unused_horse_anim_55 act_unused_horse_anim_54 act_unused_horse_anim_53 act_unused_horse_anim_52 act_unused_horse_anim_51 act_unused_horse_anim_50 act_unused_horse_anim_49 act_unused_horse_anim_48 act_unused_horse_anim_47 act_unused_horse_anim_46 act_unused_horse_anim_45 act_unused_horse_anim_44 act_unused_horse_anim_43 act_unused_horse_anim_42 act_unused_horse_anim_41 act_unused_horse_anim_40 act_unused_horse_anim_39 act_unused_horse_anim_38 act_unused_horse_anim_37 act_unused_horse_anim_36 act_unused_horse_anim_35 act_unused_horse_anim_34 act_unused_horse_anim_33 act_unused_horse_anim_32 act_unused_horse_anim_31 act_unused_horse_anim_30 act_unused_horse_anim_29 act_unused_horse_anim_28 act_unused_horse_anim_27 act_unused_horse_anim_26 act_unused_horse_anim_25 act_unused_horse_anim_24 act_unused_horse_anim_23 act_unused_horse_anim_22 act_unused_horse_anim_21 act_unused_horse_anim_20 act_unused_horse_anim_19 act_unused_horse_anim_18 act_unused_horse_anim_17 act_unused_horse_anim_16 act_unused_horse_anim_15 act_unused_horse_anim_14 act_unused_horse_anim_13 act_unused_horse_anim_12 act_unused_horse_anim_11 act_unused_horse_anim_10 act_unused_horse_anim_9 act_unused_horse_anim_8 act_unused_horse_anim_7 act_unused_horse_anim_6 act_unused_horse_anim_5 act_unused_horse_anim_4 act_unused_horse_anim_3 act_unused_horse_anim_2 act_unused_horse_anim_1 act_horse_fall_roll act_horse_fall_right act_horse_fall_in_place act_horse_slow act_horse_turn_left_head act_horse_turn_right_head act_horse_turn_left act_horse_turn_right act_horse_jump_end act_horse_jump act_horse_rear act_horse_walk_backward act_horse_pace_4 act_horse_pace_3 act_horse_pace_2 act_horse_pace_1 act_horse_stand act_unused_human_anim_100 act_unused_human_anim_99 act_unused_human_anim_98 act_unused_human_anim_97 act_unused_human_anim_96 act_unused_human_anim_95 act_unused_human_anim_94 act_unused_human_anim_93 act_unused_human_anim_92 act_unused_human_anim_91 act_unused_human_anim_90 act_unused_human_anim_89 act_unused_human_anim_88 act_unused_human_anim_87 act_unused_human_anim_86 act_unused_human_anim_85 act_unused_human_anim_84 act_unused_human_anim_83 act_unused_human_anim_82 act_unused_human_anim_81 act_unused_human_anim_80 act_unused_human_anim_79 act_unused_human_anim_78 act_unused_human_anim_77 act_unused_human_anim_76 act_unused_human_anim_75 act_unused_human_anim_74 act_unused_human_anim_73 act_unused_human_anim_72 act_unused_human_anim_71 act_unused_human_anim_70 act_unused_human_anim_69 act_unused_human_anim_68 act_unused_human_anim_67 act_unused_human_anim_66 act_unused_human_anim_65 act_unused_human_anim_64 act_unused_human_anim_63 act_unused_human_anim_62 act_unused_human_anim_61 act_unused_human_anim_60 act_unused_human_anim_59 act_unused_human_anim_58 act_unused_human_anim_57 act_unused_human_anim_56 act_unused_human_anim_55 act_unused_human_anim_54 act_unused_human_anim_53 act_unused_human_anim_52 act_unused_human_anim_51 act_unused_human_anim_50 act_unused_human_anim_49 act_unused_human_anim_48 act_unused_human_anim_47 act_unused_human_anim_46 act_unused_human_anim_45 act_unused_human_anim_44 act_unused_human_anim_43 act_unused_human_anim_42 act_unused_human_anim_41 act_unused_human_anim_40 act_unused_human_anim_39 act_unused_human_anim_38 act_unused_human_anim_37 act_unused_human_anim_36 act_unused_human_anim_35 act_unused_human_anim_34 act_unused_human_anim_33 act_unused_human_anim_32 act_unused_human_anim_31 act_unused_human_anim_30 act_unused_human_anim_29 act_unused_human_anim_28 act_unused_human_anim_27 act_unused_human_anim_26 act_unused_human_anim_25 act_unused_human_anim_24 act_unused_human_anim_23 act_unused_human_anim_22 act_unused_human_anim_21 act_unused_human_anim_20 act_unused_human_anim_19 act_unused_human_anim_18 act_unused_human_anim_17 act_unused_human_anim_16 act_unused_human_anim_15 act_unused_human_anim_14 act_unused_human_anim_13 act_unused_human_anim_12 act_unused_human_anim_11 act_unused_human_anim_10 act_unused_human_anim_9 act_unused_human_anim_8 act_unused_human_anim_7 act_unused_human_anim_6 act_unused_human_anim_5 act_unused_human_anim_4 act_unused_human_anim_3 act_unused_human_anim_2 act_unused_human_anim_1 act_pose_5 act_pose_4 act_pose_3 act_pose_2 act_pose_1 act_dance act_stand_lord act_stand_lady act_stand_townguard act_cheer_stand act_cheer act_strike_fall_back_rise_upper act_strike_fall_back_rise act_strike_chest_front_stop act_rider_fall_roll act_rider_fall_right act_fall_rider_left act_fall_rider_right act_fall_rider_right_forward act_fall_body_back act_fall_right_front act_fall_head_front act_fall_abdomen_hold_front act_fall_chest_front act_fall_face_hold act_strike_head_front_left_reloc act_strike3_abdomen_back act_strike3_abdomen_front act_strike3_abdomen_right act_strike3_abdomen_left act_strike3_chest_front act_strike3_chest_right act_strike3_chest_left act_strike3_head_back act_strike3_head_front act_strike3_head_right act_strike3_head_left act_strike2_legs_back act_strike2_legs_front act_strike2_legs_right act_strike2_legs_left act_strike2_abdomen_back act_strike2_abdomen_front act_strike2_abdomen_right act_strike2_abdomen_left act_strike2_chest_back act_strike2_chest_front act_strike2_chest_right act_strike2_chest_left act_strike2_head_back act_strike2_head_front act_strike2_head_right act_strike2_head_left act_strike_legs_back act_strike_legs_front act_strike_legs_right act_strike_legs_left act_strike_abdomen_back act_strike_abdomen_front act_strike_abdomen_right act_strike_abdomen_left act_strike_chest_back act_strike_chest_front act_strike_chest_right act_strike_chest_left act_strike_head_back act_strike_head_front act_strike_head_right act_strike_head_left act_defend_left_staff_parry_3 act_defend_left_staff_parry_2 act_defend_left_staff_parry_1 act_defend_left_staff_keep act_defend_left_staff act_defend_right_staff_parry_3 act_defend_right_staff_parry_2 act_defend_right_staff_parry_1 act_defend_right_staff_keep act_defend_right_staff act_defend_up_staff_parry_3 act_defend_up_staff_parry_2 act_defend_up_staff_parry_1 act_defend_up_staff_keep act_defend_up_staff act_defend_forward_staff_parry_3 act_defend_forward_staff_parry_2 act_defend_forward_staff_parry_1 act_defend_forward_staff_keep act_defend_forward_staff act_defend_left_onehanded_parry_3 act_defend_left_onehanded_parry_2 act_defend_left_onehanded_parry_1 act_defend_left_onehanded_keep act_defend_left_onehanded act_defend_right_onehanded_parry_3 act_defend_right_onehanded_parry_2 act_defend_right_onehanded_parry_1 act_defend_right_onehanded_keep act_defend_right_onehanded act_defend_up_onehanded_parry_3 act_defend_up_onehanded_parry_2 act_defend_up_onehanded_parry_1 act_defend_up_onehanded_keep act_defend_up_onehanded act_defend_forward_onehanded_parry_3 act_defend_forward_onehanded_parry_2 act_defend_forward_onehanded_parry_1 act_defend_forward_onehanded_keep act_defend_forward_onehanded act_defend_left_twohanded_parry_3 act_defend_left_twohanded_parry_2 act_defend_left_twohanded_parry_1 act_defend_left_twohanded_keep act_defend_left_twohanded act_defend_right_twohanded_parry_3 act_defend_right_twohanded_parry_2 act_defend_right_twohanded_parry_1 act_defend_right_twohanded_keep act_defend_right_twohanded act_defend_up_twohanded_parry_3 act_defend_up_twohanded_parry_2 act_defend_up_twohanded_parry_1 act_defend_up_twohanded_keep act_defend_up_twohanded act_defend_forward_greatsword_parry_3 act_defend_forward_greatsword_parry_2 act_defend_forward_greatsword_parry_1 act_defend_forward_greatsword_keep act_defend_forward_greatsword act_defend_shield_parry_3 act_defend_shield_parry_2 act_defend_shield_parry_1 act_defend_shield_keep act_defend_shield act_defend_shield_left act_defend_shield_right act_defend_shield_up act_defend_shield_forward act_defend_fist_parry_3 act_defend_fist_parry_2 act_defend_fist_parry_1 act_defend_fist_keep act_defend_fist act_parried_slashright_staff act_blocked_slashright_staff act_release_slashright_staff_continue act_release_slashright_staff act_ready_slashright_staff act_parried_slashleft_staff act_blocked_slashleft_staff act_release_slashleft_staff_continue act_release_slashleft_staff act_ready_slashleft_staff act_parried_thrust_staff act_blocked_thrust_staff act_release_thrust_staff_continue act_release_thrust_staff act_ready_thrust_staff act_parried_overswing_staff act_blocked_overswing_staff act_release_overswing_staff_continue act_release_overswing_staff act_ready_overswing_staff act_parried_slash_horseback_polearm_left act_blocked_slash_horseback_polearm_left act_release_slash_horseback_polearm_left_continue act_release_slash_horseback_polearm_left act_ready_slash_horseback_polearm_left act_parried_slash_horseback_polearm_right act_blocked_slash_horseback_polearm_right act_release_slash_horseback_polearm_right_continue act_release_slash_horseback_polearm_right act_ready_slash_horseback_polearm_right act_parried_slash_horseback_left act_blocked_slash_horseback_left act_release_slash_horseback_left_continue act_release_slash_horseback_left act_ready_slash_horseback_left act_parried_slash_horseback_right act_blocked_slash_horseback_right act_release_slash_horseback_right_continue act_release_slash_horseback_right act_ready_slash_horseback_right act_parried_overswing_onehanded act_blocked_overswing_onehanded act_release_overswing_onehanded_continue act_release_overswing_onehanded act_ready_overswing_onehanded act_parried_slashleft_onehanded act_blocked_slashleft_onehanded act_release_slashleft_onehanded_continue act_release_slashleft_onehanded act_ready_slashleft_onehanded act_parried_slashright_onehanded act_blocked_slashright_onehanded act_release_slashright_onehanded_continue act_release_slashright_onehanded act_ready_slashright_onehanded act_parried_thrust_onehanded_lance act_blocked_thrust_onehanded_lance act_release_thrust_onehanded_lance_continue act_release_thrust_onehanded_lance act_ready_thrust_onehanded_lance act_parried_thrust_onehanded_horseback act_blocked_thrust_onehanded_horseback act_release_thrust_onehanded_horseback_continue act_release_thrust_onehanded_horseback act_ready_thrust_onehanded_horseback act_parried_thrust_onehanded act_blocked_thrust_onehanded act_release_thrust_onehanded_continue act_release_thrust_onehanded act_ready_thrust_onehanded act_parried_overswing_twohanded act_blocked_overswing_twohanded act_release_overswing_twohanded_continue act_release_overswing_twohanded act_ready_overswing_twohanded act_parried_thrust_twohanded act_blocked_thrust_twohanded act_release_thrust_twohanded_continue act_release_thrust_twohanded act_ready_thrust_twohanded act_parried_slashleft_twohanded act_blocked_slashleft_twohanded act_release_slashleft_twohanded_continue act_release_slashleft_twohanded act_ready_slashleft_twohanded act_parried_slashright_twohanded act_blocked_slashright_twohanded act_release_slashright_twohanded_continue act_release_slashright_twohanded act_ready_slashright_twohanded act_parried_uppercut_fist act_blocked_uppercut_fist act_release_uppercut_fist_continue act_release_uppercut_fist act_ready_uppercut_fist act_parried_direct_fist act_blocked_direct_fist act_release_direct_fist_continue act_release_direct_fist act_ready_direct_fist act_parried_swingleft_fist act_blocked_swingleft_fist act_release_swingleft_fist_continue act_release_swingleft_fist act_ready_swingleft_fist act_parried_swingright_fist act_blocked_swingright_fist act_release_swingright_fist_continue act_release_swingright_fist act_ready_swingright_fist act_reload_musket act_release_musket act_ready_musket act_reload_pistol act_release_pistol act_ready_pistol act_release_stone act_ready_stone act_release_throwing_axe act_ready_throwing_axe act_release_throwing_knife act_ready_throwing_knife act_release_javelin act_ready_javelin act_reload_crossbow_horseback act_reload_crossbow act_release_crossbow act_ready_crossbow act_release_bow_mounted act_ready_bow_mounted act_release_bow act_ready_bow act_cancel_attack_polearm act_cancel_attack_twohanded act_cancel_attack_onehanded act_unequip_bow_left_hip act_equip_bow_left_hip act_unequip_bow_back act_equip_bow_back act_unequip_shield act_equip_shield act_unequip_wakizashi act_equip_wakizashi act_unequip_katana act_equip_katana act_unequip_pistol_front_left act_equip_pistol_front_left act_unequip_revolver_right act_equip_revolver_right act_unequip_axe_back act_equip_axe_back act_unequip_dagger_front_right act_equip_dagger_front_right act_unequip_dagger_front_left act_equip_dagger_front_left act_unequip_spear act_equip_spear act_unequip_crossbow act_equip_crossbow act_unequip_axe_left_hip act_equip_axe_left_hip act_unequip_greatsword act_equip_greatsword act_unequip_sword act_equip_sword act_unequip_default act_equip_default act_lancer_ride_0 act_dismount_horse act_mount_horse act_ride_turn_left act_ride_turn_right act_ride_jump_end act_ride_jump act_ride_spur act_ride_rear act_lancer_ride_4_no_shield act_lancer_ride_4 act_ride_4 act_ride_3 act_ride_2 act_lancer_charge_parried act_lancer_ride_1 act_ride_1 act_ride_0 act_crouch_to_stand act_stand_to_crouch act_walk_forward_crouch act_walk_backward_right_hips_left act_walk_backward_right_hips_right act_walk_backward_right_polearm act_walk_backward_right_twohanded act_walk_backward_right_onehanded act_walk_backward_right act_walk_backward_left_hips_left act_walk_backward_left_hips_right act_walk_backward_left_polearm act_walk_backward_left_twohanded act_walk_backward_left_onehanded act_walk_backward_left act_walk_forward_left_hips_left act_walk_forward_left_hips_right act_walk_forward_left_polearm act_walk_forward_left_twohanded act_walk_forward_left_onehanded act_walk_forward_left act_walk_forward_right_hips_left act_walk_forward_right_hips_right act_walk_forward_right_polearm act_walk_forward_right_twohanded act_walk_forward_right_onehanded act_walk_forward_right act_walk_left_hips_left act_walk_left_hips_right act_walk_left_polearm act_walk_left_twohanded act_walk_left_onehanded act_walk_left act_walk_right_hips_left act_walk_right_hips_right act_walk_right_polearm act_walk_right_twohanded act_walk_right_onehanded act_walk_right act_walk_backward_hips_left act_walk_backward_hips_right act_walk_backward_greatsword act_walk_backward_staff act_walk_backward_onehanded act_walk_backward act_walk_forward_hips_left act_walk_forward_hips_right act_walk_forward_greatsword act_walk_forward_staff act_walk_forward_onehanded act_walk_forward act_run_left_hips_left act_run_left_hips_right act_run_left_polearm act_run_left_twohanded act_run_left_onehanded act_run_left act_run_right_hips_left act_run_right_hips_right act_run_right_polearm act_run_right_twohanded act_run_right_onehanded act_run_right act_run_backward_left_hips_left act_run_backward_left_hips_right act_run_backward_left_greatsword act_run_backward_left_staff act_run_backward_left_onehanded act_run_backward_left act_run_backward_right_hips_left act_run_backward_right_hips_right act_run_backward_right_greatsword act_run_backward_right_staff act_run_backward_right_onehanded act_run_backward_right act_run_backward_hips_left act_run_backward_hips_right act_run_backward_greatsword act_run_backward_staff act_run_backward_onehanded act_run_backward act_run_forward_left_hips_left act_run_forward_left_hips_right act_run_forward_left_greatsword act_run_forward_left_staff act_run_forward_left_onehanded act_run_forward_left act_run_forward_right_hips_left act_run_forward_right_hips_right act_run_forward_right_greatsword act_run_forward_right_staff act_run_forward_right_onehanded act_run_forward_right act_run_forward_hips_left act_run_forward_hips_right act_run_forward_greatsword act_run_forward_staff act_run_forward_onehanded act_run_forward act_kick_left_leg act_kick_right_leg act_prepare_kick_3 act_prepare_kick_2 act_prepare_kick_1 act_prepare_kick_0 act_turn_left_greatsword act_turn_right_greatsword act_turn_left_staff act_turn_right_staff act_turn_left_single act_turn_right_single act_turn_left act_turn_right act_stand_crossbow act_stand_staff act_stand_greatsword act_stand_single act_stand_unarmed act_jump_end_hard act_jump_end act_jump_loop act_jump act_stand_player_first_person act_stand_man act_stand
? ? module_animations.py动画类型常量:
arf_two_handed_blade = 0x01000000
arf_lancer = 0x02000000
arf_stick_item_to_left_hand = 0x04000000
arf_cyclic = 0x10000000
arf_use_walk_progress = 0x20000000
arf_use_stand_progress = 0x40000000
arf_use_inv_walk_progress = 0x80000000
##arf_walk = arf_phase_even | arf_cyclic
#-----------------------------------------
amf_priority_mask = 0x00000fff
amf_rider_rot_bow = 0x00001000
amf_rider_rot_throw = 0x00002000
amf_rider_rot_crossbow = 0x00003000
amf_rider_rot_pistol = 0x00004000
amf_rider_rot_overswing = 0x00005000
amf_rider_rot_thrust = 0x00006000
amf_rider_rot_swing_right = 0x00007000
amf_rider_rot_swing_left = 0x00008000
amf_rider_rot_couched_lance = 0x00009000
amf_rider_rot_shield = 0x0000a000
amf_rider_rot_defend = 0x0000b000
amf_start_instantly = 0x00010000
amf_use_cycle_period = 0x00100000
amf_use_weapon_speed = 0x00200000
amf_use_defend_speed = 0x00400000
amf_accurate_body = 0x00800000
amf_client_prediction = 0x01000000
amf_play = 0x02000000 #通过脚本调用播放
amf_keep = 0x04000000
amf_restart = 0x08000000 # restart animation even if it is the current animation
amf_hide_weapon = 0x10000000
amf_client_owner_prediction = 0x20000000
amf_use_inertia = 0x40000000
amf_continue_to_next = 0x80000000
#-----------------------------------------
acf_synch_with_horse = 0x00000001
acf_align_with_ground = 0x00000002
acf_enforce_lowerbody = 0x00000100
acf_enforce_rightside = 0x00000200
acf_enforce_all = 0x00000400
acf_parallels_for_look_slope = 0x00001000
acf_lock_camera = 0x00002000 #锁定摄像机
acf_displace_position = 0x00004000
acf_ignore_slope = 0x00008000
acf_thrust = 0x00010000
acf_right_cut = 0x00020000
acf_left_cut = 0x00040000
acf_overswing = 0x00080000
acf_rot_vertical_mask = 0x00300000
acf_rot_vertical_bow = 0x00100000
acf_rot_vertical_sword = 0x00200000
acf_anim_length_mask = 0xff000000
四.添加自己制作的动画并播放
["god_horse_man_sit_down", acf_enforce_lowerbody,
amf_priority_die|amf_play|amf_client_prediction|amf_use_cycle_period,
[10, "anim_human_02", 50, 69, arf_cyclic],
],
acf_enforce_lowerbody 引擎控制骨骼动画执行时下半身骨骼不受影响
amf_play 可以通过脚本调用该动画
arf_cyclic 动画是循环播放的
五.blender中编辑自己的动画
? ??<1.Blender下载SMD插件
? ? <3.Blender导入SMD文件进行骨骼动画编辑
文章来源:https://blog.csdn.net/qq_35829452/article/details/135238379
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。 如若内容造成侵权/违法违规/事实不符,请联系我的编程经验分享网邮箱:veading@qq.com进行投诉反馈,一经查实,立即删除!
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。 如若内容造成侵权/违法违规/事实不符,请联系我的编程经验分享网邮箱:veading@qq.com进行投诉反馈,一经查实,立即删除!