Map Loader And Manager (MLAM)

Interested in having a way to load XML maps that were created for Map Editor or Menyoo, without using (or converting to) YMAPs for one reason or another (the typical reason being that certain maps either do not load correctly or do not load at all as YMAPs), without risking (crashing or tanking framerate or stability issues) from having too many maps (especially large maps) loaded at once?

Introducing MLAM (Map Loader and Manager), the script resource that revolutionizes the way that XML maps created for Map Editor and Menyoo are loaded and managed in FiveM! With MLAM, you can enjoy seamless integrations of all those XML maps simultaneously, without much worry regarding game crashes or stability issues or an excessive framerate drop due to the overload of maps.

You do not need to manually load and unload (aka manage) individual maps; MLAM takes care of everything for you, automatically and efficiently. Simply install the script resource, and it will work its magic in the background, ensuring that all of your XML maps are loaded (and managed), without requiring any inputs nor interactions from you.

MLAM’s innovative approach ensures that even multiple large maps of different varieties that are in close proximity of one another are handled well using it’s smart management system which does it’s best not to overload nor crash the game (depending upon your particular configuration that is). While I can’t promise too much for lower-end PCs, there are several tunable configuration options (currently globally controlled on the server side, but maybe individually per client in the future), allowing MLAM to be tuned for different requirements and preferences.

Usage:

  • Place your XML (Menyoo or Map Editor) map files inside of the “JM36_MLAM” directory inside of the resource.
  • Add an entry (“MAP_XML 'Some XML Map.xml'”) into the “fxmanifest.lua”
  • Optionally tune and tweak certain configuration parameters to your liking - render distance for example.

Where:
https://jaymontana36.tebex.io/package/5837583 | (Regular Subscription)
https://jaymontana36.tebex.io/package/5837597 | (Trial - 2 Days)
https://jaymontana36.tebex.io/package/5853169 | (One Time Purchase)

Code is accessible Configuration Parameters + libraries used
Subscription-based Yes
Lines (approximately) 778 (Code) - 2298 (Code + Libs)
Requirements A file editor for “fxmanifest.lua”, and XML Map files from Menyoo or Map Editor
Support Limited: Either via this thread or via DMs
2 Likes

Looks awesome, i tried to use the trial to test but is asking for 3$, isnt suppose to be free the “TRIAL”?

I have no idea how they do it, but I had selected the “Allow one off charge” option for the trial version, which I’d assumed is supposed to mean that you are allowed to not pay once. The trial is the full version (same files), just with that “Allow one off charge” option set and the subscription period set to be a week rather than a month. I guess I would probably look more into what that is and confirm first before trying it especially if it doesn’t show any option for an off charge. It did not give me any other option besides this. I’ll look into it again a little later on and see how it’s supposed to work and whether any other options are available, but when I tried to set it to be 0 but expire in a day, it wouldn’t allow me, saying it had to be a week, and still didn’t work till I slapped a price onto it. But I suppose that would kinda make sense.

Edit: Well, I can’t seem to find any information whatsoever on how to actually “properly” do a trial, but you can however try it out for free in singleplayer using JM36 Lua Plugin

Alright I’ve fixed it (hopefully) I think, I thought that one off meant that you could trial it but would be charged to continue using it afterwards.

I now have the “trial” set to be a one time $0/free for 6 hours, usable by 2 people per hour and 10 people per day, hopefully that works out well and prevents people from abusing the trial.

1 Like

thanks gonna try

A few updates:

  • Trial - changed from being just 6 hours to being 2 days
  • 1Time - added non-subscription option
  • Changed the default rendering distance from 1,000 to 3,000
  • Implement caching for certain internals (faster execution via remembering aka less work)
  • Simplified and removed excess logic (clean up and optimize remaining code)

probably a good script, just too rich for my wallet.

Is the 1 time version encrypted, also is there a trigger to load and unload automatically, or a way to trigger maps and not load automatically?

All release(d) versions are escrowed, as otherwise they’d be cracked and leaked (unfortunately).

