Modding Q&A [For Quick Questions and Answers]

正在查看此主题的用户

状态
不接受进一步回复。
Hi all,

I'm starting a M&B mod that will be a complete overhaul and started by removing everything I could while still getting the Module System to build. It is working (more or less) but I have two questions:
  • Has someone already done this, posted a bare-bones module with only the framework for starting a new mod?
  • After making my changes to the module system, clicking on the world map sometimes doesn't cause the player to move. What could I have broken to mess up the world map navigation?

Thanks!
 
We have several problems that impact performance - for slow PCs and large battles, as they are similar problems.
1)  Too many polygons
2)  no LODs have been made by OpenBRF and added to the resource
3)  the armors are often Mount&Blade models and NOT Warband models, so as I am told there is a missing alpha shader value that makes some armors glow in green when users set some HDR modes in their own video options settings for Warband.
1) I already know
2) I only need to click the "compute LOD" in open BRF, right?
3) I don't have idea.. can someone describes an information about this?
 
disperse 说:
Hi all,

I'm starting a M&B mod that will be a complete overhaul and started by removing everything I could while still getting the Module System to build. It is working (more or less) but I have two questions:
  • Has someone already done this, posted a bare-bones module with only the framework for starting a new mod?
  • After making my changes to the module system, clicking on the world map sometimes doesn't cause the player to move. What could I have broken to mess up the world map navigation?

Thanks!

https://forums.taleworlds.com/index.php/topic,155131.0.html
 
Hello  all! To understand, which lines and how I must change (in vanilla NW module system) to make my own order of troops, I moved the last troop of Austrian infantry (austrian_grenadier) on the first place of list of vanilla Austrian infantry and in module_scripts.py I changed order of Austrian infantry respectively, like this.

插入代码块:
       (this_or_next|is_between, ":troop_no", "trp_austrian_grenadier","trp_austrian_infantry_rifle"), # Austrian

But after that in he game all infantry units are on their places, but austrian_grenadier is now in the Specialists section.
Can someone help me to change list of infantry units or help me to understand, what else should I change so (in this case) austrian_grenadier will be on the first place of Austrian infantry?
_______________________________________________________________________________

If someone is interested in a solution for this question - I found one. I just created new section (like in this tutorial, but without actually making a new section by changing module_presentations.py) and added all unused old troops in this new section, worked perfectly. New troops I added instead of old ones and also I added my new rankers, musicians, NCOs and officers to respective lists in module_scripts.py and choosed my new unit as standart unit for faction.
 
_Sebastian_ 说:
itp_primary is necessary to make the weapon usable.
itp_secondary seems to be deprecated, as it has no known functionality.

As fas as I remember, the AI favours either the longest or most damaging weapon, or a mixture of both...
However there's some black magic involved, for sure!
Thanks! Yes, I was quite surprised when I tested changing itp_primary to itp_secondary and found my soldiers attacking with their bare fists.  :smile:
 
_Sebastian_ 说:
Khamukkamu 说:
Does the engine do anything different with itp_has_bayonet or it can be used for different purposes?
Applying it to an alternative-mode weapon results in playing a special agent animation when switching weapon modes.
Without the flag weapon mode switching happens instantly without any animation.

Thanks Sebastian. So if I do not use the engine's weapon switching mode (key_z) at all in a mod, and use this item property as a way to classify certain weapons, then all is good :smile:
 
So, can somebody please answer me? Hey, how do I get realistic swordplay from 1429 la guerre cent ans to different mods? Specifically Medival Conquests.
 
Ivkolya 说:
Hello  all! To understand, which lines and how I must change (in vanilla NW module system) to make my own order of troops, I moved the last troop of Austrian infantry (austrian_grenadier) on the first place of list of vanilla Austrian infantry and in module_scripts.py I changed order of Austrian infantry respectively, like this.

插入代码块:
       (this_or_next|is_between, ":troop_no", "trp_austrian_grenadier","trp_austrian_infantry_rifle"), # Austrian

But after that in he game all infantry units are on their places, but austrian_grenadier is now in the Specialists section.
Can someone help me to change list of infantry units or help me to understand, what else should I change so (in this case) austrian_grenadier will be on the first place of Austrian infantry?

The module system uses a lot of ranges for code loops. Whatever troop that was previously listed first for the Austrians in module_troops.py is probably still being used as the start of the Austrian range elsewhere in NW’s code. Search the whole module system for all instances of the previously first Austrian troop. Where these are range starts or ends, replace it with “trp_austrian_grenadier”. Also check module_constants.py for the start and end of ranges (i.e in Warband: soldiers_begin = “trp_farmer” soldiers_end = “trp_town_walker_1”).
 
So this is my first post on the forum, so forgive me if this is the wrong place or i'm doing anything wrong.

I've been working on a module for my own amusement (And for a few friends), And i've been trying to implement firearms into Native Warband. I know that there are Pistol and Musket weapon types, And i know there is a pistol readily available through the cheat menu in the game,  But the actual weapons aren't appearing in shops. I've checked around online, and apparently the game doesnt know how to add the Pistol/Musket weapon types to merchant shop lists (Or something like that). Is there a way to fix this? I've seen mods like Warsword Conquest do it, But i'm not sure myself on how to fix it.
 
