Difference between revisions of "Sysval (TeaScript)"

From PGE Wiki
Jump to navigation Jump to search
(Split screen camera style can be written to as of 1.4.5 patch 21.)
(Added the new player sysvals.)
Line 29: Line 29:
 
The number of blocks in the level.
 
The number of blocks in the level.
 
|-
 
|-
|<code>BGOCount</code>  
+
|<code>BGOCount</code>
 
|'''Read Only'''
 
|'''Read Only'''
 
The number of background objects in the level.
 
The number of background objects in the level.
 
|-
 
|-
|<code>WCount</code>  
+
|<code>WCount</code>
 
|'''Read Only'''
 
|'''Read Only'''
 
The number of warps in the level.
 
The number of warps in the level.
 
|-
 
|-
|<code>LCount</code>  
+
|<code>LCount</code>
 
|'''Read Only'''
 
|'''Read Only'''
 
The number of liquids in the level.
 
The number of liquids in the level.
 
|-
 
|-
|<code>ECount</code>  
+
|<code>ECount</code>
 
|'''Read Only'''
 
|'''Read Only'''
 
The number of warps in the level.
 
The number of warps in the level.
Line 69: Line 69:
 
1: Disable Spinjump.
 
1: Disable Spinjump.
 
|-
 
|-
|<code>ScrSplitstyle</code>  
+
|<code>ScrSplitstyle</code>
 
|'''Read Only (Read and Write in 1.4.5 Patch 21)'''
 
|'''Read Only (Read and Write in 1.4.5 Patch 21)'''
 
The status of the camera's split mainly used for 2 player mode.
 
The status of the camera's split mainly used for 2 player mode.
Line 83: Line 83:
 
4: Player 1 is on the right and player 2 is on the left.
 
4: Player 1 is on the right and player 2 is on the left.
 
|-
 
|-
|<code>Player1scrX</code>  
+
|<code>Player1scrX</code>
 
|'''Read Only'''
 
|'''Read Only'''
 
The camera's top left X-scene coordinate of player 1.
 
The camera's top left X-scene coordinate of player 1.
 
|-
 
|-
|<code>Player1scrY</code>  
+
|<code>Player1scrY</code>
 
|'''Read Only'''
 
|'''Read Only'''
 
The camera's top left Y-scene coordinate of player 1.
 
The camera's top left Y-scene coordinate of player 1.
 
|-
 
|-
|<code>Player2scrX</code>  
+
|<code>Player2scrX</code>
 
|'''Read Only'''
 
|'''Read Only'''
 
The camera's top left X-scene coordinate of player 2.
 
The camera's top left X-scene coordinate of player 2.
 
|-
 
|-
|<code>Player2scrY</code>  
+
|<code>Player2scrY</code>
 
|'''Read Only'''
 
|'''Read Only'''
 
The camera's top left Y-scene coordinate of player 2.
 
The camera's top left Y-scene coordinate of player 2.
 
|-
 
|-
|<code>GameMode</code>  
+
|<code>GameMode</code>
 
|'''Read Only'''
 
|'''Read Only'''
 
The current game mode.
 
The current game mode.
Line 126: Line 126:
 
The current score.
 
The current score.
 
|-
 
|-
|<code>StarCount</code>  
+
|<code>StarCount</code>
 
|'''Read Only'''
 
|'''Read Only'''
 
The current number of collected stars.  
 
The current number of collected stars.  
 
|-
 
|-
|<code>Starcoincount</code>  
+
|<code>Starcoincount</code>
 
|'''Read Only'''
 
|'''Read Only'''
 
The current number of collected star coins.  
 
The current number of collected star coins.  
 
|-
 
|-
|<code>WldInvCount</code>  
+
|<code>WldInvCount</code>
 
|'''Read Only'''
 
|'''Read Only'''
 
The current number of items in the world map inventory.
 
The current number of items in the world map inventory.
Line 142: Line 142:
 
The limit of coins the player can store.
 
The limit of coins the player can store.
 
|-
 
|-
|<code>BPlayer1Health</code>  
+
|<code>BPlayer1Health</code>
 
|'''Read Only (Read and Write in 1.4.5)'''
 
|'''Read Only (Read and Write in 1.4.5)'''
 
The current number of 1-ups for player 1 in battle mode.
 
The current number of 1-ups for player 1 in battle mode.
 
|-
 
|-
|<code>BPlayer2Health</code>  
+
|<code>BPlayer2Health</code>
 
|'''Read Only (Read and Write in 1.4.5)'''
 
|'''Read Only (Read and Write in 1.4.5)'''
 
The current number of 1-ups for player 2 in battle mode.
 
The current number of 1-ups for player 2 in battle mode.
Line 183: Line 183:
 
1: Show hud.
 
1: Show hud.
 
|-
 
|-
|<code>Param1</code>  
+
|<code>Param1</code>
 
|'''Read and Write'''
 