There are no triggers for anything, you simply place the XML map files inside of the MLAM subdirectory (also optionally modifying the configuration file that is located in that directory), and add entries to the fxmanifest.lua which will tell/declare what should be loaded.

Technically, you can duplicate this resource (naming the duplicates all differently), and start/stop those duplicates to load/unload different maps, but, you’ll only be able to have one instance of this resource running at a time (the last one to start is the one that will take precedence, and the other instances may have issues if it isn’t the only one running at any given moment). I actually should be able to easily fix this in the near future as just a temporary workaround, but do know that running multiple instances still isn’t as wise as a single instance managing it all.

This was never designed with the idea of manually loading/unloading individual maps specifically in mind, it was designed more or less as a “chuck all of the maps that you want/need, configure it once to load them all, and then just forget about it”. I could however restructure the code and rebase the internal generated data to make it possible to manually control/trigger map loads and unloads, but it might be awhile before that becomes a reality, especially because as I said before the code and it’s data was never designed with that in mind, so I basically need to redesign the entire thing from scratch, and then figure out how to rebuild the management system to work with this, since it doesn’t seem like it would work very good with this at all at first glance.

love this idea, but somehow my xml’s doesnt load up…ive placed them right.

Can you provide the XML files and/or the bin files? Also, are they either Menyoo Spooner or Map Editor XML files? I currently have no access to my PC with the source, maybe I have the source backed up elsewhere, I may still be able to test it sometime however.

Also, before any of that, you do also have an issue with your config as shown in your screenshot; that issue might be the cause of why your maps aren’t rendering, the internal defaults are different from the config defaults (so also try replacing your broken config with the original unmodified config from the download).

Maybe try a couple of other XMLs as well in the meantime, while we figure out what your issue may be.

I guess they are both menyoo.xml

Sorry, I’ve been away awhile. An update though: I did some poking around, and it would seem that 2 things happened: 1: I made a tiny 1 line oopsie which broke everything, and 2: after fixing 1, it seems some change was made on FiveM’s side which also broke things, whereas MLAM has a 2 part system that works hand in hand with one another, one part being on the server side and the other part being on the client side, the method that was used for transmissions between server and client stopped working for some reason, and so I’ve worked around that so now it’s all working good again.

On a side note, I’m not quite sure what you did regarding your config, I would need to know more first to be able to figure that out. And regarding that “Red Carpet”, I skimmed through the MLAM generated binary file for it as well as the original XML file, and it turns out that there is no “carpet” or “object” being used for that, in fact there are only 4 total objects in use there, which are a clipboard, phone, microphone, camera; everything else is a non-object, which is completely outside of the scope of MLAM which only cares about objects (and not anything else that “Red Carpet” map may be spawning instead of an object).

A few updates (v0.4r3 for FiveM):

  • Fixed communications issues between the server and the client (which was preventing maps from being able to be rendered).
  • Added a “RenderObjectsAlways” option which essentially disables all the trickery logic used for smart rendering; this should realistically only be used for testing/debugging purposes, like when experimenting/playing around with other configuration options and/or trying to figure out why something isn’t rendering as expected (set to false by default).
  • Reverted a previous change to the “StreamLimitMax” option which was meant to help guard against potential crashes in densely populated areas and servers but also was a source of some rendering issues being set; reverted from 63 back to 0.
  • One other small change that should make no difference whatsoever in anything, but just in case.

does it only load objects? yea about the red carpet I figured out its sppawned via IPL lol. the xml is just adding those objects you mentioned I guess

would it be possible to also spawn peds and vehicles with it?

Hey tested out the trial and loving it so far, I have a question - u mentioned I can duplicate the script to use to load/unload different maps. Im wondering if I can do that and then use the duplicate with this bucket routing script so that the maps in the duplicate only load when a player enters that other instance/bucket? These 2 scripts can work hand in hand to create a multiverse server :fire: GitHub - JaredScar/Multiverse-World-Manager: A FiveM Script taking advantage of routing buckets @JayMontana36