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

Problem loading map in TFS 1.2

OTS Learner

New Member
Joined
Feb 17, 2022
Messages
24
Reaction score
0
Hello, I tried load this map; [7.1] Real Tibia Map as close as possible (https://otland.net/threads/7-1-real-tibia-map-as-close-as-possible.270484/) with this server: GitHub - fschuindt/theforgottenserver-7.4: It was originally a babymannen/theforgottenserver-7.4, but for some reason this user deleted the repository. (https://github.com/fschuindt/theforgottenserver-7.4) and I get this error:

# wine theforgottenserver.exe
The Forgotten Server - Version 1.2
Compiled with Microsoft Visual C++ version 14.0
Compiled on Sep 17 2016 11:46:39 for platform x86

A server developed by Mark Samman
Visit our forum for updates, support, and resources: OTLand (http://otland.net/).
Loading config
Establishing database connection... MySQL 5.1.50
Running database manager
Loading vocations
Loading items
Loading script systems
Loading monsters
Checking world type... PVP
[Fatal - Map::loadMap] This map need to be upgraded by using the latest map editor version to be able to load correctly.
ERROR: Failed to load map
No services running. The server is NOT online.

Some idea for fix that? This map is a 7.1 recreation and needs a 7.4 data for open and I'm using RME 3.6.1.
 
Last edited:
Same problem bro:
[Fatal - Map::loadMap] This map need to be upgraded by using the latest map editor version to be able to load correctly.
 
Same problem bro:

[Fatal - Map::loadMap] This map need to be upgraded by using the latest map editor version to be able to load correctly.
Did you commented the code block below?
C++:
        /*if (headerVersion == 0) {
            //In otbm version 1 the count variable after splashes/fluidcontainers and stackables
            //are saved as attributes instead, this solves a lot of problems with items
            //that are changed (stackable/charges/fluidcontainer/splash) during an update.
            setLastErrorString("This map need to be upgraded by using the latest map editor version to be able to load correctly.");
            return false;
        }
            WARNING: I had to comment that to make the server load my 7.6 rme generated map, read the note ^.
        */

Try to get the files that I mentioned and replace on your project
 
Did you commented the code block below?
C++:
        /*if (headerVersion == 0) {
            //In otbm version 1 the count variable after splashes/fluidcontainers and stackables
            //are saved as attributes instead, this solves a lot of problems with items
            //that are changed (stackable/charges/fluidcontainer/splash) during an update.
            setLastErrorString("This map need to be upgraded by using the latest map editor version to be able to load correctly.");
            return false;
        }
            WARNING: I had to comment that to make the server load my 7.6 rme generated map, read the note ^.
        */

Try to get the files that I mentioned and replace on your project
Yes, I commented that and I used iomap.cpp, items.cpp and item.cpp of your repository.

I think the solution to the problem would be to edit the map with a new version of RME. I have edited the map with an older version. I have tried to do it with a newer version of RME but it gave me an error when loading spawns and houses (failed to load spawns and failed to load houses) and I could not edit the map with that new version of RME.
 
Last edited:
Yes, I commented that and I used iomap.cpp, items.cpp and item.cpp of your repository.

I think the solution to the problem would be to edit the map with a new version of RME. I have edited the map with an older version. I have tried to do it with a newer version of RME but it gave me an error when loading spawns and houses (failed to load spawns and failed to load houses) and I could not edit the map with that new version of RME.
Its weird because the code commented is exactly where your code ran and printed the error that you previously posted.

But if you are saying that you are sure about this, I don't know how to solve this for now. I can try to reproduce this error on few hours. Can you share the items.otb that you are trying to load the server?

It should be able to run the server with this map without any conversion
 
Last edited:
Ok, I reproduce your error and it is solved.

The solution was make the changes that I mentioned before. Maybe you missed something, because only changing replacing the files doest even compiles the code.
I commited the code modifications here

1 - Trying to load Tibia71.otbm
result:
Code:
[Fatal - Map::loadMap] This map need to be upgraded by using the latest map editor version to be able to load correctly.
> ERROR: Failed to load map


2 - Commenting the following code block
C++:
/*if (headerVersion <= 0) {
        //In otbm version 1 the count variable after splashes/fluidcontainers and stackables
        //are saved as attributes instead, this solves alot of problems with items
        //that is changed (stackable/charges/fluidcontainer/splash) during an update.
        setLastErrorString("This map need to be upgraded by using the latest map editor version to be able to load correctly.");
        return false;
}*/

and adding the debug lines for files versions:
C++:
    std::cout << "> Map size: " << root_header.width << "x" << root_header.height << '.' << std::endl;
    map->width = root_header.width;
    map->height = root_header.height;

    std::cout << "> Map version info: " << std::endl;
    std::cout << "\t\t OTBM version: " << root_header.version << std::endl;
    std::cout << "\t\t OTBM version items: minor is " << root_header.minorVersionItems << " major is " << root_header.majorVersionItems << std::endl;
    std::cout << "\t\t OTB version: minor is " << Items::dwMinorVersion << " major is " << Items::dwMajorVersion << std::endl;

result:
Code:
>> Loading map
> Map size: 65000x65000.
> Map version info:
         OTBM version:0
         OTBM version items: minor is 1major is 1
         OTB version: minor is 1major is 1
[Fatal - Map::loadMap] [x:31992, y:31689, z:6] Failed to load item 1294.
> ERROR: Failed to load map
>> No services running. The server is NOT online.

3 - Getting the items.otb from RME (data/740)
result:
Code:
>> Loading vocations
>> Loading items
> ERROR: Unable to load items (OTB)!
>> No services running. The server is NOT online.

4 - Making code modifications stated here
C++:
>> Loading items
[Warning - Items::parseItemNode] Unknown key value: breakChance
[Warning - Items::parseItemNode] Unknown key value: ammoAction
(OMMITED BUNCH OF items.xml Unknown key value ERRORS RELATED)
>> Loading script systems
>> Loading monsters
>> Checking world type... PVP
>> Loading map
> Map size: 65000x65000.
> Map version info:
         OTBM version: 0
         OTBM version items: minor is 1 major is 1
         OTB version: minor is 1 major is 1
> Map loading time: 4.454 seconds.
[Error - Npc::loadFromXml] Failed to load data/npc/Kasmir.xml: File was not found
[Error - Npc::loadFromXml] Failed to load data/npc/Riddler.xml: File was not found
[Error - Npc::loadFromXml] Failed to load data/npc/A Sweaty Cyclops.xml: File was not found
[Error - Npc::loadFromXml] Failed to load data/npc/Pino.xml: File was not found
(OMMITED BUNCH OF NPCS NOT FOUND ERRORS RELATED)
[Warning - Houses::loadHousesXML] House entry not set - Name:  - House id: 745
[Warning - Houses::loadHousesXML] House entry not set - Name:  - House id: 746
(OMMITED BUNCH OF HOUSES.XML ERRORS RELATED)
> Loaded house items in: 0.013 s
>> Initializing gamestate
>> Loaded all modules, server starting up...
>> Forgotten Server Online!
 
Back
Top