About This File
The mod formerly known as "simplex testing".
Its goal is to aid in mod testing (being aimed at modders), focusing on being extensible through custom code to suit a particular purpose.
To add custom code, place it in a file inside submodules/ and add that file's name (minus the ".lua" extension) to the Submodules.Include call in modmain.lua. Such code will have access to the variable imports performed in imports.lua and the conveniences defined in conveniences.lua, alongside the usual mod environment capabilities.
The default submodules do (at least) the following:
- Enable debug keys.
- Add a new row of buttons to error screens, with a button for reloading the game state (like the previous mod) and another one for going straight to the main menu (without any saving).
- Run consolecommands.lua and export a few additional console utilities, listed below.
- Export an utility function called regen_level(), which regens the current level (erasing it).
The additional console functions are:
--// Spawns the given prefab as DebugSpawn does, returns the spawned--// entity (so that you can set it to a variable for further console--// work on it) and sets it as the debug entity (accessible through the--// console command c_sel()).gimme(prefab)--// As gimme(prefab), but disables the spawned entity (by stopping its--// brain and stategraph) and makes it so that it is not persistent--// (i.e., not saved when the game saves).gimmedummy(prefab)--// Prints whatever is accessed on the given field of the given table,--// as well as the arguments to functions called within that field.--//--// The parameter t is the table, and k is the field name (typically a--// string).--//--// A common use scenario is watchfield(inst, "AnimState") to track--// animation bugs.watchfield(t, k)--// Moves the given entity to the given point. It may be called in--// several different ways, which differ on how the destination point is--// computed. The parameter inst is always the entity to be moved; it may--// also be given as a prefab name, in which case the moved entity is the--// closest entity to the player with that prefab name.--//--// The distinct ways in which it may be called are listed below.--//--// Receives the point as a triple of coordinates:MoveTo(inst, x, y, z)--// Receives the point as a Point object:MoveTo(inst, pt)--// Receives the point as an entity (whose corresponding point is its--// position):MoveTo(inst, target_inst)--// Receives the point as a prefab name (whose corresponding point is the--// position of the closest entity to the player with that prefab name):MoveTo(inst, prefab)--// Moves the player to the given point. The point may be given in all--// ways accepted by MoveTo.GoTo(x, y, z)
This mod will be listed as outdated in the Steam version. This is necessary to keep compatibility with standalone.
What's New in Version 1.3.2 See changelog
- Included squeek's suggestions for better mod presence checking.