Skip to content

Commit

Permalink
chore: FlexiblePathfinding migration follow-ups (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
skaldarnar committed Mar 6, 2022
1 parent 2f951cf commit ca190e0
Show file tree
Hide file tree
Showing 3 changed files with 125 additions and 124 deletions.
24 changes: 10 additions & 14 deletions assets/behaviors/lure.behavior
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
{
dynamic: [
{
guard: {
componentPresent: "Behaviors:FindNearbyPlayers",
values: ["N charactersWithinRange nonEmpty"],
child: {
{
guard: {
componentPresent: "Behaviors:FindNearbyPlayers",
values: ["N charactersWithinRange nonEmpty"],
child: {
sequence: [
{ sleep: {time: 0.1f }},
{ sleep: { time: 0.1f } },
check_luring_item_in_use,
followCharacter,
{ lookup: {tree: "Behaviors:follow" }}
]
}
}
},
{
lookup: {
tree: "Behaviors:stray"
{ lookup: { tree: "Behaviors:follow" } }
]
}
}
},
{ lookup: { tree: "Behaviors:stray" } }
]
}

120 changes: 62 additions & 58 deletions assets/prefabs/animals/deer.prefab
Original file line number Diff line number Diff line change
@@ -1,60 +1,26 @@
{
"skeletalmesh" : {
"mesh" : "deer",
"heightOffset" : -0.8,
"material" : "deerSkin",
"animation" : "deer#Idle",
"loop" : true
// -- Properties ----------------------------------------
"persisted": true,
// -- Components ----------------------------------------
"AliveCharacter": {},
"BaseRegen": {
"regenRate": 2,
"waitBeforeRegen": 10
},
"Behavior": {
"tree": "Behaviors:critter"
},
"FleeOnHit": {
"minDistance": 5,
"speedMultiplier": 1.2
},
"DropGrammar": {
"blockDrops": [],
"itemDrops": [
"0.7|WildAnimals:meat",
"0.3|WildAnimals:deerHide"
]
},
"Stand": {
"animationPool": [
"deer#Idle",
"deer#Idle",
"deer#Idle",
"deer#Bite_InPlace",
"deer#Yes",
"deer#No"
]
},
"Walk" :{
"animationPool": ["deer#Walk"]
},
"Die": {
"animationPool": [
"deer#Death"
"BoxShape": {
"extents": [
1.5,
1.5,
1.5
]
},
"persisted": true,
"location": {},
"Character": {},
"AliveCharacter": {},
"WildAnimal": {
"name": "Deer",
"icon": "WildAnimals:icons#Deer"
},
"NPCMovement": {},
"CreatureNameGenerator": {
"genderRatio": 0,
"nobility": 0,
"theme": "ANIMAL"
},
"CharacterMovement": {
"CharacterMovement": {
"speedMultiplier": 0.3,
"distanceBetweenFootsteps": 0.2,
"distanceBetweenFootsteps": 0.2,
"height": 1.6,
"radius": 0.3,
"jumpSpeed": 12
Expand All @@ -69,34 +35,72 @@
],
"footstepVolume": 0.03
},
"CreatureNameGenerator": {
"genderRatio": 0,
"nobility": 0,
"theme": "ANIMAL"
},
"DamageSound": {
"sounds": [
"DeerHit1",
"DeerHit2"
]
},
"Network": {},
"MinionMove": {},
"Die": {
"animationPool": [
"deer#Death"
]
},
"DropGrammar": {
"blockDrops": [],
"itemDrops": [
"0.7|WildAnimals:meat",
"0.3|WildAnimals:deerHide"
]
},
"FleeOnHit": {
"minDistance": 5,
"speedMultiplier": 1.2
},
"Health": {
"destroyEntityOnNoHealth": true,
"currentHealth": 50,
"maxHealth": 50
},
"BaseRegen": {
"regenRate": 2,
"waitBeforeRegen": 10
"Location": {},
"MinionMove": {
"movementTypes": ["walking", "leaping", "falling"]
},
"BoxShape": {
"extents": [
1.5,
1.5,
1.5
"Network": {},
"NPCMovement": {},
"SkeletalMesh" : {
"mesh" : "deer",
"heightOffset" : -0.8,
"material" : "deerSkin",
"animation" : "deer#Idle",
"loop" : true
},
"Stand": {
"animationPool": [
"deer#Idle",
"deer#Idle",
"deer#Idle",
"deer#Bite_InPlace",
"deer#Yes",
"deer#No"
]
},
"Trigger": {
"detectGroups": [
"engine:debris",
"engine:sensor"
]
},
"Walk" :{
"animationPool": ["deer#Walk"]
},
"WildAnimal": {
"name": "Deer",
"icon": "WildAnimals:icons#Deer"
}
}
105 changes: 53 additions & 52 deletions assets/prefabs/animals/sheepBase.prefab
Original file line number Diff line number Diff line change
@@ -1,48 +1,26 @@
{
"Behavior": {
"tree": "Behaviors:critter"
},
"FleeOnHit": {
"minDistance": 5,
"speedMultiplier": 1.2
},
"Stand": {
"animationPool": [
"sheep#Idle",
"sheep#Idle",
"sheep#Idle",
"sheep#Bite_InPlace",
"sheep#Yes",
"sheep#No"
]
// -- Properties ---
"persisted": true,
// -- Components ---
"AliveCharacter": {},
"BaseRegen": {
"regenRate": 2,
"waitBeforeRegen": 10
},
"Walk": {
"animationPool": [
"sheep#Walk"
]
"Behavior": {
"tree": "WildAnimals:lure"
},
"Die": {
"animationPool": [
"sheep#Death"
"BoxShape": {
"extents": [
1.5,
1.5,
1.5
]
},
"persisted": true,
"location": {},
"Character": {},
"AliveCharacter": {},
"WildAnimal": {
"name": "Sheep",
"icon": "WildAnimals:icons#Sheep"
},
"NPCMovement": {},
"CreatureNameGenerator": {
"genderRatio": 0,
"nobility": 0,
"theme": "ANIMAL"
},
"CharacterMovement": {
"CharacterMovement": {
"speedMultiplier": 0.3,
"distanceBetweenFootsteps": 0.2,
"distanceBetweenFootsteps": 0.2,
"height": 1.6,
"radius": 0.3,
"jumpSpeed": 12
Expand All @@ -57,28 +35,48 @@
],
"footstepVolume": 0.03
},
"CreatureNameGenerator": {
"genderRatio": 0,
"nobility": 0,
"theme": "ANIMAL"
},
"DamageSound": {
"sounds": [
"SheepHit1",
"SheepHit2"
]
},
"Network": {},
"MinionMove": {},
"Die": {
"animationPool": [
"sheep#Death"
]
},
"FindNearbyPlayers": {
"searchRadius": 12
},
"FleeOnHit": {
"minDistance": 5,
"speedMultiplier": 1.2
},
"Health": {
"destroyEntityOnNoHealth": true,
"currentHealth": 25,
"maxHealth": 25
},
"BaseRegen": {
"regenRate": 2,
"waitBeforeRegen": 10
"Location": {},
"MinionMove": {
"movementTypes": ["walking", "leaping", "falling"]
},
"BoxShape": {
"extents": [
1.5,
1.5,
1.5
"Network": {},
"NPCMovement": {},
"Stand": {
"animationPool": [
"sheep#Idle",
"sheep#Idle",
"sheep#Idle",
"sheep#Bite_InPlace",
"sheep#Yes",
"sheep#No"
]
},
"Trigger": {
Expand All @@ -87,10 +85,13 @@
"engine:sensor"
]
},
"Behavior": {
"tree": "WildAnimals:lure"
"Walk": {
"animationPool": [
"sheep#Walk"
]
},
"FindNearbyPlayers": {
"searchRadius": 12
"WildAnimal": {
"name": "Sheep",
"icon": "WildAnimals:icons#Sheep"
}
}

0 comments on commit ca190e0

Please sign in to comment.