OSP Oriental Animations [MB Warband Japan] Human Animations (Modmerger pack)

Users who are viewing this thread

Shcherbyna

Sergeant
[MB Warband Japan OSP] Human Animations (Modmerger pack)

# Adds a new animations and player's actions in game
# MB Warband v1.1xx

Home: http://code.fosshub.com/MB-Warband-...and-Japan-OSP-Human-Animations-Modmerger-pack
ru-board: http://rusmnb.ru/index.php?topic=9010.0

Download pages:
http://code.fosshub.com/MB-Warband-Japan-OSP/downloads

Intro:

Animations:
+ "run_forward" - walking (not runs) if no weapon in hands
+ "shinobi_jump" - ninja jumping style. Allows you to jump on the roofs. Player is ninja if he has ninja map icon. Player has ninja map icon if he equips Black Hood item (for example). * Attention! This staff requires [MB Warband Japan OSP] Map Icons Animation (ModMerger Kit)

+ Japanese sitting style for men and women
"sitting_man_seiza"
"sitting_man_agura"
"sitting_woman_seiza"
"sitting_woman_aguraR"
+ "stand_up" - stand up animation

* Attention! Next staff requires Native Command Line or StudyMod Command Line

Command Line commands:
+ "seiza" - player sits in seiza pose
+ "agura" - player sits in agura pose
+ "stand up" - player stands up from sitting pose

Manual Installation Path (see also mb repository notes for red coloured markes)

+ shinobi_jump
For quick install & testing move japan_osp_anim.bfr to Warband\Modules\YourMod\Resource\.., edit module.ini (look below), edit actions.txt:
Code:
jump 256 2197815298 1
1.000000 jump 22 46 2 0 0.0 0.0 0.0 0.0
jump_loop 256 50331650 1
0.500000 jump_loop 0 14 268435460 0 0.0 0.0 0.0 0.0
jump_end 256 50331681 1
0.300000 jump 48 55 3 0 0.0 0.0 0.0 0.0
jump_end_hard 256 50331681 1
0.600000 jump_end_hard 36 54 2 0 0.0 0.0 0.0 0.0
to
Code:
jump 256 2197815298 1
1.000000 shinobi_jump 22 80 2 0 0.0 0.0 0.0 0.0
jump_loop 256 50331650 1
0.500000 jump_loop 0 14 268435460 0 0.0 0.0 0.0 0.0
jump_end 256 50331681 1
0.300000 shinobi_jump 81 102 3 0 0.0 0.0 0.0 0.0
jump_end_hard 256 50331681 1
0.600000 jump_end_hard 36 54 2 0 0.0 0.0 0.0 0.0

+ sitting_man_seiza
+ sitting_man_agura
+ sitting_woman_seiza
+ sitting_woman_aguraR
===================
Installation:
1. Adding source-pack to mod: japan_osp_anim.bfr copy to Warband\Modules\YourMod\Resource\..
2. Describing new source-pack: add to module.ini next red strings:
Example of my module.ini
Code:
load_resource = ani_wedding
load_resource = arabian_props
load_mod_resource = japan_osp_anim

#animations
load_resource = uni_jump
load_resource = uni_stances
Ok, next steps of install is different.. editing .py or .txt
3. Addition new actions:
3.1 my module_actions.py example:
Code:
...
...
...

["wedding_bride_last", 0, amf_play|amf_priority_die|amf_start_instantly|amf_keep,
[10.0, "wedding_bride_last", 0, 300, arf_blend_in_0]],

