-
-
Notifications
You must be signed in to change notification settings - Fork 6
DefaultPrograms
Ferdinand Calo edited this page Jun 16, 2020
·
14 revisions
DefaultPrograms is a class containing some STATIC predefined programs,
and also some programs which can be configured specifically for the group.
Note: TurboLists will be called "groups" eventually.
Note 2: Do not forget to "import" the class when using it to prevent compile errors.
Example on how to add a DefaultProgram into a Model Group:
somegroup.addProgram(DefaultPrograms.RGB_PRIMARY);
//can be also multiple at once
othergroup.addPrograms(DefaultPrograms.RGB_SECONDARY, DefaultPrograms.FRONT_LIGHTS);
//can be also string IDs
anothergroup.addProgram("fvtm:rgb_primary");Here a list with their function & eventual usage:
Edit: also includes IDs for jtmt and obj models
-
RGB_PRIMARY / fvtm:rgb_primary- paints the group into the vehicle/container's primary colour -
RGB_SECONDARY / fvtm:rgb_secondary- paints the group into the vehicle/container's secondary colour -
ALWAYS_GLOW / fvtm:glow- will give a constant "glow" effect to the group -
LIGHTS / fvtm:lights- will make the group "glow" when the vehicle's lights areON -
FRONT_LIGHTS / fvtm:front_lights- will make the group glow when the vehicle's lights areON -
BACK_LIGHTS,REAR_LIGHTS- will make the group glow either when the vehicle's
lights areONor the vehicle's throttle is negative (going backwards) -
BREAK_LIGHTS- currently a duplicate of REAR_LIGHTS -
FOG_LIGHTS- will make the group glow when the vehicle's FOG lights areON -
REVERSE_LIGHTS- will make the group glow only when the vehicle's throttle is
negative (going backwards), does NOT depend on vehicle's lightsON -
TURN_SIGNAL_LEFT- will make the group flashingly glow on vehicle's left signal -
TURN_SIGNAL_RIGHT- will make the group flashingly glow on vehicle's right signal -
INDICATOR_LIGHT_LEFT- duplicate of TURN_SIGNAL_LEFT -
INDICATOR_LIGHT_RIGHT- duplicate of TURN_SIGNAL_RIGHT -
WINDOW- gives a prototype "window"/transparency effect, modify the partmodel's
"windowcolor" (RGB) variable to change the color of the effect -
WHEEL_AUTO_ALL- full wheel animation, will make the group rotate based on
the vehicle's wheel values, also will render steering (if steering slot) -
WHEEL_AUTO_STEERING- steering animation for wheels, similar to the before -
STEERING_WHEEL_X,STEERING_WHEEL_Y,STEERING_WHEEL_Z- steering-wheel
animation, select whichever matches the AXIS your steering wheel has to rotate on -
SteeringWheel- superclass of the before, you can create a custom instance
new SteeringWheel(2, 1f)- first parameter is axis (x-0, y-1, z-2) second is "ratio" -
AttributeRotator- universal class for specific animation uses based on an Attribute
examples from FVP (C10):parameters:hood.addProgram(new DefaultPrograms.AttributeRotator("c10_hood", true, -72, 0, -1, 2, 0f)); door_front_left.addPrograms(new DefaultPrograms.AttributeRotator("c10_doors_fl", true, 0, 60, 0.5f, 1, 0f), DefaultPrograms.RGB_PRIMARY); door_rear_right.addPrograms(new DefaultPrograms.AttributeRotator("c10_doors_br", true, -60, 0, -0.5f, 1, 0f), DefaultPrograms.RGB_PRIMARY); trunk_primary.addPrograms(new DefaultPrograms.AttributeRotator("c10_trunk", true, 0, 72, 1, 2, 0f), DefaultPrograms.RGB_PRIMARY);
-
String attribute- the ID of the attribute to track -
boolean boolstatebased- if the Attribute is a BOOLEAN or direct (integer/float) -
float min- min angle (degree) of the rotation -
float max- max angle (degree) of the rotation -
float step- step per render frame (shall get improved someday) -
int axis- axis to be rotated (x-0, y-1, z-2) -
Float defrot- default rotation degree (e.g. 0f) -
boolean notadditive- optional, extended constructor, default:true
set tofalseif you want the program not tooverridethe default rotation
of the polygon, it will get reset todefrot(see above) then.
-
Need help in something that is not in the wiki, or is not there yet? Got issues or crashes?
Or want to help expand the Wiki? We have a discord server! https://discord.gg/AkMAzaA