STROOP: Difference between revisions

1,945 bytes added ,  14 April 2019
Line 149: Line 149:
== Variables ==
== Variables ==


Variables are found in a Variable Panel. A variable has 2 parts to it: a name (on the left) and a value (on the right). On every STROOP update, the value updates. Some variables are values in memory, while other variables are calculated manually (referred to as special variables). While memory variables can always be set, special variables may or may not be able to be set. If you try to set a variable and it doesn't go through (either because the variable can't be set or because you entered an illegal value), then the variable will flash red to indicate this.
Variables are found in a Variable Panel. A variable has 2 parts to it: a name (on the left) and a value (on the right). On every STROOP update, the value updates. You can set a variable's value by double clicking on the value, entering text, and then pressing enter. Some variables are values in memory, while other variables are calculated manually (referred to as special variables). While memory variables can always be set, special variables may or may not be able to be set. If you try to set a variable and it doesn't go through (either because the variable can't be set or because you entered an illegal value), then the variable will flash red to indicate this.


All variables come with the following options when right clicked:
All variables come with the following options when right clicked:
* '''Highlight''':  
* '''Highlight''': Highlights the variable by giving it a red outline.
* '''Lock''':  
* '''Lock''': Locks the variable's value. Note that the variable's value can still be edited while it's locked.
* '''Copy''':  
* '''Copy''': Copies the variable's value (with no rounding) to the clipboard.
* '''Paste''':  
* '''Paste''': Pastes the clipboard value to the variable.
* '''Panel Options''':  
* '''Panel Options''': Opens up the Variable Panel options.
* '''Open Controller''':  
* '''Open Controller''': Opens up an Advanced Controller for the variable.
* '''Add to Custom Tab''':  
* '''Add to Custom Tab''': Adds the variable to the Custom Tab.
* '''Fix Address''':  
* '''Fix Address''': Fixes the address of the variable.
* '''Rename''':  
* '''Rename''': Allows you to rename the variable.
* '''Remove''':  
* '''Remove''': Removes the variable from the Variable Panel.


Number variables come with the following additional options when right clicked:
Number variables come with the following additional options when right clicked:
* '''Round to ...''':  
* '''Round to ...''': Sets how many digits you want to round the variable to.
* '''Display as Hex''':  
* '''Display as Hex''': Toggles whether the variable is displayed as hex or decimal.


Angle variables come with the following additional options when right clicked:
Angle variables come with the following additional options when right clicked:
* '''Signed''':  
* '''Signed''': Toggles whether the variable is displayed as signed or not.
* '''Units...''':  
* '''Units...''': Sets the units for the angle variable. The unit options are:
* '''Truncate to Multiple of 16''':  
** '''In-Game Units''': These are the units that the game uses. One revolution is 65536 in-game units.
* '''Constrain to One Revolution''':  
** '''HAU''': Standing for hexadecimal angle units, these are in-game units divided by 16. Thus, one revolution is 4096 HAU. These are useful because angles that fall under the same HAU value use the same entry in the game's trig table, since angles are truncated to the closest multiple of 16 before accessing the table.
* '''Reverse''':  
** '''Degrees''': One revolution is 360 degrees.
** '''Radians''': One revolution is 2*pi radians.
** '''Revolutions''': One revolution is one revolution.
* '''Truncate to Multiple of 16''': Toggles whether the angle's value is truncated to a multiple of 16. This is useful since angles that truncated to same the closest multiple of 16 use the same entry in the game's trig table.
* '''Constrain to One Revolution''': Toggles whether the angle's value is constrained to one revolution. For example, an angle that's unsigned and in angle units would be constrained to the range [0, 65535], whereas an angle that's signed and in angle units would be constrained to the range [-32768, 32767].
* '''Reverse''': Toggles whether the angle is displayed as the reverse of what it actually is.


Address variables come with the following additional options when right clicked:
Address variables come with the following additional options when right clicked: