How to add new units

Moderators: Order of Battle Moderators, The Artistocrats

Post Reply
Uhu
Colonel - Fallschirmjäger
Colonel - Fallschirmjäger
Posts: 1480
Joined: Fri Nov 04, 2011 9:16 pm
Location: Hungary

How to add new units

Post by Uhu »

I copied an existing one, modified the name (first column), added a different ID (3080) and edited several different columns too. It seems, that it is not enough: in the editor I have then a unit without catalogue-icon and it is named "3080_unit". Where else have I edit something? Is there an upgrade-family, like in PzC too? I found for example T-26 namings in a given row of several units.

I also tried to change the IDs of two existing units. But I saw no change in the list: in the editor, still the same listing was there.
Image
Image
Erik2
Order of Battle Moderator
Order of Battle Moderator
Posts: 9633
Joined: Thu Jul 14, 2011 12:59 pm
Location: Norway

Re: How to add new units

Post by Erik2 »

Check the Battle of Britain mod in your My Games-folder.
You need to link the unit# with the unit type name.
You should add something like 3080_unit = mysuperduperunit.
Attachments
unit mod.jpg
unit mod.jpg (42.33 KiB) Viewed 3642 times
Uhu
Colonel - Fallschirmjäger
Colonel - Fallschirmjäger
Posts: 1480
Joined: Fri Nov 04, 2011 9:16 pm
Location: Hungary

Re: How to add new units

Post by Uhu »

Thank you for the quick answer! That means, that I cannot put units in the original campaign unit's file? I have to create a modded version because of this?
Erik wrote:Check the Battle of Britain mod in your My Games-folder.
You need to link the unit# with the unit type name.
You should add something like 3080_unit = mysuperduperunit.
Image
Image
Uhu
Colonel - Fallschirmjäger
Colonel - Fallschirmjäger
Posts: 1480
Joined: Fri Nov 04, 2011 9:16 pm
Location: Hungary

Re: How to add new units

Post by Uhu »

By the way, is there a listing, which trait is used for what? For example rmPurchase.
Image
Image
Erik2
Order of Battle Moderator
Order of Battle Moderator
Posts: 9633
Joined: Thu Jul 14, 2011 12:59 pm
Location: Norway

Re: How to add new units

Post by Erik2 »

Personally, I would never edit the original file(s). Modding is the way to go.
Also, if you do multiplayer you really should use the same unit data as your opponent...

Sorry, don't know much about traits.
Uhu
Colonel - Fallschirmjäger
Colonel - Fallschirmjäger
Posts: 1480
Joined: Fri Nov 04, 2011 9:16 pm
Location: Hungary

Re: How to add new units

Post by Uhu »

Oh, I have long experience in modding/file changing in PzC! :) First task is to make a copy of the game folder, than nothing can be done wrong irreversible.
Erik wrote:Personally, I would never edit the original file(s). Modding is the way to go.
Also, if you do multiplayer you really should use the same unit data as your opponent...

Sorry, don't know much about traits.
Image
Image
Uhu
Colonel - Fallschirmjäger
Colonel - Fallschirmjäger
Posts: 1480
Joined: Fri Nov 04, 2011 9:16 pm
Location: Hungary

Re: How to add new units

Post by Uhu »

I simply cannot figure it out, how to attach a unit to a given 2D icon, which is A - already in game B - would have a new icon. :cry:
I looked your Battle of Britain campaign, the file structure, etc. I found the filein original game, where the name of the new unit shall be listed, above the units.csv (english___.txt). Name has been changed, which is nice - but still no 2D icon. I tried to make the entry in an english_mod.txt file and add a seperate png icon with the same name, with an icon, copied from your mod, in the same file structure. Still no icon. :( Is there something else, how it has to attached a new units.csv entry to a given 2D icon. It should be so simple, because it not an entire new unit, just mostly a copy of an existing one.
Erik wrote:Personally, I would never edit the original file(s). Modding is the way to go.
Also, if you do multiplayer you really should use the same unit data as your opponent...

Sorry, don't know much about traits.
Image
Image
Erik2
Order of Battle Moderator
Order of Battle Moderator
Posts: 9633
Joined: Thu Jul 14, 2011 12:59 pm
Location: Norway

Re: How to add new units

Post by Erik2 »

I'm sorry, someone higher up in the food-chain need to answer this.
adherbal
The Artistocrats
The Artistocrats
Posts: 3900
Joined: Fri Jun 24, 2005 6:42 pm
Location: Belgium

Re: How to add new units

Post by adherbal »

By "2D icon" do you mean the unit's picture appearing in the UI?

The filename for these must be the name of the unit in the units.csv file - for example "japanese_infantry_37" - and use the PNG format (.png extension).

So if you create a new unit entry which is NOT supposed to replace an existing unit, you have to create a new unit icon yourself. We can look into moving the unit icons to an open format (probably that won't affect loading times too much) or upload them somewhere if that helps you out.
Image
Uhu
Colonel - Fallschirmjäger
Colonel - Fallschirmjäger
Posts: 1480
Joined: Fri Nov 04, 2011 9:16 pm
Location: Hungary

Re: How to add new units

Post by Uhu »

Thanks for the answer! Yes, it would probably help the modders to create more units to the game, using the already existing 3D modells.
And if were are at this theme - adding new units -, could you please provide us with a skin-changing tool? Or making it functionable is the game would be also a good option. ;) I created several new units for the Finns and it would be nice, if these would have universal Finnish-skin and not the skin of the enemy, or other nations. Not only armor, but arty, AA is on the list. And of course, it would be also nice, to give the nations winterized, white paintings for the armored units.

Oh, and could you please look at the scenario-making topic and answer the several questions? Erik tried, but he has also his limits. :)


adherbal wrote:By "2D icon" do you mean the unit's picture appearing in the UI?

The filename for these must be the name of the unit in the units.csv file - for example "japanese_infantry_37" - and use the PNG format (.png extension).

So if you create a new unit entry which is NOT supposed to replace an existing unit, you have to create a new unit icon yourself. We can look into moving the unit icons to an open format (probably that won't affect loading times too much) or upload them somewhere if that helps you out.
Image
Image
Horst
Brigadier-General - 15 cm Nblwf 41
Brigadier-General - 15 cm Nblwf 41
Posts: 1927
Joined: Mon Feb 18, 2013 1:22 pm

Re: How to add new units

Post by Horst »

I stumbled upon a similar problem adding new switch modes for existing units and also require the possibility to add new unit-names/icons in units.csv for existing 3d-models.

The bummer with the SwitchUnit-parameter is that it only accepts unit-names. Adding two identical unit-names for SwitchUnit1 and SwitchUnit2 doesn't properly work. Same with Transport-parameter, if you like to add two identically named transports, for example SdKfz 251/A and 251/D where the identical look doesn't really matter.

Using id-numbers for switch modes, like in Panzer Corps, and supported transports could already permit using duplicate unit-names in units.csv without need for graphic access.
LadyLex
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 47
Joined: Wed Dec 07, 2016 12:57 pm

Re: How to add new units

Post by LadyLex »

adherbal wrote: We can look into moving the unit icons to an open format (probably that won't affect loading times too much) or upload them somewhere if that helps you out.
Has this been done or are you still considering it? I'm working on a mod which adds a few units. Having these icons would be VERY helpful. Thank you.
Post Reply

Return to “Order of Battle : World War II - Scenario Design”