Dear modders,
For weeks I've been consumed by the thought that there should be a easy
way to edit the dreaded battle_models.modeldb (BMDB). My first attempt
was not that user-friendly and helpful probably because it included too
many steps. To make things worse it sounded complicated for the
unintiated in gvim ( a text editor).
Here is my second attempt, which I think will be much more easier for
people to follow. The catch is that it is based on command lines rather
than GUI, and those command lines invoke shell scripts written for bash
shell (linux). But don't worry, cygwin has developed an linux emulator
that will run the shells in a windows XP machine, without any further
changes in the shells.
-------------------------
what you'll need:
-------------------------
1) Knight Errant's battle_models.modelsdb;
2) the shells I've written (http://www.twcenter.net/forums/downl...o=file&id=1487)
3) To install cygwin
4) To install gvim (optional)
caveat: during the installation of cygwin it is asked of you which file
format you want to work with , Unix or DOS. Choose Unix.
-------------------------
what you will do:
-------------------------
1) convert the Knigths Errant 's battle_models.modeldb to unix format.
You can use gvim for doing that. Open the file in gvim, then go to Edit
menu> File Setting > File Format and choose unix. Save the file and exit
2) move the battle_models.modeldb to the directory of your choice,
preferably an empty one, along with the two shells provided on the .tar
file at the download area.
3) click on the desktop icon for cygwin and through the cygwin window
find the directory where you have put the files on the preceding step 2.
4) type faction.sh at the cygwin command prompt. This will print on the
screen a help for this shell, showing you how to use it. An example:
./faction.sh battle_models.modeldb milan milan_units.txt
The shell takes three arguments:
a) the name of the BMDB file;
b) the "base" faction name, as it appears on BMDB, from which you want
to clone the units to another faction
c) the name of an output file, which will contain all the names of units
assigned to your base faction (in this case, milan) in BMDB
NOTE:the use of ./ is optional: it means that the shell script
faction.sh is in your current directory.
The output file will contain all of milan units. This file will now be
used to add all these units (or only some of them if you chose to delete
lines on this file) to a "target" faction, say "ireland".
7) type units.sh. A similar help will be output to the screen. Now add
those units in milan_units.txt to ireland faction! At the command prompt
type
units.sh '5 milan' '7 ireland' milan_units.txt battle_models.modeldb newBMDB
The units.sh does the heavy work (in a couple of seconds). It takes 5
arguments:
i) '5 milan' ----->the name of the 'base' faction and the #
of characters in it (note that they have
to be quoted using single quotes)
ii) '7 ireland' ----->the name of the "target" faction in the same
format.
iii) milan_units.txt -----> the name of the file containing the units
from the "base" faction
iv) battle_models.modeldb ----> the name of the input BMDB file
v) newBMDB ----->the name of the output edited file.
Now you are done and successfully added units to "ireland" faction,
which could be an existing faction or a brand new one.
To better understand and check the results of this editing ( and to
report bugs on the shell scripts) you should still read the tutorial
about adding units to a faction by M3rcury15.
What these shells I provided do is to make your life easier by saving you all the cutting and pasting work. Should you like to add new skins to your cloned faction, then you will have to edit the file manually after this first run!
I hope this will be useful for modders!
cheers,
Cururu