目录

阵营 Factions

自定义 生物 AI


MythicMobs 提供了在你的生物中对自定义生物 AI 进行编程的能力,这允许对生物如何攻击、他们选择攻击的目标以及其他动作进行大量额外的定制。

在以下部分中,我将提供一些示例,说明如何配置您可能希望在服务器上使用的几个常见场景。

玩家注意事项: 默认情况下,MythicMobs 使用权限系统让玩家被视为阵营的一部分。如果玩家有权限faction.(factionname),他们将被考虑在阵营中。 通过注册自定义阵营提供者,可以使用 API 覆盖此行为。

AI 目标、目标和阵营

  1. DecayingSkeleton:
  2.   Mobtype: skeleton
  3.   Display: '&aa decaying skeleton'
  4.   Health: 15
  5.   Damage: 1
  6.   Faction: Undead
  7.   AIGoalSelectors:
  8. - clear
  9. - arrowattack
  10.   AITargetSelectors:
  11. - clear
  12. - players
  13.   Options:
  14.   FollowRange: 10
  15.   MovementSpeed: 0.2
  16.   PreventOtherDrops: true

  1. DecayingSkeleton:
  2.   Mobtype: skeleton
  3.   Display: '&aa decaying skeleton'
  4.   Health: 15
  5.   Damage: 1
  6.   Faction: Undead
  7.   AIGoalSelectors:
  8. - clear
  9. - meleeattack
  10.   AITargetSelectors:
  11. - clear
  12. - hurtbytarget
  13. - otherfactionmonsters
  14.   Equipment:
  15. - COS_WoodSword:0
  16.   Options:
  17.   FollowRange: 10
  18.   MovementSpeed: 0.2
  19.   PreventOtherDrops: true

示例 1:守卫攻击附近的怪物

  1. SummonedGuard1:
  2.   Mobtype: skeleton
  3.   Display: '&Ea town guard'
  4.   Health: 500
  5.   Damage: 5
  6.   Equipment:
  7. - COS_StoneSword:0
  8.   Options:
  9.   Disguise: villager
  10.   Despawn: true
  11.   FollowRange: 5
  12.   AlwaysShowName: false
  13.   MovementSpeed: 0.35
  14.   PreventOtherDrops: true
  15.   KnockbackResistance: 1
  16.   PreventMobKillDrops: true
  1. SummonedGuard1:
  2.   Mobtype: skeleton
  3.   Display: '&Ea town guard'
  4.   Health: 500
  5.   Damage: 5
  6.   Equipment:
  7. - COS_StoneSword:0
  8.   Faction: Guard
  9.   AIGoalSelectors:
  10. - clear
  11. - opendoors
  12. - meleeattack
  13.   AITargetSelectors:
  14. - clear
  15. - hurtbytarget
  16. - otherfactionmonsters
  17.   Options:
  18.   Disguise: villager
  19.   Despawn: true
  20.   FollowRange: 5
  21.   AlwaysShowName: false
  22.   MovementSpeed: 0.35
  23.   PreventOtherDrops: true
  24.   KnockbackResistance: 1
  25.   PreventMobKillDrops: true
  1. DecayingSkeleton:
  2.   Mobtype: skeleton
  3.   Display: '&aa decaying skeleton'
  4.   Health: 15
  5.   Damage: 1
  6.   Faction: Undead
  7.   AIGoalSelectors:
  8. - clear
  9. - meleeattack
  10.   AITargetSelectors:
  11. - clear
  12. - hurtbytarget
  13. - players
  14.   Equipment:
  15. - COS_RawHead:4
  16. - COS_WoodSword:0
  17.   Options:
  18.   Despawn: true
  19.   FollowRange: 10
  20.   AlwaysShowName: false
  21.   MovementSpeed: 0.2
  22.   PreventOtherDrops: true

示例 2:兽人和地精互相攻击

  1. 兽人百夫长:
  2.   Mobtype: villagezombie
  3.   Display: '&aan 兽人百夫长'
  4.   Health: 50
  5.   Damage: 4
  6.   Faction: Orcs
  7.   AIGoalSelectors:
  8. - clear
  9. - opendoors
  10. - meleeattack
  11.   AITargetSelectors:
  12. - clear
  13. - hurtbytarget
  14. - specificfactionmonsters Goblin
  15. - players
  16.   Equipment:
  17. - C_DeathfistSkullcap:4
  18. - C_DeathfistTunic:3
  19. - C_DeathfistLeggings:2
  20. - C_DeathfistBoots:1
  21. - COS_WoodSword:0
  22.   Options:
  23.   Despawn: true
  24.   FollowRange: 10
  25.   AlwaysShowName: false
  26.   MovementSpeed: 0.25
  27.   PreventOtherDrops: true
  28.   PreventItemPickup: true
  29.   KnockbackResistance: 0.25
  30.   PreventMobKillDrops: true
  31.  
  32. 地精斗士:
  33.   Mobtype: zombie
  34.   Display: '&aa 地精斗士'
  35.   Health: 80
  36.   Damage: 4
  37.   Faction: Goblin
  38.   AIGoalSelectors:
  39. - clear
  40. - opendoors
  41. - meleeattack
  42.   AITargetSelectors:
  43. - clear
  44. - hurtbytarget
  45. - specificfactionmonsters Orcs
  46. - players
  47.   Equipment:
  48. - COS_BronzeHead:4
  49. - COS_BronzeChest:3
  50. - COS_BronzeLegs:2
  51. - COS_BronzeFeet:1
  52. - COS_WoodAxe:0
  53.   Skills:
  54. - skill BashI ~onAttack >0 0.25
  55.   Options:
  56.   Despawn: true
  57.   FollowRange: 10
  58.   AlwaysShowName: false
  59.   MovementSpeed: 0.25
  60.   PreventOtherDrops: true
  61.   PreventItemPickup: true
  62.   KnockbackResistance: 0.4
  63.   PreventMobKillDrops: true