Skip to main content

Hot Reloading

How to use Atlan Mod Loader to reload modded entities files without restarting the game.

This is an experimental feature. It is not as powerful as Doom Eternal's Meathook overrides. This may or may not be broken on Linux. If you attempt this procedure, please report whether it's successful or not.

The biggest problem with editing level mods is iteration time. Each time you want to test new changes, you must re-install the mod and restart the game. It's a time-consuming process that grinds down development. The solution offered in this page isn't perfect. You won't need to re-launch the game. However, you must exit the and re-open the level you're editing. Future research will hopefully improve this process.

Before Launching the Game

Atlan Mod Loader will engage "Hot Reload Mode" under the following conditions:

  1. An unzipped and unpackaged .mapentities file exists in your mods folder.
  2. No other mod files exist in your mods folder.

Let's say you want to edit the mission Hebeth. Your mods folder should look like this. Do not add any files besides the mapentities.

hotreloadmodsfolder_2.PNG

Once this is setup, run Atlan Mod Loader and launch the game.

Reloading the File

Let's say you've made some changes to the Hebeth mapentities file and you're ready to reload it. Perform the following steps:

  1. Alt-Tab out of the game.
  2. Run Atlan Mod Loader and wait for it to complete
  3. Quit out to main menu, then load back into Hebeth using Mission Select.
  4. The changes you've made to the file should be reflected in-game.

Quick Test

The first time you attempt hot reloading, you should do something simple to verify it works on your system. The following code snippet will place a floating text entity at the start of Hebeth. 

  1. Paste this into Hebeth's mapentities file. Make sure you paste it somewhere AFTER submap 0's world entity.
  2. Edit the entity's edit/headerText/text  property.
  3. Trigger a hot reloading using the above procedure.
  4. Verify that the text you see in-game has changed to reflect your edits.
entity 0 {
	entityDef hot_reload_test {
		inherit = "entityDef/gui/text";
		expandInheritance = false;
		editorVars = {
			placeable = false;
		}
		systemVars = {
			entityType = "idGuiEntity_Text";
		}
		edit = {
			headerText = {
				text = "Hot Reload Test!";
			}
			canvasFile = "ui/shapes/worldgui_text";
			useSWFTransform = true;
			swfScale = 0.016667;
			spawnPosition = {
				x = -1245.702881;
				y = -1230.202271;
				z = -77.942009;
			}
			spawnOrientation = {
				mat = {
					mat[0] = {
						x = -0.000000;
						y = -1.000000;
					}
					mat[1] = {
						x = 1.000000;
						y = -0.000000;
					}
				}
			}
			flags = {
				noknockback = false;
			}
			renderModelInfo = {
				model = "editors/models/gui_text.lwo";
				scale = {
					y = 15.000000;
				}
			}
			clipModelInfo = {
				type = "CLIPMODEL_NONE";
			}
		}
	}
}