|'''Read and Write'''
 
The first parameter transmitted when called.
 
The first parameter transmitted when called.
Line 191: Line 191:
 
The second parameter transmitted when called.
 
The second parameter transmitted when called.
 
|-
 
|-
|<code>Param3</code>  
+
|<code>Param3</code>
 
|'''Read and Write'''
 
|'''Read and Write'''
 
The third parameter transmitted when called.
 
The third parameter transmitted when called.
Line 222: Line 222:
 
|'''Read Only'''
 
|'''Read Only'''
 
The current year on the user's computer.
 
The current year on the user's computer.
 +
|-
 +
|disableshelldash
 +
|'''Write Only'''
 +
Disables the Shell Suit dashing if set to 1.
 +
|-
 +
|disablehammershield
 +
|'''Write Only'''<br />
 +
|-
 +
|disablelinkshield
 +
|'''Write Only'''
 +
Disables Link's shield if set to 1.
 +
|-
 +
|disablelinksword
 +
|'''Write Only'''
 +
Disables Link's sword if set to 1. (Sword animations still play.)
 
|}
 
|}

Revision as of 03:55, 6 October 2019



sysval is a function in TeaScript.vbs that allows you to read and write system variables.

To read the value of a sysval use:

sysval(name)

This will return the value of the sysval used. Note that name is not case-sensitive.


When using a sysval that is writeable use:

sysval(name) = value

...to change the value of the sysval.

Name Description
NCount Read Only

The number of NPCs in the level.

BCount Read Only

The number of blocks in the level.

BGOCount Read Only

The number of background objects in the level.

WCount Read Only

The number of warps in the level.

LCount Read Only

The number of liquids in the level.

ECount Read Only

The number of warps in the level.

ActNCount Read Only

The number of NPCs in the screen.

ActBCount Read Only

The number of blocks in the screen.

Disablejump Write Only

To change the player's ability to jump.

0: Enable the player's ability to jump.

1: Disable the player's ability to jump.

Disablespinjump Write Only

To disable the spin jump ability.

0: Enable Spinjump.

1: Disable Spinjump.

ScrSplitstyle Read Only (Read and Write in 1.4.5 Patch 21)

The status of the camera's split mainly used for 2 player mode.

0: The camera is not split or 1 player mode is on.

1: Player 1 is on the top and player 2 is on the bottom.

2: Player 1 is on the bottom and player 2 is on the top.

3: Player 1 is on the left and player 2 is on the right.

4: Player 1 is on the right and player 2 is on the left.

Player1scrX Read Only

The camera's top left X-scene coordinate of player 1.

Player1scrY Read Only

The camera's top left Y-scene coordinate of player 1.

Player2scrX Read Only

The camera's top left X-scene coordinate of player 2.

Player2scrY Read Only

The camera's top left Y-scene coordinate of player 2.

GameMode Read Only

The current game mode.

0: 1 player mode.

1: 2 player mode.

2: Battle mode.

lvltimer Read and Write

The current number in the level timer.

Playerhealth Read and Write

The current number of 1-Ups collected.

CoinCount Read and Write

The current number of coins collected.

Score Read and Write

The current score.

StarCount Read Only

The current number of collected stars.

Starcoincount Read Only

The current number of collected star coins.

WldInvCount Read Only

The current number of items in the world map inventory.

Coinsforextralife Write Only

The limit of coins the player can store.

BPlayer1Health Read Only (Read and Write in 1.4.5)

The current number of 1-ups for player 1 in battle mode.

BPlayer2Health Read Only (Read and Write in 1.4.5)

The current number of 1-ups for player 2 in battle mode.

EnableLighting Write Only

To change the light system.

0: Turn off the light system.

1: Turn on the light system.

Disablesave Write Only

To change the player's ability to save.

0: Enable the player's ability to save.

1: Disable the player's ability to save.

Enablepause Write Only

To change the player's ability to pause.

0: Enable the player's ability to pause.

1: Disable the player's ability to pause.

Showhud Write Only

To hide the hud.

0: Hide hud.

1: Show hud.

Param1 Read and Write

The first parameter transmitted when called.

Param2 Read and Write

The second parameter transmitted when called.

Param3 Read and Write

The third parameter transmitted when called.

GameTime Read Only

The current amount of frames the level has been playing.

Second Read Only

The current amount of seconds on the user's computer.

Minute Read Only

The current amount of minutes on the user's computer.

Hour Read Only

The current hour on the user's computer. It uses a 24-hour system.

Day Read Only

The current day on the user's computer.

Month Read Only

The current month on the user's computer.

Year Read Only

The current year on the user's computer.

disableshelldash Write Only

Disables the Shell Suit dashing if set to 1.

disablehammershield Write Only
disablelinkshield Write Only

Disables Link's shield if set to 1.

disablelinksword Write Only

Disables Link's sword if set to 1. (Sword animations still play.)