Link to epic - https://.myjetbrains.com/youtrack/issue/-1997/Epic-Enkauntery
Encounters are enemies that suddenly appear when traveling around the world. Some may be aggressive initially, and some will first begin a dialogue with the player, and depending on the outcome of the dialogue, it is determined whether the player will fight or disperse peacefully.
Encounters are random enemies that spawn every N minutes with a certain chance
The type of mob depends on the location where the player is located
Mobs will spawn anywhere
For example, in a city (where supposedly it should be safe) a robber may spawn and attack the player
Mob spawn distance - radius from N to M meters
Depending on the mob, the corresponding drop drops with certain chances
Some mobs can trigger dialogues, depending on the answers there will be different consequences
0.3 Terminology
Encounters are minor mobs found in the world.
Mob - enemy NPC
Spawn - creating a mob
Agr - the state of a mob in which it is hostile to the player
1. Description
1.1. General description of mechanics
Encounters are enemy mobs that spawn every N seconds with a M% chance, the timer is updated instantly when an enemy spawns.
The type and characteristics of the spawning mob depend on the territory on the map where the player is located.
1.2. Mob container
Each territory has a Mob Container, from which mobs for spawn are taken with a certain chance. Each element in the container has an array with stored mobs ( that is, 3 mobs that interact with each other can spawn at one time ).
Add a caption...
1.3. Starting a dialogue
Some encounters can trigger dialogues when colliding with a player
Encounters at spawn are in aggro mode, except for those who can start dialogues. Whether to enter the agra state or not depends on the outcome of the dialogue.
The outcome of the dialogue depends on the player's chosen answer:
A peaceful answer - the player and the mobs disperse. The mob goes in the opposite direction from where the player was coming, and when it reaches N meters, the mob is removed.
Additionally, some mechanics may be tied to the answer.
If the mechanics are related to issuing an item to an NPC, then the item that the player gave during the dialogue is placed in the NPC’s inventory.
Note A robber runs up to the player and asks for money, the player can choose the answer in which he gives the money and they disperse, or start a fight. When killing a robber, the player can take back the money he gave to the robber.
When you aggro again (for example, hit), a battle ensues.
Combat response - starting the battle.
1.4. Settings fields
General settings:
Mob spawn timer
Seconds, float
Spawn radius from player
Random float in range (N to M)
Chance of spawning
0-100%
Container settings fields:
Array with container elements
Element ID
Element weight
Array with mobs
Mob type
Mob characteristics (override to change mob stats)
Rank
Level
Loot container
Dialogue
Not selected - the dialogue will not start.
The mob's rank is normal/elite/boss, reflecting the mob's power category. They can be highlighted with special icons or visuals.
Mob level - characteristic of a mob “under the hood”, not displayed to the player, needed to balance the characteristics of the mob. Depending on the level of the mob, its characteristics change (attributes, health, damage, etc.)