Conversation
Utility to edit the refreshable areas of the map
|
I don't know which approach is better - to use a bit in the tilestate like you did for Any pros and cons in any of the approaches, opinions? |
|
@Tofame if(save_tile->getMapFlags()) {
f.addByte(OTBM_ATTR_TILE_FLAGS);
f.addU32(save_tile->getMapFlags());
}but the map flags are stored in 16 bit format uint16_t mapFlags = tile->getMapFlags();and in that u16, currently there are 12 bits in that are not even used, namely:
which means that the standard zones can and should be placed on these bits this is how I put them to use in my private fork: OTBM_TILEFLAG_NONE, // default
OTBM_TILEFLAG_PROTECTIONZONE = 1 << 0, // protection zone
OTBM_TILEFLAG_DEPRECATED = 1 << 1, // possibly former house tile
OTBM_TILEFLAG_NOPVP = 1 << 2, // non-pvp zone
OTBM_TILEFLAG_NOLOGOUT = 1 << 3, // no-logout area
OTBM_TILEFLAG_PVPZONE = 1 << 4, // pvp zone
OTBM_TILEFLAG_REFRESH = 1 << 5, // refresh tiles as in rl
OTBM_TILEFLAG_RESTINGAREA = 1 << 6, // resting area (not necessarily PZ)
OTBM_TILEFLAG_WALKTHROUGH = 1 << 7, // a special zone that allows walkthrough like PZ (except for special floors like depot tiles)
OTBM_TILEFLAG_NOSUMMONS = 1 << 8, // area where summons are disallowed
OTBM_TILEFLAG_UNREACHABLE = 1 << 9, // areas not reachable by player (eg. monsters behind teleports in tp room)even after adding these zones, there are still two bytes that are not used @Corlyone Regarding your PR: only thing that bothers me is that the color looks too similar to house tile brush, I recommend a more distinct one, eg: |
|
Community are welcome to implement any changes that think are good. I did the pull to see how "active" this community is, But from April to August... hmmm it took ages. I can add more pulls, for example, to improve the loading of maps (like 300MB maps loading in just 20 seconds), another like position paste related fixes. But if community as not active. How we can manage fixes for this. Greetings. |
@Zbizu I've tested it and can confirm it works. Should be merged with this color you suggested (works way better, the other one is the exact same as house tile) |


Utility to edit the refreshable areas of the map
For those people who have converted maps like Nostalrius 7.7 or want to add refreshable areas feature like in the original game