Good Morning All!
I am struggling to adapt an existing script I use.
I use
To check the Skills traited to the specified equipment slot.
What I'd like to do is be able to do the same for actors class
I cannot for the life of me figure out how to.
Help?
I am struggling to adapt an existing script I use.
I use
const armSkills = actor.equips()
.filter((equip, index) => index === 0) // Armoire Skills
.flatMap(equip => {
if (equip && equip.traits) {
return equip.traits.filter(trait => trait.code === 43);
} else {
return [];
}
})
.map(trait => {
const armSkill = $dataSkills[trait.dataId];
const apValue = extractApValue(armSkill.note); // Extract the AP value from the note tag
return {
id: trait.dataId, // Add the skill ID to the result
iconIndex: armSkill.iconIndex,
name: armSkill.name,
apValue: apValue // Add the extracted AP value to the result
};
});
const armskillIcon1 = armSkills[0] ? armSkills[0].iconIndex : 0;
const armskillName1 = armSkills[0] ? armSkills[0].name : "";
const armskill1Id = armSkills[0] ? armSkills[0].id : 0; // Get the ID of the first skill, or set it to 0 if not available
const armskill1AP = armSkills[0] ? armSkills[0].apValue : ""; // Get the AP value of the first skill, or set it to 0 if not available
To check the Skills traited to the specified equipment slot.
What I'd like to do is be able to do the same for actors class
actor.currentClass() and subclass actor.multiclass(2)I cannot for the life of me figure out how to.
Help?