Introduction

GLCV3 boasts a variable system for Developer Edition users.

The use of variables allows you to create, edit, store and use numbers and text strings for use throughout your launcher.

How to use variables

To use a variable in your text strings, command line switches or anywhere else they are supported, simply take the variable name and wrap it in % sign.

If you are using variables in a text string, you must ensure that ‘Constant String‘ is toggled to on, otherwise the variables won’t be rendered.

System Variable List

TEMPDIR – This is the path to the launcher’s temporary directory on the user’s computer. When the launcher is run for the first time, a set of directories are created in %appdata%\glclaunchers\ and a folder is created which is your launcher title. An example would be C:\Users\andrew\AppData\Roaming\glclaunchers\my game launcher\

LOCALVERSION – The local version number retrieved from whatever you have setup under Versioning

REMOTEVERSION – The remote version number retrieved from wherever you specified under Versioning

BGMVOL – The current volume of the global background music (0 – 100)

SCREENHEIGHT – The height of the user’s screen resolution

SCREENWIDTH – The width of the user’s screen resolution

APPDATA – This returns the absolute path to the user’s %APPDATA% folder

CURUSERFOL – This returns the absolute path to the user’s CURRENT USER folder

USERDOCS – This returns the absolute path to the user’s DOCUMENTS folder

DOWNLOADPERCENT – The download percentage of the current file being downloaded by the download action

DLSPEEDB – The download speed of the current file being downloaded by the download action, in bytes

DLSPEEDMB – The download speed of the current file being downloaded by the download action, in megabytes

DOWNLOADURL – The URL of the file being downloaded by the download action

DOWNLOADFILE – The filename of the file being downloaded by the download action

STATUSAOPS – The current status string from the Patching System

CURRENTFILEAOPS – The current file being scanned or downloaded or patched by the Patching System

TOTALAOPSPROGRESS – The total patch progress of the Patching System, returned as a number (0 – 100)

CURRENTFILEPROGRESSAOPS – The total progress of patching the individual file in CURRENTFILEAOPS, returned as a number (0-100)

PERCENT – Converts a % sign

Note on PERCENT: Because % is a reserved character for the variable string system, it would mean you can’t use % in your strings. So in order to return a % sign in your strings, you should use %PERCENT%. As an example, if you were to display the AOPS Progress, you would write it as:

%TOTALAOPSPROGRESS%%PERCENT%

Which as an example, would return: 52%

Custom Variables

You can define your own custom variables to use throughout your launcher application. In order to ‘create’ a custom variable, you need to choose a location where this variable is coming from.

Textboxes
To use the input from a text box as a variable, you can simply go to the textbox’s settings and go to Developer Settings and toggle ‘Enable Custom Variable’ to on then type in the variable name you want to use. So if this was a username box, you could use the variable name username. Then to reference this variable somewhere else, you simply use %username% in the syntax.

Examples

Display Versioning Information
To display the versioning information inside your launcher, you simply create a text string like this:

Local: %LOCALVERSION%
Latest: %REMOTEVERSION%

Load Data and Send in Query
To load data from an INI file and send it via a PHP query string, you do this…

  1. Create a textbox and in the settings choose Developer Settings
  2. Enable INI Save/Load
  3. Configure the INI settings
  4. Configure the Custom Variable Name

Once you have done this, you can create your Query String and go to the settings of that and configure those settings.

  1. Configure the URL to your script online
  2. Send the username as part of the additional parameters (?username is the query var your script is waiting for and %username% is the name of your custom variable from the textbox).
  3. Set a Script Execution Delay of at least 10, in order to give the launcher time to load the information from the INI first

Custom Patching Page
If you own the Developer Edition of GLCV3, you can design your own custom patching page, just like you would any other page. This enables you to create the exact patch design you want to fit your current launcher design.

Insert a text string and go to the settings of this new text string then go to Developer Settings click on ‘Text’ and in the textbox type in:

Current Progress: %TOTALAOPSPROGRESS%%PERCENT% - Checking File: (%CURRENTFILEAOPS%) - (%CURRENTFILEPROGRESSAOPS%%PERCENT%)

Now before this will work, don’t forget to go to the Text String settings and select ‘Extra Settings‘ and toggle ‘Is a Constant String?‘ to ON.

Unless a String is set to CONSTANT STRING ON, no variables will be parsed otherwise.

178 views

Customer Login

If you are a product customer and want to access the private support forum sections and other resources here, login with your Store account.