Magic

Magic

190k Downloads

(BUG) ChangeContext Parameter Target_location/Source_location does not accept placeholders in x,y,z format

I0nTech opened this issue ยท 0 comments

commented

With the target_location: x,y,z and source_location: x,y,z changecontext parameters, neither accepts placeholders in the fields for some reason, which makes creating spells which pass locations to component spells to target/originate from nearly impossible.

For example:

test18:
  name: Fire Projectile at Location
  creator: IonTech
  creator_id: e14876ba-5a6f-45b9-a01a-b8a30a2961aa
  actions:
    cast:
    - class: ChangeContext
      actions:
        - class: Message
          message: $target_location_x,$target_location_y,$target_location_z
        - class: Explosion
        - class: CustomProjectile
          target: other
          actions:
            - class: Damage
  effects:
    tick:
      - location: target
        particle: redstone
        particle_count: 1
        particle_offset: 0
  parameters:
    target: any
    target_location: 0,100,0
    damage: 5

This works, but having it parse target_location: $target_location_x,$target_location_y,$target_location_z will not target the those coordinates, even if it looks like it does - this can be shown with another spell which casts this spell as a component

test26:
  name: Fire custom projectile at all targets in AOE
  description: 
  icon: green_dye{18001}
  actions:
    cast:
    - class: AreaOfEffect
      actions:
        - class: Asynchronous
          actions:
          - class: PlayEffects
            effects: targeted
          - class: Message
            message: $target_location_x,$target_location_y,$target_location_z
          - class: ChangeContext
            target_caster: true
            actions:
            - class: Cast
              spell: test18
              spell_parameters:
                target_location: $target_location_x,$target_location_y,$target_location_z
  effects:
    tick:
      - location: target
        particle: composter
        particle_count: 1
        particle_offset: 0
    targeted:
      - location: target
        particle: falling_dust
        material: redstone_block
        particle_count: 5
        particle_offset: 0.3,0.5,0.3
  parameters:
    target: self
    target_type: Damageable
    radius: 12

If this issue can be fixed, (just need ChangeContext to accept placeholders,) it'd be so greatly appreciated so I can finally have spells which are comprehensible and not 300 lines long. Would also allow reusing logic rather than needing to update every spell when I make a change.