Skip to content

DefaultPrograms

Ferdinand Calo edited this page Jun 17, 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 are ON
  • FRONT_LIGHTS, fvtm:front_lights
    • will make the group glow when the vehicle's lights are ON
  • BACK_LIGHTS, REAR_LIGHTS, fvtm:back_lights
    • will make the group glow either when the vehicle's lights are ON
      or the vehicle's throttle is negative (going backwards)
  • BREAK_LIGHTS
    • currently a duplicate of REAR_LIGHTS
  • FOG_LIGHTS, fvtm:fog_lights
    • will make the group glow when the vehicle's FOG lights are ON
  • REVERSE_LIGHTS, fvtm:reverse_lights
    • will make the group glow only when the vehicle's throttle is
      negative (going backwards), does NOT depend on vehicle's lights ON
  • TURN_SIGNAL_LEFT, fvtm:turn_signal_left
    • will make the group flashingly glow on vehicle's left signal
  • TURN_SIGNAL_RIGHT, fvtm: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
  • WARNING_LIGHTS, fvtm:warning_lights
    • will make the group flashingly glow on the vehicle's warning signal
  • BACK_LIGHTS_SIGNAL_LEFT, TAIL_LIGHTS_SIGNAL_LEFT, fvtm:back_lights_signal_left
    • combination of BACK_LIGHTS and TURN_SIGNAL_LEFT
    • like seen in american type cars
  • BACK_LIGHTS_SIGNAL_RIGHT, TAIL_LIGHTS_SIGNAL_RIGHT, fvtm:back_lights_signal_right
    • combination of BACK_LIGHTS and TURN_SIGNAL_RIGHT
    • like seen in american type cars
  • LIGHTS_FRONT_FORWARD, fvtm:lights_front_forward
    • train lights on front side when going forward
  • LIGHTS_FRONT_BACKWARD, fvtm:lights_front_backward,
    • train lights on front side when going backward
  • LIGHTS_REAR_FORWARD, fvtm:lights_rear_forward
    • train lights on rear side when going forward
  • LIGHTS_REAR_BACKWARD, fvtm:lights_rear_backward,
    • train lights on rear side when going backward
  • TRANSPARENT, fvtm:transparent
    • will make the group "transparent"
  • WINDOW, fvtm:window
    • gives a prototype "window"/transparency effect,
    • custom color instance can be created via new DefaultPrograms.Window(HEX_INT)
    • for json/obj add the color in INTEGER form as argument
  • WHEEL_AUTO_ALL, fvtm:wheel_auto_all
    • full wheel animation, will make the group rotate based on
      the vehicle's wheel values, also will render steering (if it's a steering slot)
  • WHEEL_AUTO_STEERING, fvtm:wheel_auto_steering
    • only steering animation for wheels, similar to the before
  • BOGIE_AXLE_WHEEL, fvtm:bogie_axle_wheel
    • for train bogie axles, incomplete,
  • BOGIE_AUTO, fvtm:bogie_auto
  • for train bogies, incomplete
  • 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, fvtm:steering_base
    • 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"
    • for json/obj add the axis and ratio parameters in the same order as an array
  • STEERING_WHEEL_CX, STEERING_WHEEL_CY, STEERING_WHEEL_CZ
    • version of the above for non-centered polygons, but centered model (0, 0, 0)
  • SteeringWheelCentered, fvtm:steering_base_centered
    • superclass of the before, you can create a custom instance
      new SteeringWheelCentered(2, 1f) - first parameter is axis (x-0, y-1, z-2) second is "ratio"
    • for json/obj add the axis and ratio parameters in the same order as an array
  • AttributeRotator, fvtm:attribute_rotator
    • universal class for specific animation uses based on an Attribute.
      Examples from FVP (C10):
      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);
      parameters:
      • 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 to false if you want the program not to override the default rotation
        of the polygon, it will get reset to defrot (see above) then.
    • for json/obj add the parameters/arguments in the same order as an array
Clone this wiki locally