Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Miner Threat AI planner
- This file outlines how the enemies will behave in relation to the player. States are decided while
- playing, and traits are specific to the enemy type. Using this method, simply by setting the traits
- of the enemies. The only trait that will change on runtime is hostility, simply due to being shot.
- AI States
- 1 Asleep (Must be shot, hear shot nearby, or get touched by player to wake)
- 2 In Territory
- 3 Mood (Angry, Aggravated, or Calm)
- State Explanations
- 1
- If asleep, enemy will not do anything. If woken up by being attacked, they
- are guaranteed to be angry.
- 2
- Weather or not the enemy is within its own territory. If it is, it has a bonus
- attack multiplier of 1 + hostility level / 10.
- 3
- Willingness to attack player. Angry and aggravated both mean that they will shoot
- the player, but natural hostility means automatically angry instead of aggravated.
- Getting shot by the player sets it to either angry or aggravated depending on
- natural hostility.
- AI Traits (From 0 - 10)
- 1 Hostility Level
- 2 Territorial
- 3 Trigger-happy Level
- 4 Movement speed
- 5 HP
- 6 Naturally Hostile (Yes or no)
- 7 Hearing ability
- Trait Effects
- 1
- Willingness to attack player unprovoked; 0 means will not attack unless
- attacked by player. Number is the distance in which the enemy will attack
- the player. If territorial, this will be 0; unless the enemy is hurt. In
- which case, it will be 5 if aggravated, 8 if angry.
- 2
- Area around the enemy in which they will become aggravated. Naturally hostile
- enemies will not be angry upon entering territory. Once the player leaves
- their territory, they will go back to being calm; unless naturally hostile.
- 3
- Interval in between pulling trigger. Formula for calculating the fire rate
- is fire rate = gun ROF * (10 - trigger-happy level)
- 4
- How fast the enemy moves in pixels per frame. A 50% bonus is active while
- an enemy is angry, not aggravated.
- 5
- The base HP for the enemy.
- 6
- Weather they get angry or aggravated when the opportunity arises.
- 7
- How far the enemy can hear to be woken up. If 0, the enemy is deaf and therefore
- can only be woken up by being touched.
- Rules
- 1 Hostility level cannot be above 0 if territorial UNLESS angry or aggravated
- 2 Cannot be angry unless either woken up or naturally hostile
- 3 Getting hurt results in either permanent anger or aggravation
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement