fennix said:Hey. Can someone tell me if casual user without knowledge of modding can play this? Can I just mix these files with native and play mod or do I need some program to compile? If so, which program? ty in advance.
SarranidRaider said:Nice! But you forgot the detailed instructions![]()
Somebody said:Did you replace the SceneObj folder?
Yael.at said:
<!-- -*- mode: markdown; coding: utf-8 -*- -->
# TAVERN ANIMATIONS - MODMERGER
## 1. INSTALLATION
1. Install a version of **Python 2.x** and make sure that the
command ``python`` points to the python2 executable. The Warband
module system does *not* work with any variant of Python 3!
2. Download the Mount&Blade:Warband module system or any equivalent
set of scripts. Set up the required parameters (such as the
variable ``export_dir`` in ``module_info.py``) as explained
therein.
3. Install the ``ModMerger`` system into the module-system directory.
4. Aquire the original Mod [(OSP) Tavern Animations Pack][1]
by [Slawomir of Aaarrghh][2]. Unpack the contents into tehe
directory you specified as ``export_dir``. The ``.py`` files can
be omitted. If the ``export_dir`` already contains a
``module.ini`` add the contents from the Tavern-Animations
``module.ini`` file to the existing ``module.ini`` instead of
overwriting it.
5. Add the ``ta_*.py`` files to the module-system directory.
6. Add ``ta`` to ``mods_active`` in ``modmerger_options.py``, e.g.
## ----- modmerger_options.py ------
# ...
mods_active = [
'SOME_OTHER_MOD_PREFIX',
'ta',
]
# ...
7. Execute ``build_module.bat`` from the module system. If errors are
reported, it may be necessary to rerun ``build_module.bat``.
## 2. CREDITS
The ModMerger scripts automate the installation steps described in the
``to module_*.py`` files of the
original [(OSP) Tavern Animations Pack][1]
by [Slawomir of Aaarrghh][2].
The Modmerger scripts were created by [Yael.at][3] in 2017.
The resource files, and original modifications instructions were
created by [Slawomir of Aaarrghh][2] in 2014. To the best of my
knowledge he created the resources himself.
The original ``info.txt`` file read
You can use contents of this pack without asking for my permission, as long as you:
- use it for M&B games
- use it for non-commercial purposes
- give credit
Daedalus / Slawomir of Aaarrghh
[email protected]
<!-- LINKS -->
[1]: https://forums.taleworlds.com/index.php/topic,299774.0.html
[2]: https://forums.taleworlds.com/index.php?action=profile;u=17331
[3]: https://forums.taleworlds.com/index.php?action=profile;u=485224
## Header from original file
from header_common import *
from header_animations import *
amf_priority_jump = 2
amf_priority_ride = 2
amf_priority_continue = 1
amf_priority_attack = 10
amf_priority_cancel = 12
amf_priority_defend = 14
amf_priority_defend_parry = amf_priority_defend + 1
amf_priority_throw = amf_priority_defend + 1
amf_priority_blocked = amf_priority_defend_parry
amf_priority_parried = amf_priority_defend_parry
amf_priority_kick = 33
amf_priority_jump_end = 33
amf_priority_reload = 60
amf_priority_mount = 64
amf_priority_equip = 70
amf_priority_rear = 74
amf_priority_striked = 80
amf_priority_fall_from_horse= 81
amf_priority_die = 95
horse_move = 10000
combat = 20000
defend = 35000
blow = 40000
attack_parried_duration = 0.6
attack_blocked_duration = 0.3
attack_blocked_duration_thrust = attack_blocked_duration + 0.3
attack_parried_duration_thrust = attack_parried_duration + 0.1
defend_parry_duration_1 = 0.6
defend_parry_duration_2 = 0.6
defend_parry_duration_3 = 0.8
ready_durn = 0.35
defend_duration = 0.75
defend_keep_duration = 2.0
cancel_duration = 0.25
blend_in_defense = arf_blend_in_3
blend_in_ready = arf_blend_in_6
blend_in_release = arf_blend_in_5
blend_in_parry = arf_blend_in_5
blend_in_parried = arf_blend_in_3
blend_in_walk = arf_blend_in_3
blend_in_continue = arf_blend_in_1
#### Animations begin here
animations = [
["sitting_drinking_low", acf_enforce_all, amf_priority_die|amf_play,
[20.0, "dedal_sitting_drinking_low", 0, 311, arf_use_stand_progress|arf_cyclic, 0, (0, 0, 0), 0.25],],
["sitting_low", acf_enforce_all, amf_priority_die|amf_keep,
[18.0, "dedal_sitting_low", 3, 301, arf_use_stand_progress|arf_cyclic, 0, (0, 0, 0), 0.25],],
["lute_sitting", acf_enforce_all, amf_priority_die|amf_play,
[2.05, "dedal_lute_sitting", 3, 7, arf_use_stand_progress|arf_cyclic, 0, (0, 0, 0), 0.25],],
["lute_standing", acf_enforce_all, amf_priority_die|amf_play,
[2.05, "dedal_lute_standing", 3, 7, arf_use_stand_progress|arf_cyclic, 0, (0, 0, 0), 0.25],],
["lyre_sitting", acf_enforce_all, amf_priority_die|amf_play,
[2.05, "dedal_lyre_sitting", 3, 7, arf_use_stand_progress|arf_cyclic, 0, (0, 0, 0), 0.25],],
["lyre_standing", acf_enforce_all, amf_priority_die|amf_play,
[2.05, "dedal_lyre_standing", 3, 7, arf_use_stand_progress|arf_cyclic, 0, (0, 0, 0), 0.25],],
]
# -*- coding: cp1254 -*-
from header_common import *
from header_dialogs import *
from header_operations import *
from header_parties import *
from header_item_modifiers import *
from header_skills import *
from header_triggers import *
from ID_troops import *
from ID_party_templates import *
from module_constants import *
from ta_util import *
ta_dialogs = [
##Tavern commoner's dialog turned off
[anyone|plyr,"start",[(eq,"$talk_context",tc_tavern_talk),(is_between,"$g_talk_troop",walkers_begin,walkers_end)],
"This person looks quite busy. I think I shouldn't interrupt...","close_window",[]],
##Tavern random musicans dialog turned off
[anyone|plyr,"start",[(eq,"$talk_context",tc_tavern_talk),(is_between,"$g_talk_troop","trp_musican_male","trp_musicans_end")],
"This person looks quite busy. I think I shouldn't interrupt...","close_window",[]],
]
def modmerge(var_set):
diag = var_set['dialogs']
diag[3:3] = ta_dialogs # Might not be robust against mixing with other mods?
from header_game_menus import *
from header_parties import *
from header_items import *
from header_mission_templates import *
from header_music import *
from header_terrain_types import *
from module_constants import *
from pprint import pprint
from ta_util import *
game_menus = [] # Needed by modmerger, so... meh.
ta_verbose = False
ta_dedal_tavern_replacer_pattern = [
(try_begin),
(party_get_slot, ":tavern_minstrel", "$current_town", slot_center_tavern_minstrel),
'*',
(set_visitor, ":cur_entry", ":tavern_minstrel"),
(val_add, ":cur_entry", 1),
(try_end)
]
ta_dedal_tavern_replacer = (
(try_begin),
(party_get_slot, ":tavern_minstrel", "$current_town", slot_center_tavern_minstrel),
(assign,":bard",0),#dedal
(gt, ":tavern_minstrel", 0),
(assign,":bard",1),#dedal
(set_visitor, ":cur_entry", ":tavern_minstrel"),
(val_add, ":cur_entry", 1),
(else_try),
(store_add, ":alternative_town", "$current_town", 9),
(try_begin),
(ge, ":alternative_town", towns_end),
(val_sub, ":alternative_town", 22),
(try_end),
(party_get_slot, ":tavern_minstrel", ":alternative_town", slot_center_tavern_minstrel),
(gt, ":tavern_minstrel", 0),
(assign,":bard",1),#dedal
(set_visitor, ":cur_entry", ":tavern_minstrel"),
(val_add, ":cur_entry", 1),
(try_end)
)
# This pattern should be at the end.
ta_dedal_tavern_extension_pattern = [
(change_screen_mission),
(try_end),
]
ta_dedal_tavern_extension = (
#dedal begin
(try_for_range,":entry",32,41),
(store_random_in_range,":r",0,100),
(gt,":r",50),#random chance of spawning
(try_begin),
(eq,":bard",0),
(store_random_in_range,":r",0,15),
(gt,":r",13),
(mission_tpl_entry_clear_override_items,"mt_town_default",":entry"),
(store_random_in_range,":r",0,2),
(try_begin),
(eq,":r",0),
(mission_tpl_entry_add_override_item,"mt_town_default",":entry","itm_dedal_lutnia"),
(else_try),
(mission_tpl_entry_add_override_item,"mt_town_default",":entry","itm_dedal_lira"),
(try_end),
(store_random_in_range,":dna",0,1000),
(store_random_in_range,":troop","trp_musican_male","trp_musicans_end"),
(set_visitor,":entry",":troop",":dna"),
(assign,":bard",1),
(else_try),
(store_random_in_range,":town_walker",town_walkers_begin,town_walkers_end),
(store_random_in_range,":dna",0,1000),
(mission_tpl_entry_clear_override_items,"mt_town_default",":entry"),
(store_random_in_range,":r",0,10),
(try_begin),
(gt,":r",2),
(mission_tpl_entry_add_override_item,"mt_town_default",":entry","itm_dedal_kufel"),
(try_end),
(set_visitor,":entry",":town_walker",":dna"),
(try_end),
(try_end),
#dedal end
(change_screen_mission),
(try_end)
)
def modmerge(var_set):
'''
Called by 'modmerger'
var_set is a ``dict`` of module variables.
'''
## Menu format:
## idx 4 contains the actions associated with the menu (script?)
## idx 5 contains options to display, if any.
mgame = var_set['game_menus']
itown, mtown = ta_get(mgame, 'town')
options = mtown[5]
itavern, otavern = ta_get(options, 'town_tavern')
operations = otavern[3]
ta_replace_sequence_range(
operations,
ta_dedal_tavern_replacer_pattern,
ta_dedal_tavern_replacer,
verbose=ta_verbose)
ta_replace_sequence_range(
operations,
ta_dedal_tavern_extension_pattern,
ta_dedal_tavern_extension,
verbose=ta_verbose)
#### HEADER FROM module_items.py
from module_constants import *
from ID_factions import *
from header_items import *
from header_operations import *
from header_triggers import *
imodbits_none = 0
imodbits_horse_basic = imodbit_swaybacked|imodbit_lame|imodbit_spirited|imodbit_heavy|imodbit_stubborn
imodbits_cloth = imodbit_tattered | imodbit_ragged | imodbit_sturdy | imodbit_thick | imodbit_hardened
imodbits_armor = imodbit_rusty | imodbit_battered | imodbit_crude | imodbit_thick | imodbit_reinforced |imodbit_lordly
imodbits_plate = imodbit_cracked | imodbit_rusty | imodbit_battered | imodbit_crude | imodbit_thick | imodbit_reinforced |imodbit_lordly
imodbits_polearm = imodbit_cracked | imodbit_bent | imodbit_balanced
imodbits_shield = imodbit_cracked | imodbit_battered |imodbit_thick | imodbit_reinforced
imodbits_sword = imodbit_rusty | imodbit_chipped | imodbit_balanced |imodbit_tempered
imodbits_sword_high = imodbit_rusty | imodbit_chipped | imodbit_balanced |imodbit_tempered|imodbit_masterwork
imodbits_axe = imodbit_rusty | imodbit_chipped | imodbit_heavy
imodbits_mace = imodbit_rusty | imodbit_chipped | imodbit_heavy
imodbits_pick = imodbit_rusty | imodbit_chipped | imodbit_balanced | imodbit_heavy
imodbits_bow = imodbit_cracked | imodbit_bent | imodbit_strong |imodbit_masterwork
imodbits_crossbow = imodbit_cracked | imodbit_bent | imodbit_masterwork
imodbits_missile = imodbit_bent | imodbit_large_bag
imodbits_thrown = imodbit_bent | imodbit_heavy| imodbit_balanced| imodbit_large_bag
imodbits_thrown_minus_heavy = imodbit_bent | imodbit_balanced| imodbit_large_bag
imodbits_horse_good = imodbit_spirited|imodbit_heavy
imodbits_good = imodbit_sturdy | imodbit_thick | imodbit_hardened | imodbit_reinforced
imodbits_bad = imodbit_rusty | imodbit_chipped | imodbit_tattered | imodbit_ragged | imodbit_cracked | imodbit_bent
#### ITEM DECLARATIONS
items = [
["dedal_kufel","Kufel",[("dedal_kufelL",0)], itp_type_hand_armor,0,0,weight(1),0],
["dedal_lutnia","Lutnia",[("dedal_lutniaL",0)], itp_type_hand_armor,0,0,weight(1),0],
["dedal_lira","Lira",[("dedal_liraL",0)], itp_type_hand_armor,0,0,weight(1),0],
]
from header_common import *
from header_operations import *
from header_mission_templates import *
from header_animations import *
from header_sounds import *
from header_music import *
from header_items import *
from module_constants import *
from pprint import pprint
from ta_util import *
mission_templates = [] # Needed by modmerger
ta_dedal_tavern_animations_triggers = (
ti_on_agent_spawn,1,0,[
(eq, "$talk_context", tc_tavern_talk),
(store_trigger_param_1,":agent"),
(agent_get_troop_id,":troop",":agent"),
(try_begin),
(is_between,":troop","trp_musican_male","trp_musicans_end"),
(try_begin),
(agent_has_item_equipped,":agent","itm_dedal_lutnia"),
(agent_set_stand_animation, ":agent", "anim_lute_sitting"),
(agent_set_animation, ":agent", "anim_lute_sitting"),
(agent_play_sound,":agent","snd_dedal_tavern_lute"),
(else_try),
(agent_has_item_equipped,":agent","itm_dedal_lira"),
(agent_set_stand_animation, ":agent", "anim_lyre_sitting"),
(agent_set_animation, ":agent", "anim_lyre_sitting"),
(agent_play_sound,":agent","snd_dedal_tavern_lyre"),
(try_end),
(store_random_in_range,":r",0,300),
(agent_set_animation_progress,":agent",":r"),
(else_try),
(is_between,":troop",tavern_minstrels_begin,tavern_minstrels_end),
(try_begin),
(agent_has_item_equipped,":agent","itm_dedal_lutnia"),
(agent_set_stand_animation, ":agent", "anim_lute_standing"),
(agent_set_animation, ":agent", "anim_lute_standing"),
(agent_play_sound,":agent","snd_dedal_tavern_lute"),
(else_try),
(agent_has_item_equipped,":agent","itm_dedal_lira"),
(agent_set_stand_animation, ":agent", "anim_lyre_standing"),
(agent_set_animation, ":agent", "anim_lyre_standing"),
(agent_play_sound,":agent","snd_dedal_tavern_lyre"),
(try_end),
(store_random_in_range,":r",0,300),
(agent_set_animation_progress,":agent",":r"),
(else_try),
(is_between,":troop",walkers_begin,walkers_end),
(try_begin),
(agent_has_item_equipped,":agent","itm_dedal_kufel"),
(agent_set_stand_animation, ":agent", "anim_sitting_drinking_low"),
(agent_set_animation, ":agent", "anim_sitting_drinking_low"),
(store_random_in_range,":r",0,300),
(else_try),
(agent_set_stand_animation, ":agent", "anim_sitting_low"),
(agent_set_animation, ":agent", "anim_sitting_low"),
(store_random_in_range,":r",0,300),
(try_end),
(agent_set_animation_progress,":agent",":r"),
(try_end),
],[]
)
ta_dedal_sitting_people = [
(1,mtef_visitor_source,af_override_horse|af_override_gloves,0,1,[]),#32
(2,mtef_visitor_source,af_override_horse|af_override_gloves,0,1,[]),#33
(3,mtef_visitor_source,af_override_horse|af_override_gloves,0,1,[]),#34
(4,mtef_visitor_source,af_override_horse|af_override_gloves,0,1,[]),#35
(5,mtef_visitor_source,af_override_horse|af_override_gloves,0,1,[]),#36
(6,mtef_visitor_source,af_override_horse|af_override_gloves,0,1,[]),#37
(7,mtef_visitor_source,af_override_horse|af_override_gloves,0,1,[]),#38
(8,mtef_visitor_source,af_override_horse|af_override_gloves,0,1,[]),#39
(10,mtef_visitor_source,af_override_horse|af_override_gloves,0,1,[]),#40
]
def modmerge(var_set):
'''
Used by ``modmerger``
'''
mission_templates = var_set['mission_templates']
itown, ttown = ta_get(mission_templates,'town_default')
spawnrecords = ttown[4]
triggers = ttown[5]
spawnrecords.extend(ta_dedal_sitting_people)
triggers.insert(0, ta_dedal_tavern_animations_triggers)
from header_sounds import *
sounds = [
("dedal_tavern_lute", sf_priority_6|sf_vol_5|sf_looping, ["dedal_tavern_lute_1.ogg","dedal_tavern_lute_2.ogg","dedal_tavern_lute_3.ogg"]),
("dedal_tavern_lyre", sf_priority_6|sf_vol_6|sf_looping, ["dedal_tavern_lyre_1.ogg","dedal_tavern_lyre_2.ogg","dedal_tavern_lyre_3.ogg"]),
]
#### HEADER SUBSET FROM module_troops.py
from header_common import *
from header_items import *
from header_troops import *
from header_skills import *
from ID_factions import *
from ID_items import *
from ID_scenes import *
def wp(x):
n = 0
r = 10 + int(x / 10)
n |= wp_one_handed(x)
n |= wp_two_handed(x)
n |= wp_polearm(x)
n |= wp_archery(x)
n |= wp_crossbow(x)
n |= wp_throwing(x)
return n
def wpe(m,a,c,t):
n = 0
n |= wp_one_handed(m)
n |= wp_two_handed(m)
n |= wp_polearm(m)
n |= wp_archery(a)
n |= wp_crossbow(c)
n |= wp_throwing(t)
return n
def wpex(o,w,p,a,c,t):
n = 0
n |= wp_one_handed(o)
n |= wp_two_handed(w)
n |= wp_polearm(p)
n |= wp_archery(a)
n |= wp_crossbow(c)
n |= wp_throwing(t)
return n
def wp_melee(x):
n = 0
r = 10 + int(x / 10)
n |= wp_one_handed(x + 20)
n |= wp_two_handed(x)
n |= wp_polearm(x + 10)
return n
#Skills
knows_common = knows_riding_1|knows_trade_2|knows_inventory_management_2|knows_prisoner_management_1|knows_leadership_1
knows_common_multiplayer = knows_trade_10|knows_inventory_management_10|knows_prisoner_management_10|knows_leadership_10|knows_spotting_10|knows_pathfinding_10|knows_tracking_10|knows_engineer_10|knows_first_aid_10|knows_surgery_10|knows_wound_treatment_10|knows_tactics_10|knows_trainer_10|knows_looting_10
def_attrib = str_7 | agi_5 | int_4 | cha_4
def_attrib_multiplayer = int_30 | cha_30
knows_lord_1 = knows_riding_3|knows_trade_2|knows_inventory_management_2|knows_tactics_4|knows_prisoner_management_4|knows_leadership_7
knows_warrior_npc = knows_weapon_master_2|knows_ironflesh_1|knows_athletics_1|knows_power_strike_2|knows_riding_2|knows_shield_1|knows_inventory_management_2
knows_merchant_npc = knows_riding_2|knows_trade_3|knows_inventory_management_3 #knows persuasion
knows_tracker_npc = knows_weapon_master_1|knows_athletics_2|knows_spotting_2|knows_pathfinding_2|knows_tracking_2|knows_ironflesh_1|knows_inventory_management_2
lord_attrib = str_20|agi_20|int_20|cha_20|level(38)
knight_attrib_1 = str_15|agi_14|int_8|cha_16|level(22)
knight_attrib_2 = str_16|agi_16|int_10|cha_18|level(26)
knight_attrib_3 = str_18|agi_17|int_12|cha_20|level(30)
knight_attrib_4 = str_19|agi_19|int_13|cha_22|level(35)
knight_attrib_5 = str_20|agi_20|int_15|cha_25|level(41)
knight_skills_1 = knows_riding_3|knows_ironflesh_2|knows_power_strike_3|knows_athletics_1|knows_tactics_2|knows_prisoner_management_1|knows_leadership_3
knight_skills_2 = knows_riding_4|knows_ironflesh_3|knows_power_strike_4|knows_athletics_2|knows_tactics_3|knows_prisoner_management_2|knows_leadership_5
knight_skills_3 = knows_riding_5|knows_ironflesh_4|knows_power_strike_5|knows_athletics_3|knows_tactics_4|knows_prisoner_management_2|knows_leadership_6
knight_skills_4 = knows_riding_6|knows_ironflesh_5|knows_power_strike_6|knows_athletics_4|knows_tactics_5|knows_prisoner_management_3|knows_leadership_7
knight_skills_5 = knows_riding_7|knows_ironflesh_6|knows_power_strike_7|knows_athletics_5|knows_tactics_6|knows_prisoner_management_3|knows_leadership_9
#These face codes are generated by the in-game face generator.
#Enable edit mode and press ctrl+E in face generator screen to obtain face codes.
reserved = 0
no_scene = 0
swadian_face_younger_1 = 0x0000000000000001124000000020000000000000001c00800000000000000000
swadian_face_young_1 = 0x0000000400000001124000000020000000000000001c00800000000000000000
swadian_face_middle_1 = 0x0000000800000001124000000020000000000000001c00800000000000000000
swadian_face_old_1 = 0x0000000d00000001124000000020000000000000001c00800000000000000000
swadian_face_older_1 = 0x0000000fc0000001124000000020000000000000001c00800000000000000000
swadian_face_younger_2 = 0x00000000000062c76ddcdf7feefbffff00000000001efdbc0000000000000000
swadian_face_young_2 = 0x00000003c00062c76ddcdf7feefbffff00000000001efdbc0000000000000000
swadian_face_middle_2 = 0x00000007c00062c76ddcdf7feefbffff00000000001efdbc0000000000000000
swadian_face_old_2 = 0x0000000bc00062c76ddcdf7feefbffff00000000001efdbc0000000000000000
swadian_face_older_2 = 0x0000000fc00062c76ddcdf7feefbffff00000000001efdbc0000000000000000
vaegir_face_younger_1 = 0x0000000000000001124000000020000000000000001c00800000000000000000
vaegir_face_young_1 = 0x0000000400000001124000000020000000000000001c00800000000000000000
vaegir_face_middle_1 = 0x0000000800000001124000000020000000000000001c00800000000000000000
vaegir_face_old_1 = 0x0000000d00000001124000000020000000000000001c00800000000000000000
vaegir_face_older_1 = 0x0000000fc0000001124000000020000000000000001c00800000000000000000
vaegir_face_younger_2 = 0x000000003f00230c4deeffffffffffff00000000001efff90000000000000000
vaegir_face_young_2 = 0x00000003bf00230c4deeffffffffffff00000000001efff90000000000000000
vaegir_face_middle_2 = 0x00000007bf00230c4deeffffffffffff00000000001efff90000000000000000
vaegir_face_old_2 = 0x0000000cbf00230c4deeffffffffffff00000000001efff90000000000000000
vaegir_face_older_2 = 0x0000000ff100230c4deeffffffffffff00000000001efff90000000000000000
khergit_face_younger_1 = 0x0000000009003109207000000000000000000000001c80470000000000000000
khergit_face_young_1 = 0x00000003c9003109207000000000000000000000001c80470000000000000000
khergit_face_middle_1 = 0x00000007c9003109207000000000000000000000001c80470000000000000000
khergit_face_old_1 = 0x0000000b89003109207000000000000000000000001c80470000000000000000
khergit_face_older_1 = 0x0000000fc9003109207000000000000000000000001c80470000000000000000
khergit_face_younger_2 = 0x000000003f0061cd6d7ffbdf9df6ebee00000000001ffb7f0000000000000000
khergit_face_young_2 = 0x00000003bf0061cd6d7ffbdf9df6ebee00000000001ffb7f0000000000000000
khergit_face_middle_2 = 0x000000077f0061cd6d7ffbdf9df6ebee00000000001ffb7f0000000000000000
khergit_face_old_2 = 0x0000000b3f0061cd6d7ffbdf9df6ebee00000000001ffb7f0000000000000000
khergit_face_older_2 = 0x0000000fff0061cd6d7ffbdf9df6ebee00000000001ffb7f0000000000000000
nord_face_younger_1 = 0x0000000000000001124000000020000000000000001c00800000000000000000
nord_face_young_1 = 0x0000000400000001124000000020000000000000001c00800000000000000000
nord_face_middle_1 = 0x0000000800000001124000000020000000000000001c00800000000000000000
nord_face_old_1 = 0x0000000d00000001124000000020000000000000001c00800000000000000000
nord_face_older_1 = 0x0000000fc0000001124000000020000000000000001c00800000000000000000
nord_face_younger_2 = 0x00000000310023084deeffffffffffff00000000001efff90000000000000000
nord_face_young_2 = 0x00000003b10023084deeffffffffffff00000000001efff90000000000000000
nord_face_middle_2 = 0x00000008310023084deeffffffffffff00000000001efff90000000000000000
nord_face_old_2 = 0x0000000c710023084deeffffffffffff00000000001efff90000000000000000
nord_face_older_2 = 0x0000000ff10023084deeffffffffffff00000000001efff90000000000000000
rhodok_face_younger_1 = 0x0000000009002003140000000000000000000000001c80400000000000000000
rhodok_face_young_1 = 0x0000000449002003140000000000000000000000001c80400000000000000000
rhodok_face_middle_1 = 0x0000000849002003140000000000000000000000001c80400000000000000000
rhodok_face_old_1 = 0x0000000cc9002003140000000000000000000000001c80400000000000000000
rhodok_face_older_1 = 0x0000000fc9002003140000000000000000000000001c80400000000000000000
rhodok_face_younger_2 = 0x00000000000062c76ddcdf7feefbffff00000000001efdbc0000000000000000
rhodok_face_young_2 = 0x00000003c00062c76ddcdf7feefbffff00000000001efdbc0000000000000000
rhodok_face_middle_2 = 0x00000007c00062c76ddcdf7feefbffff00000000001efdbc0000000000000000
rhodok_face_old_2 = 0x0000000bc00062c76ddcdf7feefbffff00000000001efdbc0000000000000000
rhodok_face_older_2 = 0x0000000fc00062c76ddcdf7feefbffff00000000001efdbc0000000000000000
man_face_younger_1 = 0x0000000000000001124000000020000000000000001c00800000000000000000
man_face_young_1 = 0x0000000400000001124000000020000000000000001c00800000000000000000
man_face_middle_1 = 0x0000000800000001124000000020000000000000001c00800000000000000000
man_face_old_1 = 0x0000000d00000001124000000020000000000000001c00800000000000000000
man_face_older_1 = 0x0000000fc0000001124000000020000000000000001c00800000000000000000
man_face_younger_2 = 0x000000003f0052064deeffffffffffff00000000001efff90000000000000000
man_face_young_2 = 0x00000003bf0052064deeffffffffffff00000000001efff90000000000000000
man_face_middle_2 = 0x00000007bf0052064deeffffffffffff00000000001efff90000000000000000
man_face_old_2 = 0x0000000bff0052064deeffffffffffff00000000001efff90000000000000000
man_face_older_2 = 0x0000000fff0052064deeffffffffffff00000000001efff90000000000000000
merchant_face_1 = man_face_young_1
merchant_face_2 = man_face_older_2
woman_face_1 = 0x0000000000000001000000000000000000000000001c00000000000000000000
woman_face_2 = 0x00000003bf0030067ff7fbffefff6dff00000000001f6dbf0000000000000000
swadian_woman_face_1 = 0x0000000180102006124925124928924900000000001c92890000000000000000
swadian_woman_face_2 = 0x00000001bf1000061db6d75db6b6dbad00000000001c92890000000000000000
khergit_woman_face_1 = 0x0000000180103006124925124928924900000000001c92890000000000000000
khergit_woman_face_2 = 0x00000001af1030025b6eb6dd6db6dd6d00000000001eedae0000000000000000
refugee_face1 = woman_face_1
refugee_face2 = woman_face_2
girl_face1 = woman_face_1
girl_face2 = woman_face_2
mercenary_face_1 = 0x0000000000000000000000000000000000000000001c00000000000000000000
mercenary_face_2 = 0x0000000cff00730b6db6db6db7fbffff00000000001efffe0000000000000000
vaegir_face1 = vaegir_face_young_1
vaegir_face2 = vaegir_face_older_2
bandit_face1 = man_face_young_1
bandit_face2 = man_face_older_2
undead_face1 = 0x00000000002000000000000000000000
undead_face2 = 0x000000000020010000001fffffffffff
#NAMES:
tf_guarantee_all = tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_gloves|tf_guarantee_helmet|tf_guarantee_horse|tf_guarantee_shield|tf_guarantee_ranged
tf_guarantee_all_wo_ranged = tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_gloves|tf_guarantee_helmet|tf_guarantee_horse|tf_guarantee_shield
#### TAVERN ANIMATIONS MOD TROOPS
troops = [
["musican_male","Musican","Musican",tf_guarantee_boots|tf_guarantee_armor,0,0,fac_commoners,[itm_short_tunic,itm_linen_tunic,itm_tabard,itm_woolen_hose,itm_blue_hose],def_attrib|level(4),wp(60),knows_common,man_face_young_1, man_face_old_2],
["musican_female","Musican","Musican",tf_female|tf_guarantee_boots|tf_guarantee_armor,0,0,fac_commoners,[itm_blue_dress,itm_dress,itm_woolen_dress,itm_peasant_dress,itm_woolen_hose,itm_blue_hose,itm_wimple_a,itm_wimple_with_veil,itm_female_hood],def_attrib|level(2),wp(40),knows_common,woman_face_1,woman_face_2],
["musicans_end","_","_",tf_inactive,0,0,0,[],0,0,0,0],
]
from pprint import pprint
def ta_pprint(treeish):
'''
Pretty-print compact.
'''
if isinstance(treeish, tuple):
a,b = '()'
elif isinstance(treeish, list):
a,b = '[]'
else:
print repr(treeish)
return
def _pr(x,maxlen=50):
r = repr(x)
if len(r) > maxlen:
return r[:maxlen-3] + '...'
else:
return r
if len(treeish) == 0:
print a,b
return
if len(treeish) == 1:
print a, _pr(treeish[0]), b
return
if True:
print a, _pr(treeish[0]), ','
for item in treeish[1:-1]:
print ' ', _pr(item), ','
print ' ', _pr(treeish[-1]), b
def ta_eq(a,b):
'''
Compares two items.
Case-insensitive if possible.
'''
try:
return a.lower() == b.lower()
except:
return a == b
def ta_get(tree, id):
'''
Return first item in **tree** which equals **ID** as pair
**(index, item)**.
If a string, comparison is not case-sensitive.
'''
for idx, item in enumerate(tree):
if (isinstance(item,(list,tuple))
and len(item) >= 1
and ta_eq(item[0], id) ):
return idx, item
raise KeyError('No item matching', id)
def ta_find_sequence(tree,sequence,offset=0):
'''
Finds start-index of exact occurrence of SEQUENCE in TREE.
OFFSET items at the beginning are skipped (default 0).
'''
sequence = tuple(sequence)
for idx in range(offset, len(tree)-len(sequence)+1):
tree_sequence = tuple(tree[idx:idx+len(sequence)])
if tree_sequence == sequence:
return idx
raise KeyError('Sequence not in tree', sequence)
def ta_find_sequence_range(tree,pattern):
'''
Returns (CONTENT,STARTINDEX,ENDINDEX) corresponding to PATTERN.
PATTERN may contain '*' items, which delimit sequences to look
for, e.g.
((try_begin),
(do_stuff),
'*',
(something),
'*',
(try_end))
'''
parts = [[]]
for item in pattern:
if item == '*':
parts.append([])
else:
parts[-1].append(item)
start = ta_find_sequence(tree,parts[0])
end = start + len(parts[0])
for part in parts[1:]:
part_start = ta_find_sequence(tree, part, end)
end = part_start + len(part)
content = tree[start:end]
return content,start,end
def ta_replace_sequence_range(tree,pattern,replacement,verbose=False):
'''
Replaces the region found with ``ta_find_sequence_range(TREE,PATTERN)`` with REPLACEMENT.
'''
content,start,end = ta_find_sequence_range(tree,pattern)
tree[start:end]= replacement
if verbose:
print('========== ta_replace_sequence_range ==========')
print('---------- PATTERN ----------')
pprint(pattern)
print('---------- BEFORE ----------')
pprint(content, indent=2)
print('---------- AFTER ----------')
pprint(replacement, indent=2)
print('==========================================')
def ta_interact(globals,locals):
import code
var_dict = globals
var_dict.update(locals)
code.InteractiveConsole(var_dict).ta_interact()
Vankod said:I have the same problem such as Yael.at
I came to the conclusion that the matter lies in the game_menus.py
Karl-Marx said:How I can combine this mod with diplomacy mod ?
Master_Anuca said:What can I do to make it work?