Magic

Magic

190k Downloads

[Bug] Display name of Wand Item, Effects display name of Spells. + Lore on spells not working

Ash10744 opened this issue · 9 comments

commented

Version: Magic-10.8.1
Server Version:
image

Config of Wand:

# This is the key name of this wand
# It must be unique across the server, and is used in commands such as /wand and /mgive to refer to this wand.
Fluffys_Cake:
  # These track who created what spells, you can remove them if you want
  creator: Ash10744
  creator_id: 1ca75b77-6280-4eb3-8c86-58cf8ff13d8e
  # Name and description may be added here and will appear in lore for this wand.
  name: Fluffos Cake
  description: Don't eat it
  display_name: §8[§5Unique§d+§8] §5Fluffos Cake
  lore:
    - §8―――――――――――――――――――――――§d―――§8―――――――――――――――――――――――
    - §eA Magical Staff of the Fluffy
    - §8―――――――――――――――――――――――§d―――§8―――――――――――――――――――――――
    - '§cMana: §3$mana'
    - '&CCurrent Spell: §f$spell'
    - §8―――――――――――――――――――――――§d―――§8―――――――――――――――――――――――
  # Inherit from the base_wand template to get basic wand functionality
  # Such as spell inventory and key bindings
  # Other options include: basic_wand, base_bound, base_magic
  inherit: base_wand
  # Choose an icon, this is the item the wand will appear as
  icon: Crossbow{CustomModelData:10010}
  # Give the wand some mana for casting
  mana_max: 5000
  mana: 5000
  # The wand regenerates this amount of mana every second
  mana_regeneration: 5000
  # Give the wand some spells to cast
  spells: []

Config of Spell:

# This is the key name of this spell
# It must be unique across the server, and is used in configs and commands such as /mage, /wand and /mgive
# to refer to this spell.
spark:
  # These track who created what spells, you can remove them if you want
  creator: Ash10744
  creator_id: 1ca75b77-6280-4eb3-8c86-58cf8ff13d8e
  # Name and description may be added here and will appear in lore for this spell.
  name: §8[§dSpell§8] §6Spark
  description: The user conjures forth a spark to cause light.
  lore:
  - §8test
  - '§8%xp%'
  # Choose an icon, used when showing this spell in a wand inventory.
  icon: meteor
  category: combat
  worth: 0
  earns: 0
  cooldown: 10
  upgrade: true
  actions:
      cast:
      -  class: EntitySelect
         actions:
         -  class: CustomProjectile
  effects:
      cast:
      -  class: EffectSingle
         sound: entity_generic_burn
         location: origin
         color_override: color_override
         effectlib:
           class: ConeEffect
           particle: flame
           lengthGrow: 0.1
           radiusGrow: 0.003
           updateLocations: false
           updateDirections: false
  parameters:
      allow_max_range: true
      velocity: 200
      range: 8
      hitbox: true
      target_type: Damageable
      player_damage: 2
      entity_damage: 4
      target_breakables: 1
      cooldown: 15 seconds
      reorient: false
      destructible: solid
      destructible_durability: 50
      break_durability: 2
      undo: 10000
  costs:
      mana: 

Bug Proof:
The Spell with the display name on the wand:
image

The spell without a display name on a wand:
image

I also found it works fine if the spell is in my inventory not on my Hotbar. So I believe this to be a bug.

The lore on the spell doesn't also display properly I am unsure if I have done something wrong but it won't display properly despite the wand I am using.

commented

If I'm understanding what you're saying, this is intentional. Otherwise when you switch spells by using the hotbar it will look very glitchy as Minecraft wants to show the name of the spell for a brief moment.

This is why all the spells in your hotbar are usually renamed to include the wand name.

When using a fixed display name for the wand, it doesn't show the spell name and so has to resort to renaming all of the spells to be just the wand name.

It's possible I could change this for wands that don't use inventory mode or other special cases, but that is the reasoning behind what's going, let me know if that does not make sense.

commented

Yeah what I am saying is I am trying to rename the spells to be different and not include the wand name, is that possible or?

commented

No, because it will cause the UI to glitch out.

I can leave this ticket open and add a way but you probably won't want to use inventory mode in that way.

commented

Ah okay, I will see if I can reformat the name, and the lore on the spells is that the same? Or can that be solved?

commented

Spells don't support custom lore.

commented

For spell lore, you can use description then I think you could turn off all the auto-lore via messages.yml, that'd turn them off for all spells in the game though.

commented

Alright yeah thanks for the help if there is a way that could be implemented that'd be fantastic 😀

(The naming of spells mainly)

commented

Alright I will look to see if I can do that. We are limiting spells on my server so it's all manually added to a wand for a player. So it wouldn't really matter about all the lore stopping as long as I could essentially do custom lore. For each one I have created

commented

The next dev build (https://jenkins.elmakers.com) will have a new wand parameter spells_use_wand_name: false to use the bare spell names, as well as support for a lore string list on spells to replace the autogenerated lore.