[Memhack] PilotLvlUpSkillsArray - Redacted-Rice/ITB-RedactedRiceExts GitHub Wiki
Memhack PilotLvlUpSkillsArray
The Memhack PilotLvlUpSkillsArray struct represents an array of two PilotLvlUpSkill structs stored back-to-back in memory.
It has the standard memhack base struct functions/fields.
This struct uses parent tracking via the _parent field to maintain a reference to its owning Pilot (injected when obtained through Pilot getters). Child PilotLvlUpSkill entries get parent links to both the Pilot and this array. See memhack base struct for more info.
Table of Contents
Data
| Field | Type | Offset | Description |
|---|---|---|---|
| skill1 | PilotLvlUpSkill|[Memhack] PilotLvlUpSkill | 0x00 | The first level-up skill |
| skill2 | PilotLvlUpSkill|[Memhack] PilotLvlUpSkill | 0x74 | The second level-up skill |
Data Functions
These are functions that draw from the data in the struct or set the data in the struct
Game Functions
getSkill1
PilotLvlUpSkillPilotLvlUpSkillsArray:getSkill1()
Returns the first level-up skill. Parent references are automatically injected into the returned skill.
Example:
local skills = pilot:getLvlUpSkills()
local skill1 = skills:getSkill1()
LOG("Skill 1 ID: " .. skill1:getId())
setSkill1
voidPilotLvlUpSkillsArray:setSkill1(skill)
| Argument name | Type | Description |
|---|---|---|
skill |
PilotLvlUpSkill or table | The skill struct or table of field values |
Sets the first level-up skill. Accepts either a PilotLvlUpSkill struct or a table of field values.
Example:
local skills = pilot:getLvlUpSkills()
skills:setSkill1({
id = "Move",
shortName = "Pilot_MoveShort",
fullName = "Pilot_MoveName",
moveBonus = 1,
saveVal = 1
})
getSkill2
PilotLvlUpSkillPilotLvlUpSkillsArray:getSkill2()
Returns the second level-up skill. Parent references are automatically injected into the returned skill.
Example:
local skills = pilot:getLvlUpSkills()
local skill2 = skills:getSkill2()
LOG("Skill 2 ID: " .. skill2:getId())
setSkill2
voidPilotLvlUpSkillsArray:setSkill2(skill)
| Argument name | Type | Description |
|---|---|---|
skill |
PilotLvlUpSkill or table | The skill struct or table of field values |
Sets the second level-up skill. Accepts either a PilotLvlUpSkill struct or a table of field values.
Example:
local skills = pilot:getLvlUpSkills()
skills:setSkill2({
id = "Health",
shortName = "Pilot_HealthShort",
fullName = "Pilot_HealthName",
healthBonus = 1,
saveVal = 2
})
getParentPilot
PilotPilotLvlUpSkillsArray:getParentPilot()
Returns the Pilot struct that owns this skills array.
Example:
local skills = pilot:getLvlUpSkills()
local parentPilot = skills:getParentPilot()
LOG("Parent pilot: " .. parentPilot:getName())