Author Topic: Unofficial Troop Editor 1.9 for troops.txt file  (Read 151086 times)

0 Members and 1 Guest are viewing this topic.

HokieBT

  • Grandmaster Knight
  • *
  • may the force be with you
    • View Profile
  • Faction: Neutral
  • M&B
Re: Unofficial Troop Editor 1.1 for troops.txt file ( updated 4/5 )
« Reply #30 on: April 06, 2008, 07:49:33 PM »
HokieBT,

You should probably do validation on the name fields and replace " " with "_".  I had to do this with my editor, otherwise a space in the name would fool my editor the next time I tried to split that particular line into variables; everything was off by how many spaces they put in the name.

yeah, good point, that looks to be what is happening with my program.   I'll modify this and try to release a new version in the next day or so.  Technically the same thing may happen if somebody deleted a number (ie. proficiency or skill, etc) so I may try to do data validation on those fields as well.....

EDIT:  released in version 1.2
« Last Edit: April 10, 2008, 05:06:22 AM by HokieBT »
 

HokieBT

  • Grandmaster Knight
  • *
  • may the force be with you
    • View Profile
  • Faction: Neutral
  • M&B
Re: Unofficial Troop Editor 1.0 for troops.txt file
« Reply #31 on: April 10, 2008, 04:30:23 AM »
Most excellent tool, thanks so much for sharing.

I assume that the Troop file also contains the range of face codes used....how can I determine which are the face codes when I open the Troop file in Notepad?  I would like to assign the same range of face codes for all the troops in a specific faction, and different range of codes for another faction, etc.

It took me a little while but I finally figured out how to edit the troop faces.  I just released version 1.2 for anybody who is interested.  Let me know if there are any issues or comments!
 

Charidemus

  • Sergeant
  • *
  • Permanently Banned
    • View Profile
Re: Unofficial Troop Editor 1.2 for troops.txt file ( updated 4/10 )
« Reply #32 on: April 10, 2008, 04:12:05 PM »
the newest version of the troop editor doesn't work for me, so can you please put the versions before 1.2 on the repository? :cry:


HokieBT

  • Grandmaster Knight
  • *
  • may the force be with you
    • View Profile
  • Faction: Neutral
  • M&B
Re: Unofficial Troop Editor 1.2 for troops.txt file ( updated 4/10 )
« Reply #33 on: April 10, 2008, 10:00:15 PM »
the newest version of the troop editor doesn't work for me, so can you please put the versions before 1.2 on the repository? :cry:

this seems strange to me, I really didn't change much at all between versions....  What is the error you are getting and do you remember what version worked for you?   I can also try creating a setup package with all files....
 

Dragonhour

  • Sergeant at Arms
  • *
  • Strength and honor
    • View Profile
  • Faction: Neutral
Re: Unofficial Troop Editor 1.2 for troops.txt file ( updated 4/10 )
« Reply #34 on: April 11, 2008, 03:55:10 AM »
Thanks Hokie, appreciate the update.  I'll try customizinb some faces this weekend in game with editor mode and cut&past the codes onto your editor for a specific troop and see if this works.  If it does, that will be awesome.....customized faces for all troops. :-)

Galielmus

  • Veteran
  • *
    • View Profile
Re: Unofficial Troop Editor 1.2 for troops.txt file ( updated 4/10 )
« Reply #35 on: April 11, 2008, 05:29:08 AM »
This tool is really awesome, wanted throw my thanks out there.  Makes life a hell of a lot easier, a few simple clicks rather than hunt and search through a bloated python script  :D

I saw someone request in the first post a way to convert from .txt to .py, and I was thinking how great that would be too.  Any word on how to do that, or is still toil and grind for the compiling process?

Thanks again, this editor is a major time saver.

HokieBT

  • Grandmaster Knight
  • *
  • may the force be with you
    • View Profile
  • Faction: Neutral
  • M&B
Re: Unofficial Troop Editor 1.2 for troops.txt file ( updated 4/10 )
« Reply #36 on: April 11, 2008, 06:11:49 PM »
This tool is really awesome, wanted throw my thanks out there.  Makes life a hell of a lot easier, a few simple clicks rather than hunt and search through a bloated python script  :D

I saw someone request in the first post a way to convert from .txt to .py, and I was thinking how great that would be too.  Any word on how to do that, or is still toil and grind for the compiling process?

Thanks again, this editor is a major time saver.

thanks for the comments, glad you like it and find it useful!

Creating a direct .txt to .py conversion would be somewhat difficult since you would loose a lot of the comments and other information that is only located in the python file. I thought about adding the ability for my program to export python information for troops that you could then cut-n-paste into the .py file.  However, there seems to be two reasons why this didn't seem to make sense:

1) if somebody is comfortable using python then they can just edit the .py files directly.  My editor is more for people who don't want to bother with python

2) if I exported troop data in a python format you'd loose some of the 'shortcuts' that are available.  For example, right now you can just type wp(60), knows_common, swadian_face1, etc.  If I exported troop information in a .py format I'd end up expanding everything to their specific values.  So then you couldn't just make one change at the top of the file to a global variable you'd have to do a find replace or change each individual troop, etc.

So bottom line it seemed like if somebody is comfortable in python than its a lot better just to directly edit that file.  If people really think it would be helpful to export information from my editor that you could then cut-n-paste into the python file then let me know and I can think about it.  ;)
 

