SP Tutorial Module System Creating a faction.

Users who are viewing this thread

THE MISADVENTURES OF DANNY CONTINUE!

Well, the compiler output has been giving me all kinds of errors I had not foreseen, including a particularly difficult indentation error, which I finally murdered. With an axe. However, when one problem is fixed, another pops up.
  File "C:\Users\User1\Desktop\NOT EVEN SLIGHTLY PORN\ModSys\Module_system 1.16
5\module_troops.py", line 2157
    upgrade(troops,"townsman","watchman")
          ^
SyntaxError: invalid syntax
The syntax here is identical to the surrounding, and I didn't even change it.

File "C:\Users\User1\Desktop\NOT EVEN SLIGHTLY PORN\ModSys\Module_system 1.16
5\module_party_templates.py", line 159

    ^
SyntaxError: invalid syntax
The problem on line 159 of the templates bugs the poor compiler too, thing is that line 159 of the module_party_templates file does not exist.
I'm very grateful to this community for any assistance available. Or co-misery, that'd be cool too I guess.
 
THE MISADVENTURES OF DANNY CONTINUE!

Well, the compiler output has been giving me all kinds of errors I had not foreseen, including a particularly difficult indentation error, which I finally murdered. With an axe. However, when one problem is fixed, another pops up.
  File "C:\Users\User1\Desktop\NOT EVEN SLIGHTLY PORN\ModSys\Module_system 1.16
5\module_troops.py", line 2157
    upgrade(troops,"townsman","watchman")
          ^
SyntaxError: invalid syntax
The syntax here is identical to the surrounding, and I didn't even change it.

File "C:\Users\User1\Desktop\NOT EVEN SLIGHTLY PORN\ModSys\Module_system 1.16
5\module_party_templates.py", line 159

    ^
SyntaxError: invalid syntax
The problem on line 159 of the templates bugs the poor compiler too, thing is that line 159 of the module_party_templates file does not exist.
I'm very grateful to this community for any assistance available. Or co-misery, that'd be cool too I guess.

thingy is: compiler will often show you a line it can't understand as a result of a previous mistake. Say you break line 100, and when the compiler tries to process line 125... things go wrong... I know, not much help that compiler, right?

Try WRECK. Much better for error handling.
 
Will do, thanks guys

EDIT: Now using a different compiler, which says the following.
*** 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 `troops` ERROR:
Traceback (most recent call last):
  File "compile.py", line 129, in <module>
    from module_troops import *`
  File "C:\Users\Daniel\Desktop\NOT EVEN SLIGHTLY PORN\ModSys\Module_system 1.16
5\module_troops.py", line 641, in <module>
    ["Newfac_messenger","Newfac Messenger","Newfac Messengers",tf_mounted|tf_gua
rantee_boots|tf_guarantee_armor|tf_guarantee_gloves|tf_guarantee_horse|tf_guaran
tee_ranged,0,0,fac_kingdom_1,
NameError: name 'fac_kingdom_1' is not defined


COMPILATION
Obviously, the poor program doesn't like my fac_kingdom_1 entry. It looks the same as fac_kingdom_2, 3, 4, etc. to me.
I think I fixed the syntax problem in line 641. However, my only response for
"compile.py", line 129, in <module>
is a small and defeated "Whaaat?" :cry:
Thankfully I am a member of the greatest online community on all of Al Gore's internets. Can I get help from the masters?
 
The problem on line 159 of the templates bugs the poor compiler too, thing is that line 159 of the module_party_templates file does not exist.
Had that problem before.

Check for missing brackets and parentheses. If you are using Notepad++, click on the ending bracket, press control+b, and see where that takes you. Do the same for the beginning bracket. If either the end does not take you to the beginning, or the beginning doesn't take you to the end, that's likely your trouble spot.

I use the normal compiler provided by TW, so I can't decipher your new errors.
 
Thanks Dirk, I'll check it out. I think my only remaining issue is the faction not defined. i'm pretty stumped as to methods of solving it... hrmmm... :roll:
 
Add an import statement for factions if you want. If that doesn't work just revert to a backup.
 
Look at the top of the file. You'll see a lot of stuff like:
from header_troops import *

You could add:
from header_factions import *
Or:
from module_factions import *

I don't seem to need to do that on my module system, but if you want to try it, go ahead.
 
I tried your steps and the steps from the other tutorial link you provided, but something is very wrong. Not only is the merchant at the start not the merchant, its some other character and other times a combat unit, which breaks the game, but the map is all messed up. Some factions have one town on one side or map and one on the other, not to mention but the villages of the new faction (which aren't assigned to it) don't have any recruits EVER. Also the new town nor villages isn't even showing up on the map I don't know why. Someone help please! I am new at modding, so please bear with me. I apologize for any confusion.

The faction is there, but the new town and villages are not. I followed both guilds.
 
thank you so much, i'm off to add the mayans and chichimecas to nova aetas. :grin:

*edit its more then just mayans and chichimecas theirs going to be a historical aztec empire called "mexica triple alliance"along with olmecs and toltecs too.*
 
Sorry to necro the thread but I get error after error. First the compiler gave me an error for a missing comma. Not sure how I was supposed to delete it, but no biggie, just added it back. Then, it gives me an "fac_kingdom_7 not defined" error, even though I did everything in accordance to the tutorial, and added "kingdom_7" as said at step 1.
What gives???

Also, the tutorial doesn't tell you how to add villages and castles. I can imagine it's a process similar to adding towns, but is it?
 
Corbul said:
Sorry to necro the thread but I get error after error. First the compiler gave me an error for a missing comma. Not sure how I was supposed to delete it, but no biggie, just added it back. Then, it gives me an "fac_kingdom_7 not defined" error, even though I did everything in accordance to the tutorial, and added "kingdom_7" as said at step 1.
What gives???

Also, the tutorial doesn't tell you how to add villages and castles. I can imagine it's a process similar to adding towns, but is it?

while working on your issues  you should check this other tutorial (newer) https://forums.taleworlds.com/index.php/topic,334271.0.html
 
Corbul,  i kept getting same error but figured it out, in module_factions.py

    ("kingdom_6",  "Sarranid Sultanate",  0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0xDDDD33),
  ("kingdom_7",  "Custom Kingdom", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0xFFFFAAFF), (0xFFFAAFF is the colour)

you have these lines where kingdom_7 is your new faction, the numbers at the end is the colour of your kingdom, just change one letter
to a number which will change the colour, can't have two factions with same colour, this worked for me anyway.

go to morghs editor to modify the colour you really want.

hope this helped
 
Back
Top Bottom