Author Topic: Item Editor - Warband compatible version - 1.0.0.1  (Read 157131 times)

0 Members and 1 Guest are viewing this topic.

jordan

  • Sergeant at Arms
  • *
    • View Profile
  • WB
Item Editor - Warband compatible version - 1.0.0.1
« on: October 17, 2007, 09:54:14 PM »
ItemEditor V1.0.0.1

Description:
This utility edits item_kinds1.txt directly and allows for editing, inserting, and deleting items without having to mess with Python scripts. BACK UP YOUR ITEM_KINDS1.TXT FILE BEFORE USING!!!

Features:
-Edit, add, and delete items
-Allows changing of item flags, capabilities, and modifiers
-Limited support for triggers
-Export/Import to/from CSV files - New
-Auto-calculate weapon/armor speed, damage, difficulty and cost (discontinued)

NOTE: THIS REQUIRES .NET FRAMEWORK

File History:

Wed, May-04-2011

Bug fixes for:

-attribute editing - was using the wrong edit control; weight (double) and other controls (ulong) were reversed

-revert item - now reverts unless file saved

-File save prompt should only appear if changes made to current open file

Tue, May-03-2011
Totally reworked version - should work for the original game (later versions) and for Warband. Some minor differences in functionality:

- filtering by flags/capabilities/modifiers/text

- Export/import to CSV file. When you export, it does NOT include factions, meshes, or triggers. You can make edits via a spreadsheet program like Excel, and then import your changes back into the program to apply to the current open items file. You cannot insert new items via this method, only update items. The column names are important when importing, although you can move columns around and resort the items if you wish. The import function keys off the itemNumber column, so as long as it is present, the order of the items/columns doesn't matter, but if that column is missing, the import function will do nothing. Also, you can remove columns you don't wish to update.

-Better multi-language support. The best method to translate the text is to open the editor, open a file, and then select "Languages/Create Language Settings File". This will generate an XML with all translatable text in the editor. You can change what you want by editing the XML. When done, if you save the XML in the same directory as the EXE as ItemEditor.EXE.language.XML, it will load your translations automatically the next time you run the editor. You can also select "Languages/Load Language Settings File" to load your translations at any time.

-"Tools/Clone Item" will clone the current item to the end of the items list (or in Warband it will place it second to last).

-"Tools/Revert Item" will revert the current item back to it's original state as long as you haven't updated the item yet by selecting another item.

FYI, weapon attribute auto-calculation is not included as I don't think anyone was using it anyways

Tue, May-19-2008
-Changed to work for .952.  The item modifiers changed.  Included in ZIP are 2 language files, english.lang (use for pre .952) and english_.952.lang (for .952).  As you can see in the files, there are many more modifiers, although only about half appear to be used.

Sun, May-10-2008
-Fixed bug where using the translation feature for terms "Blunt", "Pierce", and "Cut" could screw up Thrust and Swing damages.

Thu, May-08-2008
-Fixed one more regional setting bug. Some PC's with "." as thousands separator and "," as decimal separator would screw up item weights when saving. Hopefully this will fix that issue

Tue, May-06-2008
-Reverted trigger handling to simpler interface. Triggers show up as text lines that you can edit or ignore to your hearts content. Very few triggers were valid for items anyways, and it makes this compatible with older versions (Possibly even .751?) This also means that there is no control on triggers, you can type whatever you want there, so be careful.

-Added application config file

-Config file has autoSave option. When turned on, every time you use the "Save File" option, it will back up your current file first. For example, saving "item_kinds1.txt" would create "item_kinds1.txt_20080506_095501". Obviously, the date/time stamp varies depending on when you save it

-Added language support. In the config file, you define a language file. Use key "languageFile" and a value pointing to the location of the file. The file layout is pretty simple. Use the "english.lang" file as a template. The file contains entries such as "Save_File=". If you change this to "Save_File=Avesay Ilefay", then the editor will show "Avesay Ilefay" where it originally showed "Save File". Be warned: the variables are case sensitive. So if you change the entry to "save_file=test", "test" will not show up because "save" and "file" were not capitalized. If you mispell an entry, leave it blank, or delete an entry, it will used default values.

