Coders-After-Dark / Reskillable

Other
7 stars 17 forks source link

[Feature Request] Gating items behind custom traits #174

Closed ImelchorI closed 4 years ago

ImelchorI commented 4 years ago

im currently compiling a heavy adventure focused modpack for myself and a couple of my friends.

the modpack is supposed to heavily gate progression through this mod, and one of the mods im running in the pack is electroblobs wizardy.

now, that wizardy mod features some specialized magic robes and wands for 7 different spell schools (fire, ice, earth, thunder, healing, necromancy, sorcery).

i thought it would be cool, if i could gate those specialized items beind custom traits in the magic skill. so the general magic skill level gates the power of the wands and wizard robes that youre able to use, but additionally you have the option to unlock pyromancy, necromancy etc. as specialization traits to gain access to the specialized gear, and not before you invest the skill points.

bonus points, if we get the options to make traits exclusive. meaning, if you unlocked one of the 7 specialization traits, it permanently locks the other 6.

pupnewfster commented 4 years ago

I believe this is possible using our addon CompatSkills. (The unlocking one trait permanently locking the other 6 should also be possible using logic requirements as I believe (at least for traits added via compatskills) I fixed the issue of them not existing at the time it checks them.) Feel free to join our discord if you need more help with some of the specifics.

ImelchorI commented 4 years ago

thank you, ill look into the addon mod. is there a tutorial available somewhere?

using reskillable to add skill gating for items was pretty easy through the confic.

ImelchorI commented 4 years ago

oh wow. so if i read this correctly on the craft tweaker documentation, i cant just edit this in via configs.

i have to mod this in by loading the reskillable mod up in eclipse? ill try to figure it out tomorrow. its a bit late where i am now. but it would be lovely if there was some sort of tutorial available, that shows how to add a simple custom trait and could guide me through step by step, so i get the basics.

i dont really have experience with modding so far. ive only done very superficial stuff so far, like adding simple solid blocks or non functional items to the game.

pupnewfster commented 4 years ago

No you can use CraftTweaker and add them in a script: https://docs.blamejared.com/1.12/en/#Mods/CompatSkills/Supports/Reskillable/CustomTraits/Custom_Traits/

ImelchorI commented 4 years ago

so i put the code for the new traits into the CraftTweaker script file, or do i create a separate script file for this? (i have used CraftTweaker before to edit recipes)

like

var trait = mods.compatskills.TraitCreator.createTrait("test", 2, 3, "compatskills:banana", 1, "compatskills:banana|5");

would create a "test" trait under the "banana" skill

im sorry if those questions may sound kindof dumb, but im pretty new to this.

pupnewfster commented 4 years ago

This is my example of creating traits: https://github.com/pupnewfster/GGSkyblock/blob/master/scripts/reskillable/traits.zs

But this is also why I recommended joining our discord if you need help, as github issues is not that great a place for providing assistance.

ImelchorI commented 4 years ago

i know you said you rather want me to do this over discord, but i currently dont have access to that. ill look into getting discord asap.

status update so far. ive had some time today and successfully created my own traits under the magic tab, including icons. it was pretty intuitive to figure out from your examples, so thank you very much.

my guess is i just have to add the new traits as a requirement to the items i want to lock in the reskillable config now, as i would lock them behind skills.

(example: ebwizardry:novice_fire_wand:*=reskillable:magic|4, trait requirement)

i tried to look up the proper syntax and found a documentation for this here on github.

when i click the links on the bottom of the page, i get a 404 though. just letting you know, just in case.

https://github.com/CraftTweaker/CraftTweaker-Documentation/blob/master/translations/de/docs/Mods/CompatSkills/Requirements/Requirements.md

in the meantime ill comb through the craft tweaker documentation if i find it there. then ill have to figure out how to make the new traits exclusive to one another. but thats not so important. if nothing esle works, i can just set the skill point cost high enough that youd only be able to afford one of them.

edit.: found the correct syntax after seeing how you locked the thaumcraft trait behind the botania trait. took me a while, but now im able to lock those items behind my traits :)

reading through other configs and scripts available here, its impressive what this mod can do, even gating dimensions behind traits, skills, advancements etc.