Bug Closed · Resolved

fleeconditional ai goal not checking furniture auras

#4970 opened by Unknown 2 years ago

Unknownreported this bug

I am attempting the create an electric fence using auras that certain entities will flee from. The furniture has this skill

  FurnitureSkills:
  - Aura{auraName=ElectricFenceAura;duration=200} @SELF ~onTimer:200

I can use this debug skill, which does show the fences have the aura

debugaura:
  Cooldown: 1
  Conditions:
  - hasaura ElectricFenceAura true
  Skills:
  - message{m="Has ElectricFenceAura"} @PlayerByName{n=Doctor_JohnSmith}

However the flee conditional is not working when the fences have the aura, but do work when a player has the aura. It seems like the fleeconditional ai goal does not check furniture.

Below are the configs for the mob I'm testing with, and the fence furniture

ElectricTest:
  Type: WOLF     
  AIGoalSelectors:
  - clear
  - fleeConditional{distance=6;speed=10;safespeed=1;conditions=[  - hasaura{aura=ElectricFenceAura} ]}
  - meleeattack
  - randomstroll
  - lookatplayers
  - randomlookaround
  - float  
  AITargetSelectors:
  - clear
  Options:
    PreventOtherDrops: true
    Silent: true
    MovementSpeed: 0.2
  Modules:
    ThreatTable: true
electric_fence_straight:
  Id: PAPER
  ItemUpdater:
    Version: 3             
    PreserveStatRatio: true 
  Model: 10048
  Display: "Electric Fence"
  Type: FURNITURE
  Group: Electric Fence
  Recipes:
   SHAPED:
    Type: SHAPED
    Amount: 1
    Ingredients:
      - IRON_INGOT | REDSTONE | IRON_INGOT
      - IRON_INGOT | SMOOTH_STONE | IRON_INGOT
      - IRON_INGOT | SMOOTH_STONE | IRON_INGOT
  Options:
    PreventEnchanting: true
  Furniture:
    Material: PAPER
    Model: 10048
    Health: 3
    Type: DISPLAY
    Height: 3
    Width: 3
    Barriers:
    - 0,0,0
    - 0,1,0
    - 0,2,0
    - 1,0,0
    - 1,1,0
    - 1,2,0
    - -1,0,0
    - -1,1,0
    - -1,2,0
    Hitbox:
      Height: 1
      Width: 2
  FurnitureSkills:
  - Aura{auraName=ElectricFenceAura;duration=200} @SELF ~onTimer:200
#  - skill{s=debugaura} @self ~onTimer:20
Unknowncommented

Closing due to inactivity and major version changes since posting. If this issue is still present, re-open this issue with a modern-version server log, configs used to test and steps to reproduce.
This likely would be a Crucible issue to report, if it's confirmed that furniture can have/use auras correctly in the first place.

Sign in to join the discussion.