Jump to content

Change avatar_character and avatar_ghost_character Like woodie and were forms?

Recommended Posts

Hi again!

I was wondering if it was possible to switch between avata_character and  avatar_ghost_character  pictures like how woodie does with his wereforms and his wereghost forms. my SO and I have a character that can change forms and wanted to have the avatar_character and avatar_ghost_character match with the character that it is. Also, idk if this falls into the same category but also the self_inspect_character icon too if thats possible



Edited by LlamaDom
Link to comment
Share on other sites

If you search for "avatar_" in the game files, you will see that it can be found in 4 different files. The interesting ones are playerbadge and targetindicator.

In targetindicator:GetAvatarAtlas() you can see that there is an ending that checks if self.isCharacterState1.

This is defined as 

self.isCharacterState1 = checkbit(self.userflags, USERFLAGS.CHARACTER_STATE_1)

That means it checks the user flags of the character.

In woodie.lua, there is this code snippet:

if IsWereMode(newmode) then
            inst:AddTag(newmode == WEREMODES.BEAVER and "beaver" or ("were"..WEREMODE_NAMES[newmode]))
            inst.overrideskinmode = "were"..WEREMODE_NAMES[newmode].."_skin"
            inst.overrideghostskinmode = "ghost_"..inst.overrideskinmode
            inst:PushEvent("startwereplayer") --event for sentientaxe

where userflags are added. 

So I think that you will also need to add user flags the way as woodie does it for your different forms and name the avatar image in the same way as woodies or wormwoods are named, which means addind a _1 or _2 or _3 at the end. 

For the self inspect I don't know, have a look at PlayerAvatarPopup and see if you can find something, I'm not sure if it's possible without changing PlayerAvatarPopup.

Edited by Monti18
  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...