How To Create A New Editable Database

Post Reply
User avatar
Veitikka
Posts: 1321
Joined: Sun Jun 24, 2007 10:11 pm
Location: Finland
Contact:

How To Create A New Editable Database

Post by Veitikka »

This post has the instructions for setting up a new database that you can edit.

Open the game's data\database folder. There you'll find the 'default' folder, which is the official locked database. Make a copy of it. In the new folder, open the 'eras.xml' file. I recommend using an advanced text editor such as Notepad++ when you need to edit the files manually, so the file contents won't be messed up. In the .xml file, you see this line:

Code: Select all

<string name="databaseID" value="default" />

You must put your database ID there. For example:

Code: Select all

<string name="databaseID" value="myDatabase" />

After this, when you run the settings launcher, you now have your database selectable in the database dropdown menu. Select it, go to the in-game database editor, and the content is editable there!

NOTE: Now the database can have a 'graphics' folder that contains custom graphics files listed in the 'resources_custom.xml'. First the system looks for the sprite file in the database folder, and if it is not found then the file in the standard graphics folder is used instead.
Know thyself!
User avatar
Issue8
Posts: 123
Joined: Sun Dec 15, 2013 10:44 am

RE: How To Create A New Editable Database

Post by Issue8 »

Modding Armored Brigade
First of all, the system needs to be understood: Armored Brigade ships with a default database system. This default system should not be edited. Someone wanting to modify the game needs to create his own custom database, whether it is for new sprites or to change the data to suit his own interests. With this system, he modify whatever he wants, and the original set is always available to restore the original.

First navigate to the data->database folder. In that folder is a 'default' folder, containing all the files for the default units and make a copy of it.


Image
Attachments
a6.jpg
a6.jpg (30.18 KiB) Viewed 1314 times
User avatar
Issue8
Posts: 123
Joined: Sun Dec 15, 2013 10:44 am

RE: How To Create A New Editable Database

Post by Issue8 »

Second, rename the folder to whatever name you want for you dataset.


Image
Attachments
a7.jpg
a7.jpg (28.16 KiB) Viewed 1314 times
User avatar
Issue8
Posts: 123
Joined: Sun Dec 15, 2013 10:44 am

RE: How To Create A New Editable Database

Post by Issue8 »

Third, open your new dataset folder and find the 'eras.xml' file and open it in a text editor. Find the line at the top and rename from default to the name of your dataset.


Image
Attachments
a8.jpg
a8.jpg (83.14 KiB) Viewed 1313 times
User avatar
Issue8
Posts: 123
Joined: Sun Dec 15, 2013 10:44 am

RE: How To Create A New Editable Database

Post by Issue8 »

name the mod in this line


Image
Attachments
a9.jpg
a9.jpg (125.04 KiB) Viewed 1314 times
User avatar
Issue8
Posts: 123
Joined: Sun Dec 15, 2013 10:44 am

RE: How To Create A New Editable Database

Post by Issue8 »

Then when you start the game, you can select your custom dataset!


Image
Attachments
b1.jpg
b1.jpg (35.61 KiB) Viewed 1314 times
User avatar
Issue8
Posts: 123
Joined: Sun Dec 15, 2013 10:44 am

RE: How To Create A New Editable Database

Post by Issue8 »

Any changes you want to make can be made to the xml files in the new folder, and the original files will still exist as the default backups
User avatar
Veitikka
Posts: 1321
Joined: Sun Jun 24, 2007 10:11 pm
Location: Finland
Contact:

RE: How To Create A New Editable Database

Post by Veitikka »

In the first post, added the note about the database custom graphics folder that is supported in the latest builds of the game.
Know thyself!
StevieLee
Posts: 13
Joined: Mon Feb 10, 2020 6:42 pm

RE: How To Create A New Editable Database

Post by StevieLee »

QUESTION: How about adding custom weapon sounds for a mod? I assume that I put the mywpn.wav file in Armored Brigade\data\database\MyProject\sound, then I put an entry for that resource in the resources custom.xml file, but I don't see any samples for the format. Obviously I know I can drop the file in the Armored Brigade\data\sound folder directly, but that isn't helpful if I want to share the finished mod on Steam. Can anyone help?
User avatar
Veitikka
Posts: 1321
Joined: Sun Jun 24, 2007 10:11 pm
Location: Finland
Contact:

RE: How To Create A New Editable Database

Post by Veitikka »

ORIGINAL: StevieLee

QUESTION: How about adding custom weapon sounds for a mod? I assume that I put the mywpn.wav file in Armored Brigade\data\database\MyProject\sound, then I put an entry for that resource in the resources custom.xml file, but I don't see any samples for the format. Obviously I know I can drop the file in the Armored Brigade\data\sound folder directly, but that isn't helpful if I want to share the finished mod on Steam. Can anyone help?

We've used mono WAV files, but I'm sure our sound engine (FMOD) supports many other formats.

At the moment we don't support custom weapon sound files for Steam Workshop mods. I think the feature could be easy to add, similar to 'graphics' we have in the database folder.
Know thyself!
User avatar
zeeschuimer
Posts: 17
Joined: Tue Jun 07, 2016 7:48 pm
Location: The Netherlands

RE: How To Create A New Editable Database

Post by zeeschuimer »

Works fine! I use the OOB's from 'Steel Panthers MBT' as reference. Many countries there with actually all info you need to make other NATO-countries.
Warrant Officer Weapon Electronics(Retired.)
mmacguinness
Posts: 100
Joined: Sat Feb 03, 2007 4:27 pm

RE: How To Create A New Editable Database

Post by mmacguinness »

