Hey Squaddies!

It’s time for another update on Modding 2.0! (You can find the last one here if you missed it.) If all goes well, the next update will be installed via Steam. Seeing as a lot of development has happened since our last post, let’s hear from Zak Strange, modding developer extraordinaire.

Engine Upgrade

As you guys heard in the Next Phase article, Squad has been undergoing a massive engine upgrade upgrading 5 versions (Almost 2 years of engine revisions! Hello UE 4.21!). This effects modding massively, as a few major engines changes occurred requiring the changes to the way we download files from Steam.

PAK files, the basic format for modding files, had to be completely rewritten for the mod cooking process. Mods from engine version 4.16 were completely broken by the update and can not be used in 4.21. Because of that, we had to prepare an additional fix that stops old mods from being loaded anymore.

All of these issues, including some we’re not quite ready to reveal yet, turned this into a much larger project than we anticipated — there has been a TON of required tweaking and modifying a to the Modding 2.0 code to make it compliant with the updated engine.

Cooking Mods (Again)

Cooking is the process of taking your modification content in Editor and turning it into a format that we can load in the version of the game that you load on Steam. With 4.21 (and just because it needed to be) the cooking process for mods was completely redone. With the rewrite came a few things:

PAK files are all now HASH’d so you can’t join a server with a different version of the mod than the server is running. Because of the way mods are distributed, there can be issues Steam pushing patches, and running a different version of the mod than the server is running can easily cause crashes.

Not only that, but PAK files are also now all compressed! We turned this on for one version of the SDK, and it seemed to work well with no issues. (Besides the cooking process taking longer.) Testing shows that most mods are 40-60% smaller with compression implemented.

Another change is that mods don’t require versions depending on the platform configuration anymore. In layman’s terms, Windows and WindowsServer are the now the same thing from the mod’s perspective, so you will only have one set of PAK files instead of two. Unless…

Mods can now be cooked for Linux as well. Although there is some additional configuration required, this is very easy for modders to set up on their development PCs. Pre-Cook, we check if the Cross-Compile toolchain is installed and if it is we can cook for Linux as well.

Threading

Sometime in the middle of Modding 2.0 development, I realized that it would make much more sense if all of the modding operations happened alongside the game on another thread. So, I went about doing just that. With the threading came the (much needed) rewrite of the uploader and the downloader.

The Steam Uploader is way better now; no longer will you get an “Unknown error has occurred.” We have a new uploading process where we are able to get back much better debug info than before. The whole Editor also does not “hang” when you are uploading to the Steam Workshop anymore!

Additionally, the Downloader can now be invoked at any time during the game process with minimal impact on performance — all downloading work is done on this thread which then sends a notification back to the main thread once the mod is ready to use. The main thread will then do one small operation to refresh the map list for one frame.

All of this threading work was done to make Modding 2.0 integrate seamlessly into Squad with minimal impact on the player experience.

Quality of Life

We’ve been listening to your feedback and we know that there are a few things you want exposed to make your modding lives easier. With the release of the Alpha 13 SDK, we have some things coming for you.

SteamID exposure

BanPlayer and KickPlayer function exposed

Setup the SQProjectileSpawner with an automated weapon blueprint, interfaces, customizable collision volumes, and various settings to allow mortar fire, arcing pre-set animated turrets, seek and destroy turrets, ammo control and line of sight control.

Exposed Healing function and Health

SQCameraManager Boolean variable added for ignoring the map start camera

Added IsReloading to WeaponAnimInstance for possible use in modding

Added bIsWeaponFiring to weapon anim instance for possible use in modding

Special thanks to Renn and KaB for implementing these changes. They’ve been a huge help in getting Modding 2.0 built!

Signoff

Thanks, Zak! Still looking for more information on Modding 2.0? Don’t forget to check out the Modding 2.0 Q&A we did a few months back. Until next time, we’ll see you on the custom server list.

Offworld out.