Example using script_load function

Documentation, usage tips and configuration guides for Titan Two scripts and bytecodes published by the community users.

Example using script_load function

Postby Scachi » Sat Apr 20, 2019 6:05 pm

This is an example for using the script_load() function
to load a different script into the current active T2 slot
on a keypress of F1,F2,F3,..,F9
the escape key will reload the script you installed via GTuner IV to that slot again.

Might be useful for fighting games with a lot of characters, each one with a lot of combos where you hit the scripts sizelimit with a single character already. This allows each character using an own script and all available script size if required, all using a single T2 slot.

Download:
Search for "script_load example" in the Online Resource in GTuner IV and click Download, do NOT use Drag Drop

Hardware requirements for this example:
  • SD-CARD *always required*
  • SD-CARD READER *always required (until gbc file management is added to the Gtuner IV software)*
  • KEYBOARD *only required for this example, you can use a button combination in your own script*


How To use/run this example
There is no automated way to install all required files via GTuner IV directly at the moment.
A feature request is already submitted to have this built in into GTuner IV in the future:
https://github.com/J2Kbr/GtunerIV/issues/286

At the moment you need to do all the mentioned steps manually:
  • Search for "script_load example" in the Online Resource in GTuner IV and click Download, do NOT use Drag Drop
  • Compile each of the 9 script files "f1.gpc","f2.gpc",...,"f9.gpc" to bytecode via "Compiler -> Built Bytecode"
  • Copy all files f1.gbc,f2.gbc,..,f9.gbc to your sd-card via a sd-card reader to path /TITAN TWO/MEMSLOT/
    ! spend attention to the B in .gbc <- you have to copy those .. do NOT copy the .GPC files to the sd-card !
  • Install ONLY ONE of those 9 script files via gtuner as you normally do to a single slot

Some fun, finally:
Select the slot of your T2 where installed one of the script files to and press key F1, F2, F3, ... F9 to load the correspondig script into that slot. The Output Panel will print some information when you hit the keys.
The Escape key will reload the script that you have installed via GTuner IV to that slot again.

Example output, I installed file f5.gpc to slot 5 and startet that slot, pressed F2, pressed F1, pressed Escape:
Code: Select all
Memory Slots: Loading memory slot 5
GVM Output: loaded f5.gpc in T2 slot 5
GVM Output: loaded f2.gpc in T2 slot 5
GVM Output: loaded f1.gpc in T2 slot 5
GVM Output: loaded f5.gpc in T2 slot 5


This is just a basic example. You can have less or a lot more than 9 script files to load into a single slot this way.
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Return to User's Script Documentation

Who is online

Users browsing this forum: No registered users and 82 guests