-
Notifications
You must be signed in to change notification settings - Fork 1
Player Actor
This page is a work in progress as more of the player actor is documented. Note that information listed here is reliant on a bunch of assumptions and small tests, so it may not be fully accurate, but meant to be as base to start looking or clue into its actual function.
There is a global pointer to the player actor located at 0x8057578c
and 0x805757b8
. The first one is used more often for reference.
The player actor most often times has the address of 0x80b7652c
. In most scenarios this can be used for quick reference, however do note that in places such as flooded faron woods, this address is not correct. This address is nice to know as it can be quick reference for fields that exist for the player. When looking at memory in dolphin, you can put this address as the base and use the offset field to look at the value desired.
In Ghidra, the Player actor is referred to as ActorLink
and is Actor number 0xC8 (200)
Spreadsheet here: ActorLink::PLAYER_ACTIONS maps to PlayerActions
Enum in Ghidra. (address is 0x80530180
)
The action flags as are referenced in the sheet are stored at an offset of 0x364
and 0x368
in the player actor. These are flags that are often referenced to control effects, animations, camera placements, and useful for logic at determining what do do at certain times. For example, actionFlags & 0x2
is responsible for whether or not gravity is applied to link.
Some things to note:
- Action Flags are given defaults based on each action. These still change dynamically throughout actions.
- Tied close to animations, responsible for progression and start of animations.
Below are quick commonalities found by analyzing the defaults in the table. These are to be taken lightly and can easily be something else, but it is a start to be edited later.
Action Flags (0x364
offset)
0x 8000 0000 -> on foot
0x 4000 0000 -> using item?
0x 2000 0000 -> using item?
0x 1000 0000 -> idk - general movement?
0x 0800 0000 -> jumpSlash/finalblow/backflip / crawlspace?
0x 0400 0000 -> idk, 'using' theme
0x 0200 0000 -> recover/electrocuted?
0x 0100 0000 -> crawling
0x 0080 0000 -> walking on tight rope
0x 0040 0000 -> on vine/rope
0x 0020 0000 -> pushing
0x 0010 0000 -> idk
0x 0008 0000 -> idk
0X 0004 0000 -> in water
0x 0002 0000 -> On Ladder
0x 0001 0000 -> On Vines
0x 0000 8000 -> idk
0x 0000 4000 -> idk
0x 0000 2000 -> idk, interactions related
0x 0000 1000 -> idk, basix actions it seems
0x 0000 0800 -> hanging ( Pehat, Target, on vines using claws, climbing up from hang tightrope )
0x 0000 0400 -> not controling link directly
0x 0000 0200 -> attacking related
0x 0000 0100 -> idk
0x 0000 0080 -> idk
0x 0000 0040 -> hanging from ledge
0x 0000 0020 -> unseen in defaults
0x 0000 0010 -> unseen in defaults
0x 0000 0008 -> damaged
0x 0000 0004 -> idk
0x 0000 0002 -> No contact with ground allows fall
0x 0000 0001 -> Not moving?
Action Flags Continued (0x368
offset)
0x 8000 0000 -> appears to be nothing
0x 4000 0000 -> appears to be nothing
0x 2000 0000 -> on peahat
0x 1000 0000 -> on clawshot target / vines with claws
0x 0800 0000 -> not enough info
0x 0400 0000 -> vines/ledge leap and being knocked back
0x 0200 0000 -> idk
0x 0100 0000 -> idk
0x 0080 0000 -> idk
0x 0040 0000 -> crawlspace related (maybe overhead cam?)
0x 0020 0000 -> idk
0x 0010 0000 -> idk
0x 0008 0000 -> immune??
0x 0004 0000 -> leaving goddess wall
0x 0002 0000 -> medium pickup / backflip?
0x 0001 0000 -> ladders / vines/ ropes / things that have control of link?
0x 0000 8000 -> idk
0x 0000 4000 -> idk some general movement
0x 0000 2000 -> attack with sword
0x 0000 1000 -> sitting
0x 0000 0800 -> nothing
0x 0000 0400 -> nothing
0x 0000 0200 -> nothing
0x 0000 0100 -> gust Bellows camera
0x 0000 0080 -> slingshot camera
0x 0000 0040 -> first person camera
0x 0000 0020 -> idk
0x 0000 0010 -> use beetle camera
0x 0000 0008 -> minecart/die/revive
0x 0000 0004 -> using claws camera
0x 0000 0002 -> bow camera
0x 0000 0001 -> unk
Links Model is comprised of multiple parts. These parts can be seen in initModels, where some will actually be allocated their own dedicated space. Due to the large amount and size it would take up, links animations are split into a separate file, PLCommonAnime
which can also be seen in ObjectPack.arc
. This file contains multiple AnmTexPat, AnmTexSrt, and AnmChr that are referenced in certain actions. These files are all seen in the External
Data folder and must be decompressed in order to be used properly.