asamy / forgottenmapeditor Goto Github PK
View Code? Open in Web Editor NEWMap editor written in lua for Open Tibia. Written with OtClient's framework.
License: Other
Map editor written in lua for Open Tibia. Written with OtClient's framework.
License: Other
Working on some File Manager stuff.
First thing is a FileDialog API.
Basically a function that works like this:
FileDialog.show(title, filter, action)
it returns false if its busy, returns nil if nothing is selected.
Action is a function(path) which is defined if a path is selected.
And a map manager for loading/saving files to make room for some extra features, like a minimap preview and recent maps.
Thinking of removing the map description/positions into separate window or something.
Id be happy with only the first bullet point.
Spawn managing should be a little more robust.
Some problems:
Hello,
I'm planning to start working on Search Widget soon, but I found out that there are two missing functions for it:
Hello,
I've found out that the minimap isn't updating after deleting everything on a tile.
Goes crazy when trying to render on nothing and/or just opened the application and loaded up everything.
This should be done ASAP.
The map editor do not support older versions than 8.10
On start up put a file loads with version...
Exemple: tibia1010.dat (so will allow changing versions to edit different maps.."
VERSION = 870 -- Most important for loading Tibia files correctly.
OTB_FILE = "/data/materials/items"..VERSION..".otb"
XML_FILE = "/data/materials/items"..VERSION..".xml"
MON_FILE = "/data/materials/monster"..VERSION.."/monsters.xml"
NPC_FOLDER = "/data/materials/npc"..VERSION..""
OTBM_FILE = "/data/materials/map.otbm"
DAT_FILE = "/data/materials/Tibia"..VERSION..".dat"
SPR_FILE = "/data/materials/Tibia"..VERSION..".spr"
There's problem with showing items on map. They are animated only on first two zoom levels (16, 24), but they should be animated also on default zoom level (32).
Hello,
I've found out that there is bug in viewing floors.
When I set map editor to floor 7 and focus camera in the temple, I get this:
But when I focus camera on a tile without upper floor, I can see the upper floors of buildings:
I think that it should be done in RME way:
Only floor 7 should be seen, no matter of tile that's in the center.
In 10.10 after load map get this error on load monsters and npcs:
ERROR: protected lua call failed: LUA ERROR:
C++ call failed: cannot place creature at 1690 2880 0 65535 65535 255 1 (increment radius)
stack traceback:
[C]: ?
[C]: in function 'loadSpawns'
/mapeditor_filebrowser/filebrowser.lua:126: in function 'openMap'
/mapeditor_filebrowser/filebrowser.lua:25: in function 'v'
/mapeditor_filebrowser/filebrowser.lua:48: in function 'openFile'
/mapeditor_filebrowser/filebrowser.lua:68: in function </mapeditor_filebrowser/filebrowser.lua:68>
On put monsters get same error...
Hello,
There's bug with movePixels function.
When I use:
movePixels(16, 0)
The map is moved by 16 pixels in right direction. But when I use that function again nothing happens.
Also when I use movePixels(32, 0) after moving the map by 16 pixels, the map is moved by only 16 pixels.
Hello,
I've found out that there are missing functions that could be added:
Spawn:getCreatures() - function that returns all creatures on spawn
g_creatures.getSpawns() - function that returns all spawns on map
A lot of features that RME has needs to be implemented onto here.
When using a ground pallette and you drag it over the same tile more than once, upper items will disappear, and they are not recognized by the undo operation. So they arent revertable
Update:
Seems to be an general Brush issue, grounds should replace the current ground and not add as an new item.
Undo and redo only works for 1 tile at the time, a better thing to do is to make a framework for "map edits"
Example:
MapEditor:preformAction(tiles, action(tile))
MapEditor.preformAction stored the action and the "previous state" of that tile, that way be able revert all changes in one Undo/Redo
On save:
books go to under tables
not save signs
not save some uids and aids
not save map version (give error on open with rme)
I was thinking about a way for people to use github as a form of autoimplementing modules.
At this source: https://github.com/mkottman/lua-git
Its a lua module for git which maybe could be used in the init script to update, ofc, a user has to agree if he wants to use automatic updates. Also if people wants additional plugins, there could be a list of some recommended source which could be merged.
To fix 10.10 support you need add
g_game.setProtocolVersion(tonumber(currentVersion.text))
on function loadDat(f) of filebrowser
and
on start up...
g_game.setProtocolVersion(VERSION)
https://github.com/BrunoDCC/forgottenmapeditor/commit/7d1c82dd6904a947eb815a87d9ba89387105d8a2
Hello,
I think that good idead is to add ability to open minimap in new window (like in RME). For some people It's very useful feature - for example: when you have 2 screens, you can put FME on first screen and window with mini map on second.
I know that it's not very important feature, but leave it here. Maybe someone will do it in freetime :-)
you should Fallen, already got you 3 ppl to follow you xP
Save and load map on last get this error:
ERROR: protected lua call failed: LUA ERROR:
C++ call failed: Unknown map data node 15
stack traceback:
[C]: ?
[C]: in function 'loadOtbm'
/mapeditor_filebrowser/filebrowser.lua:150: in function 'openMap'
/mapeditor_filebrowser/filebrowser.lua:50: in function 'v'
/mapeditor_filebrowser/filebrowser.lua:73: in function 'openFile'
/mapeditor_filebrowser/filebrowser.lua:93: in function </mapeditor_filebrowser/filebrowser.lua:93>
Starting down...
On open server:
>> Loading map
> Map size: 2600x2900.
Duplicate uniqueId 60053
FATAL: [OTBM loader] Unknown map node.
> ERROR: Failed to load map
>> No services running. The server is NOT online.
I check on mapio.cpp and not have extra node
Being able to create new pallet's with ease and being able to make it into rows. Sort of like RME raw area, it shows the item, the id, and so forth,
The Forgotten Server can't read a map created by otclient/mapeditor. It break in this line:
http://2.imgland.net/iE2GJK.png
This should be done via the FileBrowser interface.
Again, yes a RME feature, but since it is buggy on RME it could be implemented onto here. It would give users more of a reason to use FME over RME. Some ideas for it are
More will be added on when ideas are came across.
Hello,
Here are some of my suggestions for zones:
Also some new functions for them will be useful:
In save houses (button save enabled) get this error:
ERROR: protected lua call failed: LUA ERROR:
C++ call failed: failed to save houses XML /data/materials/Map-house.xml:
stack traceback:
[C]: ?
[C]: in function 'save'
/mapeditor_filebrowser/filebrowser.lua:95: in function 'saveMap'
...apeditor_filebrowser/filebrowser.otui:58: [@onClick]:2: in function <...apeditor_filebrowser/filebrowser.otui:58: [@onClick]:1>
In save spawns (button save enabled) get this error:
ERROR: protected lua call failed: LUA ERROR:
C++ call failed: failed to save spawns XML /data/materials/Map-spawn.xml:
stack traceback:
[C]: ?
[C]: in function 'saveSpawns'
/mapeditor_filebrowser/filebrowser.lua:96: in function 'saveMap'
...apeditor_filebrowser/filebrowser.otui:58: [@onClick]:2: in function <...apeditor_filebrowser/filebrowser.otui:58: [@onClick]:1>
On create a new map no get errors...
Get the error on load npc:
--> Loading NPCs...
ERROR: Unable to load module 'mapeditor_startup': LUA ERROR:
C++ call failed: cannot load creature buffer: Error document empty.
stack traceback:
[C]: ?
[C]: in function 'loadNpcs'
/mapeditor_startup/startup.lua:44: in function 'startup'
/mapeditor_startup/startup.otmod:8:[@onLoad]:2: in main chunk
[C]: in function 'ensureModuleLoaded'
/init.lua:42: in main chunk
This is loading a folder with *.xml?
This is internal thing. Minimap is bugged.
Hello,
I think that some new functions will be needed:
Hey fallen, get the fix in houses and spawns...
So lets say you can select an free amount of tiles, then preform regular actions on them, like replaceWith, remove, Add, Autoborder, Zone, MoveWithXYZOffset
You can make diffrent selections, Save them as a file and so on to be able to work between multiple files, a certain selection can be saved as an OTBM file,
The selection brushes would be pretty simple, Area, Pen, Magic Wand (aka paint bucket)
This would compensate the lack of using multiple files at once, as you can simple store a selection and import it when opening another file.
Selections can also have a role in redo/undo as the previous tiles can be stored in the selection while in memory.
A selection would be an array of positions with from/to stackpos in the memory.
Some really cool features with this would be sort of "Create House", "Randomize items" (for grass, bushes, etc) , "Protect/Isolate", aka allow only to place items inside the selection or dont allow editing withing the selection.
The selection should be sorted in an X/Y manner so you can preform example autobordering/position related functions
These functions are missing. Let's hope they'll be implemented in the near future.
we all know that mappers must shift between items every so often, that they get tired of it.
To solve this is quite simple.
You have your keys from (0 to 9 or others) which all can contain an brush/item.
Its would be located at the bottom at the screen with a Combobox as the most left side of the toolbar.
That combo box is a list of your own sets which you can switch from.
A create new /remove button for the sets can be located at the side of the box.
The items can from the pallettes can be drag and dropped into the a slot.
Alternatively the scroll button could switch the item selected in the toolbar, instead of zooming, where zooming could be done with ctrl+scrolling.
The combobox should also allow quick filtering by typing when the control is selected.
This would really increase the speed for mappers that likes RAW.
To simplify a bit: Imagine the minecraft item bar, but scrolling trough items, and list of custom sets.
Hello,
I've found that there are 4 missing functions that should be added:
Last 2 functions will be useful for "selection tool" that I'm planning to work on.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.