SP Tutorial Module System Complete Guide to Adding Factions

Users who are viewing this thread

Whenever i open up the map using the Swyter Cartographer it shows the map i'm using for the mod but not any existing towns, castles or villages that already exist for it, just the ones from Native Warband?
I think it's because i don't have the right "System Module" for the mod i'm using since i just got the default native one off the website, does anyone know how i can get the System Module and Module data from a mod i'm using?
 
Hello Kentucky ; thank you for this tutorial, I used it for my mod and it spared me a lot of time :smile: (except for one bug)
Also , here is a thing missing (not sure if said before, but very important) : adding the faction's title in module_string.py
by searching "noyan" or by searching for this line : ("faction_title_male_6", "Emir {s0}"),
Add below ("faction_title_male_7", "NewLordTitle {s0}"), in order to avoid bugs when new lords will join your faction in game.
Do the same with the ladies below : ("faction_title_female_6", "Sayeda {s0}"), and add :
("faction_title_female_7", "NewFemaleLordTitle {s0}"),



Sadly, I encountered a major bug during the new factions creation : the bandit camp is represented by a random banner and a lot of bandit camp spawn randomly in their area (it can reach 12 desert bandit camp in the south between the two Sarranids cities).
I think it's linked to the banners or something but I did not found anything to solve this.
I did not found anyone encountering the same thing so I'm asking , just in case.
 
Last edited:
Yes i have worked on it for a long time (tried to check everything, and then to reimplement the banners and parties from scratch) = same result.
I also tried to see how others mods with a lot of parties managed to correct this but they (Anno Domini 1257 ; S. Mahayuth) just cancelled the bandit lairs.

I think that the bandit lair script is made for the warband original map, and it generates errors if we modify the map/parties too much. I have not enough time to completely understand and correct it, but it seems to be something like this.
I've found a solution which is probably the same than other mods : suppress the bandit lairs (in the script which generates them), and it does not generate errors anymore. It does not cancel bandit spawn, just the lairs. Fine for my mod, but I hope others won't encounter such a pain in the neck.
 
I get a problem like this "NameError: name 'fac_kingdom_7' is not defined". I checked the line and it had a comma and yet, it still produces this error. Can any one help me?
 
I get a problem like this "NameError: name 'fac_kingdom_7' is not defined". I checked the line and it had a comma and yet, it still produces this error. Can any one help me?
Check the order of compiled files of your ModSys because you must first reference the kingdom in your module_factions.py file (if it is compiled later than the other files, then it is wrong). You will have to comment out some changes and reimplement them later for the sake of sticking to the correct compilation order.
 
I fixed it. And now it's slightly perfect. The only problem is that the faction's troops are not used by the lords. This somehow ruins the immersion sadly. So how do i also make lords use the troops i added?
Check the order of compiled files of your ModSys because you must first reference the kingdom in your module_factions.py file (if it is compiled later than the other files, then it is wrong). You will have to comment out some changes and reimplement them later for the sake of sticking to the correct compilation order.
 
So I created another mod, i followed the entire tutorial but now the parties are not ruled by any factions other than neutral and it got so buggy. instead of the merchant appearing in the beginning, Sverre appears and fights u. idk how to fix it

Edit: I didn't fix anything. just found out parties are now entirely reliant on the faction the party is assigned to in parties.txt thus explaining the parties are neutral. Also no one spawns anymore like walkers and lords. idk anymore
 
Last edited:
I had such bugs when I created new units with too many objects in the inventory. If you strictly followed the tutorial, it should be that or another a missing coma (or too many) somewhere. About the objects in the inventory it seems to be sort of a hard limit of about 60 items. If you just put one more in only one inventory, it messes up all the game.
 
Last edited:
Hey, I've come across an issue. So I follow the instructions, and when I am to finally create a custom culture, I get this during compilation:
*** Warband Refined & Enhanced Compiler Kit (W.R.E.C.K.) version 1.0.0 ***
Please report errors, problems and suggestions at http://lav.lomskih.net/wreck/

Loading module... FAILED.
MODULE `presentations` ERROR:
Traceback (most recent call last):
File "compile.py", line 127, in <module>
from module_presentations import *
File "C:\Users\Administrator\Desktop\HoW source\module_presentations.py", line
8783, in <module>
(troop_set_slot, "trp_temp_array_b", 8, factions[fac_kingdom_1][6]),
IndexError: tuple index out of range


COMPILATION FAILED.
What's strange is that I've used this tutorial in the past and never had this issue.
Anyway, how do I fix this? I've tried adding the two new factions to the list, editing the order, but all that does is to just display the same error with a 10 instead of the 8. :mad:
 
(troop_set_slot, "trp_temp_array_b", 8, factions[fac_kingdom_1][6]),
Is this something out of a specific mod? I can't find something similar in Native (which might be why you haven't encountered such yet). You will need to check that presentation to see what it is doing and what might cause the issue.
 
(troop_set_slot, "trp_temp_array_b", 8, factions[fac_kingdom_1][6]),
Is this something out of a specific mod? I can't find something similar in Native (which might be why you haven't encountered such yet). You will need to check that presentation to see what it is doing and what might cause the issue.
Yes, it's from Diplomacy.
As you've requested, I'm adding the solution from Discord, kindly provided by user dstn (not sure if they have an account on the forums here)
Comment out that section with the python lists and build, then uncomment the section. Looks like it's trying to build a list from the previous build's data but using the new additions indices so the new additions are pushing it out of range
 
Back
Top Bottom