Modding VC: basic tutorials and Q&A thread

kalarhan

Count
WBWF&SNWVC
Best answers
0
Ek_Erilaz01 said:
So I've been trying to get Swyters Cartographer to work with VC, I have the newest version. I direct it to the right path, the modsys folder but it never works. Is it due to differences in code compared to MB native and if so, is there any way to "fix it"?
the tool is not compatible with troops (more than 1) inside a party, so you will need to edit/remove those from module_parties.py, like in

Code:
    ("readingum","Readingum",pf_disabled|icon_camp_refuge|pf_is_static|pf_always_visible|pf_hide_defenders, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(24.76,-211.39),[
        (trp_mercenary_arqueros, 1,2),(trp_taiga_bandit, 80,90),(trp_elite_viking, 30,40),(trp_sea_raider_leader2, 4,6),(trp_norse_standard_bearer, 3,5),(trp_todos_cuerno, 2,4),
        (trp_norse_level1_landed, 20,30),(trp_norse_level1_companion, 10,15),(trp_norse_level2_companion, 10,15),
        ]),
if you are modding for Sandbox that makes it easier on your end, as you dont need them.
 

Ek_Erilaz01

Recruit
Best answers
0
Thanks! I've done it so far with all the scripts but when I build the module I get an error message about illegal identifiers, so I assume to get it to work I will have to go through the game menus and mission templates to get rid of any code related to it because it still doesn't function

 

kalarhan

Count
WBWF&SNWVC
Best answers
0
Ek_Erilaz01 said:
I get an error message about illegal identifiers
when talking about that stuff you need to copy and past it here, as those messages are like clues as long you know how to read them.

remember to visit the Forge as well, as you can find lots of tutorials.
 

Ek_Erilaz01

Recruit
Best answers
0
Ah I see. Okay so the transcript of the build module goes like this:

ERROR: Illegal Identifier:p_readingum
Error: Unable to find object:p_readingum
ERROR: Illegal Identifier:p_aescesdun
Error: Unable to find object:p_aescesdun
ERROR: Illegal Identifier:p_mega_danisharmy
Error: Unable to find object:p_mega_danisharmy

essentially I am curious whether I should now delete these in other module files where they appear. Ill also go look around at the forge, thank you.
 

kalarhan

Count
WBWF&SNWVC
Best answers
0
Ek_Erilaz01 said:
Ah I see. Okay so the transcript of the build module goes like this:

ERROR: Illegal Identifier:p_readingum
Error: Unable to find object:p_readingum
ERROR: Illegal Identifier:p_aescesdun
Error: Unable to find object:p_aescesdun
ERROR: Illegal Identifier:p_mega_danisharmy
Error: Unable to find object:p_mega_danisharmy

essentially I am curious whether I should now delete these in other module files where they appear. Ill also go look around at the forge, thank you.
p_ means party, so from file module_parties.py
illegal identifier means that entity does not exist (was not found)

I guess you removed them from module_parties.py and forgot to delete where they are used on other files, right? Easier way to fix this is to put them back on module_parties.py (without those troops) on the same place there were.

every time you do stuff like this
Code:
(enable_party, "p_mega_danishrmy"),
--> example from module_dialogs.py
it checks the file ID_parties.py for the ID number of "p_mega_danishmry", which is extracted from module_parties.py ... same goes for troops, items, etc. Open the ID_XXX.py files.
 

Ek_Erilaz01

Recruit
Best answers
0
Thank you, now it loads with no error messages but yet Swyter does not work. Instead of the other message we have this one:

Code:
Found WB installation on <C:\Program Files (x86)\Mount&Blade Warband>
Broken WB install? <C:\Program Files (x86)\Steam\steamapps\common\Mount&Blade Warband>
Msys folder at <C:\Program Files (x86)\Mount&Blade Warband\Modules\M>
Module folder at <>
@--start loading font xml
luajit: .\mab-font.lua:22: bad arguement #1 to 'lines' (\..\..\Data\FONT_DATA.XML: No such file or directory)
stack traceback:
           [C]: in function 'lines'
           .\mab-font.lua:22: in function 'load'
           cartographer.lua:46: in main chunk
           [C]: ?
____________________
Oops, looks like we have a bug over there :)
Press any key to continue . . .
I look around in the forge as well but if you have any quick tips it would be greatly appreciated :smile: Thanks for all the help so far
 

kalarhan

