Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Okay I'm almost giving up. Tried with only mono sounds and none of them play + game crashes when one of the enemies using them kill you for some reason. Stereo sounds work but with the problems mentioned earlier and also crash the game when the enemies get close.
None of this makes any ****ing sense.
 
benis said:
game crashes

try modding with the modsys (.py files). See if your mod is open source or not, or use the Native modsys as a example to generate your sounds.txt changes.



CutContent said:
And is there a way of transferring Warband singler player operations to MB?

the operations are part of the engine. They do not exist on the old version (MB), so you can either mod Warband or go look for a alternative (something like WSE) and add them yourself.
 
I need a way to do it through the txt

https://pastebin.com/x1nDXPSY

New sounds are the "undead..." sounds at the end. What do I need to change here?
Another question also: in this example

snd_body_fall_small 2656 2 97 0 98 0

What does the 2656 stand for?
 
benis said:
I need a way to do it through the txt

you can do your changes using modsys, even if you don't have the one for your specific mod. Use Native modsys, that way you can see how the flags are used (instead of magic numbers in the .txt), then compare the changes/results and merge them with your close source mod.
 
Hey posted this on reddit but got ignored. I'm just going to repost it.

So I am trying to edit the map of my mod for viking conquest. No map editing software worked for VC so I decided to use the module.parties folder. I added in the locations onto the map (did not edit land at all). The build_module_bat file ran and there was no errors. But when I went to this mod, I could not find these locations. I made other changes in making this mod that I did find. Anyone know what I did wrong? I'll post my code for convenience sake.

("loki_residence","Holy Forrest",pf_disabled|icon_sacred_forest|pf_is_static|pf_always_visible, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(176,-247),[]), #Frisia ("thor_residence","Holy Forrest",pf_disabled|icon_sacred_forest|pf_is_static|pf_always_visible, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(251,-89),[]), #Denmark ("odin_residence","Holy Forrest",pf_disabled|icon_sacred_forest|pf_is_static|pf_always_visible, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(228,92),[]), #Norway ("tyr_residence","Holy Forrest",pf_disabled|icon_sacred_forest|pf_is_static|pf_always_visible, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,((29,121)),[]), #Northymbre ("freyja_residence","Holy Forrest",pf_disabled|icon_sacred_forest|pf_is_static|pf_always_visible, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(-150,-6),[]), #Dub Linh ("freyr_residence","Holy Forrest",pf_disabled|icon_sacred_forest|pf_is_static|pf_always_visible, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(20,-9:cool:,[]),
 
antydaantiest said:
So I am trying to edit the map of my mod for viking conquest

check this guide to learn how to setup modsys. It looks like you have issues with your module_info.py "export_dir" variable.
https://forums.taleworlds.com/index.php/topic,240255.0.html

to use VC module_parties.py with a map tool you need to remove the troops like in this
Code:
    ("aescesdun","Aescesdun",pf_disabled|icon_sacred_forest|pf_is_static|pf_always_visible|pf_hide_defenders, no_menu, pt_none, fac_kingdom_5,0,ai_bhvr_hold,0,(5.86,-206.64),[
        (trp_kingdom_5_lord, 1,0),(trp_knight_5_1, 1,0),(trp_knight_5_3, 1,0),(trp_knight_5_4, 1,0),(trp_knight_5_5, 1,0),(trp_knight_5_6, 1,0),(trp_knight_5_7, 1,0),(trp_knight_5_9, 1,0),(trp_knight_5_11, 1,0),
        (trp_saxon_level0_landed, 410,420),(trp_saxon_bowman, 190,200),(trp_saxon_level0_companion, 290,300),(trp_saxon_standard_bearer, 15,20),(trp_todos_cuerno, 4,6),
        (trp_saxon_level1_landed, 230,240),(trp_saxon_level2_landed, 190,200),(trp_saxon_horseman, 20,30),(trp_saxon_level3_landed, 15,20),
        (trp_saxon_level1_companion, 50,60),(trp_saxon_level2_companion, 30,40),
        ]),
as the tool parser can't understand that list of troops. Tool: https://forums.taleworlds.com/index.php/topic,183658.0.html

if your mod doesn't involve storyline you could even consider removing the entries.
 
I want to assign faces and clothes to merchants. I've set up a script for initialising merchant NPCs at game_start, but they all turn out the same, save for gender. Here's an example list of relevant operations called within the script:

