IW4: How to load custom menus from "raw" without memory leaks

Hello everyone! :wave:

As IW4-SP is once again open-source, I wanted to briefly talk about one of the features I’m most proud of.

IW4-SP is capable of loading UI menu scripts from disk. It is based on the same system of CoD 4.
In short, you may create unique menus or override already existing menus and load them via a “menu list” file. I have found a really good guide on the internet that explains this in great detail and you can access it from this website openassettools.dev

if you are already familiar with creating custom menus for CoD 4 you will not need to read the guide I linked above, however, if you wish to link your menus inside a fast file archive you will need to use OAT’s linker,

The IW4-SP has undergone thorough testing, and I’m proud to announce that no memory leaks have been observed. This is a significant milestone, especially considering that IW4x and every other MW2 (2009) client have huge memory leaks. I can confidently say that IW4-SP is the first IW4 client ever (including multiplayer clients) to have an open-sourced functional menu loading code that does not have memory leaks.
The SM2 project was the first project ever to achieve this as shown by many of their asset showcase videos. However, their project no longer exists and was never available to the public and we never saw the source code to confirm.

There are a few caveats to this new feature that I want to address. First, the “Aresoul” menu dump will not work with this update. His menus were dumped with his custom tool, I’m sure he tried his best but his menus contain completely illegal syntax in many cases, additionally, his menus lack “menu list” files.

Additionally, the IW4 engine feature “UI functions” is not yet supported, mainly because no widely available menu dump contains them.

OAT can be used to dump menus from the game’s fast files and you are encouraged to use those.
Be careful to use the right settings as OAT’s dumps will contain “UI functions”, if you turn off that feature you will be able to use your freshly obtained dump with IW4-SP.