Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
NPC99 said:
Corbul said:
I've seen many mods set in the 17-19th centuries use specific hairs and facial hairs. The commonality of these would suggest they are from some of osp pack, but I can't find many hair osp's, let alone the one (or ones) featured in those mods. Same goes for some of those cheaply-made hussar uniforms, and for traditional Ukrainian hairs.
Does anyone know where I can find those? I've searched the forums here, the nexus, and mbrepository (as well as a few Russian/ Ukrainian sites) but can't seem to find anything.
Thanks!

Also, does anyone have a tutorial on how to add hunting?

You can find some OSP hussar uniforms in Willhelm’s Victorian Era pack https://forums.taleworlds.com/index.php/topic,332364.0.html

Jaymosuke’s hair OSP may be what you’re looking for https://forums.taleworlds.com/index.php/topic,164809.0.html

Thanks, but those weren't the uniforms I was looking for. Still, the pack does have some good items that I might use.
Thanks again!
 
Corbul said:
Where can I get pistol and rifle (not flintlock/ musket) reload animations?
Thank you. :smile:
Code:
 ["ready_pistol", acf_rot_vertical_sword|acf_anim_length(100), amf_priority_attack|amf_keep|amf_client_owner_prediction|amf_rider_rot_pistol,
   [0.3, "anim_human", combat+2500, combat+2515, blend_in_ready],
 ],
 ["release_pistol", acf_rot_vertical_sword|acf_anim_length(100), amf_priority_attack|amf_play|amf_client_owner_prediction|amf_rider_rot_pistol,
   [0.3, "anim_human", combat+2520, combat+2527, arf_blend_in_1],
 ],
 ["reload_pistol", 0, amf_priority_reload|amf_use_weapon_speed|amf_play,
   [3.0, "anim_human", combat+2650, combat+2860, arf_blend_in_8],
 ],
 ["ready_musket", acf_rot_vertical_bow|acf_anim_length(100), amf_priority_attack|amf_keep|amf_client_owner_prediction|amf_rider_rot_crossbow,
   [1.5, "anim_human", combat+1300, combat+1320, blend_in_ready],
 ],
 ["release_musket", acf_rot_vertical_bow|acf_anim_length(100), amf_priority_attack|amf_play|amf_client_owner_prediction|amf_rider_rot_crossbow,
   [1.0, "anim_human", combat+1330, combat+1331, arf_blend_in_1],
 ],
 ["reload_musket", 0, amf_priority_reload|amf_use_weapon_speed|amf_play,
   [2.0, "anim_human", combat+2650, combat+2860, arf_blend_in_8],
 ],
 
_Sebastian_ said:
Corbul said:
Where can I get pistol and rifle (not flintlock/ musket) reload animations?
Thank you. :smile:
Code:
 ["ready_pistol", acf_rot_vertical_sword|acf_anim_length(100), amf_priority_attack|amf_keep|amf_client_owner_prediction|amf_rider_rot_pistol,
   [0.3, "anim_human", combat+2500, combat+2515, blend_in_ready],
 ],
 ["release_pistol", acf_rot_vertical_sword|acf_anim_length(100), amf_priority_attack|amf_play|amf_client_owner_prediction|amf_rider_rot_pistol,
   [0.3, "anim_human", combat+2520, combat+2527, arf_blend_in_1],
 ],
 ["reload_pistol", 0, amf_priority_reload|amf_use_weapon_speed|amf_play,
   [3.0, "anim_human", combat+2650, combat+2860, arf_blend_in_8],
 ],
 ["ready_musket", acf_rot_vertical_bow|acf_anim_length(100), amf_priority_attack|amf_keep|amf_client_owner_prediction|amf_rider_rot_crossbow,
   [1.5, "anim_human", combat+1300, combat+1320, blend_in_ready],
 ],
 ["release_musket", acf_rot_vertical_bow|acf_anim_length(100), amf_priority_attack|amf_play|amf_client_owner_prediction|amf_rider_rot_crossbow,
   [1.0, "anim_human", combat+1330, combat+1331, arf_blend_in_1],
 ],
 ["reload_musket", 0, amf_priority_reload|amf_use_weapon_speed|amf_play,
   [2.0, "anim_human", combat+2650, combat+2860, arf_blend_in_8],
 ],

So I just change/ add them in module_animations.py and be good? No custom .brf files?
 
