sm64coopdx/docs/lua/structs.md
2022-02-13 22:18:03 -08:00

22 KiB

Lua Reference

Supported Structs


Animation

Field Type Access
flags integer
length integer
animYTransDivisor integer
startFrame integer
loopStart integer
loopEnd integer
unusedBoneCount integer

🔼


Area

Field Type Access
camera Camera read-only
flags integer
index integer
instantWarps InstantWarp read-only
musicParam integer
musicParam2 integer
objectSpawnInfos SpawnInfo read-only
paintingWarpNodes WarpNode read-only
terrainType integer
warpNodes ObjectWarpNode read-only

🔼


Camera

Field Type Access
areaCenX number
areaCenY number
areaCenZ number
cutscene integer
defMode integer
doorStatus integer
focus Vec3f read-only
mode integer
nextYaw integer
pos Vec3f read-only
unusedVec1 Vec3f read-only
yaw integer

🔼


CameraFOVStatus

Field Type Access
decay integer
fov number
fovFunc integer
fovOffset number
shakeAmplitude number
shakePhase integer
shakeSpeed integer
unusedIsSleeping integer

🔼


CameraStoredInfo

Field Type Access
cannonYOffset number
focus Vec3f read-only
panDist number
pos Vec3f read-only

🔼


CameraTrigger

Field Type Access
area integer
boundsX integer
boundsY integer
boundsYaw integer
boundsZ integer
centerX integer
centerY integer
centerZ integer

🔼


Character

Field Type Access
animOffsetEnabled integer read-only
animOffsetFeet number read-only
animOffsetHand number read-only
animOffsetLowYPoint number read-only
cameraHudHead integer read-only
capEnemyLayer integer read-only
capMetalModelId integer read-only
capMetalWingModelId integer read-only
capModelId integer read-only
capWingModelId integer read-only
modelId integer read-only
name string read-only
soundAttacked integer read-only
soundCoughing1 integer read-only
soundCoughing2 integer read-only
soundCoughing3 integer read-only
soundDoh integer read-only
soundDrowning integer read-only
soundDying integer read-only
soundEeuh integer read-only
soundFreqScale number read-only
soundGameOver integer read-only
soundGroundPoundWah integer read-only
soundHaha integer read-only
soundHaha_2 integer read-only
soundHello integer read-only
soundHereWeGo integer read-only
soundHoohoo integer read-only
soundHrmm integer read-only
soundImaTired integer read-only
soundMamaMia integer read-only
soundOnFire integer read-only
soundOoof integer read-only
soundOoof2 integer read-only
soundPanting integer read-only
soundPantingCold integer read-only
soundPressStartToPlay integer read-only
soundPunchHoo integer read-only
soundPunchWah integer read-only
soundPunchYah integer read-only
soundSnoring1 integer read-only
soundSnoring2 integer read-only
soundSnoring3 integer read-only
soundSoLongaBowser integer read-only
soundTwirlBounce integer read-only
soundUh integer read-only
soundUh2 integer read-only
soundUh2_2 integer read-only
soundWaaaooow integer read-only
soundWah2 integer read-only
soundWhoa integer read-only
soundYahWahHoo integer read-only
soundYahoo integer read-only
soundYahooWahaYippee integer read-only
soundYawning integer read-only
torsoRotMult number read-only
type integer read-only

🔼


Controller

Field Type Access
buttonDown integer
buttonPressed integer
extStickX integer
extStickY integer
port integer
rawStickX integer
rawStickY integer
stickMag number
stickX number
stickY number

🔼


Cutscene

Field Type Access
duration integer

🔼


CutsceneSplinePoint

Field Type Access
index integer
point Vec3s read-only
speed integer

🔼


CutsceneVariable

Field Type Access
angle Vec3s read-only
point Vec3f read-only
unused1 integer
unused2 integer
unusedPoint Vec3f read-only

🔼


FloorGeometry

Field Type Access
normalX number
normalY number
normalZ number
originOffset number

🔼


GraphNode

Field Type Access
children GraphNode read-only
flags integer
next GraphNode read-only
parent GraphNode read-only
prev GraphNode read-only
type integer

🔼


GraphNodeObject