["equip_bayonet", 0, amf_priority_equip|amf_play|amf_restart|amf_client_prediction,
[1.0, "anim_human", 0, 1, 0]],
## [0.8, "equip_arms", 253, 276, arf_blend_in_0]],
["unequip_bayonet", 0, amf_priority_equip|amf_play|amf_restart|amf_client_prediction,
[1.0, "anim_human", 0, 1, 0]],
## [0.2, "equip_arms", 254, 250, arf_blend_in_0]],
["sitting_man_seiza", 0, amf_client_prediction,
[11.0, "sitting_man_seiza", 0, 315, arf_use_stand_progress|arf_cyclic, 0, (0, 0, 0), 0.25],
],
["sitting_man_agura", 0, amf_client_prediction,
[11.0, "sitting_man_agura", 0, 315, arf_use_stand_progress|arf_cyclic, 0, (0, 0, 0), 0.25],
],
["sitting_woman_seiza", 0, amf_client_prediction,
[11.0, "sitting_woman_seiza", 0, 315, arf_use_stand_progress|arf_cyclic, 0, (0, 0, 0), 0.25],
],
["sitting_woman_aguraR", 0, amf_client_prediction,
[11.0, "sitting_woman_aguraR", 0, 315, arf_use_stand_progress|arf_cyclic, 0, (0, 0, 0), 0.25],
],
["unused_human_anim_18", 0, 0, [1.0, "anim_human", 0, 1, 0]],
["unused_human_anim_19", 0, 0, [1.0, "anim_human", 0, 1, 0]],
["unused_human_anim_20", 0, 0, [1.0, "anim_human", 0, 1, 0]],
...
...
...
3.2 my actions.txt example:
Code:
...
...
...
wedding_bride_last 0 100728927 1
10.000000 wedding_bride_last 0 300 1 0 0.0 0.0 0.0 0.0
equip_bayonet 0 184549446 1
1.000000 anim_human 0 1 0 0 0.0 0.0 0.0 0.0
unequip_bayonet 0 184549446 1
1.000000 anim_human 0 1 0 0 0.0 0.0 0.0 0.0
sitting_man_seiza 0 16777216 1
11.000000 sitting_man_seiza 0 315 1342177280 0 0.000000 0.000000 0.000000 0.250000
sitting_man_agura 0 16777216 1
11.000000 sitting_man_agura 0 315 1342177280 0 0.000000 0.000000 0.000000 0.250000
sitting_woman_seiza 0 16777216 1
11.000000 sitting_woman_seiza 0 315 1342177280 0 0.000000 0.000000 0.000000 0.250000
sitting_woman_aguraR 0 16777216 1
11.000000 sitting_woman_aguraR 0 315 1342177280 0 0.000000 0.000000 0.000000 0.250000
unused_human_anim_18 0 0 1
1.000000 anim_human 0 1 0 0 0.0 0.0 0.0 0.0
unused_human_anim_19 0 0 1
1.000000 anim_human 0 1 0 0 0.0 0.0 0.0 0.0
unused_human_anim_20 0 0 1
...
...
...
Install is done. Now we have 4 actions (anim_sitting_man_seiza, anim_sitting_man_agura, anim_sitting_woman_seiza, anim_sitting_woman_aguraR) for using in scripts.



For example i have changed town animation of lords & ladies.
4. my module_scripts.py example:
Code:
...
...
...
# script_init_town_agent
# Input: none
# Output: none
("init_town_agent",
[
(store_script_param, ":agent_no", 1),
(agent_get_troop_id, ":troop_no", ":agent_no"),
(set_fixed_point_multiplier, 100),
(assign, ":stand_animation", -1),
(try_begin),
(this_or_next|is_between, ":troop_no", armor_merchants_begin, armor_merchants_end),
(is_between, ":troop_no", weapon_merchants_begin, weapon_merchants_end),
(try_begin),
(troop_get_type, ":cur_troop_gender", ":troop_no"),
(eq, ":cur_troop_gender", 0),
(agent_set_animation, ":agent_no", "anim_stand_townguard"),
(else_try),
(agent_set_animation, ":agent_no", "anim_stand_townguard"),
(end_try),
(else_try),
(is_between, ":troop_no", kingdom_ladies_begin, kingdom_ladies_end),
(assign, ":stand_animation", "anim_sitting_woman_seiza"),
(else_try),
(is_between, ":troop_no", active_npcs_begin, active_npcs_end),
(assign, ":stand_animation", "anim_sitting_man_agura"),
(else_try),
(is_between, ":troop_no", soldiers_begin, soldiers_end),
(assign, ":stand_animation", "anim_stand_townguard"),
(try_end),
(try_begin),
(ge, ":stand_animation", 0),
(agent_set_stand_animation, ":agent_no", ":stand_animation"),
(agent_set_animation, ":agent_no", ":stand_animation"),
(store_random_in_range, ":random_no", 0, 100),
(agent_set_animation_progress, ":agent_no", ":random_no"),
(try_end),
]),
...
...
...
4.1 my scripts.txt example (woman & man seiza):
Code:
...
...
...
init_town_agent -1
31 23 2 1224979098644774912 1 1718 2 1224979098644774913 1224979098644774912 2124 1 100 2133 2 1224979098644774914 -1 4 0 1073741857 3 1224979098644774913 360287970189640236 360287970189640258 33 3 1224979098644774913 360287970189640258 360287970189640280 4 0 1506 2 1224979098644774915 1224979098644774913 31 2 1224979098644774915 0 1740 2 1224979098644774912 1801439850948198844 5 0 1740 2 1224979098644774912 1801439850948198844 3 0 5 0 33 3 1224979098644774913 360287970189640022 360287970189640143 2133 2 1224979098644774914 1801439850948198868 5 0 33 3 1224979098644774913 360287970189639874 360287970189640022 2133 2 1224979098644774914 1801439850948198866 5 0 33 3 1224979098644774913 360287970189639705 360287970189639816 2133 2 1224979098644774914 1801439850948198844 3 0 4 0 30 2 1224979098644774914 0 1741 2 1224979098644774912 1224979098644774914 1740 2 1224979098644774912 1224979098644774914 2136 3 1224979098644774916 0 100 1743 2 1224979098644774912 1224979098644774916 3 0
init_town_walker_agents -1
...
...
...
4.2 my scripts.txt example (woman & man agura):
Code:
...
...
...
init_town_agent -1
31 23 2 1224979098644774912 1 1718 2 1224979098644774913 1224979098644774912 2124 1 100 2133 2 1224979098644774914 -1 4 0 1073741857 3 1224979098644774913 360287970189640236 360287970189640258 33 3 1224979098644774913 360287970189640258 360287970189640280 4 0 1506 2 1224979098644774915 1224979098644774913 31 2 1224979098644774915 0 1740 2 1224979098644774912 1801439850948198844 5 0 1740 2 1224979098644774912 1801439850948198844 3 0 5 0 33 3 1224979098644774913 360287970189640022 360287970189640143 2133 2 1224979098644774914 1801439850948198869 5 0 33 3 1224979098644774913 360287970189639874 360287970189640022 2133 2 1224979098644774914 1801439850948198867 5 0 33 3 1224979098644774913 360287970189639705 360287970189639816 2133 2 1224979098644774914 1801439850948198844 3 0 4 0 30 2 1224979098644774914 0 1741 2 1224979098644774912 1224979098644774914 1740 2 1224979098644774912 1224979098644774914 2136 3 1224979098644774916 0 100 1743 2 1224979098644774912 1224979098644774916 3 0
init_town_walker_agents -1
...
...
...