Maxsw1

  • Recruit
  • *
    • View Profile
Re: Unofficial Troop Editor 1.2 for troops.txt file ( updated 4/10 )
« Reply #37 on: April 11, 2008, 09:43:08 PM »
Great mod!!  I turned the river pirates into a bunch of renegade knights.

If you are going to make another version, would it be hard to implement a feature where you can scale the size of the parties as well?

Thank you for your work!

HokieBT

  • Grandmaster Knight
  • *
  • may the force be with you
    • View Profile
  • Faction: Neutral
  • M&B
Re: Unofficial Troop Editor 1.2 for troops.txt file ( updated 4/10 )
« Reply #38 on: April 11, 2008, 10:17:26 PM »
Great mod!!  I turned the river pirates into a bunch of renegade knights.

If you are going to make another version, would it be hard to implement a feature where you can scale the size of the parties as well?

Thank you for your work!

hmm, I'll think about including that in a future version.  I haven't tried this myself but I think its easy to modify:

for example, open party_templates.txt and edit the line:
pt_river_pirates River_Pirates 281474976710665 0 2 312 81 3 30 0 -1 -1 -1 -1 -1

I think 3 is the minimum and 30 is the maximum size of a party
 

Charidemus

  • Sergeant
  • *
  • Permanently Banned
    • View Profile
Re: Unofficial Troop Editor 1.2 for troops.txt file ( updated 4/10 )
« Reply #39 on: April 12, 2008, 10:02:06 AM »
Please HokieBT can you put the older versions of the troop editor back on the repository? i'm using vista and version 1.2 doesn't work with my pc


HokieBT

  • Grandmaster Knight
  • *
  • may the force be with you
    • View Profile
  • Faction: Neutral
  • M&B
Re: Unofficial Troop Editor 1.2 for troops.txt file ( updated 4/10 )
« Reply #40 on: April 12, 2008, 02:00:19 PM »
Please HokieBT can you put the older versions of the troop editor back on the repository? i'm using vista and version 1.2 doesn't work with my pc

can you try renaming (or deleting) the TroopEditor.exe.local file and then right-clicking and choose to 'execute as administrator' ?   A *.local files is a trick in windows to get OCX and DLL files to work but maybe it doesn't work in Vista....    Since several people have reported issues with Vista and my Troop Editor I'm going to try and release an updated version that doesn't use that OCX file.  I may see if you and a few others can try it out before I release it to everybody.
« Last Edit: April 12, 2008, 03:39:10 PM by HokieBT »
 

HokieBT

  • Grandmaster Knight
  • *
  • may the force be with you
    • View Profile
  • Faction: Neutral
  • M&B
Re: Unofficial Troop Editor 1.2 for troops.txt file ( updated 4/10 )
« Reply #41 on: April 12, 2008, 03:39:41 PM »
Can a few people download this program and let me know if the 'Browse Folder' button works and what operating system you are using?  If this functionality works in Windows Vista and other OS's then I'll switch my Troop Editor so you just specify the folder you want to modify and not the actual files themselves.  This will remove the COMDLG32 and all those errors.

http://rapidshare.com/files/106906376/BrowseTest.zip.html
 

Spawn Of Achilles

  • Grandmaster Knight
  • *
  • Seksueel Overdraagbare Aandoening
    • View Profile
  • Faction: Neutral
Re: Unofficial Troop Editor 1.2 for troops.txt file ( updated 4/10 )
« Reply #42 on: April 12, 2008, 03:45:49 PM »
Great tool as I have posted before, but how would one go about editing the faces?
Are there certain codes that are used?
Sorry for the noob question but any help would be greatly appreciated.
I think I'm gonna have to start calling you "The Negotiator", Spawn. And that's just one short step from Obi-Wan in my book.


HokieBT

  • Grandmaster Knight
  • *
  • may the force be with you
    • View Profile
  • Faction: Neutral
  • M&B
Re: Unofficial Troop Editor 1.2 for troops.txt file ( updated 4/10 )
« Reply #43 on: April 12, 2008, 03:59:04 PM »
Great tool as I have posted before, but how would one go about editing the faces?
Are there certain codes that are used?
Sorry for the noob question but any help would be greatly appreciated.

well, version 1.2 of my editor allows you to enter your own face codes (a hexadecimal number).  If the troop is a single hero or lord the game only uses Face1.  If you are modifying the faces on your troops then for each troop it picks a random face between Face1 and Face2.  If you want to generate a face code (hexadecimal number) then you need to do the following:

1) start mount & blade and click configuration
2) on the Video tab click 'Start Windowed'
3) on the advanced tab, click 'Edit Mode'
4) start a new game, when you get to the Face Generator screen press CTRL+E.   This should add a box to the top of the face window with a long set of numbers.  If you click on it then it adds it to the clipboard so you can paste that into Face1 or Face2 in my editor.
 

ziprar

  • Recruit
  • *
    • View Profile
Re: Unofficial Troop Editor 1.2 for troops.txt file ( updated 4/10 )
« Reply #44 on: April 14, 2008, 08:48:34 PM »
For other Vista folks, registering the .dll and .ocx file wasn't working for me and deleting the .local didn't work either.  What did work was running it in Windows XP compatibility mode.  Just right-click on TroopEditor.exe, go to "Properties", then click on the "Compatibility" tab and check "Run this program in compatibility mode for" and set it to XP SP2.  Made it run great for me.