Scripts
Content has yet to be written.
Migration from R13
- Replace
from gremlin.user_plugin import *withfrom gremlin.user_script import *. - All variables have a new positional argument,
is_optionalin 3rd position. gremlin.joystick_handling.VJoyProxynow isvjoy.vjoy.VJoyProxy.- Every
PhysicalInputVariablehas a.decorator(mode)method that takes aModeVariableas argument and can be used as a decorator on callbacks. VirtualInputVariablechange in a few ways:- Exposes
vjoy_id,input_id, andinput_typeas properties. - Provides a
remap(value)method which allows direct vJoy assignment.
- Exposes
- Hat type inputs no longer accept a tuple
(int, int)as value but now requiregremlin.types.HatDirectionas value type. Converting a tuple into the correct direction is achieved viagremlin.types.HatDirection.to_enum(tuple_value)
Variable Types
The following describes the different variable types available for use in a script. The implementation of these can be fond in the GitHub Source Code.
Bool
BoolVariable(name, description, is_optional, initial_value)
Float
FloatVariable(name, description, is_optional, initial_value, min_value, max_value)
Integer
IntegerVariable(name, description, is_optional, initial_value, min_value, max_value)
Keyboard
KeyboardVariable(name, description, is_optional)
Logical Device
LogicalVariable(name, description, is_optional, valid_types)
Mode
ModeVariable(name, description, is_optional)
Selection
SelectionVariable(name, description, is_optional, option_list, default_index)
String
StringVariable(name, description, is_optional, initial_value)
Physical Input
PhysicalInputVariable(name, description, is_optional, valid_types)
Virtual Input
VirtualInputVariable(name, description, is_optional, valid_types)