BurntShooter 说:
So this is my first post on the forum, so forgive me if this is the wrong place or i'm doing anything wrong.

I've been working on a module for my own amusement (And for a few friends), And i've been trying to implement firearms into Native Warband. I know that there are Pistol and Musket weapon types, And i know there is a pistol readily available through the cheat menu in the game,  But the actual weapons aren't appearing in shops. I've checked around online, and apparently the game doesnt know how to add the Pistol/Musket weapon types to merchant shop lists (Or something like that). Is there a way to fix this? I've seen mods like Warsword Conquest do it, But i'm not sure myself on how to fix it.

Warband’s flintlock_pistol is already flagged as itp_merchandise to make it available in shops. However, the script refresh_center_weaponsmiths in module_scripts.py needs to be edited to include a troop_add_merchandise_with_faction operation for itp_type_pistol.
 
Alright, I've found it in module_scripts.

Do simply add
(troop_add_merchandise_with_faction,reg(2),  ":cur_faction", itp_type_pistol,2)?
And the same with the cartridges? or do i need to add anything else specific? Since im not actually sure what the specific parts of this line means..
 
pawelord 说:
So, can somebody please answer me? Hey, how do I get realistic swordplay from 1429 la guerre cent ans to different mods? Specifically Medival Conquests.
I'm not sure what you mean by that.
Could be the animations, AI, damage system, etc.
Please specify...
 
_Sebastian_ 说:
pawelord 说:
So, can somebody please answer me? Hey, how do I get realistic swordplay from 1429 la guerre cent ans to different mods? Specifically Medival Conquests.
I'm not sure what you mean by that.
Could be the animations, AI, damage system, etc.
Please specify...

I think he meant this: Papa Lazarou's Combat Animation Enhancement

@pawelord, take a look at that link and follow the instructions carefully.
 
THANK YOU @Khamukkamu

That's exactly what i needed. BTW. I wonder why isn't this implemented in every mod, it looks super cool.
 
BurntShooter 说:
Alright, I've found it in module_scripts.

Do simply add
(troop_add_merchandise_with_faction,reg(2),  ":cur_faction", itp_type_pistol,2)?
And the same with the cartridges? or do i need to add anything else specific? Since im not actually sure what the specific parts of this line means..

if you don't understand an operation look it up in header_operations.py:

插入代码块:
troop_add_merchandise_with_faction     = 1513	# (troop_add_merchandise_with_faction,<troop_id>,<faction_id>,<item_type_id>,<value>),
#faction_id is given to check if troop is eligible to produce that item

I only have an old 1.166 module system for warband where the code is:
插入代码块:
# script_refresh_center_weaponsmiths
  ("refresh_center_weaponsmiths",
  [
    (reset_item_probabilities, 100),
    (set_merchandise_modifier_quality, 150),
    (try_for_range, ":cur_merchant", weapon_merchants_begin, weapon_merchants_end),
	  (store_sub, ":cur_town", ":cur_merchant", weapon_merchants_begin),
      (val_add, ":cur_town", towns_begin), 
	  (troop_clear_inventory, ":cur_merchant"),
      (party_get_slot, ":cur_faction", ":cur_town", slot_center_original_faction),
      (troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_one_handed_wpn, 5),
      (troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_two_handed_wpn, 5),
      (troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_polearm, 5),
      (troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_shield, 6),
      (troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_bow, 4),
      (troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_crossbow, 3),
      (troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_thrown, 5),
      (troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_arrows, 2),
      (troop_add_merchandise_with_faction, ":cur_merchant", ":cur_faction", itp_type_bolts, 2),
      (troop_ensure_inventory_space, ":cur_merchant", merchant_inventory_space),
      (troop_sort_inventory, ":cur_merchant"), 
      (store_troop_gold, reg6, ":cur_merchant"),
      (lt, reg6, 1000),
      (store_random_in_range, ":new_gold", 250, 500),
      (call_script, "script_troop_add_gold", ":cur_merchant", ":new_gold"),
    (try_end),
  ]),

For that code, I'd copy the line for itp_type_bolts and change itp_type_bolts to either itp_type_pistol for pistols or to itp_type_bullets for cartridges.

I don't know where your reg(2) comes from. If it was already in your version of the script instead of ":cur_merchant" it would need to be written as reg2 and the line of code assigning its values:
插入代码块:
(try_for_range, ":cur_merchant", weapon_merchants_begin, weapon_merchants_end),
would also have to refer to reg2 as opposed to ":cur_merchant" which would be a peculiar use of a register.
 
reg(1), reg(2), ... is the old way, that still works, replaced by reg1, reg2, ... On current modsys

You can see a few cases on Native modsys that were not updated (leftovers)
 
kalarhan 说:
reg(1), reg(2), ... is the old way, that still works, replaced by reg1, reg2, ... On current modsys

You can see a few cases on Native modsys that were not updated (leftovers)

Thanks for the clarification. That's the first time I've felt modern for modding in version 1.143.  :grin:
 
状态
不接受进一步回复。
后退
顶部 底部