Log in to reply

[SCRIPT][REL] Dynamic Indicators

  • Hi everyone,

    This post will serve as a tutorial for vehicle developers who wish to equip their cars with dynamic indicators.
    For any further questions, feel free to join my discord.

    NOTE: This tutorial is not finished yet. Todo:

    • Guide for Method B (similar to A, but a few differences)
    • FAQ
    • Troubleshooting


    The script can work in 2 ways:

    1. Method A Use the existing GTA indicators, and only cover up the DRL or taillight below it;
      This option is used for example on the newest Mercedes-Benz cars, where the DRL will turn off and the indicator will light up.
      You can also use this for older cars that have their taillights turned off while the indicator is on.

    2. Method B Use a custom GTA indicator, and cover everthing up below it, including the GTA indicators.
      This option is used if option 1 is not good enough for the required effect.

    First option is the easiest, because you do not need to work on all indicators (probably only the front ones or the back ones).
    The second option takes the most time, because it will require you to do all 4 or 6 indicators (don't forget the ones in the side mirrors).

    Starting point is a normal working car, with stock GTA indicators present. If someone does not use the script, the default indicators will still work as they should.

    Lets start with Method A.
    Before you start, make sure your indicators are "on the top", and the DRL, taillight and/or brakelights are below it.

    1. Copy the DRL, taillight and/or brakelight polygons (only the parts that you want hidden) into a new object (misc_X).
      Do this for all sides you want hidden. Make sure the new object dummy is on x=0 y=0 z=0 (default). Put it under chassis for now.
    2. Apply a new (or existing) material to misc_X that is higher in the material hiarchy and is 100% transparent.
      You can use an existing badge material for this, and uv map it to a part of the texture that is 100% transparent.

    Note: If you want to have it look the same as the object you are hiding (texture-wise), copy the material used for the DRL/taillight/brakelight and put it above it in the material hiarchy. Then change that copied material it to badge material or glass material and apply it to misc_X.

    1. Move (in polygon mode) the misc_X object very slightly (<1mm) outwards, so it covers the object you want hidden but does not move past the indicator object. Do not move the dummy axis (keep it on x=0 y=0 z=0).
    2. Add Flags AE to your new misc_X object.
    3. Move the misc_X (full object including dummy position) inwards into the car, so it will not be visible anymore from the outside.
    4. Repeat steps 1-5 for every side you want covered (probably only LF and RF, or LR and RR).
    5. Export the car yft files and put it in the .\mods folder.
    6. Open Codewalker RPF Explorer and browse to the .\mods folder.
    7. Right click on the carname_hi.yft file and select Export XML.
    8. Open the XML file and search for your misc_X object(s).
    9. Verify the misc_X objects have the correct Tag value. misc_a starts at 58614 and misc_z ends at 58639, rest is between there.
    10. Verify the misc_X objects have the correct Flags from step 4: <Flags>RotX, RotY, RotZ, TransX, TransY, TransZ, Unk0</Flags>
    11. Write down the Translation coordinates of all misc_X objects made in steps 1-5. The move action of step 5 will be shown here in more detail. 2 Axis should have 0, 1 Axis should have a number (the axis you moved in step 5).
    12. Reset all the misc_X dummy positions to 0,0,0, without moving the object itself.
    13. Save, export and exit Zmodeler.
    14. Use CodeWalker or OpenIV and put the new yft files in your car dlc.

    Method B soon.

    Animations (*.ycd) are still new to us but can be used to animate certain car parts, like the misc_X objects we have created.
    First step is to download and study the animations file for Method A and/or Method B.

    After you learned how they work (by reading my comments), download the empty files which you can use as a base:
    Method A base file: https://pastebin.com/wHzJYEHX
    Method B base file: soon

    The script will simply run these animations based on the status of the indicator ingame.
    Both methods A and B require the following animations to be present in the animations file:

    • indilefton
      animation that is run when the left indicator has been turned on.
    • indileftoff
      animation that is run when the left indicator has been turned off (reuse indilefton and set everything back to X=0 Y=0 Z=0)
    • indirighton
      animation that is run when the left indicator has been turned on.
    • indirightoff
      animation that is run when the left indicator has been turned off (reuse indirighton and set everything back to X=0 Y=0 Z=0)
    • indihazon
      animation that is run when the hazard lights have been turned on (so just combine indilefton and indirighton).
    • indihazoff
      animation that is run when the hazard lights have been turned off (so just combine indileftoff and indirightoff).
    • indiltor (only needed for Method A)
      animation that is run when the right indicator has been turned on, but the left was on previously (so just combine indileftoff and indirighton)
    • indirtol (only needed for Method A)
      animation that is run when the left indicator has been turned on, but the right was on previously (so just combine indirightoff and indilefton)

    Even though it looks like a lot, there are only 4 different sets, the rest can simply be copied (in the right number order of course). These 4 are:

    1. Turning the left indicators on
    2. Turning the right indicators on
    3. Turning the left indicators off
    4. Turning the right indicators off
      And even moreso, the -off animation is mostly the same as the -on, except you revert everything back to X=0, Y=0 and Z=0.

    Lets start with Method A:

    1. Download the Method A base file and rename it to va_carname.ycd.xml
    2. Start with indilefton and add the correct Items in the <BoneIds> section.
      If you don't know what I mean, please study the animations file for Method A.
    3. Do the same for <SequenceData> and add the correct Items.
    4. Do the same for all the other animations (indileftoff, indirighton, etc.)
    5. Open CodeWalker RPF Explorer and browse to your yft files in your car dlc.
    6. Right click next to your yft files (empty section) and select Import XML. Import your va_carname.ycd.xml file.
      (If the file does not show up, there is an error in your XML file)

    Method B soon.

    First file that every end-user has to modify is tk0wnz-indicators.ini
    They need to add two new rows at the bottom:
    ModelNameX = carname
    DurationX = 0
    X equals the latest number in their ini file + 1.
    DurationX for Method A is always set to 0. If this number is >0, the script assumes Method B is used.

    In order for the animations to load, you need to add the va_carname filename to vehicle.meta:

    If you are using Method B, you will also need to edit carcols.meta:
    <color value="0x00000000" />
    This will prevent the indicator light on the road showing up out of sync with your own indicator

  • ( reserved post for Method B )

  • This post is deleted!

  • Still no Method B ? Waiting Method B :D maybe one day we Will get it working on FiveM also :D

    Keep it Up, you Are Assome and waiting new vehicles also what Are with Dynamic indis.

    Best Regards

Log in to reply

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.