Edited troops.py messing the whole game up

正在查看此主题的用户

Soil

Grandmaster Knight
Well, first I should explain what I changed...

-I expanded the faction's troop tree a bit.
-I added 2 new companions(I commented these away, recompiled, problem is still there)
-I gave some troops extra equipment.

Now when I start my game, it get the sound of levelling multiple times, and indeed, I insta-levelled to level 30. So far so good.
Then on the world map, the castles, towns+villages are owned by different characters. No, that doesn't sound like a problem at first, but Praven is ruled by Bunduk. The player is actually a whole deserter party and spawns on probably every possible spawnpoint in a scene.
Lethwin Far-Seeker is happily, or should I say galy married with Lord Nasugei and they live together in Wercheg.

So I guess the troops got somehow "shifted", which I don't really understand, because I left the troop IDs as they were...
Also, I could only find people saying you could simply add troops to troop.py, compile and you're ready to go... And I'm sure it's the troop file because I didn't change anything else(even the troop.txt file was the only .txt file I replaced in this turn).
However, I included battlefield tactics kit and shield bash and added new items, so the itemkinds1.txt, mission_templates.txt and scripts.txt are altered as well.

Oh, by the way, after installing either the shield bash or the tactics kit my character magically disappears on the world map after resting in towns or castles... Is there any way to solve this?


Thanks in advance.
 
:lol:
I had stuff like that happen to me when I tried porting my mod to 1.0 using only the .txt files. Everything gets messed up.

Your problem is probably that you didn't add new troops at the bottom of the page, but simply below the other troops. New troops have to be at the very end of module_troops.py, but before the upgrade paths.

Scroll down to the very bottom and add new troops:

["log_array_troop_object_faction",  "Local Merchant","Local Merchant",tf_guarantee_boots|tf_guarantee_armor, 0,0, fac_commoners,[itm_leather_apron,itm_leather_boots,itm_butchering_knife],def_attrib|level(5),wp(40),knows_power_strike_1, merchant_face_1, merchant_face_2],
  ["log_array_faction_object",        "Local Merchant","Local Merchant",tf_guarantee_boots|tf_guarantee_armor, 0,0, fac_commoners,[itm_leather_apron,itm_leather_boots,itm_butchering_knife],def_attrib|level(5),wp(40),knows_power_strike_1, merchant_face_1, merchant_face_2],


<here
]


#Troop upgrade declarations

upgrade(troops,"farmer", "watchman")
upgrade(troops,"townsman","watchman")
 
Hm, this only modified my problem a bit. The units recruited in villages are still messed up, the towns' and castles' lords are still messed up and the people walking around in villages and towns are still messed up. And so are the guards. However, the player doesn't spawn multiple times anymore. And I only insta-levelled to level 22...
I'm totally clueless...

But thanks a lot for the hint!
 
Are you loading a saved game?  If you want your changes to be saved game compatible then your only hope would be to add new troops at the bottom of the file.  But if you are starting a new game then technically it shouldn't be necessary to add new troops at the bottom of module_troops.py (you would have to add them at the bottom if you were modifying the text files directly).  My guess is you are loading a saved game and that would explain your issues, if you start a new game I think it should work fine as long as you didn't mess up the troop ID's.
 
Well, if I load a saved game only the troops are messed, the towns seem to be fine.

However, what I described happens when I start a new game. And no, I didn't mess with any IDs except creating new ones for the new troops(but how could that mess the game up?!)

Thanks for the answer, though...
 
后退
顶部 底部