SP Tutorial Module System Creating a faction.

Users who are viewing this thread

Hello!
I have some problems ...
I followed the tutorial as you say but it has happened that all compile everything correctly, enters the game without errors, the new city is added along with two towns and also adds to the city garrison, but troops are not added to the group of two nobles. The king and his Lord

Picture:


Any ideas?

 
leandrojas_ said:
Hello!
I have some problems ...
I followed the tutorial as you say but it has happened that all compile everything correctly, enters the game without errors, the new city is added along with two towns and also adds to the city garrison, but troops are not added to the group of two nobles. The king and his Lord

Picture:


Any ideas?

Hmm, I don't know why they don't have troops. On mine they do..., but who knows, this tutorial was for a earlier version, but I still think they should have troops.
 
Fixed.
The problem was in a part of script.py. I can not remember the name of the script. But if you look in the file (ctrl + f): "kingdom_6" several times. Eventually you'll find.
 
after a long time i decided to pick this up again. But it seems I've an error. When I go to a village of the new made kingdom I recruit immediately the highest troop instead of a recruit.
 
boogie85 said:
after a long time i decided to pick this up again. But it seems I've an error. When I go to a village of the new made kingdom I recruit immediately the highest troop instead of a recruit.

Make sure your upgrade order is correct. That should fix the problem.
 
Set their leader slots - for example
(faction_set_slot, "fac_kingdom_1",  slot_faction_leader, "trp_kingdom_1_lord"),
Otherwise the slot will be 0 by default, which is the troop id of the player.
 
So using this could I make a bunch of towns and troops as placeholders so they are all the same, and then edit them in say morghs editor and a map editor? Or would I have to place the towns and outfit the troops and lords all in python?
 
Hi guys.

I followed the tutorial, but I'm now getting these errors whenever I launch a new game.

Code:
SCRIPT ERROR ON OPCODE 1677: Invalid Map Icon ID: -166; Line No: 70:
At script: give_center_to_lord.
At script: give_center_to_lord.
At script: give_center_to_lord.
At script: give_center_to_lord.

SCRIPT ERROR ON OPCODE 1677: Invalid Map Icon ID: -166; Line No: 20:
At script: create_kingdom_hero_party.
At script: create_kingdom_hero_party.
At script: create_kingdom_hero_party.
At script: create_kingdom_hero_party.

How do I fix the map icons?

EDIT: The also game CTD's whenever I try to enter a town. I have no idea why, but has anyone else experienced this problem?
 
I_am_a_Spoon said:
Hi guys.

I followed the tutorial, but I'm now getting these errors whenever I launch a new game.

Code:
SCRIPT ERROR ON OPCODE 1677: Invalid Map Icon ID: -166; Line No: 70:
At script: give_center_to_lord.
At script: give_center_to_lord.
At script: give_center_to_lord.
At script: give_center_to_lord.

SCRIPT ERROR ON OPCODE 1677: Invalid Map Icon ID: -166; Line No: 20:
At script: create_kingdom_hero_party.
At script: create_kingdom_hero_party.
At script: create_kingdom_hero_party.
At script: create_kingdom_hero_party.

How do I fix the map icons?

EDIT: The also game CTD's whenever I try to enter a town. I have no idea why, but has anyone else experienced this problem?

I think, but I'm not sure, you gave a center to lord that isn't a hero...
 
I followed the tutorial though. Created a faction leader, created a lord, created a town, castle and three villages, and added the code to module_scripts. The mod compiled without any problems.
 
I_am_a_Spoon said:
I followed the tutorial though. Created a faction leader, created a lord, created a town, castle and three villages, and added the code to module_scripts. The mod compiled without any problems.

Yeah, there is a script somewhere that sets heros, all its saying is that its strange that an owner of a castle isn't a hero, if you want to get rid of that hit control+f and type hero or maybe set_kingdom_hero in module_scripts.
 
EDIT:  After reinstalling the game and doing a sh*tload of tinkering, I stopped the crashes and the errors. But there's another problem.

I created a town, a castle and three villages for my new faction, but one of the villages doesn't belong to anybody (it belongs to the faction, but neither the faction leader of the lord I created own it), and another village belongs to the Sarranids.
 
I_am_a_Spoon said:
EDIT:  After reinstalling the game and doing a sh*tload of tinkering, I stopped the crashes and the errors. But there's another problem.

I created a town, a castle and three villages for my new faction, but one of the villages doesn't belong to anybody (it belongs to the faction, but neither the faction leader of the lord I created own it), and another village belongs to the Sarranids.

The villages are weird, they use a script (most likely hardcoded) that the closest city to that village owns it. So you might need to move it closer to your cities.
 
It didn't work. Maybe I put the code in the wrong place?

Also, the marketplace within the town is bugging out... the weapon window is always empty, the armour window has weapons and the horse window is empty too.  The goods window is the only one that works properly.
 
I just came across a part that can cause bugs if you have more than ten factions. These slot ranges are used for starting wars between factions. If you have more than 10 factions you will need to space these farther apart to make room.
module_constants.py said:
slot_faction_truce_days_with_factions_begin               = 120
slot_faction_provocation_days_with_factions_begin         = 130
slot_faction_war_damage_inflicted_on_factions_begin   = 140
slot_faction_sum_advice_about_factions_begin           = 150
 
Egbert said:
I just came across a part that can cause bugs if you have more than ten factions. These slot ranges are used for starting wars between factions. If you have more than 10 factions you will need to space these farther apart to make room.
module_constants.py said:
slot_faction_truce_days_with_factions_begin               = 120
slot_faction_provocation_days_with_factions_begin         = 130
slot_faction_war_damage_inflicted_on_factions_begin   = 140
slot_faction_sum_advice_about_factions_begin           = 150

Thanks a ton on this bit of info.... I have 15 Factions and have been searching for the cause of this... On to testing again :smile:
 
Back
Top Bottom