Corbul said:
_Sebastian_ said:
Corbul said:
Where can I get pistol and rifle (not flintlock/ musket) reload animations?
Thank you. :smile:
Code:
 ["ready_pistol", acf_rot_vertical_sword|acf_anim_length(100), amf_priority_attack|amf_keep|amf_client_owner_prediction|amf_rider_rot_pistol,
   [0.3, "anim_human", combat+2500, combat+2515, blend_in_ready],
 ],
 ["release_pistol", acf_rot_vertical_sword|acf_anim_length(100), amf_priority_attack|amf_play|amf_client_owner_prediction|amf_rider_rot_pistol,
   [0.3, "anim_human", combat+2520, combat+2527, arf_blend_in_1],
 ],
 ["reload_pistol", 0, amf_priority_reload|amf_use_weapon_speed|amf_play,
   [3.0, "anim_human", combat+2650, combat+2860, arf_blend_in_8],
 ],
 ["ready_musket", acf_rot_vertical_bow|acf_anim_length(100), amf_priority_attack|amf_keep|amf_client_owner_prediction|amf_rider_rot_crossbow,
   [1.5, "anim_human", combat+1300, combat+1320, blend_in_ready],
 ],
 ["release_musket", acf_rot_vertical_bow|acf_anim_length(100), amf_priority_attack|amf_play|amf_client_owner_prediction|amf_rider_rot_crossbow,
   [1.0, "anim_human", combat+1330, combat+1331, arf_blend_in_1],
 ],
 ["reload_musket", 0, amf_priority_reload|amf_use_weapon_speed|amf_play,
   [2.0, "anim_human", combat+2650, combat+2860, arf_blend_in_8],
 ],

So I just change/ add them in module_animations.py and be good? No custom .brf files?

Those animations are already in Warband's module_animations.py. If you want something else you should check out Parrot's animations from Blood & Iron https://forums.taleworlds.com/index.php?topic=361657.0
 
Ruthven said:
The Bowman said:
Ruthven said:
Look at other scripts with multiple params:
store_script_param_1
store_script_param_2

@Bowman and everyone forever: "unexpected end of file" errors can be instantly troubleshooted by looking at the last entry in the specified file; it will end exactly where the error is in the MS code

It usually does tell you where the problem is in the compiler or in the error message, but in this case, there was no feedback. Strangely enough, the issue wasn't exactly about the troop inventory, but one of the flags which was separated incorrectly.
I mean the text file - the compiler stops writing at the point of error (hence "unexpected end of file" - there are supposed to be further troop/item definitions) so if you open troops.txt or whatever, the last entry will be the one with the problem (or the one before.) This is a very common issue, and since the compiler doesn't point to the afflicted entry (as you mentioned) unless you modify the process files yourself (as kal mentioned), this is an easy peasy way to find out where it all went wrong.  :razz:

As an aside, what mod are you working on?  :smile:

Oh, fair enough.

I'm compiling my scene pack into a mod that's easy to install for everyone who is unfamiliar with the Module System (I was having trouble installing the scenes myself after I've accidentally re-formatted my HDD during a fresh Windows install attempt [I'm a dummy at anything that has to do with disk partitions]). Since I have decided to give that a go, I thought it wouldn't be a bad idea to fix some of the most irritating aspects of Native without affecting its flavor, such as replacing the some old items with similar-looking ones of better quality, adjusting the troop inventories a bit to make the weapon usage more realistic and role-oriented, and applying some community fixes to the game, such as Cabbadrin's village raids and siege inventory access.

And by the way, I think I've lost the nearly-finished Baryye with my HDD stunts.
 
Corbul said:
So I just change/ add them in module_animations.py and be good? No custom .brf files?

like mentioned above those animations are already in the game, just not used on Native module. However, as the name implies, they are not for what you were asking (modern weapons), but the musket variety. You can replace them - BRF - with others by checking OSP like suggested above (use the same entry on your module_animations.py).

Totenkopf900 said:
How do I increase the payment you get for being a mercenary for a kingdom?
module_presentations.py

