Floor refresh system - what is it and how does it work?
It's been in game for a long time, even in the old times, but people never could fully understand its working. So here is a complete explanation.
1. All tiles on the map can be marked as non-refreshable (default) or refreshable.
2. Non-refreshable tiles do not reset, not even during server save! Those tiles can save items for weeks. They can be refreshed only when a new map is loaded (so called "big map reset"), but that's very rare (may happen during updates).
3. Refreshable tiles always reset during server save AND a few times a day when server is running.
Thanks to our fansite, you can check which tiles are refreshable and which not: https://tibiantis.info/library/map
But keep in mind it's based on the 7.7 map, so might be inaccraute at some points (quite unlikely, but still).
When refresh happens, everything goes back to its original state: trash is deleted, items may spawn, monsters are put back to their homes etc. That also includes containers.
So how does the live-refreshing work?
Map is divided on sectors, each sector has a size of 32x32 tiles. There are around 10 thousands of sectors. Cylinder is a set of sectors of the same [x, y] coordinates but different floors. So each cylinder includes 1 to 16 sectors, as there are 16 possible floors. Surface of the map has width and height of 48 sectors (32x48 tiles). That gives total of 48x48=2304 cylinders.
When the server starts, so does the refreshing loop. Every minute 8 cylinders are refreshed. It starts in a left top corner and ends in the right bottom corner of the map, and then goes all over again. That means each part of the map refreshes at its own time, but the interval is 4h48min everywhere (2304/8 = 288 min). So if certain part refreshed at 9:40, it will refresh again at 14:28, 19:16, 00:04 and 04:52. And those hours will be repeated everyday, pretty much. Although this depends on server start time, so it may slightly vary if e.g. server save took a bit longer. And of course will change if for some reason (e.g. update) server was started at different hour.
To know at which hours refresh will come to a certain part, you only need to calculate the first refresh. And here, again, tibiantis.info will be helpful. Note the exact hour server has started, check the number of your cylinder, divide it by 8, and you will know how many minutes from server start to refresh in this place. For the next refreshes interval of 4h48min is always constant.
Preventing floor reset
Of course, during a refresh in a certain cylinder, only tiles marked with a 'refresh' flag are refreshed, not the whole map.
But it will not happen if at the moment of refresh there are any players nearby the sector. In that case refresh in the whole sector (not cylinder!) will be omitted, atleast until next refresh in 4h48min.
What does "nearby" mean though? It means a radius of 31 squares from a point [16,16] in sector.
So if, at the moment of refresh, any player is in dstance lower than 16 squares from that sector, it will not be refreshed.
But again - do not confuse cylinders with sectors. Cylinder means "sector multiplied by all floors", where each sector is only one floor.
Blocking refresh from other floors works exactly the same as blocking the respawn from other floors. If above condition about distance from sector is met, but you're on a different floor, then:
- if you're on the surface (floors 0 to +7), you block all 7 surface floors (0 to +7)
- if you're in the underground, you block from 2 floors below yours to 2 floors above yours (e.g. being on -3 you block floors from -5 to -1).
What you need to remember is:
- your lootbag will never disappear if you leave it on non-refreshable tile, no matter what! not even during SS! (tiles can be checked on tibiantis.info map)
- if left on refreshable tile your lootbag will not disappear when you're in distance shorter than 16 squares (that's a minimum to remember, but if you care to calculate you can maximize up to 48 squares)
- refresh time is not random, but can be estimated, and is quite the same everyday (unless server started at different hour)
That was all about refresh system and how it works.