Jump to content

Help with ADVENT capes


Volkser

Recommended Posts

I have come up with an idea to use the teeth model to add prop sockets to all soldiers regardless of the armour they are using. The problem is that I need help in figuring out how to make the game load the modified teeth and override the default teeth. Would anyone here know how to do this?

Link to comment
Share on other sites

Interesting idea.

Teeth get specified in XComGameState_Unit.kAppearance.nmTeeth:

BodyPartTemplate = PartManager.FindUberTemplate("Teeth", kAppearance.nmTeeth);
ArchetypesToLoad.AddItem(BodyPartTemplate.ArchetypeName);

kAppearance is a TAppearance var on the unit class.

My experience so far with UE3 seems to suggest that you can't override meshes/textures/archetypes directly by just adding something of the same name to the game assets. I wish you could.
Instead, I would guess you'll have to change the nmTeeth property on a soldier (or the template the soldier is created from) to point to your new teeth ArcheType.

Link to comment
Share on other sites

Something roughly like this:

local XComGameState_Unit Unit;
local TSoldier Soldier; // Disposable var

// TODO HERE: Fetch Unit. stpre in Unit var.

Soldier.kAppearance = Unit.kAppearance;
Soldier.kAppearance.nmTeeth = 'DefaultTeeth';

Unit.SetTAppearance(Soldier.kAppearance);
Edited by Kvalyr
Link to comment
Share on other sites

  • Recently Browsing   0 members

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