Code:
			(try_for_range, ":cur_slot", 0, 8),
				(troop_get_inventory_slot, ":cur_item", ":troop", ":cur_slot"),
				(ge, ":cur_item", 0), #if there is an item equiped
				(troop_remove_item, ":troop", ":cur_item"),
			(try_end),

			(troop_clear_inventory, ":troop"),
			(troop_set_type, ":troop", tf_fallback_woman),
			(troop_add_item, ":troop", ":clothing", 0),
			(troop_set_face_keys, ":troop", "@00000001ff00524755258dc6db6a56db00000000001e26e30000000000000000", 0), #female fallback face 1
			(troop_set_face_keys, ":troop", "@00000001ff00524755258dc6db6a56db00000000001e26e30000000000000000", 1), #female fallback face 2
			(troop_equip_items, ":troop"),

They all have the default quick jimmy face.
 
Jacobhinds said:
(troop_set_face_keys, ":troop", "@00000001ff00524755258dc6db6a56db00000000001e26e30000000000000000", 0),

you should use a string register (s1, s2, etc) as the operation argument. See if that is your only issue.
 
kalarhan said:
Nameless Warrior said:
Usually with opcode errors the number next to it can tell you where the issues is but ....

operations that use the OR "|" operator are not explicited listed in the *.py files (the numeric representation), like "this_or_next|eq", thus why you won't find a reference to them. And when you get a invalid number that means you used the wrong combination, thus creating a combination that is not allowed by the engine (it has no idea what to do with that crazy number that makes no sense)

you can see them by using the Python terminal and typing them manually, or important a header file like header_operations.py, in case you are curious and want to learn more.

Thank you. I dropped all other lines of thought and after some trial and elimination I found I was looking at the wrong area for the error.  this_or_next, ge was the guilty code.
 
I am trying to port the shaders from Battle of Europe OSP into Native, and as you can see in the post I made yesterday, its not working very well. The hard part about this, is that shaders are not well documented (the official shaders for Warband even warn you about this at the top of the file). This is overwhelming, but I'm not going to give up just yet. I think, the first step is to catagorize every kind of error that I find, then I need to say what the errors are caused by. This might be helpful for people in the future, so I'm probably going to make a forum post about my findings.

So far, these are the errors I've successfully figured out the cause of:

White Textures - When something is white, it is because the BRF texture used by the object's material doesn't exist.
Mouse Pointer Textures - If you see mouse pointers spammed as textures for random objects, this is because you loaded your resources in the wrong order in your ini. You should ALWAYS load them in the following order:
[list type=decimal]
[*]shaders
[*]textures
[*]materials
[*]meshes
[/list]
If you look at native, everything is categorized into these groups, then they are loaded into the graphics memory in this order. You see mouse pointers because this is the first texture loaded into memory, and is the default one used if there are any errors.

These are things that are still confusing me. Maybe someone can enlighten me:

Invisible materials (walls you can see through)
Random floating polygons
Random props without collisions that were not originally in the scene
Random and malformed textures
Pitch black textures (the exact opposite of the white texture bug, possibly due to light not being calculated properly)
flickering (would be very dangerous if you were prone to seizures, the entire screen flickers in different colors in certain scenes)
font stretching bugs.
interior room skybox stretching (in interior meshes, the mesh becomes massive and is like a skybox)
textures in the sky (random things in the sky that make no sense, a famous occurance of this is here https://www.reddit.com/r/gaming/comments/2pdiqc/a_strange_glitch_my_friend_experienced_whilst)
 
I'd appreciate some help since my google skills has failed me!

I love playing this game and use plenty of mods. However, sometimes I disagree with the trend of huge armies that many mod makers seem to favor. For example there are huge armies in Viking Conquest and the maker of the new submod for Gekojoku is increasing the AI army size.

1) How do I edit the army sizes and 2) is it possible to do it without starting a new game afterwards?
 
shaelor said:
How do I edit the army sizes and 2) is it possible to do it without starting a new game afterwards?

it changes from module to module, so the answer for Native wouldn't help you with VC (a example).

Can you change the armies size (lords, bandits, etc) ? Yes
Can you change the battle size (how many agents fight on each side) ? Yes
Can you change how the reinforcements waves work in a battle ? Yes
Can you change size of garrison (how many troops defend a castle/town) ? Yes

So you need to check which module (a mod, a DLC, Native, etc) you want to change, if the modsys is public available (like for Native and VC), and then hunt down the individual features that balance the game world. You will also need to balance out other things like the economy (as smaller armies means less expenses for the player and AI), waves of reinforcements, battle size, etc.
 
Thanks for your answer. Appararently it is quite complicated. The mod I'm interested in is Daymio Edition of Gekojoku. https://forums.taleworlds.com/index.php/topic,363705.195.html
 
shaelor said:
Appararently it is quite complicated.

