• 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!

C++ Change Items.otbm Version

Na Amigo

The crazy girl
Joined
Jun 5, 2017
Messages
254
Solutions
3
Reaction score
18
Location
Egypt
i was have some ancient xml source with protocol 7.92 i converted it to 8.10 but there's some problem
i got some error at console says
Code:
:: Loading items.otb... Not supported items.otb version.
Error: Unable to load data/items/items.otb!
here is the required lines of items.cpp
C++:
    if(Items::dwMajorVersion != 8){
        std::cout << "Not supported items.otb version." << std::endl;
        return ERROR_INVALID_FORMAT;
    }
 
    if(Items::dwMajorVersion == 0xFFFFFFFF){
        std::cout << "[Warning] Items::loadFromOtb items.otb using generic client version." << std::endl;
    }
    else if(Items::dwMinorVersion != CLIENT_VERSION_810){
        std::cout << "Not supported items.otb client version." << std::endl;
        return ERROR_INVALID_FORMAT;
    }
here is the required lines of itemsloader.h
C++:
/////////OTB specific//////////////
enum clientVersion_t{
    CLIENT_VERSION_750 = 1,
    CLIENT_VERSION_755 = 2,
    CLIENT_VERSION_760 = 3,
    CLIENT_VERSION_770 = 3,
    CLIENT_VERSION_780 = 4,
    CLIENT_VERSION_790 = 5,
    CLIENT_VERSION_792 = 6,
    CLIENT_VERSION_800 = 7,
    CLIENT_VERSION_810 = 8
};
i want change the items.otb to 8.10 from my source
 
Last edited:
that's all
C++:
if(Items::dwMajorVersion != 8){
       std::cout << "Not supported items.otb version." << std::endl;
        return ERROR_INVALID_FORMAT
 }

should works
 
that's all
C++:
if(Items::dwMajorVersion != 8){
       std::cout << "Not supported items.otb version." << std::endl;
        return ERROR_INVALID_FORMAT
 }

should works
it's not working but while i put the items.otb of tibia 800 it's work
and here's a message
Code:
Warning: [OTBM loader] This map needs an updated items OTB file.
:: Map size: 3361x2048
FATAL: Failed to create an object. Code: 1145262
 
Last edited:
basically comment out whole check version of items if you can't get around it.
i've do it but this message appear
Code:
Warning: [OTBM loader] This map needs an updated items OTB file.
:: Map size: 3361x2048
FATAL: Failed to create an object. Code: 1145262
 
trace it back in sources, you can compile with debug mode and then run the server; add breakpoints around your items and inside definition so you see the value of var that causes the issue.
 
Now you have to change your map version.

Yea upgrade or downgrade between different versions is fucking sick.

Not talking about people who has zero knowledge
 
Making the server accept any items.otb!......

any version that accepts item.otb




C++:
 /*if(Items::dwMajorVersion != 8){
        std::cout << "Not supported items.otb version." << std::endl;
        return ERROR_INVALID_FORMAT;
    }

    if(Items::dwMajorVersion == 0xFFFFFFFF){
        std::cout << "[Warning] Items::loadFromOtb items.otb using generic client version." << std::endl;
    }
    else if(Items::dwMinorVersion != CLIENT_VERSION_810){
        std::cout << "Not supported items.otb client version." << std::endl;
        return ERROR_INVALID_FORMAT;
    }*/

The only change I made in the code is to add the comment tags / * * / so that the server does not check otb.
 
Back
Top