- Zones can be defined which will spawn a number of enemy sprites in them. The spawn locations are random within the zone. The spawn timer is configurable.
- Spawn zones can additionally have a "roaming zone" that defines where the enemy is allowed to move. If no roam zone is defined, a spawned enemy may move anywhere.
- Enemy sprites can be defined to have multiple possible "encounter parties", which are the enemy parties that the player will encounter in battle.
- Enemy sprites have an "aggression" where if the player gets within a certain distance, the enemy will actively seek out and "hunt" the player until colliding with the player (which triggers a battle), or the player escapes the aggression radius of the sprite (usually by running away), or the player gets outside of the enemy's roaming zone.
- Enemy sprites can be moved and manipulated the same as standard map sprites (in theory...I've never tested this but even if it doesn't work now, it should be easy to get it working).
Now I have a ton of ideas for how to expand upon this feature set to make it better, but to keep the discussion focused for now lets just talk about aggression. One of the ideas we had discussed and pretty much universally approved was the idea that an enemy's aggressive behavior toward the player is dynamic. In other words, sometimes enemies are more aggressive in hunting down the player and forcing them into battle, and other times they may choose to try and run from the player instead. Data that would factor into the aggression calculation would include: the average experience level of the party, whether or not the dungeon has been "cleared" or major boss enemies have been defeated, etc. We could literally alter the aggression of a dungeon by anything we wanted to, including events in the story that have occurred outside of the map in question.
Here's my initial proposal for how such a system could work.
1) Every dungeon has an aggression rating with a range from 1 to 100. The base aggression rating for every dungeon is 50. The higher this rating, the more aggressive enemies are in that dungeon. The lower the rating, the enemies will instead try to avoid contact with the player.
2) The aggression rating determines the aggression range. The aggression range is defined as a radius from each enemy sprite that the player needs to be within in order for the enemy to "notice" the player and take the appropriate aggression response.
3) The aggression range is broken up into sections. Each section corresponds to a different aggression range and aggression response. For example, we could do the following section breakup: #1: 1-20, #2: 21-40, #3: 41-60, #4: 61-80, and #5: 81-100. and these would be their responses:
#1: Avoid player, aggression range 10
#2: Avoid player, aggression range 5
#3: Engage player, aggression range 2
#4: Engage player, aggression range 5
#5: Engage player, aggression range 10
So that's the basic idea. There's still a lot of room left here to consider other changes as well. For example:
- Should aggression rating also have an effect on the movement speed of the enemy?
- Do we want aggression to optionally factor in line-of-sight (e.g., enemy does not act unless its facing toward the player)?
- Do we want aggression to optionally factor in sound (e.g. player running creates more sound than player walking)?
- Do we want to report the aggression level of the dungeon to the player in any capacity?
- Do we want to optionally allow individual enemies or spawn zones to have aggression ratings that are different from the current one on the map, or should aggression remain a global map value?
Yeah so, enemy map aggression. What's your take on it?