Code:
      (try_begin),
        (gt, "$players_kingdom", 0),
        (neq, "$players_kingdom", "fac_player_supporters_faction"),
        (neq, "$players_kingdom", "fac_player_faction"),
        (eq, "$player_has_homage", 0),
        (str_store_faction_name, s0, "$players_kingdom"),
        (create_text_overlay, reg1, "str_mercenary_payment_from_s0", 0),
        (position_set_x, pos1, 900),
        (position_set_y, pos1, 900),
        (overlay_set_size, reg1, pos1),
        (position_set_x, pos1, 25),
        (position_set_y, pos1, ":cur_y"),
        (overlay_set_position, reg1, pos1),
        (call_script, "script_party_calculate_strength", "p_main_party", 0),
        (assign, ":offer_value", reg0),
        (val_div, ":offer_value", 2),
        (val_add, ":offer_value", 30),
        (call_script, "script_round_value", ":offer_value"),
        (val_add, ":net_change", reg0),
        (create_text_overlay, reg1, "@{!}{reg0}", tf_right_align|tf_single_line),
        (position_set_x, pos1, 900),
        (position_set_y, pos1, 900),
        (overlay_set_size, reg1, pos1),
        (overlay_set_color, reg1, 0x00AA00),
        (position_set_x, pos1, 500),
        (position_set_y, pos1, ":cur_y"),
        (overlay_set_position, reg1, pos1),
        (val_sub, ":cur_y", 27),
      (try_end),
 
Totenkopf900 said:
Sorry if this a noob question but how do the val_add and val_div formula works?

val = value

so val_add is "add this to the value"
  -> (val_add, a, b) :: a = a + b

for details on operations you can check header_operations.py
 
Maglubiyet said:
I'm trying to make some weapons require a custom skill to be a certain level to be equipped. Is it doable or hard-coded?

sure, but this description is short on details to point to a solution. You can check mods that have racial restriction, as a example, if you want to see what others did in the past - like just Orcs can use this item, and so on. Then think more about your design and how/when/who/why it should work.

easiest way is to just remove stuff from inventory after it with a map trigger.
 
kalarhan said:
Maglubiyet said:
I'm trying to make some weapons require a custom skill to be a certain level to be equipped. Is it doable or hard-coded?

sure, but this description is short on details to point to a solution. You can check mods that have racial restriction, as a example, if you want to see what others did in the past - like just Orcs can use this item, and so on. Then think more about your design and how/when/who/why it should work.

easiest way is to just remove stuff from inventory after it with a map trigger.

Thanks, man!

In case someone else tries to do the same thing in the future, search for "check_equipped_items" in module_scripts in The Last Days module system.
 
Maglubiyet said:
kalarhan said:
Maglubiyet said:
I'm trying to make some weapons require a custom skill to be a certain level to be equipped. Is it doable or hard-coded?

sure, but this description is short on details to point to a solution. You can check mods that have racial restriction, as a example, if you want to see what others did in the past - like just Orcs can use this item, and so on. Then think more about your design and how/when/who/why it should work.

easiest way is to just remove stuff from inventory after it with a map trigger.

Thanks, man!

In case someone else tries to do the same thing in the future, search for "check_equipped_items" in module_scripts in The Last Days module system.

Be careful though. In TLD, we use item_value to determine racial restrictions. So you either have to change the way you determine this OR make sure your item_values in module_items.py fit with your restrictions.
 
I want to make Bandit Lords
Example: Exiled Swadian Noble

module_troops.py
Code:
["exiled_swadian_noble","Exiled Swadian Noble","Exiled Swadian Nobles",tf_hero, 0, reserved, fac_outlaws,
   [itm_flat_topped_helmet,itm_padded_cloth_red,itm_khergit_leather_boots,itm_mail_mittens, itm_lance, itm_tab_shield_kite_cav_a, itm_morningstar, itm_hunter],
   def_attrib|level(30),wp(150),knight_skills_5, swadian_face_young_1, swadian_face_old_2],
module_party_templates.py
Code:
 ("exiled_swadian_noble","Exiled Swadian Noble",icon_vaegir_knight|carries_goods(2),0,fac_outlaws,bandit_personality,[(trp_exiled_swadian_noble,1,1),(trp_troublemaker,1,10),(trp_outlaw,1,10)]),
module_scripts.py
Code:
     (try_begin),
       (store_num_parties_of_template, ":num_parties", "pt_exiled_swadian_noble"), ### exiled_swadian_noble added by Johammed
       (lt,":num_parties",1),
       (store_random,":spawn_point",num_forest_bandit_spawn_points),
       (val_add,":spawn_point","p_forest_bandit_spawn_point"),
       (set_spawn_radius, 10),
       (spawn_around_party,":spawn_point","pt_exiled_swadian_noble"),
     (try_end),

