Working Starting timer for my track

Discussion in 'General' started by Massimo, Dec 17, 2020.

  1. Massimo

    Massimo Member

    Joined:
    Jul 9, 2019
    Messages:
    45
    Likes Received:
    11
    Hi to all modders friends,
    Today I would like to ask you if it is possible to make a starting timer working on AC, and how to do it.
    Let me explain, the idea is to make a timer that counts 5 seconds, and repeat the cycle, without stopping so as to be able to space out the starts of the cars (we are talking about a sort of rally). My idea is to model 5 meshs shaped as the numbers from 1 to 5 and make them light up in sequence, restarting each time, without stopping. Is there a way to do this? Maybe as we do with the starting light, trough the .ini file.
    Sorry for my English and thanks for your attention!
    Best regards to all

    Massimo
     
    Last edited: Jan 5, 2021
  2. jocala

    jocala New Member

    Joined:
    Mar 10, 2020
    Messages:
    8
    Likes Received:
    0
    I am also looking for a solution for the exact same thing
     
  3. fughettaboutit

    fughettaboutit aka leBluem

    Joined:
    Jul 21, 2014
    Messages:
    1,113
    Likes Received:
    378
    yes, but afaik no way to make it synced in online servers:
    (eventually with INPUT=TIME, but i have no idea how to do the LUT then)
    also AC timing is completely un-affected with this
    Code:
    [CONDITION_...]
    NAME=BLINKRED  ; 20 seconds on
    INPUT=ONE
    FLASHING_LUT=(|0=1|0.6666=1|0.6666=0|0.95=0|1=1|)
    FLASHING_FREQUENCY=0.0333  ; loop 30 seconds
    FLASHING_SKIP_OFF_STATE=1
    FLASHING_SKIP_DOWNHILL_STATE=1
    FLASHING_SMOOTHNESS=1
    
    [CONDITION_...]
    NAME=BLINKYELLOW  ; 5 seconds on from 15 seconds in
    INPUT=ONE
    FLASHING_LUT=(|0=0|0.45=0|0.5=1|0.6666=1|0.6666=0|1=0|)
    FLASHING_FREQUENCY=0.0333  ; loop 30 seconds
    FLASHING_SKIP_OFF_STATE=1
    FLASHING_SKIP_DOWNHILL_STATE=1
    FLASHING_SMOOTHNESS=1
    
    [CONDITION_...]
    NAME=BLINKGREEN  ; 10 seconds on from 20 seconds in
    INPUT=ONE
    FLASHING_LUT=(|0=0,0,0|0.5=0|0.6666=0|0.6666=1|0.95=1|1=0|)
    FLASHING_FREQUENCY=0.0333  ; loop 30 seconds
    FLASHING_SKIP_OFF_STATE=1
    FLASHING_SKIP_DOWNHILL_STATE=1
    FLASHING_SMOOTHNESS=1
    
    [MATERIAL_ADJUSTMENT_...]
    MATERIALS=blinkred
    KEY_0=ksEmissive
    VALUE_0=255,2,1,1
    CONDITION=BLINKRED
    
    [MATERIAL_ADJUSTMENT_...]
    MATERIALS=blinkyellow
    KEY_0=ksEmissive
    VALUE_0=255,255,1,1
    CONDITION=BLINKYELLOW
    
    [MATERIAL_ADJUSTMENT_...]
    MATERIALS=blinkgreen
    KEY_0=ksEmissive
    VALUE_0=2,255,1,1
    CONDITION=BLINKGREEN
     
    Last edited: Jan 21, 2021
  4. jocala

    jocala New Member

    Joined:
    Mar 10, 2020
    Messages:
    8
    Likes Received:
    0

    Well, i wrote this and it works not perfectly but it works, now all that remains is to associate it with the server time.
    little video with the light

    [CONDITION_5]
    NAME=BLINKRED ; 20 seconds on
    INPUT=ONE
    FLASHING_LUT=(|0=1|0.6666=1|0.6666=0|0.95=0|1=1|)
    FLASHING_FREQUENCY=0.0333 ; loop 30 seconds
    FLASHING_SKIP_OFF_STATE=1
    FLASHING_SKIP_DOWNHILL_STATE=1
    FLASHING_SMOOTHNESS=1

    [CONDITION_6]
    NAME=BLINKYELLOW ; 5 seconds on from 15 seconds in
    INPUT=ONE
    FLASHING_LUT=(|0=0|0.45=0|0.5=1|0.6666=1|0.6666=0|1=0|)
    FLASHING_FREQUENCY=0.0333 ; loop 30 seconds
    FLASHING_SKIP_OFF_STATE=1
    FLASHING_SKIP_DOWNHILL_STATE=1
    FLASHING_SMOOTHNESS=1

    [CONDITION_7]
    NAME=BLINKGREEN ; 10 seconds on from 20 seconds in
    INPUT=ONE
    FLASHING_LUT=(|0=0,0,0|0.5=0|0.6666=0|0.6666=1|0.95=1|1=0|)
    FLASHING_FREQUENCY=0.0333 ; loop 30 seconds
    FLASHING_SKIP_OFF_STATE=1
    FLASHING_SKIP_DOWNHILL_STATE=1
    FLASHING_SMOOTHNESS=1

    [MATERIAL_ADJUSTMENT_10]
    MATERIALS = luce rossa
    MESHES = SEMAFORO0_SUB7
    KEY_0=ksEmissive
    VALUE_0=255,2,1,1
    CONDITION=BLINKRED

    [MATERIAL_ADJUSTMENT_11]
    MATERIALS = luce arancio
    MESHES = SEMAFORO0_SUB8
    KEY_0=ksEmissive
    VALUE_0=255,255,1,1
    CONDITION=BLINKYELLOW

    [MATERIAL_ADJUSTMENT_12]
    MATERIALS = luce verde
    MESHES = SEMAFORO0_SUB9
    KEY_0=ksEmissive
    VALUE_0=2,255,1,1
    CONDITION=BLINKGREEN
     
  5. jocala

    jocala New Member

    Joined:
    Mar 10, 2020
    Messages:
    8
    Likes Received:
    0
    on the right of this video there is real sequence 0.35 sec, ps i have realized this track for assetto corsa
     
  6. Massimo

    Massimo Member

    Joined:
    Jul 9, 2019
    Messages:
    45
    Likes Received:
    11
    Great Guys! Thanks to funghettaboutit as always for the solution and thanks to jocala for testing it!
    Jocala, can I ask you where did you get the semaphore model shown in the video?
    Thanks again!

    Massimo
     
  7. jocala

    jocala New Member

    Joined:
    Mar 10, 2020
    Messages:
    8
    Likes Received:
    0
    yes, the semaphore are made by an friend with me, today i can build it easy, ps: i'm italian
     
  8. Massimo

    Massimo Member

    Joined:
    Jul 9, 2019
    Messages:
    45
    Likes Received:
    11
    What a pleasure! If is not "private", can you send me it? It should be very helpful for me.
    Grazie amico

    Massimo
     
  9. Massimo

    Massimo Member

    Joined:
    Jul 9, 2019
    Messages:
    45
    Likes Received:
    11
    Sorry Guys, how to name the file. ini that contains the code? (I suppose)

    Thanks
     
  10. fughettaboutit

    fughettaboutit aka leBluem

    Joined:
    Jul 21, 2014
    Messages:
    1,113
    Likes Received:
    378
    track config, whether in
    assettocorsa\content\tracks\yourtrack\extension\ext_config.ini
    or
    assettocorsa\extension\config\tracks\loaded\yourtrack.ini
     
  11. Massimo

    Massimo Member

    Joined:
    Jul 9, 2019
    Messages:
    45
    Likes Received:
    11
    Oh, perfect. Is needed Custom Shaders Patch?
    Thanks
     
  12. jocala

    jocala New Member

    Joined:
    Mar 10, 2020
    Messages:
    8
    Likes Received:
    0
    No sorry, for now is private and experimental to improve in game

    yes you need
     
  13. Massimo

    Massimo Member

    Joined:
    Jul 9, 2019
    Messages:
    45
    Likes Received:
    11
    No worries man, congratulations for your track, I saw the video you posted here, on Youtube. Great job!
    Anyway, I tried to do what you said guys, but not working for me (thinking I did something wrong).
    In my track there is already the external_config file with the codes for Grass FX and for the ambient lights (Trough BLM Lights App), I have simply pasted the code under the others. I modeled a "timer", imported into my track, and renamed the three meshes and materials of the lights to the correct name (I used exactly your code, Jocala).
    Did I miss some steps? Maybe some setting to activate in the CSP settings?

    Thank you guys

    Massimo
     
    Last edited: Jan 23, 2021
  14. fughettaboutit

    fughettaboutit aka leBluem

    Joined:
    Jul 21, 2014
    Messages:
    1,113
    Likes Received:
    378
    edit: for green to not fade out, but switch out, it should be somthing like this (untested):

    [CONDITION_...]
    NAME=BLINKGREEN ; 10 seconds on from 20 seconds in
    INPUT=ONE
    FLASHING_LUT=(|0=0|0.6666=0|0.6666=1|0.95=1|1=1|1=0|)
    FLASHING_FREQUENCY=0.0333 ; loop 30 seconds
    FLASHING_SKIP_OFF_STATE=0
    FLASHING_SKIP_DOWNHILL_STATE=1
    FLASHING_SMOOTHNESS=0
     
  15. Xuacu

    Xuacu Member

    Joined:
    Jun 13, 2023
    Messages:
    39
    Likes Received:
    14

    I am trying to do a traffic lights. I come from this post: https://assettocorsamods.net/thread...hts-for-a-free-roam-assetto-corsa-track.3274/

    I see that you did something close that I need but I don understand how you did.
    What means this line? FLASHING_LUT=(|0=0|0.6666=0|0.6666=1|0.95=1|1=1|1=0|)
    Do you need a .lut or . lua doc for make working that or only numerical values like 0.6666?

    How do you decide the "on" time and the "off" time and when the beginning of the loop?

    Thank you very much for the help!
     
    Last edited: Mar 17, 2024
  16. fughettaboutit

    fughettaboutit aka leBluem

    Joined:
    Jul 21, 2014
    Messages:
    1,113
    Likes Received:
    378
    Xuacu likes this.
  17. Xuacu

    Xuacu Member

    Joined:
    Jun 13, 2023
    Messages:
    39
    Likes Received:
    14
    Forgive my complete ignorance.

    I would like to know the meaning of each line:
    Input=one what does it mean? (; possible inputs:
    ; ONE, NONE, TIME, AMBIENT, FOG, SUN, RACING_FLAG, YEAR_PROGRESS)

    How could I choose the time I want for each loop? How do you measure the percentage in time? 0.0333 is 30 seconds: 1/30= 0.0333?

    What do the values 0.6666;0.95 mean? 1 is 60 seconds?


    As I understand this it would be like this

    FLASHING_LUT=(|0=0|0.6666=0|0.6666=1|0.95=1|1=1|1=0|)

    0=0 in time is off until time 0.6666 (1.5 secs)

    from 0.6666 to 0.95 (1.05 secs) is on

    The last range |1=1|1=0| I do not get it


    I apologize if I'm being very annoying but I need to understand this well.
     
  18. fughettaboutit

    fughettaboutit aka leBluem

    Joined:
    Jul 21, 2014
    Messages:
    1,113
    Likes Received:
    378
    input = one ; is 1 sec yes
    flashing_freq = 0.0333 is 1/30
    so now we stretched 1 in 30 parts/seconds
    in the flashing_lut we switch to percent
    at 0.666 * 30secs = 20secs
    and we want the light to turn on 'sharply' at that point
    ...0.666=0|0.666=1...

    we could do some 'fade' in:
    ...0.664=0|0.668=1...

    (0.668 - 0.664) = 0.004 * 30sec = 0.12secs fade-in time
     
    Last edited: Mar 18, 2024
    Xuacu likes this.
  19. fughettaboutit

    fughettaboutit aka leBluem

    Joined:
    Jul 21, 2014
    Messages:
    1,113
    Likes Received:
    378
    idk how else to explain, maybe sombody else?
     
  20. Xuacu

    Xuacu Member

    Joined:
    Jun 13, 2023
    Messages:
    39
    Likes Received:
    14

    Thank you very much for the trouble of explaining to me, I will try to do tests when I have free time with this information that you have given me.
    Thanks again!
     
    fughettaboutit likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice