CompatSkills

CompatSkills

8M Downloads

Trying to make custom traits!?!

zwaper opened this issue ยท 2 comments

commented

Hello.
so i'm trying to make a custom traits for a skill called technology.
i've added this code int my traits file.
var professor = createTrait("professor", 3, 2, "compatskills:technology", 7, "compatskills:technology|23", "trait|compatskills:intern"); professor.name = "Advanced Machines"; professor.description = "Unlocks access to the more advanced Technology."; professor.icon = "mekanism:textures/items/portableteleporter.png";

and i have this code in my skills file

val technology = createSkill("technology", "appliedenergistics2:textures/blocks/dense_energy_cell7.png"); technology.name = "Tech"; technology.setRankIcon(0, "mekanism:textures/items/basiccontrolcircuit.png"); technology.setRankIcon(1, "mekanism:textures/items/advancedcontrolcircuit.png"); technology.setRankIcon(2, "mekanism:textures/items/elitecontrolcircuit.png"); technology.setRankIcon(3, "mekanism:textures/items/ultimatecontrolcircuit.png");
but whenever i start my mod it says this

ERROR: String Resource Location, compatskills:technology, is not a Valid Skill!
ERROR: [crafttweaker]: Error executing {[9999:crafttweaker]: reskillable\traits.zs}: null

And is there a way to make so Xaero's Minimap could be enabled as a trait. so when you reach that specific level and unlocks it. it will enable the minimap but if you don't have the levels for it or the trait it stays disabled and can't be used?

commented

I don't remember but you may need to make sure that the script gets ran first, so create the skill in another file with a higher priority to ensure that it exists when the skill adding the traits is ran.

And there is no way to make it so Xaero's Minimap can be enabled as a trait. If there is a gamestage addon that does that though you could use a gamestage unlockable (from compatskills) to give the corresponding gamestage to the player thus unlocking xaero's minimap.

commented

Thank you for a quick reply.
i'll try it and see if it works :D