Troublemakers and Outlaw are just some temporary custom bandit troops, don't mind them.

As you can see the troop type is tagged "tf_hero".
  • - If I capture this troop will a new one spawn? This would be a problem if rename this troop to a more personal name, as I wouln't want to have duplicates of the same hero.
    - Is there a way to make this hero spawn with a companion as prisoner, so you would have to beat this guy to hire the companion?
    - Is there a way to change the spawn from p_forest_bandit_spawn_point to a village like Elberl (village_72), without making a new spawnpoint in parties.py?

In the case of the "Companion as a prisoner" type of bandit lord, I would like him to only spawn once. But in other cases I would like to have bandit lords that keep on reappearing.
The best thing would be if the bandit lord only have this companion the first time they spawn, but not when they respawn.
I don't even know if companions can be duplicated this way, but I would like to prevent that if that's the case.
 
Following up on my previous questions.
  • 1. To make some bandit parties have unique colors, do I have to make a new type of bandit faction?
    2. If so, how does these factions work? If I make a new faction with 10 "Lords" with no fiefs whatsoever, will they stay loyal to their faction for ever? If not, is there a way to make them stay?
    3. If I give this faction high tier troops, can I make them not spawn in as deserters for this faction? I would like them to be hard to get a hold of, so killing small parties of deserters would ruin this.
 
Less Talking More Raiding said:
I want to make Bandit Lords
Example: Exiled Swadian Noble

module_troops.py
Code:
["exiled_swadian_noble","Exiled Swadian Noble","Exiled Swadian Nobles",tf_hero, 0, reserved, fac_outlaws,
   [itm_flat_topped_helmet,itm_padded_cloth_red,itm_khergit_leather_boots,itm_mail_mittens, itm_lance, itm_tab_shield_kite_cav_a, itm_morningstar, itm_hunter],
   def_attrib|level(30),wp(150),knight_skills_5, swadian_face_young_1, swadian_face_old_2],
module_party_templates.py
Code:
 ("exiled_swadian_noble","Exiled Swadian Noble",icon_vaegir_knight|carries_goods(2),0,fac_outlaws,bandit_personality,[(trp_exiled_swadian_noble,1,1),(trp_troublemaker,1,10),(trp_outlaw,1,10)]),
module_scripts.py
Code:
     (try_begin),
       (store_num_parties_of_template, ":num_parties", "pt_exiled_swadian_noble"), ### exiled_swadian_noble added by Johammed
       (lt,":num_parties",1),
       (store_random,":spawn_point",num_forest_bandit_spawn_points),
       (val_add,":spawn_point","p_forest_bandit_spawn_point"),
       (set_spawn_radius, 10),
       (spawn_around_party,":spawn_point","pt_exiled_swadian_noble"),
     (try_end),

Troublemakers and Outlaw are just some temporary custom bandit troops, don't mind them.

As you can see the troop type is tagged "tf_hero".
  • - If I capture this troop will a new one spawn? This would be a problem if rename this troop to a more personal name, as I wouln't want to have duplicates of the same hero.
    - Is there a way to make this hero spawn with a companion as prisoner, so you would have to beat this guy to hire the companion?
    - Is there a way to change the spawn from p_forest_bandit_spawn_point to a village like Elberl (village_72), without making a new spawnpoint in parties.py?

In the case of the "Companion as a prisoner" type of bandit lord, I would like him to only spawn once. But in other cases I would like to have bandit lords that keep on reappearing.
The best thing would be if the bandit lord only have this companion the first time they spawn, but not when they respawn.
I don't even know if companions can be duplicated this way, but I would like to prevent that if that's the case.
With some playtesting I found that if I capture this Hero, a new one will indeed spawn.
 
Less Talking More Raiding said:
So should I make a new faction for these types of lords just like the normal kingdoms?
Will they stay loyal even though they don't hold any fiefs?

a faction is just a name, you decide what it means. Kingdoms are factions, bandit groups are factions, but a bandit group is not the same as a kingdom, right?

all the stuff you mentioned like switching factions, etc, is defined on the modsys, so you can check it yourself and add any new rules you need to.
 
Status
Not open for further replies.
Back
Top Bottom