Author Topic: Creating New Troops  (Read 16977 times)

0 Members and 1 Guest are viewing this topic.

Type9

  • Sergeant
  • *
    • View Profile
Creating New Troops
« on: April 25, 2006, 12:39:41 AM »
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.
X-Box?  X-Bob...

UMR

  • Sergeant Knight at Arms
  • *
    • View Profile
  • Faction: Nord
  • MP nick: WTF_xUMR
  • M&BWB
Re: Creating New Troops
« Reply #1 on: April 27, 2006, 07:44:05 PM »
I have same bug...

Tiwaz

  • Recruit
  • *
  • Tanz Tanz Tanz!
    • View Profile
    • Framing Chaos Lampwork
  • Faction: Neutral
Re: Creating New Troops
« Reply #2 on: January 03, 2007, 09:15:14 PM »
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
« Last Edit: January 03, 2007, 09:22:03 PM by Tiwaz »
This time of night's for singin' songs about the local news.

nunoalves

  • Veteran
  • *
    • View Profile
Re: Creating New Troops
« Reply #3 on: January 04, 2007, 10:43:02 AM »
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 :)

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.

Wu-long

  • Sergeant Knight at Arms
  • *
    • View Profile
  • Faction: Vaegir
  • MP nick: Wulong
  • WBWF&SNW
Re: Creating New Troops
« Reply #4 on: December 26, 2008, 05:25:17 AM »
Alright i added them but one problem i cant find them at any tavern  :?

Pali Gap

  • Knight
  • *
  • Permanently Banned
    • View Profile
  • Faction: Neutral
Re: Creating New Troops
« Reply #5 on: December 26, 2008, 05:52:53 AM »
Added who?  The more details, the more answers.

Wu-long

  • Sergeant Knight at Arms
  • *
    • View Profile
  • Faction: Vaegir
  • MP nick: Wulong
  • WBWF&SNW
Re: Creating New Troops
« Reply #6 on: December 26, 2008, 06:06:24 AM »
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


Luisrah

  • Sergeant
  • *
    • View Profile
  • Faction: Swadian
Re: Creating New Troops
« Reply #7 on: December 27, 2008, 01:57:44 PM »
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.

Wu-long

  • Sergeant Knight at Arms
  • *
    • View Profile
  • Faction: Vaegir
  • MP nick: Wulong
  • WBWF&SNW
Re: Creating New Troops
« Reply #8 on: December 27, 2008, 03:37:27 PM »
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

Larhendiel

  • Veteran
  • *
    • View Profile
  • Faction: Neutral
  • M&BWB
Re: Creating New Troops
« Reply #9 on: January 19, 2009, 02:58:13 AM »
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?

Ruthven

  • Revs lil' helper
  • Grandmaster Knight
  • *
  • crushie crushie crushie
    • View Profile
  • Faction: Neutral
  • MP nick: irc://Ruthven
Re: Creating New Troops
« Reply #10 on: January 19, 2009, 03:20:36 AM »
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")





Larhendiel

  • Veteran
  • *
    • View Profile
  • Faction: Neutral
  • M&BWB
Re: Creating New Troops
« Reply #11 on: January 23, 2009, 08:05:23 AM »
Thanks!
it works!
I love it, it gives more fun than actual playing! :D

Larhendiel

  • Veteran
  • *
    • View Profile
  • Faction: Neutral
  • M&BWB
Re: Creating New Troops
« Reply #12 on: January 23, 2009, 09:16:34 AM »
Thanks! It works!

doudle

  • Regular
  • *
    • View Profile
  • Faction: Sarranid
Re: Creating New Troops
« Reply #13 on: September 19, 2009, 08:14:10 PM »
How can i delete some troops that i dont like without making the game crash
Ty for the help

KirvesSoturi

  • Regular
  • *
    • View Profile
  • Faction: Nord
  • MP nick: FinXynL
Re: Creating New Troops
« Reply #14 on: April 30, 2011, 08:51:34 PM »
And how do i change unit equipment without crashing game ?
Thanks for answers