Suggestion for map makers using custom objects

I'd like to make a suggestion to map makers that use custom objects to help to minimize loading time of these objects while playing the map. I've seen many maps being released with the .X files along with many different texture files, ie, .bmp, .png, .jpg and so on.

When these object are released like this and the map is played, whether SP or MP, these objects need to be converted by the game and placed into the cache folder for each, MeshCache and TextureCache. This takes time for the game to load and convert these objects and textures, depending on the strength of your system, and as we all know, it lags the game because of it and we have to wait for the game to do it's thing before we can continue on. And if there are a bunch of them, this could take some time to do.

So what I'd like to suggest is that you, the map maker, run your map fully to let the game convert all of these custom objects and textures, and then for you to take these objects and textures out of the cache folders and place them into your map folders before releasing them to the public.

To do this, I would;

  1. First clear your cache so no other objects are included that don't belong there, or be sure that you know exactly what objects you use so to not inlude anything other than what is used in your map.

  2. Run your map, in game, to be sure that each custom object and their textures get converted by the game and placed into the cache folders.

2a. If your map is large and not wanting to run the whole map to do this, you can create a smaller map with no detail with the objects in it just to convert them over instead having to run your full map.

  1. Create 2 folders in your map folder named _m and _t.
    _m is for the converted .X files,
    _t is for the converted textures files.

  2. Go into your cache folder and take all of the converted .X files from the MeshCache folder and place them into the _m folder you created in your map folder.

  3. Go into your cache folder and take all of the converted texture files from the TextureCache folder and place them into the _t folder you created in your map folder.

  4. Remove the meshes and textures folders from your map folder since they are converted now and not needed. I'm not saying to delete them because you may need them later. Just remove them from your map folder before being released.

And that's it. By doing this, the map will load faster and won't lag so much from having to convert all of these objects because it's been done already and everyone will be a lot happier playing your maps because you took the time to optimize the map before hand.

Note: This will most likely be done by the editor when we get map support in the workshop like it does for mods. But this will help in the mean time and help to familiarize yourselves with how the game works.

EDIT: If this is done like explained above, when you run your map after doing this, there should not be anything in the cache folders
from your map because everything was converted already.


On a side note, I've learned a good way to load the maps without having to extract them from the .zip file, but they have to be zipped up a certain way for them to work and it HAS to be a .zip file because the game will not use any others.

When zipping the contents of your map, only include the needed folders in your .zip file. So when you open your map.zip, the only folders you'll see are these, depending on what is included in your map;

_m
_t
classes
levels

Then place a line in your config.xml to load the map like I do for my gearboxes. I place it at the very bottom before the closing </config> like below.

<MediaPath Path="aMaps/map.zip" DoPrepend="true" />

</Config>

I create a folder in the Mudrunner folder named aMaps. I use that just so it's at the top. You can use whatever you like, of course.

I hope this helps and hope to play many good user created maps in the future.

Thank you for reading this.

last edited by Tattoo

@Tattoo
Impeccable timing, my friend! I just started working with custom objects on my map today, and I nearly gaunched my map in the process (reminder to make regular backups!)
This should come in super handy! Any suggestions if a model does NOT convert via the editor?

@mexican_420 said in Suggestion for map makers using custom objects:

Any suggestions if a model does NOT convert via the editor?

I didn't realize that the editor converts the model when creating a map. I was talking about running the map, in game, to convert the models. Hmm, I'll have to look into that. Thanks for pointing that out.

So I guess an answer to your question would be to run the map in game like I suggested above and take the converted model from the games cache folder.

I just noticed the editor converted the rock model I just made in the editor but didn't convert the texture file so I would say it's best to run the map in-game to get the converted models and textures.

EDIT: I edited my op to reflect that the map should be run in-game to convert the models and textures. Thanks again for the heads up.

last edited by Tattoo

thank you taking the time and effort to share this with us... i'm still trying to figure out how to even create a basic map file . but in time this will be helpful. keep up w/ the great mod work!

@mexican_420 said in Suggestion for map makers using custom objects:

@Tattoo
Impeccable timing, my friend! I just started working with custom objects on my map today, and I nearly gaunched my map in the process (reminder to make regular backups!)
This should come in super handy! Any suggestions if a model does NOT convert via the editor?

@Tattoo
@RoughRider
I think what I should have asked here is this: if I used a custom object/model in my map and, after running the entire map in-game, I find that a model (and it's associated textures) are not in the cache folder, do I simply include the unconverted .X/xml files and textures in their respective folders when I zip everything up? IOW can the zip include the classes/meshes/textures folders for the unconverted objects as well as the _m/_t folders for the converted objects, or do I have to go exclusively one way or the other?

@mexican_420, I've actually tried that and you can have both. I did that with Blackwater Canyon because I didn't finish the map yet and only moved the object that got converted and it worked fine.

But like I said in 2a, you can make a small map with no detail and put the models in it just to get em converted. I've done that too.

@Tattoo
Awesome. Thanks for the tip my friend!