well that depends on the mod, your experience with modding and how you view game balance. Also what you want to do, as you could probably live with a quick and dirty solution that breaks world balance  :mrgreen:

talk to the modder (or check the download files) to see if you have the source, and explain in more details what you want to change.

For VC, as a example, you can set battle size from 300 to 750, and you have game options to increase/decrease the bandits. You also have tweaks to change the garrison size, waves, etc, by using the Tweaks Tool.
 
There is no way to add an invading faction without both module sys and the mod's source code, is there? Also I finally managed to fix the undead sounds, thanks everyone for your help.

https://my.mixtape.moe/goqqxf.mp4
 
benis said:
There is no way to add an invading faction without modsys?

well there are ways, if you are crazy, you don't mind spending a lot of time learning about coding and how compiler works, and the engine, and....


but if you want the sane answer: nope  :mrgreen:
 
I'd have to replace one of the existing factions, then, and that's not something I really want. Thanks for your answer.
The undead will have to stay as outlaws which means no desperate city defense against a giant horde of the dead unless I somehow find a way to make outlaws attack cities if they have the numbers for it.
 
benis said:
There is no way to add an invading faction without both module sys and the mod's source code, is there?

For a simple invasion without having to add a whole faction, see Lumos's code in reply 4 ( link below). Try compiling it using the native warband module system &  copying the changes in the compiled text files to the compiled text files of your mod (into the same places). Remember to update the numbers at the start of the text files that record the number of entries. If your mod doesn't have Swadian knights, substitute some other powerful troop in the party template.

https://forums.taleworlds.com/index.php?topic=231383.0

 
Hello, I've just got into modding Mount & Blade Warband, and it is extremely fun and time consuming, however, I have a question about a new faction I have created. So, what I have done, is copy and paste the Nord faction and renamed it, (it is meant to be a new Nordic faction) and I copy and pasted Nord troops and renamed them and made a few armor edits, I did the same with the Lords and Ladies. but when i clicked the batch file to export my mod, I got errors that I have never seen before, (other then the NameError but I also need help with that as well). Here is the batch file output, I'd love for someone to enlighten me on what some of these errors mean and how I can fix them for the future. I have gone over some of the errors I knew about, and fixed them.
Traceback (most recent call last):
  File "process_init.py", line 2, in <module>
    from process_operations import *
  File "C:\Users\fehr3\Desktop\Module_system 1.171\process_operations.py", line 14, in <module>
    from module_troops import *
  File "C:\Users\fehr3\Desktop\Module_system 1.171\module_troops.py", line 619, in <module>
    [itm_arrows,itm_arrows,itm_nomad_bow,itm_arabian_sword_a,itm_hide_armor,itm_sarranid_boots_b,itm_sarranid_helmet1,itm_sarranid_warrior_cap,itm_turban,itm_desert_turban],
NameError: name 'itm_hide_armor' is not defined
Traceback (most recent call last):
  File "process_global_variables.py", line 12, in <module>
    from process_operations import *
  File "C:\Users\fehr3\Desktop\Module_system 1.171\process_operations.py", line 14, in <module>
    from module_troops import *
  File "C:\Users\fehr3\Desktop\Module_system 1.171\module_troops.py", line 619, in <module>
    [itm_arrows,itm_arrows,itm_nomad_bow,itm_arabian_sword_a,itm_hide_armor,itm_sarranid_boots_b,itm_sarranid_helmet1,itm_sarranid_warrior_cap,itm_turban,itm_desert_turban],
NameError: name 'itm_hide_armor' is not defined
Exporting strings...
Exporting skills...
Exporting tracks...
Exporting animations...
Exporting meshes...
Exporting sounds...
Exporting skins...
Traceback (most recent call last):
  File "process_map_icons.py", line 6, in <module>
    from process_operations import *
  File "C:\Users\fehr3\Desktop\Module_system 1.171\process_operations.py", line 14, in <module>
    from module_troops import *
  File "C:\Users\fehr3\Desktop\Module_system 1.171\module_troops.py", line 619, in <module>
    [itm_arrows,itm_arrows,itm_nomad_bow,itm_arabian_sword_a,itm_hide_armor,itm_sarranid_boots_b,itm_sarranid_helmet1,itm_sarranid_warrior_cap,itm_turban,itm_desert_turban],
NameError: name 'itm_hide_armor' is not defined
Traceback (most recent call last):
  File "process_factions.py", line 2, in <module>
    from module_factions import *
  File "C:\Users\fehr3\Desktop\Module_system 1.171\module_factions.py", line 51
    ("kingdom_7",  "New Calradic Empire", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.10),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 1C1C1C),
                                                                                                                                                                                    ^
