• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Solved Cap values incorrect after recompile

Queb

New Member
Joined
Mar 3, 2020
Messages
1
Reaction score
0
So I've been running this tfs 1.2 version with the precompiled .exe file provided.


Old .exe
The Forgotten Server 8.0 - Version 1.2
Compiled with Microsoft Visual C++ version 1932
Compiled on Oct 4 2022 17:44:49 for platform x64

New .exe
The Forgotten Server 8.0 - Version 1.2
Compiled with Microsoft Visual C++ version 14.0
Compiled on Jun 28 2026 09:50:34 for platform x64

But I noticed the edges of pyramids don't work as intended so I changed = to |= in
items.cpp.

C++:
                it.floorChange |= TILESTATE_FLOORCHANGE_DOWN;
            } else if (tmpStrValue == "north") {
                it.floorChange |= TILESTATE_FLOORCHANGE_NORTH;
            } else if (tmpStrValue == "south") {
                it.floorChange |= TILESTATE_FLOORCHANGE_SOUTH;
            } else if (tmpStrValue == "southalt") {
                it.floorChange |= TILESTATE_FLOORCHANGE_SOUTH_ALT;
            } else if (tmpStrValue == "west") {
                it.floorChange |= TILESTATE_FLOORCHANGE_WEST;
            } else if (tmpStrValue == "east") {
                it.floorChange |= TILESTATE_FLOORCHANGE_EAST;
            } else if (tmpStrValue == "eastalt") {
                it.floorChange |= TILESTATE_FLOORCHANGE_EAST_ALT;
and recompiled with the source provided. But after recompiling my cap value is all over the place. It says my cap is 2295 in the database but in client after recompiling it shows up as wild numbers like 32892 in the client. and if I pick up items, like a backpack weighing 1000 oz my available cap increases to 38k. What could be the issue here?

SOLVED:
changed msg.add<uint16_t>(player->getFreeCapacity()); to msg.add<uint32_t>(player->getFreeCapacity()); in protocolgame.cpp.
in otcv8 client features.lua I added this

LUA:
if(version >= 770) then
    g_game.enableFeature(GameLooktypeU16)
    g_game.enableFeature(GameMessageStatements)
    g_game.enableFeature(GameLoginPacketEncryption)
    g_game.enableFeature(GameDoubleFreeCapacity) -- added this
end
 
Last edited:
Back
Top