changing weapons for infantry squads

User avatar
TG92929
Chief Warrant Officer
Posts: 588
Joined: Fri 20 Dec 2013 09:16
Location: YVR
Contact:

changing weapons for infantry squads

Postby TG92929 » Thu 18 Oct 2018 14:31

Hi!
I've been tapping into the modding tool recently, and I can't figure out how I can, for example, add a BAR to armored rifles squads or swap kar98k for g43 in panzergrenadiere squads?
Is there any ways to change or add weapons for infantry squads?
Image
AMRAAMS FOR THE AMRAAMS GOD, FLANKERS TO THE FLANKER THRONE, LET THE SKY... BURN! :twisted:

Sandiford
Corporal
Posts: 32
Joined: Thu 8 Dec 2016 19:54
Contact:

Re: changing weapons for infantry squads

Postby Sandiford » Thu 25 Oct 2018 12:47

You'll find the weapons defined in GameData/Gameplay/Gfx/Generated/WeaponDescriptor.ndf

To add a weapon add a new TTurretInfanterieDescriptor

User avatar
TG92929
Chief Warrant Officer
Posts: 588
Joined: Fri 20 Dec 2013 09:16
Location: YVR
Contact:

Re: changing weapons for infantry squads

Postby TG92929 » Fri 26 Oct 2018 18:14

Sandiford wrote:You'll find the weapons defined in GameData/Gameplay/Gfx/Generated/WeaponDescriptor.ndf

To add a weapon add a new TTurretInfanterieDescriptor

Thank you! :D
BTW how to change their weapons on their models too? The model still holds their original weapons even if their weapons on the stats sheet has been changed.
Image
AMRAAMS FOR THE AMRAAMS GOD, FLANKERS TO THE FLANKER THRONE, LET THE SKY... BURN! :twisted:

Sandiford
Corporal
Posts: 32
Joined: Thu 8 Dec 2016 19:54
Contact:

Re: changing weapons for infantry squads

Postby Sandiford » Mon 29 Oct 2018 19:54

That's not so easy...


1) Find the unit depiction in Gameplay/Gfx/Generated/Infanterie/GeneratedDepictionInfantry.ndf

If you can't find it by name, search the unit name in Gameplay/Gfx/Generated/ShowRoomEquivalance.ndf to find the show room unit, then in that unit in ShowRoomUnits.ndf find GfxWeaponModels to find the name of the depiction

For example for UK rifles it is Gfx_Rifle_UK_Squad


2) Above the depiction are the main weapon subdepictions e.g.

SubDepiction_Rifle_UK_1 is TSubDepiction( Anchor = 'Arme_1' Depiction = Gfx_Sten( Actions = Weapons_Rifle_UK_Arme_1 CivMask = CivMask/OTAN ) )

I think Arme_1 means it is the first weapon a soldier holds e.g. a rifle. Arme_2 would be a secondary weapon like a bazooka

Gfx_Sten is the weapon and it's model. It'll be defined somewhere if you want to search for it and look at it. For other weapons just look through the file for what they are called

Weapons_Rifle_UK_Arme_1 links the weapon to it's weapon in WeaponDescriptor.ndf, and to it's visual and audio effects. These are in Gameplay\Gfx\Generated\GeneratedDepictionUnitWeaponBlock.ndf.

weapon_effet_tagN refers to the EffectTag in WeaponDescriptor.ndf

Weapon_Rifle_UK_1 is the audio and visual effects. It is in Gameplay/Gfx/Generated/Infanterie/GeneratedInfanterieWeaponsUnites.ndf. Look at the file for references of how to do it. Smoke and grenades are done a little differently. Just copy paste from one you want. If you need a different number of weapons e.g. x7 instead of x6 you can search for the FX and SFX definitions and add a new one copying the others.


3) For the Depiction itself, the TDepictionFacadeDescriptor entries are individual soldiers with their weapon or weapons specified by subdepictions.

Code: Select all

Operators = [~/DepictionOperator_SkeletalAnimation_MMG]


Operators are how they stand and hold weapons. Can be DepictionOperator_SkeletalAnimation_Rifle, DepictionOperator_SkeletalAnimation_SMG, DepictionOperator_SkeletalAnimation_MMG (Actually LMG I think), DepictionOperator_SkeletalAnimation_Special (Rifle + Bazooka). Check the file.
Operators = [~/DepictionOperator_SkeletalAnimation_Rifle]

Code: Select all

Actions = Weapons_Rifle_UK


Actions are weapons that all soldiers have like grenades and smoke. Weapons_Rifle_UK will contain a list of weapon much like those in the subdepictions(2) section

TurretToSoldiersIndex = MAP[
(0,[7,8,]),
(1,[0,1,2,3,4,5,6,]),
(2,[9,]),]


TurretToSoldiersIndex is which turret in WeaponDescriptor.ndf maps to which soldier. Here the first turret (Turret 0) maps to the 8th and 9th soldier (soldiers 7 and 8). Indexes start at 0 as you see.