SyntaxError: invalid syntax
Exporting item data...
Traceback (most recent call last):
  File "process_items.py", line 66, in <module>
    from process_operations import *
  File "C:\Users\fehr3\Desktop\Module_system 1.171\process_operations.py", line 14, in <module>
    from module_troops import *
  File "C:\Users\fehr3\Desktop\Module_system 1.171\module_troops.py", line 619, in <module>
    [itm_arrows,itm_arrows,itm_nomad_bow,itm_arabian_sword_a,itm_hide_armor,itm_sarranid_boots_b,itm_sarranid_helmet1,itm_sarranid_warrior_cap,itm_turban,itm_desert_turban],
NameError: name 'itm_hide_armor' is not defined
Exporting scene data...
Traceback (most recent call last):
  File "process_scenes.py", line 15, in <module>
    from process_operations import *
  File "C:\Users\fehr3\Desktop\Module_system 1.171\process_operations.py", line 14, in <module>
    from module_troops import *
  File "C:\Users\fehr3\Desktop\Module_system 1.171\module_troops.py", line 619, in <module>
    [itm_arrows,itm_arrows,itm_nomad_bow,itm_arabian_sword_a,itm_hide_armor,itm_sarranid_boots_b,itm_sarranid_helmet1,itm_sarranid_warrior_cap,itm_turban,itm_desert_turban],
NameError: name 'itm_hide_armor' is not defined
Traceback (most recent call last):
  File "process_troops.py", line 4, in <module>
    from module_troops import *
  File "C:\Users\fehr3\Desktop\Module_system 1.171\module_troops.py", line 619, in <module>
    [itm_arrows,itm_arrows,itm_nomad_bow,itm_arabian_sword_a,itm_hide_armor,itm_sarranid_boots_b,itm_sarranid_helmet1,itm_sarranid_warrior_cap,itm_turban,itm_desert_turban],
NameError: name 'itm_hide_armor' is not defined
Exporting particle data...
Traceback (most recent call last):
  File "process_scene_props.py", line 7, in <module>
    from process_operations import *
  File "C:\Users\fehr3\Desktop\Module_system 1.171\process_operations.py", line 14, in <module>
    from module_troops import *
  File "C:\Users\fehr3\Desktop\Module_system 1.171\module_troops.py", line 619, in <module>
    [itm_arrows,itm_arrows,itm_nomad_bow,itm_arabian_sword_a,itm_hide_armor,itm_sarranid_boots_b,itm_sarranid_helmet1,itm_sarranid_warrior_cap,itm_turban,itm_desert_turban],
NameError: name 'itm_hide_armor' is not defined
Traceback (most recent call last):
  File "process_tableau_materials.py", line 8, in <module>
    from process_operations import *
  File "C:\Users\fehr3\Desktop\Module_system 1.171\process_operations.py", line 14, in <module>
    from module_troops import *
  File "C:\Users\fehr3\Desktop\Module_system 1.171\module_troops.py", line 619, in <module>
    [itm_arrows,itm_arrows,itm_nomad_bow,itm_arabian_sword_a,itm_hide_armor,itm_sarranid_boots_b,itm_sarranid_helmet1,itm_sarranid_warrior_cap,itm_turban,itm_desert_turban],
NameError: name 'itm_hide_armor' is not defined
Traceback (most recent call last):
  File "process_presentations.py", line 8, in <module>
    from process_operations import *
  File "C:\Users\fehr3\Desktop\Module_system 1.171\process_operations.py", line 14, in <module>
    from module_troops import *
  File "C:\Users\fehr3\Desktop\Module_system 1.171\module_troops.py", line 619, in <module>
    [itm_arrows,itm_arrows,itm_nomad_bow,itm_arabian_sword_a,itm_hide_armor,itm_sarranid_boots_b,itm_sarranid_helmet1,itm_sarranid_warrior_cap,itm_turban,itm_desert_turban],
NameError: name 'itm_hide_armor' is not defined
Traceback (most recent call last):
  File "process_party_tmps.py", line 2, in <module>
    from module_party_templates import *
  File "C:\Users\fehr3\Desktop\Module_system 1.171\module_party_templates.py", line 123, in <module>
    ("kingdom_7_reinforcements_a", "{!}kingdom_7_reinforcements_a", 0, 0, fac_commoners, 0, [(trp_imperial_footman,5,10),(trp_imperial_recruit,2,42)]),
