Magic

Magic

190k Downloads

Can't make new path after wizard/master

Grievous07 opened this issue ยท 27 comments

commented

I'm trying to add the harry potter spells as a path "sorcerer" that is unlocked after the master path spells are all learned. I've tested and managed to get Patronus to be added and working, and it is in the uberwand.
And yes I know I could just add the default of the potter preset, but I'd rather just have its spells that arent inhereited from the default survival spells added as a new path.

All the spells that are listed under the spells for sorcerer i've added under Plugins/Magic/Spells. I copy them from the potter default, but remove the category and class, other than that they stay the same.

This is in Plugins/Magic/paths
"sorcerer:
icon: wood_hoe:5
migrate_icon: gold_axe
required_spells:

  • fury
  • blessing
  • cluster
  • bomb
  • invincible
  • earthquake
  • nuke
  • meteor
  • pollinate
  • kill
  • torture
  • petrify
  • tornado
  • tendril
  • force
  • stash
  • railgun
  • levitate
  • shrink
  • dragonball
  • neutron
  • mob
    inherit: master
    mana_regeneration: 70
    mana_max: 300
    spells:
  • patronus
  • amplify
  • aparecium
  • araniaexumai
  • arresto
  • avis
  • beat
  • bombtastic
  • colloportus
  • colorvaria
  • confringo
  • deletrius
  • deluminate
  • dementor
  • diffindo
  • dungbomb"
commented

You will also need to put this in your paths.yml:

master:
  upgrade: sorcerer

I think it should work then!

commented

XD so obv, I should've seen that. Lemme add that and restart, let u know. Thanks!

commented

No problem, it's not really that obvious :)

Hope that works, it's a fun idea!

commented

So in Plugins/Magic/Paths.yml
at the very bottom, I added

master:
upgrade: sorcerer

Also if it means anything, I found that my sorcerer path got added to the bottom of the default folder's paths.yml
Did a second restart after adding the master upgrade: sorcerer thing, cause the first time didn't work. Second time just in case.
And did /mage reset, re-learned every spell. Still, nada, once I learned them all it said "There are no spells for you to buy here."

Also, I updated the sorcerer path, in case there were require spells for unlock that were being uncoperative to this.

sorcerer:
  icon: wood_hoe:5
  migrate_icon: gold_axe
  required_spells:
  - invincible
  - kill
  inherit: master
  mana_regeneration: 70
  mana_max: 300
  spells:
  - patronus
  - amplify
  - aparecium
  - araniaexumai
  - arresto
  - avis
  - beat
  - bombtastic
  - colloportus
  - colorvaria
  - confringo
  - deletrius
  - deluminate
  - dementor
  - diffindo
  - dungbomb
commented

I saw upgrade_item in alot of the paths, is that a possibility of what's needed?

commented

Oh, and in plugins/magic/defaults/paths.yml the master got succesfully overwritten that its upgrade is sorcerer, but upgrade_item is still "engineer_upgrade" as Idk what an upgrade_item is.

commented

upgrade_item is not required, but you'd probably want to empty it out like upgrade_item: "" ... I don't think I can look at it tonight but if you can't get it I'll see if I can try it out myself tomorrow.

commented

Okay, thank you so much for the quick replies! I've never met a plugin or mod developer that replies to issues as fast as you do. Looking forward to your input tomorrow (or whenever its convenient for you to get to it) thanks for pointing out that obvious mistake before, def wouldn't have gotten far without it.

commented

Hi! Sorry it took me a little while to try this out, but I'm sad/happy to report it seems to work for me .. here is what I did.

This goes in plugins/Magic/paths.yml:

master:
  upgrade: sorcerer

sorcerer:
  icon: wood_hoe:5
  migrate_icon: gold_axe
  required_spells:
  - invincible
  - kill
  inherit: master
  mana_regeneration: 70
  mana_max: 300
  spells:
  - patronus
  - amplify
  - aparecium
  - araniaexumai
  - arresto
  - avis
  - beat
  - bombtastic
  - colloportus
  - colorvaria
  - confringo
  - deletrius
  - deluminate
  - dementor
  - diffindo
  - dungbomb

Then in-game I do the following commands:

# to start fresh
/clear
/mage reset
/mgive wand
# You can use the "enchant" command to give yourself spells and automatically move through the ranks
/wand enchant 18
# You should now be Student
/wand enchant 18
# You should now be Apprentice
/wand enchant 23
# You should now be Wizard (master)
/wand enchant 24

Now you should be taken to sorcerer. Doing /cast spellshop should show you the HP spells, plus any extra spells from the survival paths that weren't required to rank up.

Please let me know how it goes for you, could be something simple like a stray space in the paths config.

commented

Couldn't find the wand enchant perm (which I disabled earlier) so I went the long way giving myself sp and learning all the spells. I don't think that makes a diff, but just incase.
Sadly did not work.

