Jump to content

Help requested swapping pistol model/skin


Crux2

Recommended Posts

I recently started playing the long war mod and have just unlocked gauss weapons, LW is great overall but I really don't like the look of the squashed down rifles being passed off as pistols and I'd like to swap the weapon model for the 'gauss machine pistol' to the default xcom pistol.

 

I've been googling for answers, poking around forums, making speculative changes to some entries in defaultcontent.ini but I'm not having any luck so far.

 

Previous experience modding other games makes me feel like the answer is either something simple that's staring me in the face or else it's so complicated it's not worth my time pursuing.

 

Anyone able to point me in the right direction on this?

Link to comment
Share on other sites

It's not normally so simple as an INI tweak. However, since you are talking about LW and reverting to an already existing model, it may be that team has you covered. According to Amineri in another post: "All images are now configured in DefaultContent.ini using a repurposed multiplayer config variable (MultiplayerLoadoutSlots)."

 

If you need more help, best to ask in the "Long War" download page "forum section" for a quick response.

 

-Dubious-

Edited by dubiousintent
Link to comment
Share on other sites

I think the 'images' refer to the 2D pictures used on the HUD and in the base menus, I recall a forum post describing how to change the model itself but it was pre-patch 13 or something and the same method apparently doesn't work for the later versions of LW.

 

I've repeated the question in the LW forum section, here's hoping someone knows what to do.

Link to comment
Share on other sites

Okay, I guess a bit of a tutorial on how LW weapon 3D models are set up is in order ...

 

Most stuff is configured in DefaultContent, but rescaling is configured in DefaultGameCore.

 