NameError: name 'trp_imperial_footman' is not defined
Traceback (most recent call last):
  File "process_parties.py", line 6, in <module>
    from process_operations import *
  File "C:\Users\fehr3\Desktop\Module_system 1.171\process_operations.py", line 14, in <module>
    from module_troops import *
  File "C:\Users\fehr3\Desktop\Module_system 1.171\module_troops.py", line 619, in <module>
    [itm_arrows,itm_arrows,itm_nomad_bow,itm_arabian_sword_a,itm_hide_armor,itm_sarranid_boots_b,itm_sarranid_helmet1,itm_sarranid_warrior_cap,itm_turban,itm_desert_turban],
NameError: name 'itm_hide_armor' is not defined
Exporting quest data...
Exporting info_page data...
Traceback (most recent call last):
  File "process_scripts.py", line 7, in <module>
    from process_operations import *
  File "C:\Users\fehr3\Desktop\Module_system 1.171\process_operations.py", line 14, in <module>
    from module_troops import *
  File "C:\Users\fehr3\Desktop\Module_system 1.171\module_troops.py", line 619, in <module>
    [itm_arrows,itm_arrows,itm_nomad_bow,itm_arabian_sword_a,itm_hide_armor,itm_sarranid_boots_b,itm_sarranid_helmet1,itm_sarranid_warrior_cap,itm_turban,itm_desert_turban],
NameError: name 'itm_hide_armor' is not defined
Traceback (most recent call last):
  File "process_mission_tmps.py", line 8, in <module>
    from process_operations import *
  File "C:\Users\fehr3\Desktop\Module_system 1.171\process_operations.py", line 14, in <module>
    from module_troops import *
  File "C:\Users\fehr3\Desktop\Module_system 1.171\module_troops.py", line 619, in <module>
    [itm_arrows,itm_arrows,itm_nomad_bow,itm_arabian_sword_a,itm_hide_armor,itm_sarranid_boots_b,itm_sarranid_helmet1,itm_sarranid_warrior_cap,itm_turban,itm_desert_turban],
NameError: name 'itm_hide_armor' is not defined
Traceback (most recent call last):
  File "process_game_menus.py", line 8, in <module>
    from process_operations import *
  File "C:\Users\fehr3\Desktop\Module_system 1.171\process_operations.py", line 14, in <module>
    from module_troops import *
  File "C:\Users\fehr3\Desktop\Module_system 1.171\module_troops.py", line 619, in <module>
    [itm_arrows,itm_arrows,itm_nomad_bow,itm_arabian_sword_a,itm_hide_armor,itm_sarranid_boots_b,itm_sarranid_helmet1,itm_sarranid_warrior_cap,itm_turban,itm_desert_turban],
NameError: name 'itm_hide_armor' is not defined
Traceback (most recent call last):
  File "process_simple_triggers.py", line 5, in <module>
    from process_operations import *
  File "C:\Users\fehr3\Desktop\Module_system 1.171\process_operations.py", line 14, in <module>
    from module_troops import *
  File "C:\Users\fehr3\Desktop\Module_system 1.171\module_troops.py", line 619, in <module>
    [itm_arrows,itm_arrows,itm_nomad_bow,itm_arabian_sword_a,itm_hide_armor,itm_sarranid_boots_b,itm_sarranid_helmet1,itm_sarranid_warrior_cap,itm_turban,itm_desert_turban],
NameError: name 'itm_hide_armor' is not defined
Traceback (most recent call last):
  File "process_dialogs.py", line 9, in <module>
    from process_operations import *
  File "C:\Users\fehr3\Desktop\Module_system 1.171\process_operations.py", line 14, in <module>
    from module_troops import *
  File "C:\Users\fehr3\Desktop\Module_system 1.171\module_troops.py", line 619, in <module>
    [itm_arrows,itm_arrows,itm_nomad_bow,itm_arabian_sword_a,itm_hide_armor,itm_sarranid_boots_b,itm_sarranid_helmet1,itm_sarranid_warrior_cap,itm_turban,itm_desert_turban],
NameError: name 'itm_hide_armor' is not defined
Traceback (most recent call last):
  File "process_global_variables_unused.py", line 3, in <module>
    from process_operations import *
  File "C:\Users\fehr3\Desktop\Module_system 1.171\process_operations.py", line 14, in <module>
    from module_troops import *
  File "C:\Users\fehr3\Desktop\Module_system 1.171\module_troops.py", line 619, in <module>
    [itm_arrows,itm_arrows,itm_nomad_bow,itm_arabian_sword_a,itm_hide_armor,itm_sarranid_boots_b,itm_sarranid_helmet1,itm_sarranid_warrior_cap,itm_turban,itm_desert_turban],
NameError: name 'itm_hide_armor' is not defined
Exporting postfx_params...

______________________________

Script processing has ended.
Press any key to exit. . .
 
Status
Not open for further replies.
Back
Top Bottom