Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
For fun, I tried adding one handed thrust spear upthrust animations (from here: Link).

Added the below code to module_animations:

Code:
## Kham - Overhead 2H Spear Thrust
 ["ready_overswing_spear", acf_overswing|acf_rot_vertical_bow|acf_anim_length(100), amf_priority_attack|amf_use_weapon_speed|amf_use_inertia|amf_keep|amf_client_owner_prediction,
   [ready_durn, "attacks_staff_thrust_overhead", 6, 21, blend_in_ready],
 ],
 ["release_overswing_spear", acf_overswing|acf_rot_vertical_bow|acf_anim_length(100), amf_priority_attack|amf_use_weapon_speed|amf_play|amf_continue_to_next,
   [0.45, "attacks_staff_thrust_overhead", 21, 43, blend_in_release], 
 ],
 ["release_overswing_spear_continue", 0, amf_priority_continue|amf_use_weapon_speed|amf_play|amf_client_owner_prediction,
   [0.3, "attacks_staff_thrust_overhead", 43, 50, arf_blend_in_2],
 ],
 ["parried_overswing_spear", 0, amf_priority_parried|amf_use_weapon_speed|amf_play,
   [0.3, "attacks_staff_thrust_overhead", 50, 43, arf_blend_in_2],
 ],
 ["blocked_overswing_spear", 0, amf_priority_blocked|amf_use_weapon_speed|amf_play,
   [0.3, "attacks_staff_thrust_overhead", 50, 43, arf_blend_in_2],
 ],
 # Kham - Overhead 2H Spear Thrust End
 # Kham - Overhead 1H Spear Thrust
 ["ready_overswing_musket", acf_rot_vertical_sword| acf_overswing, amf_priority_attack|amf_use_weapon_speed|amf_use_inertia|amf_keep|amf_client_owner_prediction|amf_rider_rot_thrust,
  [ready_durn, "1h_spear_thrust_overhead", 0, 20, blend_in_ready],
 ],
 ["release_overswing_musket", acf_rot_vertical_sword|acf_overswing, amf_priority_attack|amf_use_weapon_speed|amf_play|amf_continue_to_next|amf_rider_rot_thrust,
  [0.45, "1h_spear_thrust_overhead", 20, 41, blend_in_release],#78
 ],
 ["release_overswing_musket_continue", 0, amf_priority_continue|amf_use_weapon_speed|amf_play|amf_client_owner_prediction|amf_rider_rot_thrust,
  [0.3, "1h_spear_thrust_overhead", 41, 52, arf_blend_in_2],
 ],
 ["parried_overswing_musket", 0, amf_priority_parried|amf_use_weapon_speed|amf_play,
   [0.3, "1h_spear_thrust_overhead", 26, 22, blend_in_parry],
 ],
 ["blocked_overswing_musket", 0, amf_priority_blocked|amf_use_weapon_speed|amf_play,
   [0.3, "1h_spear_thrust_overhead", 26, 22, blend_in_parry],#95 79
 ],
# Kham - Overhead 1H Spear Thrust END

And commented out the same amount of unused anim lines.

Added the apprporiate animation to resources folder, added the appropriate weapon flags to module_items, then tested it out.. to no avail. My character just does a walking animation when trying out the spear thrust. Any tips on how to properly implement this?
 
hmmm another problem with motomataru's Formations and AI it seems. everything compiles correctly but in-game at the beginning of any battle the "killfeed" is delayed for at least 30 seconds before messages start to show up, no errors though.

I suspect it's harmless but it doesn't happen in other mods that use this formationAI and I'd rather fix it, if anyone knows what the heck is going on or has any hunches pls let me know.
 
I'm sick tired of the intro quest with the bandit attack, the merchant quest and so on. I need a fast and easy intro to test the mod when needed. How to delete/skip that quest at the beginning?
 
laius said:
hmmm another problem with motomataru's Formations and AI it seems. everything compiles correctly but in-game at the beginning of any battle the "killfeed" is delayed for at least 30 seconds before messages start to show up, no errors though.

I suspect it's harmless but it doesn't happen in other mods that use this formationAI and I'd rather fix it, if anyone knows what the heck is going on or has any hunches pls let me know.

Press L to see what's holding the messages up. It's probably debug spam which is harmless and can be removed from the code in most cases.
 
jacobhinds said:
Press L to see what's holding the messages up. It's probably debug spam which is harmless and can be removed from the code in most cases.

or enable edit mode (game launcher) and look at your rgl_log.txt (it will be added there), you can then open it with Notepad++ and see all the messages, filter, search, etc

laius said:
that gave me lots of errors to do with missing operations so I figured I had to add these to header_operations:
did you fix your header_operations.py ? And did you update your other header_XXX.py files as well? You were using a old (outdated) modsys





Heinrik von Waiblingen said:
I'm sick tired of the intro quest with the bandit attack, the merchant quest and so on. I need a fast and easy intro to test the mod when needed. How to delete/skip that quest at the beginning?
quick start is commented out (IIRC). If you want to delete it just bypass the menu (its optional after all). If you want to have it there for testing: enable the cheat menu options on your build (a good filter option is to check for edit mode enable/disabled on your menu)

TLDR: you don't need the initial quest. You can remove it. You can make it optional. You can change it. And so on.
 