Only thing I noticed still outta place was that in Plugins/Magic/Deafults/Paths the master sitll has engineer as an upgrade item
upgrade_item: engineer_upgrade
I tried removing this, but it was just replaced after the restart

I went ahead and removed
master:
upgrade: sorcerer
from the Plugins/Magic/Paths.yml

Is there a thing where the inherit path's (master) spells has to match the upgrade path's (sorcerer) required spells? Like I would only have kill and invincible in the master's spells and all its other spells go itno the extra spells like
extra_spells:

  • mount
  • cage
  • silence
  • tent
  • tame
  • etc
    spells:
  • kill
  • invicible
commented

Oops I forgot about the upgrade item, you should do

master:
  upgrade: sorcerer
  upgrade_item: ""

Alternately, it seems like you must be loading the engineering example or else there wouldn't be that upgrade_item - do you have like examples: engineering in your config.yml? You could try removing that since you're (presumably?) not using it.

Though I was also testing with that enabled so I'm not sure it's the problem.

To be clear, the required_spells are spells that are required to progress to the next path. Not spells required to get to that path.

It's kind of confusing, but that means the required_spells on your sorcerer path aren't really do anything.

So, what happens when you get all of the spells and use the spellshop? Does it just tell you there's nothing more to learn here?

I'm not sure what else could be going wrong... if you want pastebin your paths.yml along with any other configs you've edited I can take a closer look.

commented

correct, it just says there's nothing further to learn.
I will try the upgrade item, if that doesn't work ill give u my paths config, paths default, and paths yml.
If there seems to be nothing wrong after the deeper inspection, I'll try changing the spells of the engineer path, and just use that.

commented

More specifically it says "there are no spells for you to buy here" in case that makes a diff between learn and buy.
Again didn't work. Here are the files. Though I just want to say. You're absolutely amazing for helping me out so thoroughly and quickly! Most plugin developers hardly even look at their issues and tend to be clueless as to any bugs. Thank you so much!

Paths.defaults.yml

master:
  icon: wood_hoe:4
  migrate_icon: gold_axe
  required_spells:
  - rollback
  upgrade: sorcerer
  upgrade_item: sorcerer_upgrade
  inherit: apprentice
  mana_regeneration: 50
  mana_max: 250
  extra_spells:
  - mount
  - cage
  - silence
  - tent
  - tame
  spells:
  - fury
  - blessing
  - cluster
  - bomb
  - invincible
  - earthquake
  - icbm
  - nuke
  - meteor
  - pollinate
  - kill
  - torture
  - petrify
  - singularity
  - tornado
  - tendril
  - force
  - stash
  - railgun
  - levitate
  - shrink
  - dragonball
  - neutron
  - mob
sorcerer:
  icon: wood_hoe:5
  migrate_icon: gold_axe
  required_spells:
  - invincible
  - kill
  inherit: master
  mana_regeneration: 70
  mana_max: 300
  spells:
  - patronus
  - amplify
  - aparecium
  - araniaexumai
  - arresto
  - avis
  - beat
  - bombtastic
  - colloportus
  - colorvaria
  - confringo
  - deletrius
  - deluminate
  - dementor
  - diffindo
  - dungbomb

PATHS FOLDER (magic/paths/sorcerer.yml)

master:
  upgrade: sorcerer
  upgrade_item: sorcerer_upgrade

sorcerer:
  icon: wood_hoe:5
  migrate_icon: gold_axe
  required_spells:
  - invincible
  - kill
  inherit: master
  mana_regeneration: 70
  mana_max: 300
  spells:
  - patronus
  - amplify
  - aparecium
  - araniaexumai
  - arresto
  - avis
  - beat
  - bombtastic
  - colloportus
  - colorvaria
  - confringo
  - deletrius
  - deluminate
  - dementor
  - diffindo
  - dungbomb

CONFIG.YML and
MY paths.yml is completely hashtagged out, all green.

commented

sorry I gt no idea why that last bit has such a larger font

commented

Hey, since this prbly just isn't working (no fault of ur own) you've been SUPER helpful! Simply I feel like this has taken too much effort for what it's getting. So if you could just show me a link or instructions on how to allow people to get engineer (cause i think its locked by perms) I can easily change the engineer's spells.

commented

We could do that, but I think maybe I know what's wrong- is your config.yml is completely blank (commented ut)? It was hard to tell in that paste, do you have the potter configs loaded? Maybe this is obvious ... but if you do /mage add patronus does it actually work and give you the spell?

If not, make sure you have example: potter in plugins/Magic/config.yml

Maybe it's just missing all of the spells?

The engineering configs are not permission-locked, they are a separate example. I don't think we want to add all of that in only to not use it... I feel like we can figure this out!

Sorry its been such a challenge, though, this really should be a relatively simple change.

commented

IT WORKED!!!!!!!!!!!!!! THANK YOU SO MUCH! OMG THE STAFF LOOKS AMAZING! THE SPELLS WORK GREAT! OMG never could've without you! sorry for the caps, but like seriously no other plugin developer give such effort to helping their people, thank you so much!

