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

Remeres - How to remove stacked items?

222222

Intermediate OT User
Joined
Jul 3, 2007
Messages
207
Reaction score
145
I'm having some issues that when walls are on top of each other, the client instantly crashes.
I have to go through each wall with browse field and remove duplicate items right now, which takes ages.
Especially in big mountains where there were duplicate walls on top of each other.

Any quick way to remove stacked non-walkable items in Remeres Map Editor?
If there are walls/stones on top of each other, it should remove them until only 1 left.

I'm working on a 7.4 map.


Example of a clear error. 2 walls on same sqm.

CwmKncl.png
 
Dude I had the same with the first Roxor map, I had to go through every wall on every floor in the Training monks, and the VIP town and remove all the duplicates it took me months, but is all done now. no easy solution I think.
Basically I would move a wall if a 2nd was there delete it then put the wall back, and go to the next one.
 
Dude I had the same with the first Roxor map, I had to go through every wall on every floor in the Training monks, and the VIP town and remove all the duplicates it took me months, but is all done now. no easy solution I think.
Basically I would move a wall if a 2nd was there delete it then put the wall back, and go to the next one.

There really should be another way of doing it. This is hell. Found an awesome map but it's so buggy after somebody converted it to another version.
 

Its faster to remake the map than going tile by tile fixing duplicates manually.
 
you can use Simone map editor ,click in tolls>verify map>check ,and a list with all stacked items will appear ( it's easier to fix than with Remeres :p )
 
Last edited:
Havn't had this issue yet myself but if you find them just -> Browse -> Select Raw - > Delete and repeat it. or just press A and press it and Delete button, it's not a big issue if you're fast in your hands.
 
Havn't had this issue yet myself but if you find them just -> Browse -> Select Raw - > Delete and repeat it. or just press A and press it and Delete button, it's not a big issue if you're fast in your hands.

Dude... this is a real map server. There are hundreds of thousands of tiles.

I need to find a way to:
  • Loop through all tiles
  • If any tile contains multiple non-walkable items, then it should give me the position of it


I may be able to do this by searching each wall/non-walkable item id.
Export each one of them into a list.
Then combine ALL of the lists into 1 large text file.
Loop through the entire file and find every line that has the same X,Y,Z.
Then save those coordinates in a separate file.
Then go to those tiles in map editor and remove it.


This may work! I will give that a try! Will need to make a tool for that in like C# or Python.
 
Last edited:
Quick update:

Well that actually helped. At least I now I have a list of coordinates where there are duplicate items.
I did like I mentioned in the post above.

I went into Remeres Map Editor, then Edit->Find (ctrl+f) and searched for different id numbers of walls.
And each time I searched, I exported the list of search results.
I then combined all the text files into 1 large, I removed the name of the item so I only had the coordinates and named the file "all_ids.txt"
Then I just ran the following in C# and all tiles with duplicate id's were output to "duplicates.txt"

C#:
string[] lines = File.ReadAllLines("all_ids.txt");
lines = lines.GroupBy(x => x).Where(g => g.Count() > 1).Select(g => g.Key).ToArray();
File.WriteAllLines("duplicates.txt", lines);

Now it's just a matter of going to each one of those tiles in the map editor and remove it.
It did not help me automate it, but at least I now know which tiles to check.
I had about 700 tiles with duplicate walls on them, so that will take some time.


But I will make an AutoHotkey script that will iterate through the text file, click in RME, press Ctrl+G, paste the position into each textbox, and go to that position. Then I will just have to remove them myself. But instead of copy/pasting the positions myself, I will just press like F12 and it will do that for me on the next line in the text file.
 
Last edited:
If duplicates appear in the same way a lot in the Browse Field window, You could make a macro with 'Jitbit' recorder.. setup a loop to iterate over every tile on your map. check if certain images exist (brwse field image with duplicates) and remove item.. might take a while to run over the whole map but you could be semi afk

EDIT: typed that before I saw your last msg looks like you found a good solution. You could make a jibit script off those 700 tiles with x y pos and check which Browse Field duplicate id exists by diff image checks, have macro delete accordingly based on which image duplicate it is and next

what do I mean?
CwmKncl.png


Say if this had two 908 ids.. Youd check for that image, then set if imagefound for 908(set mouse to 908 pos) then delete the duplicate.
Then your macro can go back to notepad copy the next x y and do it again.

pseudo
Code:
if dupeimagefound1
  setcursormouseondupitem1 and select
elseif dupeimagefound2
  setcursormouseondupitem2 and select
elseif ~
end

go to delete image and press click

go to next x y in notepad

I could set this up in AHK and it prob take 3-5 mins or less to execute

but if you have like 20+ diff items that will take a while xD still might be less tedious than clickin on over 700 fields
 
Last edited:
Finished it now. I couldn't be arsed replacing them all. So instead I made a teleport script to each of these SQMs. And I only removed the ones that actually crashed the client. To my surprise, most of them did not cause any debug.


Still a lot of aesthetic work to be done in a lot of the mountains. Some borders are missing. But no debugs.
Just to make sure I will make the script teleport to all tiles and see which ones debug me. If nothing on the entire map debugs, then that's a good start!
 
You wouldn't be able to exclude items that have height (e.g. parcels) or other walkable items using this framework, because you'd need to read the Tibia.dat or items.otb to get those item flags.
You are sort of right, but you can manually make an array with ids to avoid, like parcels, boxes and etc, since he is using 7.4 it would be easy to do.
 
Back
Top