Heinrik von Waiblingen said:
How to bypass the menu?
Basically I just want to spawn in the map after chosing stats, name, face and characters background.

follow the flow of menus from the "start_game_0", and you will see what which one does (welcome text, gives stats/items, background info, calls the quest, ...)

also check "tutorial_cheat"

Edit: this thread has a discussion on this, code samples, etc  :arrow: https://forums.taleworlds.com/index.php/topic,349118.msg8377882.html#msg8377882
 
kalarhan said:
jacobhinds said:
Press L to see what's holding the messages up. It's probably debug spam which is harmless and can be removed from the code in most cases.

or enable edit mode (game launcher) and look at your rgl_log.txt (it will be added there), you can then open it with Notepad++ and see all the messages, filter, search, etc

laius said:
that gave me lots of errors to do with missing operations so I figured I had to add these to header_operations:
did you fix your header_operations.py ? And did you update your other header_XXX.py files as well? You were using a old (outdated) modsys

I replaced all the header files with the new ones at first but it wouldn't compile so I only replaced header_operations, and I need to be conservative about what files I replace with native ones since I'm editing an existing mod and also I have no idea what I'm doing.
anyway it doesn't seem like the outdated header files were the problem at all in this case. I was using an older version of the item_kinds1.txt (I had made some changes to it with morghs that are harder to make via the module system) and when the script went looking for the noswing items it creates they weren't there. a real BOZO move on my part. it worked error and delay free after I used the newly compiled item_kinds.
 
laius said:
I had made some changes to it with morghs that are harder to make via the module system

module_items.py is simple to work with, you just may need to invest a few minutes learning how the syntax works.

but if you still want to work with Morgh's that works as well. Just use it on the module_items.py file, not on items_kinds1.txt. That way you won't have issues with compilation deleting your changes.



laius said:
I replaced all the header files with the new ones at first but it wouldn't compile so I only replaced header_operations
Get WinMerge (or any similar tool). Check your module base version (example, Native 1.143). Compare it with latest (1.171), and see what is missing. Include new stuff on your header_XXX.py files, while keeping any custom changes in there.
 
Heinrik von Waiblingen said:
How to bypass the menu?
Basically I just want to spawn in the map after chosing stats, name, face and characters background.

I use this code in start_game_0.

Code:
("start_mod",[],"Quick Character (Don't click this unless you need to.)",
       [
        (troop_set_type,"trp_player",0),
        (assign,"$character_gender",tf_male),   
        (assign,"$character_rank",0),   
        (set_show_messages, 0),
        (troop_add_gold, "trp_player", 80000),
        (troop_add_item, "trp_player","itm_french_overalls_lightcavalry",0),
        (troop_add_item, "trp_player","itm_french_coat_chasseurguard",0),
        (troop_add_item, "trp_player","itm_french_colpack",0),
        (troop_add_item, "trp_player","itm_sabre_anix",0),

        (troop_raise_attribute, "trp_player",ca_strength,100),
        (troop_raise_attribute, "trp_player",ca_agility,100),
        (troop_raise_skill, "trp_player","skl_power_strike",10),
        (troop_raise_skill, "trp_player","skl_riding",10),
        (troop_raise_skill, "trp_player","skl_pathfinding",10),
        (troop_raise_skill, "trp_player","skl_spotting",10),
        (troop_raise_skill, "trp_player","skl_athletics",10),      
        (troop_raise_proficiency_linear, "trp_player", wpt_crossbow, 300),
        (troop_equip_items,"trp_player"),   
        (change_screen_map),
        ]
      ),
 
Heinrik von Waiblingen said:
Pity they all work on .txt and not .py, is there another thread about this issue?

if they work on .txt, they also work on .py files, just translate them (should be quite easy to do so). Besides as you have the source it should be doable to find any feature and tweak then as you gain more experience with the - horrible organized  :mrgreen: - modsys.

For VC modsys I wrote a short tutorial on the process of locating things: https://forums.taleworlds.com/index.php/topic,347990.msg8331487.html#msg8331487. Same thought process will work for Native or any mods.
 
Heinrik von Waiblingen said:
how do I edit faction relationships from the start? Like, having one faction against two others from the start.

file module_factions.py can be used for day 1 relations. But check how your dynamic relations work, in case you are using a random process to create unique campaigns.

TLDR: module_factions.py. Check you base mod too.
 
Added 10 new animations to a mod, and commented out 10 unused human animations.

When attempting to execute the animation, it plays OTHER animations instead.

1) Do the position of where I put the animation code in module_animations.py matter? I tried moving it around and it was still the same, sometimes even playing different animations (i.e different from the wrong animation that used to play).

2) Anything else I should try out to test?

Thanks
 
Khamukkamu said:
2) Anything else I should try out to test?

double check your IDs (ID_animations.py), compare it with Native. Make sure they are the same (you could have deleted something else by accident, or added more than you thought, issues with comments, etc)
 
Khamukkamu said:
Aside from the unused anim IDs being replaced by the new ones, they are the same.  :sad:

try posting your current code (animations and how are you using them with mission template). And check your frames (from the BRF) and priority.

when you say it doesnt work... are you trying to use a animation manually (via a mission trigger), like a blacksmith making a sword, but the agent instead does something else?
 
Status
Not open for further replies.
Back
Top Bottom