new resource: map_loader
Is your feature request related to a problem? Please describe.
In short, MTA Map Loading system (through meta.xml <map/> nodes or loadMapData (probably nobody uses this feature) has limitations:
- It's server-side and uses element data (inefficient)
- Maps exported by map editor even require a
mapEditorScriptingExtension_c.luascript to do removeWorldObject and LODs!!! This duplicates a lot of code. - It doesn't support
createBuilding - It doesn't support new models, which are incredibly popular since the addition of
engineRequestModel - It doesn't support custom textures, which servers since shaders were invented
- ...
Describe the solution you'd like I believe the solution is not to expand the MTA Map Loader in C++ (mtasa-blue code), but instead to remove it (deprecate nodes etc) and create a map loader resource (official) that does everything the current system does + all the nice fun features we can add. The idea is that new official resource will be included in the default resources pack, allowing any server to use it to load their maps through:
- File drag & drop
- Custom exported functions
- etc
Additional context
Honestly I've already created a map loader for fun and for several servers in the past, it's pretty simple.
A map is just a list of elements to spawn at certain positions with certain properties.
The list can be stored on any popular format like JSON, then just use Lua functions to spawn the elements and set their properties.
We can even use the new glob features (<file src="maps/**/*.json"/>) if useful.
Tell us your opinion about this.
Another thing to consider here is that this should involve some kind of sandbox that allows map scripts to be loaded only for those players who have this map loaded avoiding the issue of getting music played globaly or effects applied when you're not in such map (like in race servers with multi-modes).
Another thing to consider here is that this should involve some kind of sandbox that allows map scripts to be loaded only for those players who have this map loaded avoiding the issue of getting music played globaly or effects applied when you're not in such map (like in race servers with multi-modes).
Nice idea: client side scripts associated with maps....