Count
WBWF&SNWVC
Best answers
0
your path configuration is wrong. You can check the tool tutorial and redo it, or do a quick hack: replace the tool default Native folder with your files from VC. Just remember to manually copy the module_parties.py/map.txt/... back later

 

ha3481

Veteran
Best answers
0
what's the meaning of this code? two opposite operations

Code:
        (val_div, ":random", 10),
        (val_mul, ":random", 10),
normalization?
 

kalarhan

Count
WBWF&SNWVC
Best answers
0
ha3481 said:
what's the meaning of this code? two opposite operations

Code:
        (val_div, ":random", 10),
        (val_mul, ":random", 10),
normalization?
Integer operations, so yeap. Or you can think of rounding down/up values.

Like 22/10=2, 2*10=20
 

Millix

Recruit
Best answers
0
I tried customizing my sail and now I am constantly getting the "Unable to open texture file" error. Any ideas?
 

Banok

Knight
M&BWBNWVC
Best answers
0
Does anyone know how to edit the bonus to party size in VC from owning fiefs?

or which file it is in? ie scripts "game_get_party_companion_limit -1" / "party_get_ideal_size -1"
 

kalarhan

Count
WBWF&SNWVC
Best answers
0
Banok said:
"game_get_party_companion_limit"
^

Code:
      (assign, ":fyrd", 0),
      (assign, reg35, 0),
      (try_for_range, ":cur_center", walled_centers_begin, walled_centers_end), #kingdom
        (party_slot_eq, ":cur_center", slot_town_lord, "trp_player"),
        (try_begin), #towns
          (party_slot_eq, ":cur_center", slot_party_type, spt_town),
          (val_add, ":fyrd", 80),
        (else_try), #castles forts
          (val_add, ":fyrd", 40),
        (try_end),
      (try_end),
      (val_add, reg35, ":fyrd"),
      (val_add, reg0, ":fyrd"),
80 and 40 are the bonus for towns/castles.
 

Banok

Knight
M&BWBNWVC
Best answers
0
kalarhan said:
Banok said:
"game_get_party_companion_limit"
^


80 and 40 are the bonus for towns/castles.
Super helpful Kalarhan, thanks.

My other question is about how to change limit to garrison sizes.

If I understand correctly "party_templates" (PT) determines which troops garrisons get ie. 4 to 8 trp_norse.

then "cf_reinforce_party -1" in scripts will determine when party/garrison is reinforced, and presumably which PT. but is this within a limit? what is the limit set in VC for villages, castles towns?
 

hvitserk115

Recruit
Best answers
0
<REPOST>
Firstly, i love throwing spears in M&B VC RE vanilla and dark age.
But unfortunately, my favourites which instantly remove shields and kill on strike - only 2 be held in one weapon slot.
I know this is very noobish, but can i do an edit to increase the number of spears the item provides? If so,
How can i do this? I remember that in the cheat menu there is a spear item with 100 spears in it. Can i edit these ones damage and shield bonus? How?
Do i need python, or is it just a simple notepad .txt edit?
-instructions please? :party:

Thanks,
Hvitserk115.

 

kalarhan

Count
WBWF&SNWVC
Best answers
0
hvitserk115 said:
I know this is very noobish, but can i do an edit to increase the number of spears the item provides?
looks like you didnt read the links to tutorials, etc. So try to use Morgh's to increase ammo ...

you can find the thread here https://forums.taleworlds.com/index.php/board,22.0.html

if you, however, want to learn how to mod and use modsys then check module_items.py and increase ammo there. Follow the guides on how to setup, download and compile the code.



Banok said:
My other question is about how to change limit to garrison sizes.
check [VC Tweaks Tools]. You can find a tweak for garrison in there. Use it as a reference if you are not interested in the tool itself.

Code:
# TWEAK 1: REDUCE GARRISON LIMITS FROM ALL TOWNS AND FORTS
                                        # On vanilla towns have a higher limit than forts, and both are a function of 
                                        # player level (higher level allows for more troops)
                                        # and prosperity of the center (how rich).
                                        # Max is 650 (forts) and 850 (towns).
                                        # This tweak will change the limit, and town/forts with too many troops
                                        # will lose them over time (for all factions)
TWEAK_GARRISON_LIMIT_FOR_FORTS = 650    # Default: 650
TWEAK_GARRISON_LIMIT_FOR_TOWNS = 850    # Default: 850
 
Top