I have added a database to add a faction.
I select the db in settings.
I can open the new db in Databae Editor and I can creat scenarios.
Excellent.

However....

I have been unable to load a flag for the new faction.
I have tried several methods.
In the data/graphics/flags folder:
I have copied and renamed an existing flag file, then edited it in GIMP and saved it. No Joy.
I created a new file in GIMP and saved it. No Joy
I created a new fuilr in Paint. No Joy.

How is it done?
User avatar
Veitikka
Posts: 1321
Joined: Sun Jun 24, 2007 10:11 pm
Location: Finland
Contact:

RE: How To Create A New Editable Database

Post by Veitikka »

ORIGINAL: mmacguinness

I have added a database to add a faction.
I select the db in settings.
I can open the new db in Databae Editor and I can creat scenarios.
Excellent.

However....

I have been unable to load a flag for the new faction.
I have tried several methods.
In the data/graphics/flags folder:
I have copied and renamed an existing flag file, then edited it in GIMP and saved it. No Joy.
I created a new file in GIMP and saved it. No Joy
I created a new fuilr in Paint. No Joy.

How is it done?

You have to copy the flag image file to the 'graphics' folder in your new database folder (ideally create a 'flag' folder there) and then add the flag resource name to the resources_custom.xml. For example:

Code: Select all

   <sprite name="flag_new" base_angle="0">
     <image file="flag\flag_new.png" />
     <translation origin="top_left"/>
     <rotation origin="top_left"/>
   </sprite>
 
Know thyself!
mmacguinness
Posts: 100
Joined: Sat Feb 03, 2007 4:27 pm

RE: How To Create A New Editable Database

Post by mmacguinness »

OK, but..

In the first post above:

"NOTE: Now the database can have a 'graphics' folder that contains custom graphics files listed in the 'resources_custom.xml'. First the system looks for the sprite file in the database folder, and if it is not found then the file in the standard graphics folder is used instead. "

1. I understood this to mean that a graphics directory in the new db is optional. My new faction will not have any equipment that does not already exist in the AB database. So the only graphic I am adding is the flag, which I added to the original existing flag folder, i.e., the "standard graphics folder" as in the note above..

2. I put a new flag folder with a flag file in the new db folder(copy of Italy flag), and updated the resources_custom.xml file as you suggested. It is still not picking up the flag.

Image
Attachments
ABdirectory.jpg
ABdirectory.jpg (43.83 KiB) Viewed 1314 times
mmacguinness
Posts: 100
Joined: Sat Feb 03, 2007 4:27 pm

RE: How To Create A New Editable Database

Post by mmacguinness »

OK. Working now.
Keltos01
Posts: 139
Joined: Mon Mar 14, 2022 12:04 pm
Location: Milan Italy

Re: How To Create A New Editable Database

Post by Keltos01 »

I was wondering how the armor is set ?

If I read :Hull and turret armor reliably protects the crew from 7.62mm bullets and shell fragments, while the frontal armor - also against 12.7mm bullets.

How is that implemented in game? How can we change it?
Also for the helos and the su-25 which in RL are tougher than in-game

Thanks
User avatar
Veitikka
Posts: 1321
Joined: Sun Jun 24, 2007 10:11 pm
Location: Finland
Contact:

Re: How To Create A New Editable Database

Post by Veitikka »

Keltos01 wrote: Sun May 08, 2022 11:28 am I was wondering how the armor is set ?

If I read :Hull and turret armor reliably protects the crew from 7.62mm bullets and shell fragments, while the frontal armor - also against 12.7mm bullets.

How is that implemented in game? How can we change it?
Also for the helos and the su-25 which in RL are tougher than in-game

Thanks
Units and aircraft have the "Size and Armor" tab in the database editor.
Know thyself!
Keltos01
Posts: 139
Joined: Mon Mar 14, 2022 12:04 pm
Location: Milan Italy

Re: How To Create A New Editable Database

Post by Keltos01 »

Ok,

An armor of 2 mm on the helos means anything downs them.

"Namely, the Tiger can effectively resist small arms and heavy machine gun fire"

"The Apache is heavily armored on all sides. ... The cockpit is protected by layers of reinforced armor and bulletproof glass. According to Boeing, every part of the helicopter can survive 12.7-mm rounds, and vital engine and rotor components can withstand 23-mm fire."

If I want to protect against 23 mm shell do I need to up the armor to 23 mm ?
User avatar
Veitikka
Posts: 1321
Joined: Sun Jun 24, 2007 10:11 pm
Location: Finland
Contact:

Re: How To Create A New Editable Database

Post by Veitikka »

Keltos01 wrote: Sun May 15, 2022 11:40 am Ok,

An armor of 2 mm on the helos means anything downs them.

"Namely, the Tiger can effectively resist small arms and heavy machine gun fire"

"The Apache is heavily armored on all sides. ... The cockpit is protected by layers of reinforced armor and bulletproof glass. According to Boeing, every part of the helicopter can survive 12.7-mm rounds, and vital engine and rotor components can withstand 23-mm fire."

If I want to protect against 23 mm shell do I need to up the armor to 23 mm ?
The projectile size and armor penetration are not directly proportional. In the game, if you set aircraft armor to, let's say, 20 then ammunition with armor penetration less than 20 cannot damage the aircraft.
Know thyself!
Keltos01
Posts: 139
Joined: Mon Mar 14, 2022 12:04 pm
Location: Milan Italy

Re: How To Create A New Editable Database

Post by Keltos01 »

Thanks!!

Loving it and looking forward to ab2
Post Reply

Return to “MODS and Scenarios”