Creating a new unit from scratch

User avatar
Darkmil
Brigadier
Posts: 3008
Joined: Mon 29 Oct 2012 15:17
Location: Lyon
Contact:

Creating a new unit from scratch

Postby Darkmil » Tue 8 Aug 2017 16:09

Hi everybody !
I've finally achieved to master the 3D model replacement functions of the tools.
So I wonder if any of you have any idea where to start to create a brand new unit (as far as coding is concerned) ?
Thanks in advance !
Image

Hulor
Staff Sergeant
Posts: 86
Joined: Mon 10 Apr 2017 15:25
Contact:

Re: Creating a new unit from scratch

Postby Hulor » Thu 10 Aug 2017 10:07

Hi Darkmil,

Glad to hear that you have progressed with 3D models tools.
To create a plain new unit you will have to :
- create his description in GameData/Gameplay/Gfx/Generated/UniteDescriptor.ndf, you can copy an existing one and rebind necessary variables.
- add its definition to the list in GameData/Gameplay/Gfx/Generated/AllUnits.ndf.
- create his showroom description in GameData/Gameplay/Gfx/Generated/ShowRoomUnits.ndf
- add the link between its showroom description and the unit description in GameData/Gameplay/GFx/Generated/ShowRoomEquivalence.ndf

User avatar
The W:AB Noob
Lieutenant General
Posts: 4538
Joined: Fri 12 Jul 2013 22:29
Location: United States, Central Time Zone
Contact:

Re: Creating a new unit from scratch

Postby The W:AB Noob » Sat 12 Aug 2017 19:56

Hulor wrote:Hi Darkmil,

Glad to hear that you have progressed with 3D models tools.
To create a plain new unit you will have to :
- create his description in GameData/Gameplay/Gfx/Generated/UniteDescriptor.ndf, you can copy an existing one and rebind necessary variables.
- add its definition to the list in GameData/Gameplay/Gfx/Generated/AllUnits.ndf.
- create his showroom description in GameData/Gameplay/Gfx/Generated/ShowRoomUnits.ndf
- add the link between its showroom description and the unit description in GameData/Gameplay/GFx/Generated/ShowRoomEquivalence.ndf

Don't you also have to:
- List it's dependencies in GameData\Gameplay\Gfx\DependencyHelper.ndf
- Include it in a Pack in GameData\Gameplay\Decks\Generated\Packs.ndf
- Make the pack available in a division in
- Make a link in GameData\Gameplay\Skirmish\Generated\UnitToUnitTag.ndf
- Add a CubeAction object in GameData\Gameplay\UI\Resources\Generated_CubeActionsUnites.ndf
- Give it a tag in GameData\Gameplay\Unit\TagUnit.ndf
- Assuming you are making a unit that is not in the game (like a Maus) one must also add the countless new objects in that are referenced by UniteDescriptor.ndf such as VisualTextures, ButtonTextures, {UNIT}_Depiction, ActionDescriptor, etc., as well as new unit card pictures and localization hash.

I might be wrong on many of these since I have not messed around with them so I can only guess what they do or how necessary they are.
W:RD Sandbox Mod 5.4.2, the Final and Ultimate Patch Click -> Image

MrCrisps
Corporal
Posts: 40
Joined: Wed 19 Apr 2017 20:15
Contact:

Re: Creating a new unit from scratch

Postby MrCrisps » Sat 19 Aug 2017 17:10

I'm just wondering but would that be possible to import a model from Wargame RD to Steel Division?

I'm really interested to add the M18 Hellcat but I don't know if the meshes are compatible for the engine of SD .

Also, I don't even understand how to modify textures. Sure some explanations are given in the manual, but there aren't any details about the file format (jpeg, png...etc) or the size of the pictures for the different types of "textures" (unit stats picture, unit portrait for the division...etc). Do someone knows what are the specificities?

User avatar
Darkmil
Brigadier
Posts: 3008
Joined: Mon 29 Oct 2012 15:17
Location: Lyon
Contact:

Re: Creating a new unit from scratch

Postby Darkmil » Sun 20 Aug 2017 14:31

MrCrisps wrote:I'm just wondering but would that be possible to import a model from Wargame RD to Steel Division?

I'm really interested to add the M18 Hellcat but I don't know if the meshes are compatible for the engine of SD .

Also, I don't even understand how to modify textures. Sure some explanations are given in the manual, but there aren't any details about the file format (jpeg, png...etc) or the size of the pictures for the different types of "textures" (unit stats picture, unit portrait for the division...etc). Do someone knows what are the specificities?


