

NOTE 2: Also if you enable unlimited funds, you must disable the "Failure Conditions" option when generating the world.NOTE: If you enable the unlimited funds cheats, your funds in the game will still go down - but that doesn't matter, it's still unlimited.

Click "Mutators" for additional options, such as increased health for guards and no-clipping guards.You'll see some world generation options. Prison Architect from version 2+ has built-in dev menu you can use for cheating. In fact, it's possible the latest version is used for every scripted object that's spawned, I've not tested because I assumed no app could be written that badly, but.You don't even need a trainer for this game, my dudes. All you need to do is start a new prison (or load a saved prison) and the latest version of your script will be used for the duration of that prison. You'll be glad to know that you don't need to restart the whole app to make script changes take effect. For example, you can call a function but try giving it parameters and it breaks. It is, however, very limited and - as with all things Introversion - heaving with bugs. You can type Lua script directly in to that and hit Enter to run it in the scope of your script. You'll also notice that all three modes of the debugger (it's not a debugger, it's a console.ish) have a text box near the bottom of the window. Starting from _G (the global scope) it let's you see all non- local variables and their properties. The "Explore" option lets you inspect the local scripting environment (each scripted object on the map gets its own scripting environment). Output - any error messages, and trace from Game.DebugOut().There's a little drop-down at the bottom left of each console with three options: Unlike Lua's print() function, Game.DebugOut() can only handle a single parameter. The easiest way to force an error is to call the non-existent print() function: Force an error in your script (see below) to automatically open the debugger for the object that caused the error.Select one of your scripted objects on the map and press the F3 key to view that objects' debugger.

There are two ways to open the scripting console for an object: For example, if you have a scripted object called Foo and you place two Foo on the map, each of them will have their own scripting console.
#Prison architect script debugger how to#
For tips on how to prevent this, see Update()Įvery scripted object on the map has its own debugging console.
#Prison architect script debugger update#
This doesn't affect Create() and - Update() as they won't get called until after the whole script has been compiled.Īll top-level code (such as variable and function declarations) will be run straight away, but to do anything meaningful on an ongoing basis you'll have to use (Object Events).Ī script's Update function gets called many times per second, and if it regularly does computationally expensive operations, then your game will begin to slow down and lag. Some stuff end - Note that such functions won't be available until the whole script has been compiled - if you tried to access the function Boo() at top of script (outside of a function) - you'd get an error (function doesn't exist yet). Code here will be run every update (very, very regularly) - It's strongly recommended to 'despam' this function (see later) end - Helper functions are usually defined at the bottom of the script function Boo() The game will run code here when your object has been fully constructed on the map end function Update( elapsedTime ) Code outside of functions will run immediately when the script is loaded - This is useful for defining local variables local foo = "bar " - Creates a local variable 'foo' and set it's value to "bar" function Create()