Mod Merger Installation Path
After reviewing the source code you will see:
+ How to use Modmerger to add or replace the animation in the module system
+ How to use Modmerger to replace tuple in script
+ How to replace the standard jump by new one under the given conditions

=== Install ===

* Installed ModMerger must be. (http://www.mbrepository.com/file.php?id=2151)

1) Copy resources to Warband/Modules/YourMod/
2) Edit module.ini
3) Copy to Module_system/ Japan_OSP-folder
4) Edit modmerger_options.py
5) Build module by build_module.bat[/sub]
 
Last edited by a moderator:

Shcherbyna

Sergeant
Bug: The player does not sit with arms

player_actions_scripts.py said:
update_script_command_line_analyzer = [
            (this_or_next|eq, "$cmd_code", 2639), # "stand up"
            (eq, "$cmd_code", 1655), # "встать"
            (agent_set_animation, "$g_player_agent", "anim_stand_up"),
            #(mission_cam_set_mode, 0, 5000, 0), # привязать камеру к игроку
            (agent_set_no_dynamics, "$g_player_agent", 0), # включить движение агента
        (else_try),
            (eq, "$cmd_code", 1480), # "seiza" (crouch)
            # Камера привязывается к игроку на высоте 166-180, двигать камерой на новой высоте не получается.
            # (mission_cam_set_mode, 1, 0, 0), # отвязать камеру от игрока и разрешить ей сдвинуться вниз
            # (mission_cam_get_position, pos10),
            # (position_move_z, pos10, -50, 1),
            # (mission_cam_animate_to_position, pos10, 1000),
            # Hide weapon first / убрать оружие, иначе на сядет
            (agent_get_wielded_item, ":wielded_weapon", "$g_player_agent", 0),
            (agent_unequip_item, "$g_player_agent", ":wielded_weapon"),

            (troop_get_type, ":is_female", "trp_player"),
            ...
            ...

        (else_try),
            (eq, "$cmd_code", 1350), # "agura" (crouch)
            # Hide weapon first / убрать оружие, иначе на сядет
            (agent_get_wielded_item, ":wielded_weapon", "$g_player_agent", 0),
            (agent_unequip_item, "$g_player_agent", ":wielded_weapon"),

            (troop_get_type, ":is_female", "trp_player"),
            ...
            ...
           
]
 
Top Bottom