Item Editor - Warband compatible version - 1.0.0.1

Users who are viewing this thread

Morgh's Mount & Blade Warband TXT Tools v0.940 is released.
This contains the base version of the item editor in my TXT Tools.

Official thread: http://forums.taleworlds.com/index.php/topic,105928.0.html
 
When I try to edit the file, I run into this error: "System.ArgumentOutOfRangeException: StartIndex cannot be less than zero". What does it mean?

Yes, I modified the item_kinds1.txt directly, but that is not the cause. The error was ocurring before I edited it.

And the file I'm trying to modify is from Sword of Damocles 4.57

If I just know what this error means...
 
swadiachicken said:
When I try to edit the file, I run into this error: "System.ArgumentOutOfRangeException: StartIndex cannot be less than zero". What does it mean?
I'm a bit late to the party here, but if anyone else runs into this: Use a text editor and see how many blank lines are at the end of the file (following the last zero). There has to be two blank lines or the program won't work.
 
Shatari said:
Alex Dragon said:
Why don;t you make this (item editor) work with mount and blade 1.011 ???
It works just fine for 1.011. Are you running into errors?

It doesn;t work , evertime i change stuff it said save may corrut something like and i press continue and when i go into the game nothing change (i did restart the game )
Plus when i save it it doesn;t change everything because when i save it i close the program and reopen it again and check that the value of what i change is not change.

EG , i change hunting crossbow damage to 100 , in game nothing change .
 
I got errors when I load the item_kinds file...
I have framework 4 on my computer...
Sadly it is in dutch. so I translated it quite rough but:
Zie het einde van dit bericht voor meer informatie over het aanroepen
van JIT-foutopsporing (Just In Time) in plaatsr.

************** Tekst van uitzondering **************
System.FormatException: De indeling van de invoertekenreeks is onjuist.
  bij System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
  bij System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
  bij System.Int32.Parse(String s, NumberStyles style, IFormatProvider provider)
  bij ItemEditor.ItemKinds..ctor(String path)
  bij ItemEditor.Form1.openFileToolStripMenuItem_Click(Object sender, EventArgs e)
  bij System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
  bij System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
  bij System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
  bij System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
  bij System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
  bij System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
  bij System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
  bij System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
  bij System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
  bij System.Windows.Forms.Control.WndProc(Message& m)
  bij System.Windows.Forms.ScrollableControl.WndProc(Message& m)
  bij System.Windows.Forms.ToolStrip.WndProc(Message& m)
  bij System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
  bij System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
  bij System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
  bij System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Geladen assembly's **************
mscorlib
    Assembly-versie: 2.0.0.0
    Win32-versie: 2.0.50727.5444 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
ItemEditor
    Assembly-versie: 1.0.0.0
    Win32-versie: 1.0.0.0
    CodeBase: file:///C:/Users/Florius/Downloads/ItemEditor.exe
----------------------------------------
System.Windows.Forms
    Assembly-versie: 2.0.0.0
    Win32-versie: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly-versie: 2.0.0.0
    Win32-versie: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly-versie: 2.0.0.0
    Win32-versie: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Windows.Forms.resources
    Assembly-versie: 2.0.0.0
    Win32-versie: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_nl_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------
Accessibility
    Assembly-versie: 2.0.0.0
    Win32-versie: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
System.Configuration
    Assembly-versie: 2.0.0.0
    Win32-versie: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly-versie: 2.0.0.0
    Win32-versie: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
mscorlib.resources
    Assembly-versie: 2.0.0.0
    Win32-versie: 2.0.50727.5444 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------

************** JIT-foutopsporing **************
Als u JIT-foutopsporing wilt inschakelen, moet in het configuratiebestand voor deze
toepassing of computer (machine.config) de waarde
jitDebugging in het gedeelte system.windows.forms zijn ingesteld.
De toepassing moet ook zijn gecompileerd terwijl foutopsporing
was ingeschakeld.

Bijvoorbeeld:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

Wanneer JIT-foutopsporing is ingeschakeld, worden onverwerkte uitzonderingen
naar het JIT-foutopsporingsprogramma gestuurd dat op de computer is geregistreerd
en worden niet door dit dialoogvenster verwerkt.



See the end of this message for details on invoking
JIT debugging (Just In Time) instead of this dialog.

