1 Screenshot

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

Released

  • Included squeek's suggestions for better mod presence checking.



User Feedback

Recommended Comments

To the people who downloaded it before this: there was some leftover code which was preventing the exported console commands (such as gimme()) from working. This is now fixed, please redownload.

And squeek, the mod is now using require() to load consolecommands.lua. I edited the wiki as well. ;]

  • Like 2

Share this comment


Link to comment
Share on other sites

I gather this mod is for people who have a basic understanding of coding/Don't Starve's layout. If not, might be relevant to explain what it actually does (I'm looking at it and I really don't understand what it does). 

Share this comment


Link to comment
Share on other sites

I gather this mod is for people who have a basic understanding of coding/Don't Starve's layout. If not, might be relevant to explain what it actually does (I'm looking at it and I really don't understand what it does).

Yes, it's meant as a testing tool for other mods, that's why I uploaded it under "Modding Tools, Tutorials & Examples". Though some of its features, like the enabling of debug keys and the addition of buttons to error screens, don't really require an understanding of how Don't Starve ticks.

Share this comment


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now