[Outdated] Worksheet and export script for Items

Users who are viewing this thread

Scion

Master Knight
Tested this for 0.808 and it seems to work perfectly. But I haven`t modified it so it might not fully support new item flags etc.

Worksheet and export script for Items
This is an Open Office "Excel" Worksheet where you will have to export all individual sheets (Sword, Axe etc) to a csv file. There is also a "global variables" sheet where you can set a multiplier and exponent for stats, for example damage stats. Ex: Damage_multiplier*[Swing damage]^Damage_exponent.

Why use this:
  • Nice table of items instead of Python arrays and tuples.
  • Less error phrone adding items (assuming my script is bugfree).
  • Nice sorting functions, output funcitonality, formulas etc in OpenOffice.

itemsworksheet.zip - 0.01MB
(even though there is a new version coming up every second, there is nothing wrong with making the OpenOffice file, as it will probably be quite similar.)



A Python script


Which will give you this:


OpenOffice Worksheet with Pyhon export script for items in Mount & Blade Official Module System
Author: Scion

------------------------------------------------------------------------------------------------
Tested with:
- Mount & Blade 0.751
- OpenOffice.org 1.1.3 (Norwegian version)
- Python 2.5

------------------------------------------------------------------------------------------------
Conditions:
No conditions, except that if you redistribute this in any way, please include me in the credits somehow.

------------------------------------------------------------------------------------------------
Instructions:

1) Export worksheets in "Items.sxc" to the following files:
Axes.csv
BodyArmor.csv
Global.csv
Helmets.csv
Horses.csv
Polearms.csv
Ranged.csv
Shields.csv
Swords.csv
   The script needs all files to be there.
   When exporting to .csv, choose ";" as column separator and empty field for text.
2) Run generateOutput.py
3) Copy from "items.txt" into module_items.py in your ModuleSystem folder.

------------------------------------------------------------------------------------------------
Notes:
- The examples together with the instructions in module_items.py should pretty much explain what is going on.
- Boolean fields: "1" denotes true, all other values will denote false.
- Lines beginning with "-" in the first column are considered as comments and will not be in the output.
- All letters in the fields will be converted to lower-case letters.
- The two upper rows will be skipped by the export script. Use this for variables used in formulas etc.
- Global variables works on stats the following way: Multiplier*([stat]^Exponent)
  They are intended to be a quick way to try new balancing features. More advanced formulas can easily be done in OpenOffice.
- Note the nice "export to html" feature in OpenOffice for a nice overview.

http://www.openoffice.org/
 
Scion said:
... is there any interrest of me releasing this?

Are you kidding me, where can we download it? I have planning to write a script like this for ages. Great work!


Any more thoughts about the formulas? I have been using the following for swords:

speed = -7*LN((weight*5)1.65*length0.6) + 141
cut = 11.75*LN(speed*weight*length) - 82
thrust = (weight*speed)0.61

I'm having some difficulties finding formulas justifiable by physics, mainly because I don't know a thing about it.


 
I can't test it before the new version is out, so I can get it out maybe the next day after that. The global variables are mainly for testing new concepts quickly. The formulas you're mentioning (which I will try  :razz: ) can be used directly in the worksheet. The script reads a set number of columns from the third lines and lines marked with - in the first column are considered as comments. This is not very genericly programmed, it's expecting the current layout. It wouldn't be much work tweaking it though.

The script isn't really following too good programming practice, but I was feeling lazy, and most importantly, it works. Okay, I'll share it after the release of the new module version. Tell me if you have a request or idea that would make it better.

I am planning of doing something similar for "troops", but I'll have to experiment a little for finding a good layout for that. These are not one-liners as the items.
 
Thank you! Please let me know if it works or if it has bugs. I think something similar can make the process more easy for troops and conversations creation. A conversation template system where you can draft out the "conversation tree" and export it, and then after put in triggers and scripts.
 
Back
Top Bottom