MB Barracks Editor Package [v2.46 25.03.2015]

lconracl

Grandmaster Knight
M&BWB
Best answers
0
"Mount and Blade Barracks Editor"                  version 2.46


Standalone editor and Microsoft Excel based applications which allows user to edit TXT files from MB1011, MB 'Warband', 'With Fire and Sword' and 'Napoleonic Wars' (mods or latest natives). It should work with "Viking Conquest" as well, but I do not have this DLC to actually check it.



Standalone version _____________________________________________________________

Microsoft Windows (with .NET Framework v4.0 installed) based application which allows user to import txt files from MB 'Warband', 'With Fire and Sword', 'Napoleonic Wars' (mod or native). It contains: Troops, Items, Faction, Parties and Party Templates Editors.

All editors allow to:
- edit: name, ID, flags ... ,
- create new / remove existing entry,
- copy / replace selected data,
- export data as a text (game file) or a comma-separated values (to open as table in e.g. Excel/Libre/Open Office),
- show all data in table format, which supports sorting by: name, ID ... ,
- save all edited data automatically,
- warn (if enabled) and correct user if incorrect data is entered,
- present all information important for user on the status bar (no confirmation windows to click),
- resize editor window (recommended minimum resolution is 1280x800, but window's dimensions can be reduced even further).

Extra in Troop Editor:
- compare two units side by side,
- search Troop Name, Troop ID, Upgrade Path and Item columns for specified word (e.g. find which units are equipped with Morningstar),
- filter data by troops' type (infantry, cavalry, foot / mounted archers), show only selected types,
- troops equipment:
    - show main stats (e.g. damage and length for polearms, HP and speed for horses),
    - present only selected items' type,
    - sort equipment by type or number,
    - add / remove multiple items at the same time,
    - support mouse drag & drop to rearrange items, RMB to add / remove them,
- selected only or all troops attributes, proficiencies and skills can be filled with random numbers within defined limits,
- delete / replace item in inventories of all troops.

Extra in Items Editor:
- search Item Name, Item ID and Mesh Name columns for specified word (e.g. find if mesh is already used),
- filter data by items' type, show only selected types.

Editor assumes that each Faction ID begins with 'fac_', Items ID - 'itm_', Troops ID - 'trp_', Party Templates ID - 'pt_' , Parties ID - 'p_'. If this assumption is  false, data could not be loaded properly. Information about quantity of imported data will be displayed on the status bar.

Editor adds one empty line at the end of exported '*.txt' file. It should not affect the game and could be easily removed manually from the output file if desired.

Parties Editor support up to  6 troops.

Party Templates and Parties editors support first 255 map icons.

Application tested (files imported, exported and compared with original successfully) on Windows8 64bit ENG with mods presented on the first picture.

Some pictures (all shown game data comes from great mod Prophesy of Pendor):
List of the mods in specified folder.



Microsoft Excel version _____________________________________________________________

Microsoft Excel based application which allows user to import ITEMS and TROOPS from MB1.011, MB 'Warband', 'With Fire and Sword', 'Napoleonic Wars' (mod or native), and:
- edit multiple troops/items in the same time,
- edit single troop/item,
- create troops tree using semi-automatic creator,
- see detailed informations about troops/items (attributes, skills, flags, meshes, capabilities, factions, triggers),
- compare two troops/items (damage, attributes, skills, flags, equipment, stats),
- switch view between excel worksheet (table format) and application GUI,
- compare two ITEM_KINDS1.TXT or TROOPS.TXT files to see changes (for example after new patch relase),
- remove item from ITEM_KINDS1.TXT and automatically from units equipment (TROOPS.TXT).

1. Microsoft Excel 2010 (compatible with 2003 version) with temporarily or permanently enabled Macros.
2. Application must be located in game MODULES folder (...\Mount&Blade Warband\Modules\ put editor here) (or created new MODULES folder with mods' folders contain necessary txt files).
3. Application needs: ITEM_KINDS1.TXT, TROOPS.TXT, FACTIONS.TXT.
4. Exported txt file is saved in this editor location (game Modules folder). 
5. Press IMPORT button to import data from selected mod.

I strongly recommend to check how program handles untouched files:
- in main menu choose IMPORT, then select TROOPS or ITEMS,
- press EDITOR in new window,
- click PROCESSTXT->REBUILDTXT from top menu,
- answer YES on both questions,
- select path to the just imported original file,
- there should be no differences between files.

It is a good idea to compare both txt files in other program, like NOTEPAD++.

On slower systems some operations can take some time.

Application tested (files imported, exported and compared with original successfully) on Windows8 64bit ENG, Microsoft Excel 2010 and:
1. Mount and Blade Native v1.011:
  - Wedding Dance - Beta 9,
  - The Last Days Of The Third Age Of Middle Earth Mod 3.1 (TLD_3.1_hotfix_3).
2. Mount and Blade Warband Native v1.158:
  - Prophesy of Pendor 3.611,
  - 1257AD 0.97.1,
  - Brytenwalda 1.40,
  - Sword of Damocles: Warlords v3.92f3,
  - 1776 Old America v. 1,0,
  - Light&Darkness 1.032,
  - Persistent World PW_4_beta7
3. Mount and Blade With Fire and Sword Native v1.143:
  - WFaS Enhanced 175
4. Mount and Blade Napoleonic Wars Native v1.006.

Some pictures (all shown game data comes from great mod Prophesy of Pendor):
To view and compare troops stats, equipment...
To edit multiple troops in the same time. Supports "skl_reserved".

For example:
--- select all Swadia troops' attributes and click one button to increase them by 2;
--- sort all units by level -> choose all with level 15 -> select their weapon proficiencies -> click one button to fill them randomly with numbers 140-160,
--- do the same for level 20's units, but fill their proficiencies with 200-230,
--- rebuilt troops.txt -> export troops.txt (note file path),
--- change exported file name to 'troops.txt' -> replace original file in the mod folder (make copy of original file) -> play the game.

Command bar options (left to right):
- ProcessTXT:
--- RebuildTXT  - checks data integrity (optional) and rebuilds "troops.txt" file structure at the end of the current units list,
--- ExportTXT    - transfers created data into "troops_1.txt" file, saved in this editor location (game Modules folder),
--- Help              - help you are reading now,
--- Back              - back to TROOPS VIEWER,

- Insert:
--- AutoFilter      - switches auto filter on/off,
--- Symbol          - helps manually correct names contain letters like: ó, æ, ã ... before EXPORTTXT,

- EditorGUI          - to edit single troop,

- Increase/Decrease By - input box for constant used for +/-,
- +           - increases selected cell(range) value(s) by constant specified in "Increase/Decrease By" input box,
- -           - decreases selected cell(range) value(s) by constant specified in "Increase/Decrease By" input box,

- Lowerbound    - input box which contains lower boundary used for FillRandom,
- Upperbound    - input box which contains upper boundary used for FillRandom,
- FillRandom        - fills selected cell(range) value(s) with numbers specified in Lowerbound and Upperbound input boxes,

- Items                - list of all items sorted by type, number,
- AddItem          - adds item specified in "Items" combobox to the end of selected troop's list; added item will be marked red,
- RemoveItem    - removes last item from the selected troop's list,

- Factions            - list of all factions,
- ReplaceFaction - uses name selected in "Factions" combo box to replace orginal troop's faction; changed faction will be marked red,

- FindRed            - finds cells marked with red - cells with warnings (marked after tests), changed factions, added items,
- RemoveRed      - removes red colour from selected cell(range).

For SCENE raw value is used to rebuilt the file.
To edit single troop.

Options (left to right):
- Back              - back to Troops Editor Excel,

- Add                - adds new troop (require UNIQUE TROOP ID)  to the end of troops' list,
- Remove          - removes last troop from list,
- Update          - updates selected troop,

- ComboBox1    - selects fields for +/-/Fillrandom operation,
- TextBox1        - input box for constant used for +/-,
- +         - increases selected in ComboBox1 values by constant specified in TextBox1,
- -         - decreases selected in ComboBox1 values by constant specified in TextBox1,

- TextBox2        - input box which contains lower boundary used for FillRandom,
- TextBox3        - input box which contains upper boundary used for FillRandom,
- FillRandom      - fills selected in ComboBox1 values with numbers from TextBox2 to TextBox3.

Choose troops for Troops Tree creation.


Initial Troops Tree view.


Finished Troops Tree (troop's name~level~strength~agility~average proficiencies).
To view and compare items stats.
To edit multiple items in the same time. Supports more then one trigger, new MBFWS item flag, meshes.

Command bar options (left to right):
- ProcessTXT:
--- RebuildTXT  - checks data integrity (optional) and rebuilds "item_kinds1.txt" file structure under current items list,
--- ExportTXT    - transfers created data into "item_kinds1_1.txt" file, saved in this editor location (game Modules folder),
--- Help              - help you are reading now,
--- Back              - back to ITEMS VIEWER,

- Insert:
--- AutoFilter      - switches auto filter on/off,
--- Symbol          - helps manually correct names contain letters like: ó, æ, ã ... before EXPORTTXT,

- EditorGUI          - to edit single item,

- Increase/Decrease By - input box for constant used for +/-,
- +           - increases selected cell(range) value(s) by constant specified in "Increase/Decrease By" input box,
- -           - decreases selected cell(range) value(s) by constant specified in "Increase/Decrease By" input box,

- Type                - input box which contains available item's types,
- RepleaceType  - replaces selected item's type,

- Factions            - list of all factions,
- ReplaceFaction - uses name selected in "Factions" combo box to replace orginal item's faction,

- Mesh Modifier Bits - list of all item's available mesh modifier bits,
- AddMMB            - adds mesh modifier bit on the end of current list (ixmesh_ only one always appears on the beginning of the list),
- RemoveMMB    - removes last mesh modifier bit,

- FindRed            - finds cells marked with red - cells with warnings (marked after tests), changed factions, added items,
- RemoveRed      - removes red colour from selected cell(range).

Support for upto two triggers.

To edit single troop.

Options (left to right):
- Back              - back to Items Editor Excel,

- Add                - adds new item (require UNIQUE TROOP ID)  to the end of items' list,
- Remove          - removes last item from list and if requested removes it from troops equipment as well,
- Update          - updates selected item and troops equipment.


... add weapon to troop's equipment using GUI?
1. open my program,
2. in MOD section select 'Native' (or your mod),
3. click IMPORT and wait,
4. click TROOPS,
5. in new window click EDITOR to go to Excel,
6. from top menu (Add-ins in Excel2010) choose EDITOR GUI,
7. in TROOP EDITOR GUI window select unit, from item list (right side) choose weapon and click button with arrow (pointed left),
8. press UPDATE button, then confirm change (do that for each troop you change),
9. press BACK to go to Excel,
10. from top menu (Add-ins in Excel2010) choose PROCESSTXT->REBUILDTXT,
11. click Yes in first small window, then No in second one,
12. from top menu (Add-ins in Excel2010) choose PROCESSTXT->EXPORTTXT (note path),
13. look for exported file, change its name to 'troops.txt', copy into mod folder ('Native' / your mod) (MAKE COPY OF ORGINAL ONE),
14. start new game to see changes.

...  change troop's gender with GUI?
1. in TROOP EDITOR GUI choose female troop,
2. copy her 'face code 1' and 'face code 2' to notepad,
3. select troop you want to change,
4. paste 'face code 1' and 'face code 2' from notepad,
5. changed troop's gender to "female",
6. press UPDATE, then BACK,
7. in Excel view PROCESSTXT->REBUILDTXT, then PROCESSTXT->EXPORTTXT,
8. make copy of orginal 'troops.txt' and then replace it with exported file,
9. start new game to see changes.
- names contains letters like: ó, æ, ã ... - those letters are replaced - correct names manually (e.g. 1257AD v0.95pre10),
- during import\export operations max text line length is 6120 characters (the longest triggers seen in Light&Darkness 1.032 - 5321 characters),
- max 9999 items supported,
- if mesh's name is in numeric format (like 123 ) - line could be imported incorrectly (seen only in two mods for MB1.011 ).   

Download from Mount&Blade Repository or NexusMods

v2.46
in stand alone version:
- improved TROOPS & ITEMS RHS top menus open/close behaviour,
- fixed parties editor on screen menu: alerting party temp entry does not change values in icon column.
v2.45
in stand alone version:
- in all but FACTION editor: ADD and REMOVE operations are not limited to the last row any more,
- added: user can run multiple instances of application (e.g. TROOPS and ITEMS EDITORS in the separate windows); note: all game data is imported when editor type is selected in the main window, therefore e.g. changing item stats in the 1st instance does not update this item description in the 2nd instance,
- added ZERO WINDOW POSITION to MAIN -> OTHER to cover situation, when during first launch editor's window appears outside screen; other way: press Windows Key + Up Arrow to maximize window,
- in REPLACE ITEM window: item type combo box error fixed,
- all fields in COMPARE units window are updated properly,
- minor fix in TROOPS EDITOR's SEARCH function,
- easier to switch between TROOPS EDITOR's menus.
v2.44
in stand alone version, in TROOPS EDITOR:
- added REPLACED ITEM window (OTHER menu) - selected item (double mouse click on the list) will be replaced or removed from inventory of ALL troops; WARNING: operation is irreversible,
- SEARCH function - if entered word has 'name-number' format (e.g. club-2), only cells, which exactly match searched word, will be returned. E.g.: search for 'club' will return 'club-2' and 'club-299', but 'club-2' will return 'club-2' only,
- single mouse click will open / close top strip's menus.
v2.43
in stand alone version:
- added COMPARE to TROOPS EDITOR - allows to compare two units side by side and edit some stats,
- improved SEARCH function,
- added ALWAYS ON TOP functionality to all windows,
- program will remember size and last position of the editor's window on the screen. 
v2.42
in stand alone version:
- covered (hopefully) situation, when in Windows Regional Settings decimal separator is comma (e.g. French, Polish) not dot (e.g. English).
v2.41
in stand alone version:
- added 'abnormal flags' to Troops Editor to cover 'Europe 1200 0.22 - Beta 9',
- improved code versatility - secured some exceptions.
v2.40
in stand alone version:
- added Parties Editor,
- improved copy operation,
- corrected description in Help files.
v2.30
- added Party Templates Editor,
- added Random function to Troop Editor - selected only or all troops attributes, proficiencies and skills can be filled with random numbers within defined limits,
- improved code versatility in Excel version.
v2.20
- added Troops Editor,
- added SEARCH in Items Editor
v2.10
- added second module (Item Editor) to standalone editor - next to do is Troops Editor,
- fixed bugs in standalone Factions Editor.
v2.00
- added standalone Faction Editor (no Excel required) - next to do is Items Editor,
- fixed bug in Item View (Excel version) - when not all items' types are selected wrong item's modifiers added to list.
v1.06
- added version compatible with MB1.011.
v1.05
- updated to patches W 1.153, WFAS 1.143, NW 1.006,
- removed file for MB1.011 - working to make current version for Warband compatible with MB1.011,
- increased max test line length from 1020 to 6120 (trigger1) and 4080 (trigger2),
v1.04b
- improved code versatility - compatibile with more mods,
- support for two triggers.
v1.032b
- improved code versatility - editor compatibile with Sword of Damocles: Warlords v3.92f1.
v1.031b
- fixed problem when on some systems during 'export items file' operation dot in item weight is replaced by comma.
v1.03b
- fixed "gender" combo box in TROOPS EDITOR GUI,
- older version added - support for 'Mount and Blade'.
v1.02b
- now compatibile with MBWFS 1.43; added new items' flags ("is_pike", "offset_musket", "no_blur") and capabilities ("overswing_spear", "overswing_musket", "thrust_musket"),
- in TROOPS EDITOR GUI divided items into types - easier to equip troop,
- in TROOPS EDITOR EXCEL - "+" and "-" buttons can be used to change troops' equipment (e.g. you can remove first item from item_kinds1.txt, then in TROOPS EDITOR EXCEL select all troops' equipment and using "-" decrease them by one; it is handy if you play a mod with some of your own items added at the end of item_kinds1.txt and in new patch item_kinds1.txt is longer/shorter),
- bug fixes.
v1.01b
- added ITEMS EDITOR for editing single/multiple item(s),
- added new items' flag from MBWFS,
- added support for troops' skills not used in native game (skl_reserved)
- simplify handling,
- bug fixes.
v0.12b
- fixed EXPORT operation in troops EDITOR GUI,
- when not all items' types are selected, 'compare item operation' fails - fixed,
- improved FillRandom operation.
v0.11b
- added TROOPS EDITOR GUI (for editing single troop),
- TROOPS EDITOR EXCEL - added: factions, REMOVE ITEM button, option to skip tests,
- some changes in the code.
v0.10b - download if you have errors discribed below:
- sometimes, on some systems, 'Cut' operation causes error: 'Run-Time Error '-21474417848 (8001010:cool:' - fixed,
- sometimes Dir function causes error - secured.
v0.09b
- replaced equipment number with short item description (Troops Editor),
- in Troops Editor: added combo box with all items (each item has short description; items sorted by type and number),
- added 'fine' item modyfier,
- corected troops' equipment in compare section (GUI).
v0.08b:
- corrected Undead flag in Troops editor,
- added more information about troops and items (flags, meshes, capabilities, fractions, triggers),
- improved compatibility with some mods,
- some bugs fix.
v0.07b:
- added TROOPS.TXT Excel editor (read HELP first),
- corrected SHOW (sort) operation in GUI.
v0.06b:
- corrected weight calculation in compare items section,
- corrected weapon types: 1H, 2H and 1H/2H in GUI.
v0.05b:
- user can adjust window's size (up to 50% of orginal size),
- updated OpenOffice file to MB Native 1.011, MBW Native 1.125.
v0.04b:
- for OpenOffice users: added simple worksheet with troops' and items' lists for MB Native 1.011, MBW Native 1.123,
- added "1H/2H" item's type (for weapons like Bastard Sword),
- in "Excel View" buttons moved from sheet area (which can sometimes dissapear) to command bar (top of the screen),
- changed code slightly to cover MBWs' patches 1.123, 1.124.
 

lconracl

Grandmaster Knight
M&BWB
Best answers
0
saxondragon said:
+1 Rep.. nice work!

Best regards,

Saxondragon
I think this program can help update Prophesy of Pendor WIKI (troops' trees, weapons' lists divided into types ...) .
 

lconracl

Grandmaster Knight
M&BWB
Best answers
0
bigtoebubby said:
ohhh man i love spreadsheets!!
Me too. :smile:

Now I'm trying to figure out how damage system works and plan to add it to the next relase.
 

saxondragon

Sergeant Knight
Best answers
0
saxondragon said:
+1 Rep.. nice work!

Best regards,

Saxondragon
I think this program can help update Prophesy of Pendor WIKI (troops' trees, weapons' lists divided into types ...) .
Much more.. we are in the last stages of development for Pop 3.0 and there is so much data to balance that it is mind numbing.  New troops, new items.. etc.. that this tool will save me dozens of hours of work and reduce errors as well as provide a way to get this information out to the players through the website for Pop 3.0.

Again.. thanks mate.

Best,

Saxondragon
 

lconracl

Grandmaster Knight
M&BWB
Best answers
0
saxondragon said:
saxondragon said:
+1 Rep.. nice work!

Best regards,

Saxondragon
I think this program can help update Prophesy of Pendor WIKI (troops' trees, weapons' lists divided into types ...) .
Much more.. we are in the last stages of development for Pop 3.0 and there is so much data to balance that it is mind numbing.  New troops, new items.. etc.. that this tool will save me dozens of hours of work and reduce errors as well as provide a way to get this information out to the players through the website for Pop 3.0.

Again.. thanks mate.

Best,

Saxondragon
About errors. When I import POP2.5 item_kinds1.txt two items have "?" type. That is happened because there is not single but double space between numbers in the file.

For example Noldor Ancient Plate:

itm_pl_467 Noldor_Rune_Armor Noldor_Rune_Armor 1**nobleman_outf_second 0  16777229 0 15279 704643236 22.000000 1 0 64 25 14 0 0 0 0 0 0 0
0

itm_pl_187 Noldor_Ancient_Plate Noldor_Ancient_Plate 1***plate_chain_engraved 0  553648141 0 18005 123731968 14.000000 1 2 62 22 5 0 0 0 0 0 0 0
0

I'm not sure that is big error, but I've never seen this armor in game (I think...).
 

saxondragon

Sergeant Knight
Best answers
0
That is interesting.. thanks for the heads up.. I checked and found that there was an extra space in the mesh name.  It is not found in stores and only on certain troops in version 2.5.  I corrected it in 3.0.

  ["pl_187", "Noldor Ancient Plate", [("_plate_chain_engraved",0)], itp_type_body_armor|itp_covers_legs |itp_civilian,0,    23571 , weight(21)|abundance(1)|head_armor(2)|body_armor(62)|leg_armor(22)|difficulty(30) ,imodbits_armor],

Best,

Saxondragon
 

cmpxchg8b

Count
M&BWBWF&SNW
Best answers
0
That is happened because there is not single but double space between numbers in the file.
You really shouldn't parse .txt files expecting constant amounts of spaces, even if it works most of the time due to everyone using the same module system.
The game doesn't care if there is 1 space or 2 spaces or 120 newlines, as long as there is some kind of whitespace between tokens.
 

lconracl

Grandmaster Knight
M&BWB
Best answers
0
cmpxchg8b said:
That is happened because there is not single but double space between numbers in the file.
You really shouldn't parse .txt files expecting constant amounts of spaces, even if it works most of the time due to everyone using the same module system.
The game doesn't care if there is 1 space or 2 spaces or 120 newlines, as long as there is some kind of whitespace between tokens.
I'm using SPLIT function to process each item. This function allows me to put all necessary information into array using single line of code, which is pretty efficient. But I need to specify what character divides whole string into pieces (single space in my case).
When I first time tested this program, used four different files and imported about 2800 items. I found only 8 (0.3%) marked as "?", so I decided treat "extra space" as error.
 

Robis

Knight
WB
Best answers
0
It doesnt open troops.txt file. I get black view and nothing more. I'm unable to see troops tree too.
 

orik

Regular
WB
Best answers
0
I've openoffice and when I try to 'insert from sheet' the txt file the result is not as in the image. what sould I do?

great job!!!!
 

lconracl

Grandmaster Knight
M&BWB
Best answers
0
orik said:
I've openoffice and when I try to 'insert from sheet' the txt file the result is not as in the image. what sould I do?

great job!!!!
I've never test it with OpenOffice so I'm not sure.

In version 0.3b both Items and Troops worksheets are empty so in next release I will fill them with MBWarband's data. That allows OpenOffice users see information in spreadsheet format.
 

bigtoebubby

Knight
M&BWBWF&SVC
Best answers
0
any way to get the splash screen smaller or custom resolution? on my widescreen sometimes it's clipped at the bottom because the picture is at a fixed res.
 

lconracl

Grandmaster Knight
M&BWB
Best answers
0
bigtoebubby said:
any way to get the splash screen smaller or custom resolution? on my widescreen sometimes it's clipped at the bottom because the picture is at a fixed res.
It is a bit hard to make screen smaller because there is plenty information to show at the same time. Personally I use 1680x1050 and thought that 1280x800 is the most common one. I can always make lists shorter, move buttons to the top...

I'll do something about it.