Yes it would be with some work and ninjaripper. But that wouldn't be fast by any standard, the only steps you'll bypass would be modeling and texturing.
Image

Hulor
Staff Sergeant
Posts: 86
Joined: Mon 10 Apr 2017 15:25
Contact:

Re: Creating a new unit from scratch

Postby Hulor » Wed 23 Aug 2017 10:26

The W:AB Noob wrote:Don't you also have to:
- List it's dependencies in GameData\Gameplay\Gfx\DependencyHelper.ndf
- Include it in a Pack in GameData\Gameplay\Decks\Generated\Packs.ndf
- Make the pack available in a division in
- Make a link in GameData\Gameplay\Skirmish\Generated\UnitToUnitTag.ndf
- Add a CubeAction object in GameData\Gameplay\UI\Resources\Generated_CubeActionsUnites.ndf
- Give it a tag in GameData\Gameplay\Unit\TagUnit.ndf
- Assuming you are making a unit that is not in the game (like a Maus) one must also add the countless new objects in that are referenced by UniteDescriptor.ndf such as VisualTextures, ButtonTextures, {UNIT}_Depiction, ActionDescriptor, etc., as well as new unit card pictures and localization hash.

I might be wrong on many of these since I have not messed around with them so I can only guess what they do or how necessary they are.


Well, yes to create a brand new unit this is necessary. What I listed before was the strict minimum to create the unit, considering that in the first time you can use textures, tags, etc... which are already in the game.

MrCrisps wrote:Also, I don't even understand how to modify textures. Sure some explanations are given in the manual, but there aren't any details about the file format (jpeg, png...etc) or the size of the pictures for the different types of "textures" (unit stats picture, unit portrait for the division...etc). Do someone knows what are the specificities?


Well it depends of which texture you want to change, for units' model textures you have these specs in the modding manual section 3D Model Specs. For interface textures, it's better if you use png format with transparency. About the size in interface it shouldn't matter the game will try to fit it in the location.

User avatar
Darkmil
Brigadier
Posts: 3008
Joined: Mon 29 Oct 2012 15:17
Location: Lyon
Contact:

Re: Creating a new unit from scratch

Postby Darkmil » Wed 23 Aug 2017 15:22

Code: Select all

Title : Revision SVN: 300084678 - gitlab/steeldivision | Erreurs NDF
Message : NDF build errors :

press Yes to retry
================
Stack
================
@file:GameData:/Gameplay/Gfx/Generated/UniteDescriptor.ndf@(51071:25) Trying to set properties that are not in class TTypeUnitModuleDescriptor : UnitTypeTokens
    @file:GameData:/Gameplay/Gfx/Generated/UniteDescriptor.ndf@(51064:21)
    @file:GameData:/Gameplay/Gfx/Generated/UniteDescriptor.ndf@(51064:21)
    @file:GameData:/Gameplay/Gfx/Generated/UniteDescriptor.ndf@(51061:29)
    @file:GameData:/Gameplay/Gfx/Generated/UniteDescriptor.ndf@(51031:13)
    @file:GameData:/Gameplay/Gfx/Generated/UniteDescriptor.ndf@(51031:13)
    @file:GameData:/Gameplay/Gfx/Generated/UniteDescriptor.ndf@(51028:40)
    @file:GameData:/Gameplay/Gfx/Generated/UniteDescriptor.ndf@(51025:1)
    @file:GameData:/Gameplay/Gfx/Generated/UniteDescriptor.ndf@(51024:33)
   
@file:GameData:/Gameplay/Gfx/Generated/UniteDescriptor.ndf@(51034:17) Trying to set properties that are not in class TTypeUnitModuleDescriptor : UnitTypeTokens
    @file:GameData:/Gameplay/Gfx/Generated/UniteDescriptor.ndf@(51031:13)
    @file:GameData:/Gameplay/Gfx/Generated/UniteDescriptor.ndf@(51031:13)
    @file:GameData:/Gameplay/Gfx/Generated/UniteDescriptor.ndf@(51028:40)
    @file:GameData:/Gameplay/Gfx/Generated/UniteDescriptor.ndf@(51025:1)
    @file:GameData:/Gameplay/Gfx/Generated/UniteDescriptor.ndf@(51024:33)
   


It doesn't seem to work.

The strangest thing is that those properties are not in the unit I created is in the unit "Unit_Commander_FR" and not "Unit_Maus_GER".
Image

Who is online

Users browsing this forum: No registered users and 1 guest