New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Monsters should not spawn on unwalkable tiles #8300
Comments
This is how it works on official servers:
|
- When searching for a map-wide free cell, the tiles 15 cells from the edge are no longer considered * Added a configuration to change the edge size to any value between 4 and 40 - When searching for a free cell, the tiles 4-5 cells from the edge are now considered invalid and trigger a retry - Searching for a free cell now defaults to 50 tries, but if the "no spawn on player" option is active, those failed attempts are not counted towards the limit anymore - When a monster spawns in a defined area there will now be 9 attempts to spawn it on a valid cell within the area; if all 9 attempts fail, there will now be 50 tries to spawn it map-wide before it gives up - When a monster has fixed spawn coordinates, but those coordinates are a wall, it will now spawn in a random location map-wide instead - Fixes #8300
Further tests on spawns area:
Conclusion: The area for finding a spawn cell is one radius lower than we expected (1->1x1, 2->3x3, 3->5x5), but the "find spawn cell" code is actually called twice, which doubles the potential area but results in a much higher chance for center cells to be picked (1x1 stays 1x1, 3x3 becomes 5x5 with 3x3 focus, 5x5 becomes 9x9 with 5x5 focus). |
From further testing we found out that first randomization of the area already happens at server start. So for example on (3,3), at server start, each monster's center cell will be placed in a 5x5 area around the spawn center. And then each time the monster spawn, it will then be placed in a 5x5 around its own center cell. That's why the total possible area is 9x9, but until the next server restart, the same monster will still always respawn in a 5x5 area. The center cell can even be outside of the map. |
- When searching for a map-wide free cell, the tiles 15 cells from the edge are no longer considered * Added a configuration to change the edge size to any value between 1 and 40 - When searching for a free cell, the tiles 4-5 cells from the edge are now considered invalid and trigger a retry * If you make the edge size smaller than this, it will use edge size instead - Searching for a free cell now defaults to 50 tries, but if the "no spawn on player" option is active, those failed attempts are not counted towards the limit anymore - When a monster spawns in a defined area there will now be 8 attempts to spawn it on a valid cell within the area and then one attempt on the center cell; if all 9 attempts fail, there will now be 50 tries to spawn it map-wide before it gives up - When a monster has fixed spawn coordinates, but those coordinates are a wall, it will now spawn in a random location map-wide instead * This also applies to icewall blocking the cell unless the boss_monster command was used - Each monster in an area spawn will now receive its own spawn center within the spawn area on server start * This results in the spawn area being larger but having a bias towards the center * Added a configuration to disable this behavior - Fixed slave monsters always being active and constantly calling the "search freecell" function even though neither them nor their master have been spotted yet - Fixed map server crash when setting no_spawn_on_player to 100 (follow-up to 33b2b02) - Updated prontera field spawns to official episode 18+ - Updated all champion mob respawn times to 3 minutes and sorted them by map name - Fixes #8300
rAthena Hash
30928a0
Client Date
2021-11-03
Server Mode
Pre-Renewal
Result
Monsters spawn on unwalkable tiles, for example the Hydras in iz_dun03.
Relevant Log Output
No response
Expected Result
Monsters never spawn on walkable tiles, if no walkable tile could be found after a while (I assume it does a number of attempts), the monster is just spawned on a random location on the map instead.
For example there are ~30 hydras that spawn randomly on iz_dun03 instead of just 10.
How to Reproduce
Check spawns in iz_dun03.
Official Information
If you check iz_dun03, you will see that those fixed position Hydras that rAthena has are not there on any official server.
Modifications that may affect results
No response
The text was updated successfully, but these errors were encountered: