v0.8.9 (Bugfixes + translations) released to Google Play!

Useful links
Source code of the game - Contribution guide - ATCS Editor - Translate the game on Weblate - Example walkthrough - Andor's Trail Directory - Join the Discord
Get the game (v0.8.9) from Google, F-Droid, our server, or itch.io

Respawn Timers

A place for general discussion about the content and gameplay of Andor's Trail.
Post Reply
ArcAngL
Posts: 63
Joined: Sat Mar 19, 2011 12:51 pm
Location: Rockford. IL

Respawn Timers

Post by ArcAngL »

I don't suppose anyone knows the respawn system in detail? For example I don't like to leave the gargoyle trainers and I almost literally pitch a tent and light a campfire every time I clear their area. It takes roughly 2-5 mins for them to spawn and I've noticed that I have to sit in specific areas if I want them to spawn. I don't know if this is something that can be found in the code or not but does anyone know
1) their specific spawn time
2) the distance from them that you have to be to allow them to spawn?

Id like to break this down to a science if we can. I know resting in a bed resets the spawns but again that's too much traveling if you plan on camping a specific set of spawns.
Level: 34
Experience: 689808
AP Cost: 3
Atk Chance: 146%
Atk Damage: 20-21
Crit Chance: 25%
Crit Multiplier: 3
Block Chance: 51%

Updated: 4/15/11
Droid X 2.3.3 Gingerbread (Leaked "official" non-rooted manual install )
Samuel
VIP
Posts: 655
Joined: Wed Feb 23, 2011 3:35 pm
android_version: 2.2

Re: Respawn Timers

Post by Samuel »

As the source code is open, here are the answers:
0) If you do not visit a place for 3 minutes all monsters are respawned. (or if you slept in bed before revisiting the place)

Code: Select all

public static final long MAP_UNVISITED_RESPAWN_DURATION_MS = 3 * 60 * 1000; // 3 min in milliseconds
1) If I got it right there is a chance of 1% per respawn area that one monster respawns in it after each 0.5 seconds.
So to maximize the number of respawned monsters you should enter a map with many respawn areas in it.

2) Monsters could not spawn directly on players, other monsters, obstacles and "event objects".
The game tries to spawn a monster 100 times until there is nothing in the way anymore.
If there is something in the way 100 times in a row spawning is aborted.

Code: Select all

public Coord getRandomFreePosition(CoordRect area, Size requiredSize, Coord playerPosition) { 
    CoordRect p = new CoordRect(requiredSize);
    for(int i = 0; i < 100; ++i) {
        p.topLeft.set(
            area.topLeft.x + Constants.rnd.nextInt(area.size.width)
            ,area.topLeft.y + Constants.rnd.nextInt(area.size.height));
        if (!monsterCanMoveTo(p)) continue;
        if (playerPosition != null && p.contains(playerPosition)) continue;
        return p.topLeft;
    }
    return null; // Couldn't find a free spot.
}
So you could slightly (something around 0.0001%) increase monster respawn rate when keeping away from respawn areas.
It would also slightly increase the rate when you kill all monsters in the respawn area.
Last edited by Samuel on Sun Mar 20, 2011 10:51 pm, edited 1 time in total.
Level: 101, XP: 18780586, Gold: 358739
HP: 398, AC: 303%, AD: 84-95, AP: 4, ECC: 12, CM: -, BC: 13%, DR: 0
RoLS: 2, ElyR: 1, RoL: 1, ChaR: 1, GoLF: 1, ShaF: 1, SRoV: 2, VSH: 1, WMC: 0, GoW: 0
ArcAngL
Posts: 63
Joined: Sat Mar 19, 2011 12:51 pm
Location: Rockford. IL

Re: Respawn Timers

Post by ArcAngL »

Beautiful. This will help greatly. Thank you very much.
Level: 34
Experience: 689808
AP Cost: 3
Atk Chance: 146%
Atk Damage: 20-21
Crit Chance: 25%
Crit Multiplier: 3
Block Chance: 51%

Updated: 4/15/11
Droid X 2.3.3 Gingerbread (Leaked "official" non-rooted manual install )
Samuel
VIP
Posts: 655
Joined: Wed Feb 23, 2011 3:35 pm
android_version: 2.2

Re: Respawn Timers

Post by Samuel »

Additional infos:
3) Chance to respawn seems to be 1% each 0.5 seconds. (Corrected it above.)
4) Monsters only respawn on the current visible map
5) Monsters do not respawn in the menu or when you fight.
6) Monsters do not respawn if the maximum number of monsters per spawn area was reached. (usually 1, sometimes 3 or 4) -> so kill spawned monsters quickly

There are 3 rooms in the gargoyle cave.
Room 1 has 4 respawn areas with gargoyle trainers. (maximum of 6 gargoyle trainers can respawn here)
Room 2 has 2 respawn areas with gargoyle trainers. (maximum of 2 gargoyle trainers can respawn here)
Room 3 has 4 respawn areas with gargoyle trainers. (maximum of 6 gargoyle trainers can respawn here)

a) With a resting-tactic you may kill 14 trainers each turn. (do it 495 times to get a 50% chance to get the ring)
b) With a "kill all respawned trainers"-tactic, on room 3 there will respawn a trainer every 12.8 seconds. (results in 14 kills in 3 minutes)
After 3 minutes you may clear the other 2 rooms. (+8 kills) -> total of 22 kills per 3.x minutes [x comes from time to fight, move, heal etc.]
(do it 315 times to get a 50% chance to get the ring)

Tactic b would last around 16 + x hours.
Tactic a would have a movement time from around 2 minutes. So it would last around 16.5 + x hours.

Math is fun. ;-)
Level: 101, XP: 18780586, Gold: 358739
HP: 398, AC: 303%, AD: 84-95, AP: 4, ECC: 12, CM: -, BC: 13%, DR: 0
RoLS: 2, ElyR: 1, RoL: 1, ChaR: 1, GoLF: 1, ShaF: 1, SRoV: 2, VSH: 1, WMC: 0, GoW: 0
Post Reply