SP Tutorial Module System Complete Guide to Adding Factions

Users who are viewing this thread

Followed the guide I thought perfectly but get this error

Initializing...
Compiling all global variables...
Exporting strings...
Exporting skills...
Exporting tracks...
Exporting animations...
Exporting meshes...
Exporting sounds...
Exporting skins...
Exporting map icons...
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Exporting faction data...
Exporting item data...
Exporting scene data...
Exporting troops data
Exporting particle data...
Exporting scene props...
Exporting tableau materials data...
Exporting presentations...
Exporting party_template data...
Exporting parties
Exporting quest data...
Exporting info_page data...
Exporting scripts...
WARNING: Local variable never used: kingdom_7_banners_begin, at: game_start
Exporting mission_template data...
Exporting game menus data...
exporting simple triggers...
exporting triggers...
exporting dialogs...
Checking global variable usages...
Exporting postfx_params...

______________________________

Script processing has ended.
Press any key to exit. . .

Any idea what silly mistake I have made
Thank you for reading
 
markfamily said:
Exporting scripts...
WARNING: Local variable never used: kingdom_7_banners_begin, at: game_start

read the error message. It says on scripts (module_scripts.py) you have a local variable ":kingdom_7_banners_begin" that is no used on the script "game_start". Find it and see what is going on.
 
Thank you again it was a silly error but know I have an even bigger one.
Tested the game everything fine picked the sarranid caravan killed the bandit then the merchant ran at me naked and now stuck on that area cannot get out so I have screwed up somewhere but have not got a clue where.
I know its a long shot without any errors but any clues where I can look.
I tested my mod before I added the new faction and everything was fine so I have done something wrong entering my new faction.
More info I have started with all six factions and after the bandit is killed a novice fighter then attacks me then I am stuck cammot leave area.
Problem solved I forgot a try end.
Thank you for a great tutorial.
 
Could you give an already existing castle to a new faction. I'm creating a faction that originates from Praven and Swadia is holding it at the start and I'm just wondering if its possible
 
Hi,

Thank you for the great tutorial, it has been extremely helpful.
I have two questions though.

1. Could you elaborate more on the family relations section as I followed what you said and I still don't have ladies married to my lords?

2. How would I go about assigning a specific reputation to one of my lords? I saw you referenced this earlier on in the comments section but I still don't understand what code to put and where to put it. I suppose the same goes for question 1.

Thanks again for your time :smile:
 
Thanks for the amazing level of care and detail in this tutorial

I've tried to follow it as close as I could, but I've run into an unexpected problem, reading as follows
Code:
Initializing...
Compiling all global variables...
Exporting strings...
Exporting skills...
Exporting tracks...
Exporting animations...
Exporting meshes...
Exporting sounds...
Exporting skins...
Exporting map icons...
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Exporting faction data...
Exporting item data...
Exporting scene data...
Exporting troops data
Exporting particle data...
Exporting scene props...
Exporting tableau materials data...
Exporting presentations...
Exporting party_template data...
Exporting parties
Traceback (most recent call last):
  File "process_parties.py", line 69, in <module>
    save_parties(parties)
  File "process_parties.py", line 47, in save_parties
    file.write("%f %f 0.0 "%position)
TypeError: not all arguments converted during string formatting
Exporting quest data...
Exporting info_page data...
Exporting scripts...
Exporting mission_template data...
Exporting game menus data...
exporting simple triggers...
exporting triggers...
exporting dialogs...
Checking global variable usages...
WARNING: Global variable never used: g_presentation_battle_active
Exporting postfx_params...

______________________________

Script processing has ended.
Press any key to exit. . .

The lines referenced are the hardwired ones for casualties and main party, which I haven't touched, any idea where could have I missed something? Thx in advance
 
Check the changes made in 'module_parties', concretely the field 10 (Initial coordinates), the compiler makes reference to this field. This is an exception for unknown format characters, maybe you have introduced more than two values in the tuple...
 
hello friends, review this excellent tutorial, to see which part it has fallen into, because I can't find the error. I was adding some stuff and I had to disconnect the computer before compiling.
help please!!!
0pyezhdnuwjlwpf6g.jpg
 
Anyone can help me, please?

include your new faction on module_factions.py
run build_module.bat
use the faction on other files. Do not use it until you have compiled the code
--> if you forgot to do it... open file ID_factions.py and include it there manually (this once). Increase the number (ID), it must be a increment of 1 in each line
Code:
fac_player_supporters_faction = 14
fac_kingdom_1 = 15
fac_kingdom_2 = 16
fac_kingdom_3 = 17
fac_kingdom_4 = 18
fac_kingdom_5 = 19
fac_kingdom_6 = 20