Be aware when looking at WeaponDescriptor.ndf for the different between as weapon and a turret, as sometimes two weapons will be on the same turret.

I think the game only cares about main weapons e.g. rifles, smgs, lmgs for this mapping.

4) It's important to know about NbSoldatInGroupeCombat in Gameplay/Gfx/Generated/ShowRoomUnits.ndf.

If your depection has 10 soldiers, but NbSoldat is 4, it will only show 4 soldiers. Increase this to 10 to see them all. If your NbSoldatInGroupeCombat is bigger than the number of soldiers in the depiction your game will crash (I think as soon as you try to look at them in the deck builder)

User avatar
TG92929
Chief Warrant Officer
Posts: 588
Joined: Fri 20 Dec 2013 09:16
Location: YVR
Contact:

Re: changing weapons for infantry squads

Postby TG92929 » Tue 30 Oct 2018 13:58

Sandiford wrote:That's not so easy...


1) Find the unit depiction in Gameplay/Gfx/Generated/Infanterie/GeneratedDepictionInfantry.ndf

If you can't find it by name, search the unit name in Gameplay/Gfx/Generated/ShowRoomEquivalance.ndf to find the show room unit, then in that unit in ShowRoomUnits.ndf find GfxWeaponModels to find the name of the depiction

For example for UK rifles it is Gfx_Rifle_UK_Squad


2) Above the depiction are the main weapon subdepictions e.g.

SubDepiction_Rifle_UK_1 is TSubDepiction( Anchor = 'Arme_1' Depiction = Gfx_Sten( Actions = Weapons_Rifle_UK_Arme_1 CivMask = CivMask/OTAN ) )

I think Arme_1 means it is the first weapon a soldier holds e.g. a rifle. Arme_2 would be a secondary weapon like a bazooka

Gfx_Sten is the weapon and it's model. It'll be defined somewhere if you want to search for it and look at it. For other weapons just look through the file for what they are called

Weapons_Rifle_UK_Arme_1 links the weapon to it's weapon in WeaponDescriptor.ndf, and to it's visual and audio effects. These are in Gameplay\Gfx\Generated\GeneratedDepictionUnitWeaponBlock.ndf.

weapon_effet_tagN refers to the EffectTag in WeaponDescriptor.ndf

Weapon_Rifle_UK_1 is the audio and visual effects. It is in Gameplay/Gfx/Generated/Infanterie/GeneratedInfanterieWeaponsUnites.ndf. Look at the file for references of how to do it. Smoke and grenades are done a little differently. Just copy paste from one you want. If you need a different number of weapons e.g. x7 instead of x6 you can search for the FX and SFX definitions and add a new one copying the others.


3) For the Depiction itself, the TDepictionFacadeDescriptor entries are individual soldiers with their weapon or weapons specified by subdepictions.

Code: Select all

Operators = [~/DepictionOperator_SkeletalAnimation_MMG]


Operators are how they stand and hold weapons. Can be DepictionOperator_SkeletalAnimation_Rifle, DepictionOperator_SkeletalAnimation_SMG, DepictionOperator_SkeletalAnimation_MMG (Actually LMG I think), DepictionOperator_SkeletalAnimation_Special (Rifle + Bazooka). Check the file.
Operators = [~/DepictionOperator_SkeletalAnimation_Rifle]

Code: Select all

Actions = Weapons_Rifle_UK


Actions are weapons that all soldiers have like grenades and smoke. Weapons_Rifle_UK will contain a list of weapon much like those in the subdepictions(2) section

TurretToSoldiersIndex = MAP[
(0,[7,8,]),
(1,[0,1,2,3,4,5,6,]),
(2,[9,]),]


TurretToSoldiersIndex is which turret in WeaponDescriptor.ndf maps to which soldier. Here the first turret (Turret 0) maps to the 8th and 9th soldier (soldiers 7 and 8). Indexes start at 0 as you see.

Be aware when looking at WeaponDescriptor.ndf for the different between as weapon and a turret, as sometimes two weapons will be on the same turret.

I think the game only cares about main weapons e.g. rifles, smgs, lmgs for this mapping.

4) It's important to know about NbSoldatInGroupeCombat in Gameplay/Gfx/Generated/ShowRoomUnits.ndf.

If your depection has 10 soldiers, but NbSoldat is 4, it will only show 4 soldiers. Increase this to 10 to see them all. If your NbSoldatInGroupeCombat is bigger than the number of soldiers in the depiction your game will crash (I think as soon as you try to look at them in the deck builder)

I see, well I'm not sure if I can handle that, might as well wait for the eastern front Steel Division 2 :lol:
Thank you!
Image
AMRAAMS FOR THE AMRAAMS GOD, FLANKERS TO THE FLANKER THRONE, LET THE SKY... BURN! :twisted:

Who is online

Users browsing this forum: No registered users and 1 guest