Mappings from item enum to 3D model is separately configured for strategy vs tactical (don't ask me why, this is Firaxis design)...

 

Tactical 3D model, in DefaultContent (examples for machine pistols) :

;Machine Pistols
WeaponPackageInfo=(ItemType=eItem_MecArmor3_Flamethrower_Grenade_Electro,ArchetypeName="Weapon_ExaltAssaultRifle.GD_ExaltAssaultRifle")
WeaponPackageInfo=(ItemType=eItem_MecArmor3_Flamethrower_Grenade_ProximityMine,ArchetypeName="Weapon_ExaltLaserRifle.GD_ExaltLaserRifle")
WeaponPackageInfo=(ItemType=eItem_MecArmor3_Flamethrower_Mist_Electro,ArchetypeName="Weapon_AssaultRifle.GD_AssaultRifle")
WeaponPackageInfo=(ItemType=eItem_MecArmor3_Flamethrower_Mist_ProximityMine,ArchetypeName="Weapon_LaserRifle.GD_LaserRifle")
WeaponPackageInfo=(ItemType=eItem_BEGIN_EXALT_COLLECTIBLES,ArchetypeName="Weapon_PlasmaRifleLight.GD_PlasmaRifleLight")
This provides the mappings from the reused enums for the various tech levels of machine pistols (all 5 of them, whereas there are only 3 models for pistols) to the 3D model to be used.
Strategy 3D model, in DefaultContent (machine pistol examples) :

Resource=WP_ExaltWeapons_MOD.Meshes.SM_ExaltAssaultRifle
Tag=eItem_MecArmor3_Flamethrower_Grenade_Electro
Resource=WP_ExaltWeapons_MOD.Meshes.SM_ExaltLAssaultRifle
Tag=eItem_MecArmor3_Flamethrower_Grenade_ProximityMine
Resource=WP_AssaultRifleModern.Meshes.SM_AssaultRifleModern
Tag=eItem_MecArmor3_Flamethrower_Mist_Electro
Resource=WP_AssaultRifleLaser.Meshes.SM_AssaultRifleLaser
Tag=eItem_MecArmor3_Flamethrower_Mist_ProximityMine
Resource=WP_LightPlasmaRifle.Meshes.SM_LightPlasmaRifle
Tag=eItem_BEGIN_EXALT_COLLECTIBLES

Reworking these two sections is all that is necessary to change which models correspond to which item enums.
-------------------------
Item non-proportional scaling is configured in DefaultGameCore. For the machine pistol, the lines :

; Machine Pistol
Itembalance_Normal=(eItem=236, iCash=-1, iElerium=0, iAlloys=0, iTime=-1, iEng=-1)
BalanceMods_Classic=(eType=236, iDamage=0, iCritHit=60100100, iAim=0, iDefense=0, iHP=0, iMobility=-1, iWill=0);
and in particular the iCritHit=60100100 configure the non-proportional scaling for the maching pistol. This configures 60% scaling along the x axis (along the barrel), and 100% along the y and z axes.

 

Link to comment
Share on other sites

Ah, see I took one look at the "MecArmor3_Flamethrower" bit and assumed it was something unrelated to do with the power armour that comes later in the game (never got that far before, 1st time playing the exp pack) - I'll try making some changes and report back later today.

 

 

*Update*

 

I was able to change the gauss pistol model to the default xcom pistol easily enough - unfortunately it won't work properly in combat - when switching to the pistol the soldier appears in the classic arms-outstretched 'T' pose and the game crashes if you try to fire the weapon - I assume this is an animation issue as the gauss pistol/machine pistol would use the assault rifle animation in addition to the weapon model.

 

Any ideas where to go from here?

Edited by Crux2
Link to comment
Share on other sites

That's an interesting glitch...

 

I presume it has to do with the XGItemLibrary class in XComGame.upk. This is set up with a mapping from item enum to default XGWeapon subclass, defined via defaultProperties of the XGItemLibrary.m_arrItems variable. The machine pistols use as a "base" :

{|XGWeapon_ExaltAssaultRifle|} //item 236 eItem_MecArmor3_Flamethrower_Grenade_Electro -- tier 1 Machine Pistol
{|XGWeapon_ExaltLaserAssaultRifle|} //item 237 eItem_MecArmor3_Flamethrower_Grenade_ProximityMine -- tier 2 Machine Pistol
{|XGWeapon_AssaultRifle|} //item 238 eItem_MecArmor3_Flamethrower_Mist_Electro -- tier 3 Machine Pistol
{|XGWeapon_LaserAssaultRifle|} //item 239 eItem_MecArmor3_Flamethrower_Mist_ProximityMine -- tier 4 Machine Pistol
{|XGWeapon_PlasmaLightRifle|} //item 240 -- tier 5 Machine Pistol

I'm not sure why/how it's loading the wrong animations, but it seems that some hex editing to the XGItemLibrary defaultProperties is likely required to fix it.

Edited by Amineri
Link to comment
Share on other sites

  • 5 months later...

That's an interesting glitch...

 

I presume it has to do with the XGItemLibrary class in XComGame.upk. This is set up with a mapping from item enum to default XGWeapon subclass, defined via defaultProperties of the XGItemLibrary.m_arrItems variable. The machine pistols use as a "base" :

{|XGWeapon_ExaltAssaultRifle|} //item 236 eItem_MecArmor3_Flamethrower_Grenade_Electro -- tier 1 Machine Pistol
{|XGWeapon_ExaltLaserAssaultRifle|} //item 237 eItem_MecArmor3_Flamethrower_Grenade_ProximityMine -- tier 2 Machine Pistol
{|XGWeapon_AssaultRifle|} //item 238 eItem_MecArmor3_Flamethrower_Mist_Electro -- tier 3 Machine Pistol
{|XGWeapon_LaserAssaultRifle|} //item 239 eItem_MecArmor3_Flamethrower_Mist_ProximityMine -- tier 4 Machine Pistol
{|XGWeapon_PlasmaLightRifle|} //item 240 -- tier 5 Machine Pistol

I'm not sure why/how it's loading the wrong animations, but it seems that some hex editing to the XGItemLibrary defaultProperties is likely required to fix it.

 

 

I've run into this same problem when swapping out weapon models and I narrowed it down to this. How do I go about modifying the array? I understand it's through hex edits but what's the process?

 

*EDIT*

 

Nevermind, I found your instructions in a much older post: http://forums.nexusmods.com/index.php?/topic/1177417-how-to-edit-defaultproperties/

 

Thanks!

Edited by Kaldreth88
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...