# your new factions should be here!!!!!!!!

fac_kingdoms_end = 21

After this, i get a Error:

Loading module... FAILED.
MODULE `presentations` ERROR:
Traceback (most recent call last):
File "compile.py", line 127, in <module>
from module_presentations import *
File "D:\Desktop\M&B Dev\Diplomacy for 1.174\module_presentations.py", line 8783, in <module>
(troop_set_slot, "trp_temp_array_b", 9, factions[fac_player_supporters_faction][6]),
IndexError: tuple index out of range


COMPILATION FAILED.
-----------
Edit

I followed these steps:

I corrected the error. if you received the same error do the following

module_presentations

Call it

(troop_set_slot, "trp_temp_array_b", 3, factions[fac_kingdom_6][6]),

change that text like that

(troop_set_slot, "trp_temp_array_b", 3, factions[fac_kingdom_6][6]),
(troop_set_slot, "trp_temp_array_b", 4, factions[fac_kingdom_5][6]),
(troop_set_slot, "trp_temp_array_b", 5, factions[fac_kingdom_4][6]),
(troop_set_slot, "trp_temp_array_b", 6, factions[fac_kingdom_3][6]),
(troop_set_slot, "trp_temp_array_b", 7, factions[fac_kingdom_2][6]),
(troop_set_slot, "trp_temp_array_b", 8, factions[fac_kingdom_1][6]),
(troop_set_slot, "trp_temp_array_b", 9, factions[fac_kingdom_7][6]),

And now i get a new error:

Loading module... DONE.
Loading plugins... DONE.
Checking module syntax... DONE.
Allocating identifiers... DONE.
Compiling module... FAILED.
MODULE scripts AGGREGATOR ERROR:
failed to compile script game_start (#0)
command [502, 3, <fac.kingdom_7[#432345564227567638]>, 11, 'trp_kingdom_7_1'] compilation fails in script.game_start on line 166
failed to parse operand 'trp_kingdom_7_1' for operation faction_set_slot in script.game_start on line 166
illegal reference `trp.kingdom_7_1`


COMPILATION FAILED.

-----------
Edit

I solved this, i dont know how.
 
Last edited:
Hello everybody, I tried to add a new faction. I had followed the guide that is in a tutorials section, you know, but something went wrong and the game crashes while loading a new game.

Rgl_log says this
SCRIPT ERROR ON OPCODE 1677: Invalid Map Icon ID: -166; LINE NO: 78:
At Script [230] give_center_to_lord.
At Script [230] give_center_to_lord.
At Script [230] give_center_to_lord.
SCRIPT ERROR ON OPCODE 1677: Invalid Map Icon ID: -166; LINE NO: 78:
At Script [230] give_center_to_lord.
At Script [230] give_center_to_lord.
At Script [230] give_center_to_lord.
SCRIPT ERROR ON OPCODE 1677: Invalid Map Icon ID: -166; LINE NO: 78:
At Script [230] give_center_to_lord.
At Script [230] give_center_to_lord.
At Script [230] give_center_to_lord.
SCRIPT ERROR ON OPCODE 1677: Invalid Map Icon ID: -166; LINE NO: 78:
At Script [230] give_center_to_lord.
At Script [230] give_center_to_lord.
At Script [230] give_center_to_lord.
SCRIPT ERROR ON OPCODE 1677: Invalid Map Icon ID: -166; LINE NO: 78:
At Script [230] give_center_to_lord.
At Script [230] give_center_to_lord.
At Script [230] give_center_to_lord.
SCRIPT ERROR ON OPCODE 1677: Invalid Map Icon ID: -166; LINE NO: 25:
At Script [244] create_kingdom_hero_party.
At Script [244] create_kingdom_hero_party.
At Script [244] create_kingdom_hero_party.
SCRIPT ERROR ON OPCODE 1677: Invalid Map Icon ID: -166; LINE NO: 25:
At Script [244] create_kingdom_hero_party.
At Script [244] create_kingdom_hero_party.
At Script [244] create_kingdom_hero_party.

I know that I did smth wrong with the map icons, but who can explain what actually is this. Thank you!
 
Reread again step 3 carefully and check if you might have missed something. Also look if you get compiler errors or if error messages show up in your rgl-log. Revert your changes to the latest working version and redo every step again.
I don't have any Cartographer - i can't download Swyter's and thogrims not working so i use Morghs editor. Apart from this I did everything as it was written.
 
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?
 
Back
Top Bottom