Field Type Access
angle Vec3s read-only
cameraToObject Vec3f read-only
node GraphNode read-only
pos Vec3f read-only
prevAngle Vec3s read-only
prevPos Vec3f read-only
prevScale Vec3f read-only
prevScaleTimestamp integer
prevShadowPos Vec3f read-only
prevShadowPosTimestamp integer
prevThrowMatrixTimestamp integer
prevTimestamp integer
scale Vec3f read-only
sharedChild GraphNode read-only
skipInterpolationTimestamp integer
unk18 integer
unk19 integer
animInfo GraphNodeObject_sub read-only
unk4C SpawnInfo read-only

🔼


GraphNodeObject_sub

Field Type Access
animAccel integer
animFrame integer
animFrameAccelAssist integer
animID integer
animTimer integer
animYTrans integer
curAnim Animation read-only
prevAnimFrame integer
prevAnimFrameTimestamp integer
prevAnimID integer
prevAnimPtr Animation read-only

🔼


HandheldShakePoint

Field Type Access
index integer
pad integer
point Vec3s read-only

🔼


InstantWarp

Field Type Access
area integer
displacement Vec3s read-only
id integer

🔼


LakituState

Field Type Access
curFocus Vec3f read-only
curPos Vec3f read-only
defMode integer
focHSpeed number
focVSpeed number
focus Vec3f read-only
focusDistance number
goalFocus Vec3f read-only
goalPos Vec3f read-only
keyDanceRoll integer
lastFrameAction integer
mode integer
nextYaw integer
oldPitch integer
oldRoll integer
oldYaw integer
pos Vec3f read-only
posHSpeed number
posVSpeed number
roll integer
shakeMagnitude Vec3s read-only
shakePitchDecay integer
shakePitchPhase integer
shakePitchVel integer
shakeRollDecay integer
shakeRollPhase integer
shakeRollVel integer
shakeYawDecay integer
shakeYawPhase integer
shakeYawVel integer
skipCameraInterpolationTimestamp integer
unused integer
unusedVec1 Vec3f read-only
unusedVec2 Vec3s read-only
yaw integer

🔼


LinearTransitionPoint

Field Type Access
dist number
focus Vec3f read-only
pitch integer
pos Vec3f read-only
yaw integer

🔼


MarioAnimation

Field Type Access
targetAnim Animation read-only

🔼


MarioBodyState

Field Type Access
action integer
capState integer
eyeState integer
grabPos integer
handState integer
headAngle Vec3s read-only
heldObjLastPosition Vec3f read-only
modelState integer
punchState integer
torsoAngle Vec3s read-only
torsoPos Vec3f read-only
wingFlutter integer

🔼


MarioState

Field Type Access
action integer
actionArg integer
actionState integer
actionTimer integer
angleVel Vec3s read-only
animation MarioAnimation read-only
area Area read-only
bubbleObj Object read-only
capTimer integer
ceil Surface read-only
ceilHeight number
character Character read-only
collidedObjInteractTypes integer
controller Controller read-only
curAnimOffset number
currentRoom integer
doubleJumpTimer integer
faceAngle Vec3s read-only
fadeWarpOpacity integer
flags integer
floor Surface read-only
floorAngle integer
floorHeight number
forwardVel number
framesSinceA integer
framesSinceB integer
freeze integer
healCounter integer
health integer
heldByObj Object read-only
heldObj Object read-only
hurtCounter integer
input integer
intendedMag number
intendedYaw integer
interactObj Object read-only
invincTimer integer
isSnoring integer
marioBodyState MarioBodyState read-only
marioObj Object read-only
minimumBoneY number
nonInstantWarpPos Vec3f read-only
numCoins integer
numKeys integer
numLives integer
numStars integer
particleFlags integer
peakHeight number
playerIndex integer read-only
pos Vec3f read-only
prevAction integer
prevNumStarsForDialog integer
quicksandDepth number
riddenObj Object read-only
slideVelX number
slideVelZ number
slideYaw integer
spawnInfo SpawnInfo read-only
splineKeyframeFraction number
splineState integer
squishTimer integer
statusForCamera PlayerCameraState read-only
terrainSoundAddend integer
twirlYaw integer
unkB0 integer
unkC4 number
usedObj Object read-only
vel Vec3f read-only
wall Surface read-only
wallKickTimer integer
wasNetworkVisible integer
waterLevel integer

🔼


ModeTransitionInfo

