- This example shows how the Skeleton AI generally works for
- This example shows how the Skeleton AI generally works for
attacking. (minus all the fluff, such as randomly walking around).
attacking. (minus all the fluff, such as randomly walking around).
...
@@ -62,8 +62,9 @@ AI Goals, Targets, and Factions
...
@@ -62,8 +62,9 @@ AI Goals, Targets, and Factions
* As you see **clear** is always first, which in this case wipes the mobs AI so you have a clean slate to work with. This is important otherwise your AI may not function the way you would expect.
* As you see **clear** is always first, which in this case wipes the mobs AI so you have a clean slate to work with. This is important otherwise your AI may not function the way you would expect.
* Now lets say we want the skeleton to attack other mobs instead and we want him to use a melee attack instead of a ranged attack. See below for how we accomplish this.
* Now lets say we want the skeleton to attack other mobs instead and we want him to use a melee attack instead of a ranged attack. See below for how we accomplish this.
```yaml
DecayingSkeleton:
DecayingSkeleton:
Mobtype: skeleton
Type:skeleton
Display:'&aadecayingskeleton'
Display:'&aadecayingskeleton'
Health:15
Health:15
Damage:1
Damage:1
...
@@ -76,11 +77,12 @@ AI Goals, Targets, and Factions
...
@@ -76,11 +77,12 @@ AI Goals, Targets, and Factions
-hurtbytarget
-hurtbytarget
-otherfactionmonsters
-otherfactionmonsters
Equipment:
Equipment:
- COS_WoodSword:0
-COS_WoodSword HAND
Options:
Options:
FollowRange:10
FollowRange:10
MovementSpeed:0.2
MovementSpeed:0.2
PreventOtherDrops:true
PreventOtherDrops:true
```
- The skeleton AI now is programmed to attack other mobs, and any mobs
- The skeleton AI now is programmed to attack other mobs, and any mobs
that attack it first. In addition, it will use the melee attack
that attack it first. In addition, it will use the melee attack
...
@@ -115,15 +117,15 @@ Example 1: Guards attack nearby monsters
...
@@ -115,15 +117,15 @@ Example 1: Guards attack nearby monsters
<!-- -->
<!-- -->
```yaml
SummonedGuard1:
SummonedGuard1:
Mobtype: skeleton
Type:skeleton
Display:'&Eatownguard'
Display:'&Eatownguard'
Health:500
Health:500
Damage:5
Damage:5
Equipment:
Equipment:
- COS_StoneSword:0
-COS_StoneSword HAND
Options:
Options:
Disguise: villager
Despawn:true
Despawn:true
FollowRange:5
FollowRange:5
AlwaysShowName:false
AlwaysShowName:false
...
@@ -131,6 +133,8 @@ Example 1: Guards attack nearby monsters
...
@@ -131,6 +133,8 @@ Example 1: Guards attack nearby monsters
PreventOtherDrops:true
PreventOtherDrops:true
KnockbackResistance:1
KnockbackResistance:1
PreventMobKillDrops:true
PreventMobKillDrops:true
Disguise:villager
```
- So if we tie this mob to a mob spawner at our gates, he's going to
- So if we tie this mob to a mob spawner at our gates, he's going to
go attack all of our players in the town so we need to make some
go attack all of our players in the town so we need to make some
...
@@ -138,13 +142,14 @@ Example 1: Guards attack nearby monsters
...
@@ -138,13 +142,14 @@ Example 1: Guards attack nearby monsters
<!-- -->
<!-- -->
```yaml
SummonedGuard1:
SummonedGuard1:
Mobtype: skeleton
Type:skeleton
Display:'&Eatownguard'
Display:'&Eatownguard'
Health:500
Health:500
Damage:5
Damage:5
Equipment:
Equipment:
- COS_StoneSword:0
-COS_StoneSword HAND
Faction:Guard
Faction:Guard
AIGoalSelectors:
AIGoalSelectors:
-clear
-clear
...
@@ -155,7 +160,6 @@ Example 1: Guards attack nearby monsters
...
@@ -155,7 +160,6 @@ Example 1: Guards attack nearby monsters
-hurtbytarget
-hurtbytarget
-otherfactionmonsters
-otherfactionmonsters
Options:
Options:
Disguise: villager
Despawn:true
Despawn:true
FollowRange:5
FollowRange:5
AlwaysShowName:false
AlwaysShowName:false
...
@@ -163,6 +167,8 @@ Example 1: Guards attack nearby monsters
...
@@ -163,6 +167,8 @@ Example 1: Guards attack nearby monsters
PreventOtherDrops:true
PreventOtherDrops:true
KnockbackResistance:1
KnockbackResistance:1
PreventMobKillDrops:true
PreventMobKillDrops:true
Disguise:Villager
```
- Now the mob will target other factions containing monsters besides
- Now the mob will target other factions containing monsters besides
his own and will target anyone that hurts him (this will keep some
his own and will target anyone that hurts him (this will keep some
...
@@ -176,8 +182,9 @@ Example 1: Guards attack nearby monsters
...
@@ -176,8 +182,9 @@ Example 1: Guards attack nearby monsters
<!-- -->
<!-- -->
```yaml
DecayingSkeleton:
DecayingSkeleton:
Mobtype: skeleton
Type:skeleton
Display:'&aadecayingskeleton'
Display:'&aadecayingskeleton'
Health:15
Health:15
Damage:1
Damage:1
...
@@ -190,14 +197,15 @@ Example 1: Guards attack nearby monsters
...
@@ -190,14 +197,15 @@ Example 1: Guards attack nearby monsters
-hurtbytarget
-hurtbytarget
-players
-players
Equipment:
Equipment:
- COS_RawHead:4
-COS_RawHead HEAD
- COS_WoodSword:0
-COS_WoodSword HAND
Options:
Options:
Despawn:true
Despawn:true
FollowRange:10
FollowRange:10
AlwaysShowName:false
AlwaysShowName:false
MovementSpeed:0.2
MovementSpeed:0.2
PreventOtherDrops:true
PreventOtherDrops:true
```
- Our decaying skeleton is now in the Undead faction (different then
- Our decaying skeleton is now in the Undead faction (different then
the Guard faction) and so he will be attacked by the guard. Also, by
the Guard faction) and so he will be attacked by the guard. Also, by
...
@@ -236,8 +244,9 @@ Example 2: Orcs and Goblins attack each other
...
@@ -236,8 +244,9 @@ Example 2: Orcs and Goblins attack each other
<!-- -->
<!-- -->
```yaml
OrcCenturion:
OrcCenturion:
Mobtype: villagezombie
Type:villagezombie
Display:'&aanorccenturion'
Display:'&aanorccenturion'
Health:50
Health:50
Damage:4
Damage:4
...
@@ -252,11 +261,11 @@ Example 2: Orcs and Goblins attack each other
...
@@ -252,11 +261,11 @@ Example 2: Orcs and Goblins attack each other
-specificfactionmonsters Goblin
-specificfactionmonsters Goblin
-players
-players
Equipment:
Equipment:
- C_DeathfistSkullcap:4
-C_DeathfistSkullcap HEAD
- C_DeathfistTunic:3
-C_DeathfistTunic CHEST
- C_DeathfistLeggings:2
-C_DeathfistLeggings LEGS
- C_DeathfistBoots:1
-C_DeathfistBoots FEET
- COS_WoodSword:0
-COS_WoodSword HAND
Options:
Options:
Despawn:true
Despawn:true
FollowRange:10
FollowRange:10
...
@@ -266,9 +275,10 @@ Example 2: Orcs and Goblins attack each other
...
@@ -266,9 +275,10 @@ Example 2: Orcs and Goblins attack each other
PreventItemPickup:true
PreventItemPickup:true
KnockbackResistance:0.25
KnockbackResistance:0.25
PreventMobKillDrops:true
PreventMobKillDrops:true
```
```yaml
GoblinBattlemaster:
GoblinBattlemaster:
Mobtype: zombie
Type:zombie
Display:'&aagoblinbattlemaster'
Display:'&aagoblinbattlemaster'
Health:80
Health:80
Damage:4
Damage:4
...
@@ -283,13 +293,13 @@ Example 2: Orcs and Goblins attack each other
...
@@ -283,13 +293,13 @@ Example 2: Orcs and Goblins attack each other
-specificfactionmonsters Orcs
-specificfactionmonsters Orcs
-players
-players
Equipment:
Equipment:
- COS_BronzeHead:4
-COS_BronzeHead HEAD
- COS_BronzeChest:3
-COS_BronzeChest CHEST
- COS_BronzeLegs:2
-COS_BronzeLegs LEGS
- COS_BronzeFeet:1
-COS_BronzeFeet FEET
- COS_WoodAxe:0
-COS_WoodAxe HAND
Skills:
Skills:
- skillBashI ~onAttack >0 0.25
-skill{s=BashI} ~onAttack >0 0.25
Options:
Options:
Despawn:true
Despawn:true
FollowRange:10
FollowRange:10
...
@@ -299,7 +309,7 @@ Example 2: Orcs and Goblins attack each other
...
@@ -299,7 +309,7 @@ Example 2: Orcs and Goblins attack each other
PreventItemPickup:true
PreventItemPickup:true
KnockbackResistance:0.4
KnockbackResistance:0.4
PreventMobKillDrops:true
PreventMobKillDrops:true
```
- So there are a few things we've configured here of note.
- So there are a few things we've configured here of note.