commented

since this ticket is already open, hope u don't mind me bring up a few other things.
1: now creepers hit by magic missile, their explosion's block damage is repaired, idk.
2: I'm adding a new plugin "Knokko's Custom Items" which requires a server texturepack. My idea just use the magic plugin's texture pack and add onto it. Tho I did a quick look and didnt find much on how one might go about doing that.
3: can the decoy spell be made to scramble nearby mob's threat tables? AKA redirect them to attack the decoy, copy the armor of the caster. And easier one, make more decoys, like at level 1 makes 2 decoys/level 2 makes 4/level 3 makes 9/etc

commented

Glad you're enjoying it! ๐Ÿ‘

  1. Ah.. interesting, yeah I guess since I made missile break blocks I could see how that happens. Not really intentional- if you're up for opening a separate new bug for that, I probably won't address it real soon (kind of a nice bug, lol) but I probably would like to fix it eventually.

  2. You can use this tool to merge the two resource packs, but you will have the issue of having to host the result somewhere: https://merge.elmakers.com

  3. That's a fun idea, yeah I think I will add that. AreaOfEffect+Aggro should do the trick.

commented
  1. ya, honestly it could well be a "feature" an easy way to prevent devastating sadness by creepers.

  2. thank you : )

  3. very awesome, any chance about programming the spawn multiple decoys? sounds like it'd be an easy thing to write in, abit easier than making the decoys wear the same armor.

commented

Oh, nice glad you're using the editor! I don't think there'll be a good template for this one though.

Now that I think about it, it actually gets a little tricky with the way the spell is set up to end when the decoy is killed. Still doable, but maybe makes sense to just switch it to a fixed duration. Something like this:

decoys:
  icon: totem_of_undying{CustomModelData:18001}
  icon_disabled: totem_of_undying{CustomModelData:18002}
  legacy_icon: spell_icon:65
  legacy_icon_disabled: spell_icon_disabled:65
  disable_mana_regeneration: true
  quick_cast: true
  worth: 300
  requires: LibsDisguises
  actions:
    cast:
    - class: Vanish
    # The multiply action runs 5 copies of all of its actions, all at the same time
    - class: Multiply
      multiply: 5
      actions:
        # Spread action randomizes the target location within an 8-block radius
        - class: Spread
          radius: 8
          actions:
          # Spawn the decoy
          - class: SpawnEntity
            # Set the spawned mob as the target of the AOE action below
            set_target: true
            spawn:
            # This causes all mobs within a 32-block radius to focus on the decoy!
            - class: AreaOfEffect
              actions:
                - class: Aggro
  parameters:
    target: self
    cooldown: 30000
    cancel_on_damage: 0.5
    cancel_on_cast_other: true
    type: husk
    silent: true
    # This will copy equipment in the next dev build!
    disguise_target: self
    max_health: 20
    radius: 32
    undo: 15000
  costs:
    mana: 100
commented

and you are a beautiful programmer! even made sure to change it to husk from pigmen as to adapt for 1.16. Ya don't miss anything. Throwing this into spells.yml and spells folder to give it a run.

commented

works like a charm!

commented

I'm glad you like it! And thanks for the suggestions. I'm cleaning up the builtin Decoy now, and I'm going to make it an official spell in the Apprentice path.

I recently made it so spells can auto-disable if some dependency (like LibsDisguises) isn't there, so this is perfect. It's a fun spell, I'd like more people to see it.

commented

Yeah you could wrap that whole spell in like a Repeat + Spread to spawn a bunch of them in an area.

I like the idea of matching equipment though, I think I can do that!

commented

Decoy:
name: Decoy
description: Spawn decoys to confuse enemies
icon: gold_ingot
actions:
cast:
# The repeat action repeats its contained actions
# multiple times.
- class: Repeat
actions:
cast:
- class: Vanish
- class: SpawnEntity
actions:
- class: Undo
# The Retarget action updates the target location
# Otherwise each iteration of this Repeat would target
# the same location.
- class: Retarget
- class: Sphere
actions:
- class: ModifyBlock
# The delay action delays for some amount of time
# before letting the spell proceed on to the next actions
# This is often used inside of a Repeat action to make a spell
# animate over several ticks.
# without the Delay, the Repeat would run through its repetitions
# immediately.
- class: Delay
parameters:
target: self
cooldown: 30000
cancel_on_damage: 0.5
cancel_on_cast_other: true
type: pig_zombie
silent: true
disguise_target: self
max_health: 20
repeat: 100
# Delaying for 500 milliseconds (1/2 a second) in between each
# repeat, meaning this runs twice a second.
delay: 250
costs:
mana: 100
enabled: true

To repeat, would it look like this?

commented

I used the ML maker template for a repeating spell, and copy and pasted the decoy spell content from the default spells. I just don't see where it stops. Like does it just keep repeating till outta mana?