In this update:
1) NPC habitat areas
Added habitat areas for NPCs that have their own population system and math logic.
The current population determines how many mobs can spawn at a given moment. That means: the more you kill, the fewer can spawn. If only 1 NPC remains, then the maximum that can spawn is also 1.
A weight value was also added for each NPC.
When the last NPC is killed, the habitat area disappears.
New habitats, their expansion, additional detail, and dens/lairs will be added later.
2) Surface scaling & detailing system (based on height differences)
Next comes a surface scaling and detailing system depending on level/height differences.
How it works: from a single surface tile visible on the travel map, a 27×27 chunk is generated. It also expands depending on neighboring chunks. If a neighboring chunk is already generated, the system uses it as a reference and adapts. If it hasn’t been generated yet, it uses the chunk’s level as the reference.
Height differences can vary — by one level or by several levels.
Level 1 difference: when neighboring surface types meet, for example plains and forest, or river and shore.
Level 2 difference: when one surface type is skipped, e.g. not river → shore, but directly river → plains.
I have implemented level 1–2 differences relatively well, although I will keep improving them.
Level 3 differences are not implemented yet — it will be noticeable on the map, for example when a forest is located next to water.
Minor updates & fixes:
Fixed coroutine errors in the main menu.
Fixed a bug when scaling the world map.
Fixed an issue allowing movement through diagonal walls.
Fixed clipping into textures when leaving combat mode.
Added smooth transitions between music tracks and other sounds.
Added detailed audio settings.
Added the ability to exit settings using KeyCode.Escape.
Movement speed is no longer dependent on FPS.
NPCs can no longer spawn in restricted movement areas (P.S. water).
NPCs can no longer spawn in settlements.
Fixed an issue with overlapping Esc input.
Added a window and basic structure for the “Beginner’s Guide” window.
Added logic, an info window, and a test notification.
Fixed a bug where the player could walk into walls in travel mode.
Fixed a bug that could break travel mode.
Temporarily removed world rotation in travel mode.
Added a window and basic structure for the “What’s New!” window.