************** Exception Text **************
System.FormatException: The layout of the input string is incorrect.
  by System.Number.StringToNumber (String str, number styles options, number and buffer number, NumberFormatException info info, Boolean parseDecimal)
  by System.Number.ParseInt32 (String s, style number styles, NumberFormatException info info)
  by System.Int32.Parse (String s, number styles style, IFormatProvider provider)
  at ItemEditor.ItemKinds .. ctor (String path)
  by ItemEditor.Form1.openFileToolStripMenuItem_Click (Object sender, EventArgs e)
  by System.Windows.Forms.ToolStripItem.RaiseEvent (Object key, EventArgs e)
  by System.Windows.Forms.ToolStripMenuItem.OnClick (EventArgs e)
  by System.Windows.Forms.ToolStripItem.HandleClick (EventArgs e)
  by System.Windows.Forms.ToolStripItem.HandleMouseUp (MouseEventArgs e)
  by System.Windows.Forms.ToolStripItem.FireEventInteractive (EventArgs e, tools strip item event type)
  by System.Windows.Forms.ToolStripItem.FireEvent (EventArgs e, tools strip item event type)
  by System.Windows.Forms.ToolStrip.OnMouseUp (MouseEventArgs mea)
  by System.Windows.Forms.ToolStripDropDown.OnMouseUp (MouseEventArgs mea)
  by System.Windows.Forms.Control.WmMouseUp (Message & m, mouse buttons, button, Int32 clicks)
  by System.Windows.Forms.Control.WndProc (Message & m)
  by System.Windows.Forms.ScrollableControl.WndProc (Message & m)
  by System.Windows.Forms.ToolStrip.WndProc (Message & m)
  by System.Windows.Forms.ToolStripDropDown.WndProc (Message & m)
  by System.Windows.Forms.Control.ControlNativeWindow.OnMessage (Message & m)
  by System.Windows.Forms.Control.ControlNativeWindow.WndProc (Message & m)
  by System.Windows.Forms.NativeWindow.Callback (IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)


************** ************** Loaded assemblies
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5444 (Win7SP1GDR.050727-5400)
    codebase: file: / / / C: / Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
item editor
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    codebase: file: / / / C: / Users / Florius / Downloads / ItemEditor.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    codebase: file: / / / C: / Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    codebase: file: / / / C: / Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    codebase: file: / / / C: / Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Windows.Forms.resources
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    codebase: file: / / / C: / Windows/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_nl_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------
Accessibility
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    codebase: file: / / / C: / Windows/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    codebase: file: / / / C: / Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    codebase: file: / / / C: / Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
mscorlib.resources
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5444 (Win7SP1GDR.050727-5400)
    codebase: file: / / / C: / Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------

************** JIT Debugging **************
If you want to enable JIT debugging must be in the configuration file for this
application or computer (machine.config) the value
jitDebugging in the System.Windows.Forms set.
The application must also be compiled with debugging
was enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</ Configuration>

When JIT debugging is enabled, any unhandled exception
to the JIT debugger on the computer that sent registered
and not by this dialog box.
 
Alex Dragon said:
Shatari said:
Alex Dragon said:
Why don;t you make this (item editor) work with mount and blade 1.011 ???
It works just fine for 1.011. Are you running into errors?

It doesn;t work , evertime i change stuff it said save may corrut something like and i press continue and when i go into the game nothing change (i did restart the game )
Plus when i save it it doesn;t change everything because when i save it i close the program and reopen it again and check that the value of what i change is not change.

EG , i change hunting crossbow damage to 100 , in game nothing change .
Are you running Windows Vista or Windows 7?  You may have to start the program as an administrator or it may not have rights to save changes to the file.  To do so, right click and select "run as administrator"
 
rambo said:
I got errors when I load the item_kinds file...
I have framework 4 on my computer...
Sadly it is in dutch. so I translated it quite rough but:

...
See the end of this message for details on invoking
JIT debugging (Just In Time) instead of this dialog.

************** Exception Text **************
System.FormatException: The layout of the input string is incorrect...
This error is thrown when the program fails to convert a string to a number because the format is incorrect.  Since the file is text, much of it representing numbers, one cause of this error is if you have an invalid value for a numeric field, like a weapon damage of "30a".

Another cause which is harder to spot and fix is an extra space between values for an item.  Each item has a line of text with values delimited by spaces.  When I coded the editor, I mistakenly thought there could only be one space between values, but in reality the game can handle multiple spaces.  So, if you had some values like this, "123 456 789", my editor will parse it into three numbers ,123, 456, and 789.  However, if you had those values like so, "123  456 789", it would try to parse a number out of "123", "", "456", and "789" (4 values because 3 spaces - 2 between the first two numbers).  Trying to parse a number from an empty string is invalid, hence the error.

If you have an item with extra spaces between values, which is most likely your issue as item files from mods had this happen fairly frequently, you would have to try and find the extra spaces and delete them, which is like finding a needle in a haystack.  Or if you want, you can email me the item file, and I should be able to find it fairly easily for you.
 
Hi all, I didn't really play M&B for awhile, and I'm not even sure I have the source code for this editor anymore.  However, I recently purchased Warband and have been playing a little here and there.  I realize there is a new editor by Morgh which can edit the Warband item file.  However, I have an inkling to update my editor to edit Warband files as well.  I was very busy with work for a couple years there, but I'm a little slow and feel like doing something to keep me busy a few nights a week when my wife is away at school.  Would there be any interest in such a thing from anyone?

No offense to Morgh, but I tried his editor any found it annoying that I have to save changes every time I edit an item as opposed to once when I wish to exit.  Also, every save prompts me with a pop-up showing the actual translated item text, which is of little use in my opinion, and which I then have to click OK on.  Maybe these have been changed/fixed already in a more recent version, and if not I'm sure it would be easy.  Just some constructive criticism. 

Another thing I thought would be useful is an import/export option to save/load from a comma delimited file which could be opened with Excel for example.

So, if there is any interest, please let me know.  If not, I probably won't bother.
 
Jordan, I have it also with the file of Native, not only the mod?
How is it possible then?
But I can send it to you, but what is your e-mail?
 
rambo said:
Jordan, I have it also with the file of Native, not only the mod?
How is it possible then?
But I can send it to you, but what is your e-mail?
Have you tried editing the item file by hand?  If so, you may have inadvertently added an extra space somewhere.  My email is visible in one of the editor menu selections (maybe 'about' - I don't remember).
 
Anyone interested in testing my updated item editor?  It should be compatible with the original game (later versions) and Warband.  I basically did a rewrite of my original editor because I've come a long way in C# programming since the original, and I wanted the code to be cleaner.  It has all the functionality of the old editor, plus it has better built in multi-language support via an XML config file.  If you want to beta test it for me, please email me at [email protected].  .NET framework required.
 
jordan said:
No offense to Morgh, but I tried his editor any found it annoying that I have to save changes every time I edit an item as opposed to once when I wish to exit.  Also, every save prompts me with a pop-up showing the actual translated item text, which is of little use in my opinion, and which I then have to click OK on.  Maybe these have been changed/fixed already in a more recent version, and if not I'm sure it would be easy.  Just some constructive criticism. 

The editor works in the same way as all my included editors, with an update button. Maybe this is not the best way to handle the item editor, but so the code was compatible with the rest of the tool and also with the usage of HookieBT's editor, which was before my tool...
Another reason of a less "tricky GUI" is, that VB6 is 13 years old, and I released the tool without any framework or other libraries. Its just the controls which are in the standard VB6 runtimes which are on every base installed Windows PC - without installing anything.

The "translated item" is for people who want to add the code manually to another text file, or just to analyze it. So this is a "feature" :wink: and I won't remove this simple "function call".

But thanks for updating your tool! I wrote mine a year ago after waiting a while for an update of your tool :wink:
 
Morgh said:
jordan said:
No offense to Morgh, but I tried his editor any found it annoying that I have to save changes every time I edit an item as opposed to once when I wish to exit.  Also, every save prompts me with a pop-up showing the actual translated item text, which is of little use in my opinion, and which I then have to click OK on.  Maybe these have been changed/fixed already in a more recent version, and if not I'm sure it would be easy.  Just some constructive criticism. 

The editor works in the same way as all my included editors, with an update button. Maybe this is not the best way to handle the item editor, but so the code was compatible with the rest of the tool and also with the usage of HookieBT's editor, which was before my tool...
Another reason of a less "tricky GUI" is, that VB6 is 13 years old, and I released the tool without any framework or other libraries. Its just the controls which are in the standard VB6 runtimes which are on every base installed Windows PC - without installing anything.

The "translated item" is for people who want to add the code manually to another text file, or just to analyze it. So this is a "feature" :wink: and I won't remove this simple "function call".

But thanks for updating your tool! I wrote mine a year ago after waiting a while for an update of your tool :wink:
Hi Morgh, thanks for not taking my criticism the wrong way.  I appreciate your work as I was being bugged a lot to update my editor until your tool came out.  It wasn't feasible at the time as my work was really hectic and I didn't have the new game anyways.

I used to code in VB6 quite a bit, but I haven't touched it in years and cannot remember much of it.  However, I always thought it was under-rated.  I could churn out a lot of code quickly back in the day; especially simple GUI stuff.  I even got it to do some data intensive processing for work by incorporating some Windows API calls. 

It is nice that you tried to write it in the most compatible way.  I'm just really used to .NET now, and most PCs have the framework installed anyways.

By the way, I may try to add an import/export item option now that you mention it; kind of like your 'translate item' function.
 
jordan said:
Hi Morgh, thanks for not taking my criticism the wrong way.  I appreciate your work as I was being bugged a lot to update my editor until your tool came out.  It wasn't feasible at the time as my work was really hectic and I didn't have the new game anyways.

I used to code in VB6 quite a bit, but I haven't touched it in years and cannot remember much of it.  However, I always thought it was under-rated.  I could churn out a lot of code quickly back in the day; especially simple GUI stuff.  I even got it to do some data intensive processing for work by incorporating some Windows API calls. 

It is nice that you tried to write it in the most compatible way.  I'm just really used to .NET now, and most PCs have the framework installed anyways.

By the way, I may try to add an import/export item option now that you mention it; kind of like your 'translate item' function.

VB6 is just "a bit" outdated, but I own a legal copy of it. I used it years ago for a lot of projects, so if you don't want to code fast algorithms, system drivers or something else, its still a solution.
I stopped development of my tool. Everything interesting is already implemented. Also I haven't started Warband since months.

If you want to add a really interesting feature whichs also makes your tool something special, then write code to export the text items to python code. Sometimes people start with text editing, and later they realize that the module system is the only way to make their dreams come true...
Thats nothing impossible because there are no function calls or variables (conditions, consequences) at the items. I was just too lazy to do that, because then I have to do that with all text editors. -> You can ignore triggers, because people can't really edit triggers in text mode. So you can disable export function at items with triggers if you want to safe a lot of your spare time :grin:

Good luck!
 
Back
Top Bottom