Script Compatibility
GPC3 supports the common controller, combo, timing, math, keyboard/mouse, remapping, memory, and polar scripting patterns used by Titan Two/GPC2 and selected Cronus scripts.
Common Compatible Names
Aliases such as get_lval(), get_ival(), get_ptime(), get_brtime(), event_press(), get_rtime(), block(), random(), and the all-combo controls are available for easier script migration.
Untyped functions and parameters default to int, and the compatibility form define name = value; is accepted alongside #define.
Expected Differences
- Hardware-management calls for device ports, memory slots, displays, LEDs, batteries, power, and SD-card macros are not part of the PC scripting surface.
- Force feedback is read-only. In Helios,
ffb_get,ffb_get_actual, andget_rumbleread the returned feedback shown in Device Monitor;ffb_getandffb_get_actualreturn the same value.ffb_set,ffb_reset,set_rumble,block_rumble, andreset_rumbleare accepted for source compatibility but do not produce rumble. See Force Feedback and Force Feedback Functions. - Native Cronus
get_pvar()andset_pvar()are accepted, butget_pvar()always returns its default argument andset_pvar()does not save anything. Usepmem_*for settings during a script run. - Helios
pmemslots retain settings only during the current script run; they do not survive a script reload or application restart. See Memory & Persistent Data. rand()takes no arguments and returns a decimal from0.0up to but not including1.0; userandom(min, max)for inclusive integers.elapsed_time()takes no arguments and reports the previous main-loop interval. Usesystem_time() - saved_timefor a time window.
Force Feedback
Feedback channels are FFB_L, FFB_R, FFB_LT, FFB_RT, FFB_LH, and FFB_RH. Titan names keep their usual meaning (FFB_1 = L, FFB_2 = R, FFB_3 = RT, FFB_4 = LT), and the Cronus names RUMBLE_A, RUMBLE_B, RUMBLE_RT, and RUMBLE_LT follow the same order. LH/RH are haptic signal levels, not motor strength.
ffb_get(id, &duration) returns strength from 0.0 to 100.0 and writes the remaining time in milliseconds to a uint32 variable; pass NULL when you do not need it. Feedback without a known end time reports 0xFFFFFFFF. No feedback, a disconnected source, or an unknown channel returns zero. get_rumble(id) returns a whole-number percentage.
uint32 remaining;
main {
if (ffb_get_actual(FFB_L, &remaining) > 20.0) {
set_val(BUTTON_16, 100.0);
}
}For every channel, return value, and example, see Force Feedback Functions.
When migrating a script, compile it in Helios and review every reported unsupported name instead of replacing hardware-specific behavior with guessed equivalents.