Scripting for CheatDevice Remastered [WIP]
------------------------------------

Scripts can be added to CheatDevice Remastered by creating text files in the /SCRIPTS/LCS and /VCS directories on the memory card.

Collection: https://github.com/Freakler/CheatDeviceRemastered-UserScripts

These script text files follow Sanny Builder 3's syntax and require opcodes for each instruction. Cleo IF THEN END syntax is NOT supported!
Therefore it is recommended to enable "Write Opcodes" under "Tools > Options > General" if you plan to copy paste from decompiled SCMs.


	SCM documentation & useful links:
	https://gtamods.com/wiki/SCM_language

	Stories specific:
	https://docs.sannybuilder.com/scm-documentation/lcs
	https://docs.sannybuilder.com/scm-documentation/vcs

	What opcodes exist? 
	https://docs.sannybuilder.com/edit-modes/opcodes-list-scm.ini
	https://gtaforums.com/topic/502580-stories-opcodes/
	https://github.com/Freakler/CheatDeviceRemastered-UserScripts/wiki/LCS-Opcodes-Documentation
	https://github.com/Freakler/CheatDeviceRemastered-UserScripts/wiki/VCS-Opcodes-Documentation


Tutorial
--------

Part 1, Getting Started
https://github.com/Freakler/CheatDeviceRemastered-UserScripts/wiki/UserScript-Tutorial---Part-1,-Getting-Started

Part 2, Game Looping, If Statements and Input
https://github.com/Freakler/CheatDeviceRemastered-UserScripts/wiki/UserScript-Tutorial---Part-2,-Game-Looping,-If-Statements-and-Input




Good to know
------------
You can add metadata to your Script txt by using the keywords "Author:", "Version:", "Category:", "Date:", "Description:" which will then show in the Legend box.

You can call / jump to labels defined in the MAIN section too! 

A script should always end with a return or terminate_script opcode or the game might freeze.

The script is limited to 8192 translated Bytes with 256 possible Labels currently.

You can use up to 16 custom texts per script currently. If the GXT identifier cannot be found the text will be displayed instead.

Starting a new script if another is still running WILL result in undefined behaviour (probably crash) for now!!!! 
--> Scripts should be created with a disable key to not run forever! See VCS examples!




Currently not (maybe yet) supported
-----------------------------------

	- Using defined Model names like Sanny does. Insert the actual IDE number instead!
		024C: request_model #CARDBOARDBOX 		-> NOT SUPPORTED
		024C: request_model 547					-> OKAY!
	
	- block comments. Only simple // comments for now
