Creating New Troops

Users who are viewing this thread

Type9

Sergeant
Hello.

I got the unofficial editor, and I made some troops that I thought would be cool, and I saved it, but when I try to load them again it says:

troops.txt: Error reading record 209.  Error: Cannot find key.  Key: 34465, Table: Scenes
troops.txt: Error reading record 210.  Error: Cannot find key.  Key: 142, Table: Scenes
Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.
ForeignKeyConstraint Constraint4 requires the child key values () to exist in the parent table.
ForeignKeyConstraint Constraint4 requires the child key values () to exist in the parent table.

So, what did I do wrong, and how do I fix it?

Also, is there a tutorial on making new troops?  If not, it would surely help a lot of people.

Thanks for your help.
 
Ok I may be having some problems somewhere.  When I open up the editor, I open my 'Copy of Native' mod file, then go to view the troops, but there are only four options.  Is this right?  They are:

trp_player
trp_unarmed_troop
trp_veteran_fighter
trp_townsman

Another thing to note is that whenever I open up the editor, I always get a giant list of errors... I'm beginning to think that this consists of all the other troops that should be here...

Thanks for any help

Edit: I opened up the fantasy mod, and it seemed like it was going to list tons of troops.  It created a small scroll bar on the side of the list box but then the slider went away and an even bigger list of errors occured.  I looked through the list and found the part about troops.  Here's an example of a few lines of the error message:

troops.txt: Error reading record 1.  Error: Cannot find key.  Key: 1, Table: Factions
troops.txt: Error reading record 2.  Error: Cannot find key.  Key: 65536, Table: Scenes
troops.txt: Error reading record 3.  Error: Cannot find key.  Key: 1048576, Table: Items
troops.txt: Error reading record 4.  Error: Input string was not in a correct format.
troops.txt: Error reading record 5.  Error: Cannot find key.  Key: 65536, Table: Scenes
troops.txt: Error reading record 6.  Error: Cannot find key.  Key: 1048576, Table: Items
troops.txt: Error reading record 7.  Error: Input string was not in a correct format.
troops.txt: Error reading record 8.  Error: Cannot find key.  Key: 65536, Table: Scenes
troops.txt: Error reading record 9.  Error: Cannot find key.  Key: 1048576, Table: Items
troops.txt: Error reading record 10.  Error: Input string was not in a correct format.

-Tiwaz
 
Tiwaz, the original question was posted in April of 2006, at the time the unoficial editor was still up to date with the version of the game.
This is not currently the case, if you have version 0.8xx the unoficial editor will not work.

I'm also just starting out with the module thing so i can point you in the right directions cuz the initial steps are all very fresh in my head still :smile:

First of all, to modify the game you need to use the official module system files, you can find help for this here

If you want to edit the map, Thorgrim's map editor is priceless, you can find it here

If you want to create new item meshes and textures or modify existing ones, you need Thorgrim's BRFedit tool, read about it here. You'll also need a program to edit and modify the 3d models. There are many out there, i started playing with wings3d.
 
Pali Gap said:
Added who?  The more details, the more answers.

I added 3 hero's  but i can't find them in taverns i added them with the troop editor and then edited the faces with the .txt file heres the picture.The heroes are in highlights

Troops-1.gif
 
Well, there's a lot more trouble in making a hero than simply a new troop.
You can add the hero to a party with no problems, but I think you have to go to simple_triggers or something linke that to make him appear in taverns just like the others. Plus you have to make a dialog for him with triggers.
 
Luisrah said:
Well, there's a lot more trouble in making a hero than simply a new troop.
You can add the hero to a party with no problems, but I think you have to go to simple_triggers or something linke that to make him appear in taverns just like the others. Plus you have to make a dialog for him with triggers.

oh....is there a tutorial some where about that? But i thought if i copy another heros info (stats and stuff) i dont need to make a dialog cuz his attitude would be the same
 
I have just started to "play" with module system, and when i tried to practice troops changes (adding new troops upgrades)
And when I think everything is done, I run Run Module in python
and thats what i end up with:

Traceback (most recent call last):
  File "E:\Mount & Blade\Mount&Blade\Modules\Sword of Damocles - Invasion\ModuleSystem\module_troops.py", line 1639, in <module>
    upgrade(troops,"mercenary_horseman","mercenary_cavalry","mercenary_veteran")
TypeError: upgrade() takes exactly 3 arguments (4 given)

What does it mean? how can i make it work?
 
Larhendiel said:
I have just started to "play" with module system, and when i tried to practice troops changes (adding new troops upgrades)
And when I think everything is done, I run Run Module in python
and thats what i end up with:

Traceback (most recent call last):
  File "E:\Mount & Blade\Mount&Blade\Modules\Sword of Damocles - Invasion\ModuleSystem\module_troops.py", line 1639, in <module>
    upgrade(troops,"mercenary_horseman","mercenary_cavalry","mercenary_veteran")
TypeError: upgrade() takes exactly 3 arguments (4 given)

What does it mean? how can i make it work?
It needs to be "upgrade2(troops,"mercenary_horseman","mercenary_cavalry","mercenary_veteran") instead of "upgrade(troops,"mercenary_horseman","mercenary_cavalry","mercenary_veteran")
 
And how do i change unit equipment without crashing game ?
Thanks for answers
 
Im just trying to change troop names to make a "new" troop but when i change the troop names with the troop editor and update and save it and start a new game the names never change, what am i doing wrong?
 
Hi, I tried to bring the undead, undead nomad, undead horesman and hell knight into my mod but every time when I would see them (eg. I put them in my castle so every time I enter the courtyard) my screen go's blank and I have to type ctrl+alt+delete, go to task manerger where it says not responding and then I end the task. In module toops.py they have #'s before them so they go red, I deleted the #'s making them green and I gave them armor, when I cliked on build module everything went fine. In module parties.py I added them to my castle. If you know what is causing the blank screen thing or know anything that would help, I'd greatly appreciate it. Sorry for all the writing :oops: but I wanted to make sure you get all the details.-Crushguant
 
Lato said:
Im just trying to change troop names to make a "new" troop but when i change the troop names with the troop editor and update and save it and start a new game the names never change, what am i doing wrong?
Have you tried copying and pasting and then changing their names?
You can copy and paste this, it's what I use as a basic troop and then edit.["new_troop","new_troop","new_troops",tf_guarantee_boots|tf_guarantee_armor,no_scene,reserved,fac_commoners,
  [itm_sword,itm_hide_boots],
  str_6|agi_6|level(5),wp(60),knows_common,swadian_face1, swadian_face2],

You might need to change (swadian_face1, swadian_face2) though.
 
Well I was having a bad clash between editing the text files and using the MS system, finally I just deleted the MS, I find it alot less extra steps to edit the text, I just change the names in troop editor and then ingame edit mode for differnt faces. Its alot faster but I did wish I understood how everyone else does it.
 
I've had to delete the MS systom 4 times. By the way does anyone know of any systoms to use to make your own objects (weapons, armor, etc), I've got wings but it doesn't work, it won't turn on.
 
Back
Top Bottom