Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

FPSC Modification

1. Installation
Rename the original FPSC-Game.exe in your FPSC folder to something else (e.g.: FPSC-
Game_original.exe). Copy this FPSC-Game.exe in your FPSC folder.

In case you get an "array index out of bounds" error or something similar:
- Go to this folder:FPS Creator\Files\languagebank\english\textfiles
- Open the file fpsc-050.ini
- Change the value to 670 or higher
- Save fpsc-050.ini

2. Variables
This mods provides four global variables. Two of them are numeric (variables 1 and 2), and two are
alpha-numeric (A and B). Within the scripts you can use these variables instead of literal values.
Example:

:state=%1:state=%2

The preceding % sign tells the script interpreter that you want to use a variable instead of a
literal value. In the above example the interpreter checks whether state equals the value in
variable 1 and if so, sets state to the value in variable 2.
There are three ways to assign values to a variable.

1) You can set a literal value directly:


VAR1=42
VARB=my text

2) You can assign the value of a variable to another


VAR2=%1
VARA=%A
(the engine automatically converts the value type if you assign the value of a numeric variable to a alpha-numeric variable)

3) You can assign an entity property to a variable


SETVAR1=level
(see SETVAR1, SETVAR2, SETVARA and SETVARB for more details)

3. New conditions
KEYPRESSED=X
is true if the user presses the key with the SCANCODE in X

INIKEYPRESSED=X
is true when any of the 32 keys defined in the setup.ini file are pressed

ENTITYTIMERGREATER=X
is true if X exceeds the entity timer

PLRLOWER=X
is true when player is X units lower than entity

VAR1=X
is true when the numeric value of variable 1 equals X

VAR2=X
is true when the numeric value of variable 2 equals X
VAR1LESS=X
is true when the numeric value of variable 1 is less than X

VAR1GREATER=X
is true when the numeric value of variable 1 is greater than X

VARA=X
is true when the alpha-numeric value of variable A equals X

VARB=X
is true when the alpha-numeric value of variable B equals X

FILEEXIST=X
is true when the file X exist

LEVEL=X
is true when the current level equals X

LEVELONCE
is true once for each level

ONCE
is true once in the game

TARGETACTIVE=X
is true if the current target is active and X is 1 or the current
target is inactive and X is 0

4. New Actions
STORELEVEL=filename
stores the current level settings with a file

LOADLEVEL=filename
loads a level previously stored in a file

ENTITYTIMERSTART
resets the entity timer

SYNCRATE=X
sets the sync rate of the game

VAR1=X
sets variable 1 to the numeric value X

VAR2=X
sets variable 2 to the numeric value X

VARA=X
sets variable A to the alpha-numeric value X

VARB=X
sets variable B to the alpha-numeric value X

VAR1ADD=X
adds the numeric value X to the value of variable 1

VAR1SUB=X
subtracts the numeric value X to the value of variable 1
VAR1MUL=X
multiplies the numeric value X to the value of variable 1

VAR1DIV=X
divides the numeric value X to the value of variable 1

VARACONCAT=X
concatenates the alpha-numeric value in variable A with X

SETVAR1=X
sets a numeric value of an entity property given in X to variable 1
possible properties in X are:
state: the state of the entity
health: health of the entity
plrhealth: health of the player
quantity: quantity of the entity
plrdist: distance of the player
plrusingaction: player using action
shotdamage: value of the last taken damage
activated: returns 1 if the entity is activated, else 0
targetindex: index number of the current target
level: the current level number

SETVAR2=X
sets a numeric value of an entity property given in X to variable 2 (see SETVAR1 for more details)

SETVARA=X
sets an alpha-numeric value of an entity data given in X to variable A
possible entity data:
name: name of the entity

SETVARB=X
sets an alpha-numeric value of an entity property given in X to variable B (see SETVARA for more details)

EXECFILE=filename
Executes a file

EXECFILEWAIT=filename
executes a file and waits till it's terminated

CALLDLL=DllFile|FuncName
calls the function "FuncName" in a Dll "DllFile" and passes 4 pointers. These pointers point to values that are
stored in the 4 global variables. A DLL function can modify these values and on its return these modifications
are stored back. Syntax example: To call a function named "TestMe" in a DLL called "MyLib.DLL", write:
CALLDLL=MyLib.DLL|TestMe

DELETEFILE=FileName
Deletes a file

SETTARGETNAME=X
sets an entity named X as the current target

FOGRANGE=X Y
sets the fog near range to X and the fog far range to Y (The near range is overwritten by FOG=X if X>1)

CAMERARANGE X Y
sets the camera near range to X and the camera far range to Y

USEARROWKEYS=X
if X is 0 the arrow keys do not control the player character anymore
TERMINATE
quits the game immediately (useful for a "boss key")

WIREFRAME=X
if X is 1 all static objects are displayed in wireframe mode.

5. Other changes
The field "Key12=" in the setup.ini file now defines the screenshot key. If no value is given it defaults to
the F12 key.

6. Scan Code Map

You might also like