Field Type Access
frame integer
lastMode integer
max integer
newMode integer
transitionEnd LinearTransitionPoint read-only
transitionStart LinearTransitionPoint read-only

🔼


NetworkPlayer

Field Type Access
connected bool read-only
currActNum integer read-only
currAreaIndex integer read-only
currAreaSyncValid bool read-only
currCourseNum integer read-only
currLevelAreaSeqId integer read-only
currLevelNum integer read-only
currLevelSyncValid bool read-only
fadeOpacity integer read-only
globalIndex integer read-only
lastReceived number read-only
lastSent number read-only
localIndex integer read-only
modelIndex integer read-only
name string read-only
onRxSeqId integer read-only
paletteIndex integer read-only
type integer read-only

🔼


Object

Field Type Access
activeFlags integer
areaTimer integer
areaTimerDuration integer
areaTimerType integer
bhvDelayTimer integer
bhvStackIndex integer
collidedObjInteractTypes integer
createdThroughNetwork integer
globalPlayerIndex integer
header ObjectNode read-only
heldByPlayerIndex integer
hitboxDownOffset number
hitboxHeight number
hitboxRadius number
hurtboxHeight number
hurtboxRadius number
numCollidedObjs integer
parentObj Object read-only
platform Object read-only
prevObj Object read-only
respawnInfoType integer
unused1 integer

🔼


ObjectHitbox

Field Type Access
damageOrCoinValue integer
downOffset integer
health integer
height integer
hurtboxHeight integer
hurtboxRadius integer
interactType integer
numLootCoins integer
radius integer

🔼


ObjectNode

Field Type Access
gfx GraphNodeObject read-only
next ObjectNode read-only
prev ObjectNode read-only

🔼


ObjectWarpNode

Field Type Access
next ObjectWarpNode read-only
node WarpNode read-only
object Object read-only

🔼


OffsetSizePair

Field Type Access
offset integer
size integer

🔼


ParallelTrackingPoint

Field Type Access
distThresh number
pos Vec3f read-only
startOfPath integer
zoom number

🔼


PlayerCameraState

Field Type Access
action integer
cameraEvent integer
faceAngle Vec3s read-only
headRotation Vec3s read-only
pos Vec3f read-only
unused integer
usedObj Object read-only

🔼


PlayerGeometry

Field Type Access
currCeil Surface read-only
currCeilHeight number
currCeilType integer
currFloor Surface read-only
currFloorHeight number
currFloorType integer
prevCeil Surface read-only
prevCeilHeight number
prevCeilType integer
prevFloor Surface read-only
prevFloorHeight number
prevFloorType integer
waterHeight number

🔼


SpawnInfo

Field Type Access
activeAreaIndex integer
areaIndex integer
behaviorArg integer
next SpawnInfo read-only
startAngle Vec3s read-only
startPos Vec3s read-only
unk18 GraphNode read-only

🔼


Surface

Field Type Access
flags integer
force integer
lowerY integer
modifiedTimestamp integer
normal Vec3f read-only
object Object read-only
originOffset number
prevVertex1 Vec3s read-only
prevVertex2 Vec3s read-only
prevVertex3 Vec3s read-only
room integer
type integer
upperY integer
vertex1 Vec3s read-only
vertex2 Vec3s read-only
vertex3 Vec3s read-only

🔼


TransitionInfo

Field Type Access
focDist number
focPitch integer
focYaw integer
framesLeft integer
marioPos Vec3f read-only
pad integer
posDist number
posPitch integer
posYaw integer

🔼


Vec3f

Field Type Access
x float
y float
z float

🔼


Vec3s

Field Type Access
x integer
y integer
z integer

🔼


WallCollisionData

Field Type Access
numWalls integer
offsetY number
radius number
unk14 integer

🔼


WarpNode

Field Type Access
destArea integer
destLevel integer
destNode integer
id integer

🔼


WarpTransition

Field Type Access
data WarpTransitionData read-only
isActive integer
pauseRendering integer
time integer
type integer

🔼


WarpTransitionData

Field Type Access
blue integer
endTexRadius integer
endTexX integer
endTexY integer
green integer
red integer
startTexRadius integer
startTexX integer
startTexY integer
texTimer integer

🔼


Waypoint

Field Type Access
flags integer
pos Vec3s read-only

🔼


Whirlpool

Field Type Access
pos Vec3s read-only
strength integer

🔼