Fri, Apr-04-2008
-Should work for older versions (.800+) still. Triggers still will not work for .890+, but the only native items using them are the flintlock and torch. There is some partial language support, but not working totally yet.

-Why a new version? Some foreign (non-US) users could not get it to work. I guess Windows has regional settings, and if you live in a place where a thousands separator is "." as opposed to "," and where the decimal indicator is "," as opposed to ".", the program would die trying to read decimal data. This version forces the numeric parsing to expect US style numbers as is used in the items file.

Tue, Nov-20-2007
-Added item numbers to all items for easier identification when modifying troops/parties

-Fixed bug where editing inserted was quirky (sometimes edits affected item that was cloned).

Mon, Nov-19-2007
-No longer tries to default to :\Program Files\Mount&Blade\Modules\Native, but should remember last folder opened.

-Can now edit .808 version of file with one caveat - the file seems to be the exact same format except for triggers, so if you load up a .808 file and save it, you will loose all triggers. You can add them back in manually if you want, but don't try to add them through the editor or you will probably crash the game.

Nov-2007
-Fixed bug where edited damage values would not save

Quote
Hi,

First off, I'm new to the forums but have played this game since .751.  And this game is probably my all time favorite, so hats off to the developers.

Secondly, I am trying to write an app in C# that will allow editing of items in the Item_kinds1.txt file.  I plan on having check boxes for all flags (like item modifiers, etc), text boxes to change weapon hit points, etc, and even an option to have the app adjust all the weapon stats automatically (calculating speed, damage, strength requirement, and price depending on the weapon type, length, and weight). 

I've viewed the file and by looking at the module system, I've figured out all the fields EXCEPT for one field as it pertains to weapons.  I do not know what the field prior to the weapon speed attribute is.  For example, in this slightly modified line for the bastard sword, the data after the name and animations reads:

4259843 9223635954298781951 279 532 2.250000 100 0 0 0 9 50176 88 0 120 0 35 49

