Limitations and Issues with mapping in Diesel

Here is a list of potential issues you may have when working on custom maps.

Out of Memory Crash

Application has crashed: C++ exception
Could not load texture because IDirect3D9::CreateTexture call failed.
Direct3D could not allocate sufficient memory to complete the call.

This issue only happens on maps that have too many assets loaded, through overbloated packages or high file size assets. Temporary workaround to this issue is to lower texture settings to Medium or lower, however in most cases this can be avoided by loading assets that only exist in larger packages from Extract.

If you use more than 2000MB of memory in editor you will likely crash due to team Ai using a very large amount of memory, even more likely players will crash when using mods in the heist also. The White House heist uses ~1600MB. The Safehouse uses ~1600MB.

You can figure out how close you are to 'OOM' (Out of memory) crashing by using the -qa steam launch option.

Ingame it will look like this.

Loading units

TLDR: two of the solutions are near perfection but both have some drawbacks, adding them from extract cannot load some units and packages cause slow loading times and unstable maps.

Loading units for maps was an issue I tried solving for a long time.

Loading from extracted files

Phase 1:

With overkill adding a new function to add files(DB:create_entry) I found out you can force existing assets to be loaded by loading them from the map itself but sadly this has a few issues, first of all it takes a lot of space and secondly biggest issue is that it cannot load effects from what I know which can cause some units to crash.

Phase 2:

After releasing the editor I had that idea floating in my head that maybe we don't need the model and texture of the asset to make it load in the map(had the idea after finding out you can mostly only read these files inside the game using DB:open even if they're not loaded) and I was right, after testing that it had no issue what so ever to load the units.

With phase 2 we cut the file size of the map by a lot(for example I tried doing that for a big custom heist and it was only around 8mb) this makes that method a more viable option now the only remaining issue is that DB:create_entry does not support effects which is a big issue and can cause some units to fail to load, this option is not really viable for characters. DB:create_entry also doesn't support fonts from what I know(pls ovk)

In future versions of the editor you will see an improvement to the load from extract system.

Loading packages

After fiddling around with packages I found out you can load as much as you want as long as you monitor the size of the packages(packages are actually bundles just non hashed! so we can see their actual size by using core lua functions) this method a limitation, it can be quite hard to load packages for big maps resulting in the map loading too much packages which can also cause the loading to be very slow and make the map unstable.

Revision #2
Created Fri, Oct 25, 2019 3:12 PM by Rex
Updated Wed, Feb 5, 2020 2:57 AM by Rex