How do I change the unit portraits\pictures?

User avatar
Destraex
Command Sergeant Major
Posts: 314
Joined: Fri 10 Feb 2012 02:32
Contact:

How do I change the unit portraits\pictures?

Postby Destraex » Fri 9 Feb 2018 10:43

I am new to modding steel division. All I want to do is create a mod that changes the default unit card pictures to something more to my tastes and possibly the rest of the communities as well. Is there an easy way to substitute the unit card/portrait pictures?

I have downloaded the modding tool and installed it. Created "awesomenewmod" and had a look at the directory contents. There does not appear to be anything but text files in there. The normal Steel Division directory does not seem to have unit card pictures either.
Is there a format or file type I am missing or are they compressed somewhere.

I need to know all of this and what format/size they are etc.

I want to change these pictures both in game and out of game. Cannot seem to find the files. I gather they are probably in GameData:/Assets/2D/Interface/Common/UnitsIcons/EU/default.png ?? I have no such directory though.
Image
Image

Hulor
Sergeant First-Class
Posts: 113
Joined: Mon 10 Apr 2017 15:25
Contact:

Re: How do I change the unit portraits\pictures?

Postby Hulor » Mon 12 Feb 2018 17:48

Destraex wrote:I have downloaded the modding tool and installed it. Created "awesomenewmod" and had a look at the directory contents. There does not appear to be anything but text files in there. The normal Steel Division directory does not seem to have unit card pictures either.
Is there a format or file type I am missing or are they compressed somewhere.


Hi Destraex,

We don't provide our png as moddable texture, but you still can replace them by your own, everything is explained in the modding manual.

Destraex wrote:I need to know all of this and what format/size they are etc.


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
Destraex
Command Sergeant Major
Posts: 314
Joined: Fri 10 Feb 2012 02:32
Contact:

Re: How do I change the unit portraits\pictures?

Postby Destraex » Tue 13 Feb 2018 00:14

Thanks Hulor. I want to use my own unit card pictures. But cannot figure out how, even with the manual.
Are you please able to give some fairly specific step by step instructions to somebody who is not a modder but has excellent computer skills like me?
I am very keen to do this mod and hopefully give back to the community. Their used to be a lot of these kind of unit icon mods for the old close combat games. Not sure if you remember them?

Thanks in advances for any help you can give :)
Image

User avatar
Destraex
Command Sergeant Major
Posts: 314
Joined: Fri 10 Feb 2012 02:32
Contact:

Re: How do I change the unit portraits\pictures?

Postby Destraex » Sun 4 Mar 2018 10:19

Nobody? Are Eugen still on strike?
Image

Hulor
Sergeant First-Class
Posts: 113
Joined: Mon 10 Apr 2017 15:25
Contact:

Re: How do I change the unit portraits\pictures?

Postby Hulor » Mon 26 Mar 2018 13:07

Destraex wrote:Nobody? Are Eugen still on strike?


Hi,

Sorry for the late answer.
So, to modify the interface visual texture, you have to find your unit in GameData/Gameplay/Gfx/Generated/UniteDescriptor.ndf.
Once you have your unit, you can find it its "VisualForInterface" which must be a reference to an TUIResourceTexture_Common in GameData/Gameplay/UI/Resource/Textures/Generated/VisualTexture.ndf.
Once you have this texture you can either modify the existing one by redefining it as a TUIResourceTexture_CommonModded, or create a new one. After that you just have to redirect it to your own texture (which must be in [SteamLibraryPath]/SteelDivision/Mods/[YourModName]/AssetsModding/, you may create it if it's not already there), you just have to put the path from AssetsModding.

For exemple :

Code: Select all

export Texture_Visual_Rifle_CAN is TUIResourceTexture_Common
(
    FileName = "Assets/2D/Interface/UseInGame/LabelIcons/Visuals/Rifle_CAN.png"
)

Will become :

Code: Select all

export Texture_Visual_Rifle_CAN is TUIResourceTexture_CommonModded
(
    FileName = "YourNewTexture.png"
)

If you want to create a new TUIResourceTexture, you can copy the existing one as a base, rename it and reference it in your unit (UniteDescriptor.ndf), then reapply the same process as if you were modifying the base.

User avatar
Destraex
Command Sergeant Major
Posts: 314
Joined: Fri 10 Feb 2012 02:32
Contact:

Re: How do I change the unit portraits\pictures?

Postby Destraex » Fri 30 Mar 2018 03:39

Thanks Hulor, I will give this a go.
Image

User avatar
Destraex
Command Sergeant Major
Posts: 314
Joined: Fri 10 Feb 2012 02:32
Contact:

Re: How do I change the unit portraits\pictures?

Postby Destraex » Fri 30 Mar 2018 15:12

Generated a mod with generatemod.bat

Got a png file into assetmodding, firefly.png

Edited visualtextures.ndf as a test to say:

export Texture_Visual_Beute_Cromwell is TUIResourceTexture_CommonModded
(
FileName = "Firefly.png"

Then updated my mod using updatemod.bat

Mod shows and can be applied in game. But the texture unit portrait does not show the Beute Cromwell as a firefly.
Is there a specific size it needs to recognise or something? Perhaps it is because I own all the expansions?
Image

User avatar
Destraex
Command Sergeant Major
Posts: 314
Joined: Fri 10 Feb 2012 02:32
Contact:

Re: How do I change the unit portraits\pictures?

Postby Destraex » Fri 30 Mar 2018 15:19

ok cool. I ran generatemod.bat again and it seemed to update it properly.
However only the large picture has changed. Not the small unit card with the A on it.

Where is that picture exactly?

Now that I am starting to get a handle on things I may be able to find it. But easier if you are around just to point me. Because then I am done and I can start work in earnest on the mod.
Image

Hulor
Sergeant First-Class
Posts: 113
Joined: Mon 10 Apr 2017 15:25
Contact:

Re: How do I change the unit portraits\pictures?

Postby Hulor » Fri 30 Mar 2018 15:42

Destraex wrote:However only the large picture has changed. Not the small unit card with the A on it.
Where is that picture exactly?


Not sure which texture you're talking about but maybe you can try to modify the one referenced by "MenuIconForInterface" in GameData/Gameplay/Gfx/Generated/UniteDescriptor.ndf

User avatar
Destraex
Command Sergeant Major
Posts: 314
Joined: Fri 10 Feb 2012 02:32
Contact:

Re: How do I change the unit portraits\pictures?

Postby Destraex » Sat 31 Mar 2018 00:41

The pictures circled in red here are the ones I want to change. Primarily I want to make a mod where these pictures are hopefully the same both here in the deck creation tool and in a game when selecting units to bring on the field.
Image
Image

Who is online

Users browsing this forum: No registered users and 1 guest