I know what each field is and how it works except for the 11th one of 50176.  Each weapon has a different value.  It appears to be flags of some sort because converted to hex it is x'C400' in this case.  Does anyone know what it is?
« Last Edit: November 05, 2011, 04:02:18 PM by Caba`drin »

Miclee

  • Master Knight
  • *
  • Meh.
    • Skype - michael.louisseize
    • Twitter - MikeLouisseize
    • YouTube - MicleeWoM
    • View Profile
  • Faction: Neutral
  • MP nick: Miclee
  • M&BWB
Re: Item_kinds1.txt
« Reply #1 on: October 17, 2007, 10:22:27 PM »
Ermmm.. Download the module system. Much easier.
You can find me on twitter: http://twitter.com/#!/MikeLouisseize

D'Sparil

  • Baron
  • *
  • Wordfilter up your bottom
    • View Profile
  • Faction: Swadian
Re: Item_kinds1.txt
« Reply #2 on: October 17, 2007, 10:39:47 PM »
Miclee did you EVEN READ what he posted? he is trying to make an items editor for everyone to use, not a mod, jeez.

Miclee

  • Master Knight
  • *
  • Meh.
    • Skype - michael.louisseize
    • Twitter - MikeLouisseize
    • YouTube - MicleeWoM
    • View Profile
  • Faction: Neutral
  • MP nick: Miclee
  • M&BWB
Re: Item_kinds1.txt
« Reply #3 on: October 17, 2007, 11:04:07 PM »
Yeah, but what's the point of it? We have a module system that allows this, and more.
You can find me on twitter: http://twitter.com/#!/MikeLouisseize

SPD_Phoenix

  • Master Knight
  • *
    • View Profile
  • Faction: Neutral
Re: Item_kinds1.txt
« Reply #4 on: October 18, 2007, 12:03:12 AM »
Yeah, but what's the point of it? We have a module system that allows this, and more.

GUI editor

Edit: my guess based on the process_item.py, that's supposed to be item's hit point.
« Last Edit: October 18, 2007, 12:32:12 AM by SPD_Phoenix »

D'Sparil

  • Baron
  • *
  • Wordfilter up your bottom
    • View Profile
  • Faction: Swadian
Re: Item_kinds1.txt
« Reply #5 on: October 18, 2007, 12:05:07 AM »
Yeah, but what's the point of it? We have a module system that allows this, and more.
Most people dont know how to mod. Besides this would allow people to edit items from any mod, without having the source file.

Miclee

  • Master Knight
  • *
  • Meh.
    • Skype - michael.louisseize
    • Twitter - MikeLouisseize
    • YouTube - MicleeWoM
    • View Profile
  • Faction: Neutral
  • MP nick: Miclee
  • M&BWB
Re: Item_kinds1.txt
« Reply #6 on: October 18, 2007, 12:41:53 AM »
Ahhh... I see. Sort of like the unofficial editor, but just for items.
You can find me on twitter: http://twitter.com/#!/MikeLouisseize

James

  • Golden Crocoduck
  • Grandmaster Knight
  • *
    • View Profile
    • A Medieval Craftsman
  • Faction: Neutral
Re: Item_kinds1.txt
« Reply #7 on: October 18, 2007, 01:09:29 AM »
Yes, but the UE doesn't exist for these versions; SO, this is at least a start.

jordan

  • Sergeant at Arms
  • *
    • View Profile
  • WB
Re: Item_kinds1.txt
« Reply #8 on: October 18, 2007, 01:20:50 AM »
Yeah, but what's the point of it? We have a module system that allows this, and more.
Most people dont know how to mod. Besides this would allow people to edit items from any mod, without having the source file.


Yes, you've got it.  This would allow editing of all item attributes, not only weapons, without having to recompile the python scripts, and make it easy for anyone, not just modders, to do.

GUI editor

Edit: my guess based on the process_item.py, that's supposed to be item's hit point.

I saw that too, and it makes sense for the horses.  But for the weapons, not so much.  Here's the values for some swords from .894.

Bastard sword: 33792 = 0x8400
Great sword: 36864 = 0x9000
Sword of war: 37888 = 0x9400
Nomad sabre and broadsword: 27648 = 0x6C00
Scimitar: 26624 = 0x6800

According to the scripts, these seem to be related to the ibf_hitpoint... variables in header_items.py.  But those variables do not seem to have anything to do with the weapons as far as I can tell...unless Armagan plans on adding weapon and armor durability in the future.  Which would be pretty cool I think.

ibf_hitpoints_mask       = 0x0000ffff
ibf_hitpoints_bits       = 40

Fujiwara

  • Sergeant at Arms
  • *
    • View Profile
  • Faction: Neutral
Re: Item_kinds1.txt
« Reply #9 on: October 18, 2007, 07:04:16 PM »
I know that the hitpoints are used for shields. It seems the ibf_hitpoints_mask would mask out the four hex values you give in your list, if I understand how that works.

Code: [Select]
ibf_hitpoints_mask = 0x0000FFFF

Bastard_sword = 0x00008400

Bastard_sword | ibf_hitpoints_mask = 0x0000FFFF // Gives zero hit points for the bastard sword

Whether Armagan intends to implement durability in the future, only he knows.
M&B: Onin no Ran - THE Japan Mod

Pythonic Module Editor

Johnny is a hacker's son
But Johnny is not 133t
What Johnny thought was ADD_AND_SHIFT
Instead was REG_DELETE

jordan

  • Sergeant at Arms
  • *
    • View Profile
  • WB
Re: Item_kinds1.txt
« Reply #10 on: October 20, 2007, 01:19:42 AM »
Well, I coded up a small app that lets you edit all the flags/attributes etc for all items.  If anyone is interested in trying it out, let me know at [email protected] 

As for the hitpoint field for weapons, I left it as editable, although I don't know what changing it will do.

By the way, it requires .NET framework.
« Last Edit: October 20, 2007, 01:23:40 AM by jordan »

SPD_Phoenix

  • Master Knight
  • *
    • View Profile
  • Faction: Neutral
Re: Item_kinds1.txt
« Reply #11 on: October 20, 2007, 02:14:45 AM »
Since horses and shields use hit point, the field should be editable. I believe game doesn't read weapon hitpoint for now.

Edit: I just spent a little time playing around with the your editor. It's pretty cool that I can load the text file from any mod and change the stats as I like. The editor has pretty much everything about items' stats. All kind of stats: from item capabilities, item when carry, modifiers used with item, to the usual weapon length, damage,...However, the items flags and item's capabilities don't seem to be saved (or is it intended?). For example, changing spear capability to polearm capability (giving spear the ability to swing like poleaxe).

The interface remind me of the old Unofficial Editor and quite easy to use.

It is limited to changing stats for now (means: no adding/deleting or changing name or mesh selection capability yet). Still, it can be a great tool for someone who just want to change item stats, but don't want to go through the whole module system thing.

It is great work in progress.

Jordan, are you going to expand/add more ability to the editor this or this is it? Because if you are going to add more feature, may I suggest that you speak with Effidian and Thorgrim to see if they could share their experiences from the Unofficial Editor (for 0.751).
« Last Edit: October 20, 2007, 09:14:44 AM by SPD_Phoenix »

jordan

  • Sergeant at Arms
  • *
    • View Profile
  • WB
Re: Item_kinds1.txt
« Reply #12 on: October 22, 2007, 02:47:41 PM »
Since horses and shields use hit point, the field should be editable. I believe game doesn't read weapon hitpoint for now.

Edit: I just spent a little time playing around with the your editor. It's pretty cool that I can load the text file from any mod and change the stats as I like. The editor has pretty much everything about items' stats. All kind of stats: from item capabilities, item when carry, modifiers used with item, to the usual weapon length, damage,...However, the items flags and item's capabilities don't seem to be saved (or is it intended?). For example, changing spear capability to polearm capability (giving spear the ability to swing like poleaxe).

The interface remind me of the old Unofficial Editor and quite easy to use.

It is limited to changing stats for now (means: no adding/deleting or changing name or mesh selection capability yet). Still, it can be a great tool for someone who just want to change item stats, but don't want to go through the whole module system thing.

It is great work in progress.

Jordan, are you going to expand/add more ability to the editor this or this is it? Because if you are going to add more feature, may I suggest that you speak with Effidian and Thorgrim to see if they could share their experiences from the Unofficial Editor (for 0.751).
I've fixed the flag setting bug in the new version I sent.  Also, I've updated the automatic weapon settings now.  The only issue with it is when it calculates weapons speed and damage for swinging polearms, it tends to give them very high swing damage.

I may add more functionality to the editor.  I can easily allow simple mesh modification (add, delete, change names, etc).  But if I wanted to validate mesh data entered, that might take more effort.  It's been a fun way for me to improve my C# as I've only been coding in it a few months.  What type of things do you (or anyone) think would be good to add to it? 

rlg85

  • Sergeant
  • *
    • View Profile
  • Faction: Neutral
  • MP nick: Fallen_Knight85
Re: Item_kinds1.txt
« Reply #13 on: October 23, 2007, 06:34:53 AM »
Quote
What type of things do you (or anyone) think would be good to add to it?

Well I imagine a lot of people would like to be able to edit the parties.txt and the troops.txt, particularly the troops.txt for the purpose of easily adding troop trees and heroes.

SPD_Phoenix

  • Master Knight
  • *
    • View Profile
  • Faction: Neutral
Re: Item_kinds1.txt
« Reply #14 on: October 23, 2007, 07:03:02 PM »
Jordan, I tested the new version. It works great.

As for new functions of this module (item_kinds1):

- The ability to Add/Clone an item: this may require that the item's name fields are editable. Also, need a field for mesh name and this should be editable (user must use valid mesh name just like in UE).
- With the ability to add/clone, I may need the ability to delete item.
- With the ability to add/clone/delete, you will need to make sure the items count (at the beginning of the text file) is adjusted correctly. Otherwise, it may create a problem for mod.

Currently, all of the above can be done manually. To add/delete item: manually copy and paste or delete the item from the text file. Change the item count. If adding, manually change item name (so it is not duplicated) and mesh name if needed. Load the file in the Editor and edit other attributes that can not be edited directly in the text file.

Like, rlg85 said, I love to have the ability to edit troops. And if possible, party_templates.