• “Just being a mediocre driver has never been my ambition. That's not my style” ― Michael Schumacher
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Have a chance to win a copy of F1 2017 The Game (PC) by following RaceDepartment on Twitter, Facebook, Instagram, Twitch, Steam and / or YouTube.

The script thread?

Discussion in 'Racer' started by gtpdzbiz, Aug 8, 2010.

  1. gtpdzbiz

    gtpdzbiz

    Messages:
    129
    Ratings:
    +0
    Racer is now supporting RSX script which is a pretty nice little tool~expands the possibility of custom content creation.

    So....I'll start with a simple script for testing 0-100km acceleration time.

    Just put the files into yourtrackfolder/scripts/paint, press spacebar if you want to reset the timer.

    Hope it helps~:)
     

    Attached Files:

  2. QuadCoreMax

    QuadCoreMax

    Messages:
    767
    Ratings:
    +71
    Thx man, works great !

    Just a question, how did you generate the rcx file ? Looks like binary format...
     
  3. Stereo

    Stereo

    Messages:
    2,462
    Ratings:
    +1,497
    You write an ascii source code (script.rsx), then compile it through the Racer console:
    compile <filename>
    Which produces the .rcx file.
     
  4. QuadCoreMax

    QuadCoreMax

    Messages:
    767
    Ratings:
    +71
    Ah yes, now I remember....

    I'll try something out !
     
  5. AMGfan(BPM)

    AMGfan(BPM)

    Messages:
    804
    Ratings:
    +30
    Interesting! Never mind it! gonna try!
     
  6. camsinny

    camsinny

    Messages:
    479
    Ratings:
    +21
    Thanks, was trying to figure this out last week but couldn't get it.

    Clearly scripting isn't my thing haha
     
  7. Mr Whippy

    Mr Whippy

    Messages:
    2,992
    Ratings:
    +461
    Any chance of a timer for different intervals, and braking time/distances etc too?

    Hmmmm, nice :D


    Also, general observation, I noticed the default 'graphs' seem to have gone now... ie, "run glong" in the console doesn't show the longitudinal G graph any more... have they been removed?!

    Dave
     
  8. gtpdzbiz

    gtpdzbiz

    Messages:
    129
    Ratings:
    +0

    I think it's fairly easy to make a script combining with trigger gate for testing braking time/distance, and many other testing features like quarter mile acc test/top speed recording/even drifting score.

    The "graphs" function still works, the "glong" script is probably deleted so you can't execute it via console. Try "graph step -20 20 gforce_lon" in the console for the lon-G graph instead.

    Edited: It looks like racer is having some trouble running multiple rcx scripts. Perhaps they all running on a single thread?
     
  9. Alex Forbin

    Alex Forbin

    Messages:
    727
    Ratings:
    +125
    Very handy. I've been hoping someone would start a thread that knew something about this.

    Alex Forbin
     
  10. Cobra

    Cobra

    Messages:
    217
    Ratings:
    +0
    Would love to have 1/4 mile accel tests...... :)
    Good job on this! works fine :)
     
  11. QuadCoreMax

    QuadCoreMax

    Messages:
    767
    Ratings:
    +71
    Is there any chance of getting the simulated/outputted values from the debug functions & reuse/execute them somehow in our custom scripts/functions as input values ?
     
  12. gtpdzbiz

    gtpdzbiz

    Messages:
    129
    Ratings:
    +0
    You can contact Mitch about accessing simulation values from the rsx scripts.
     
  13. QuadCoreMax

    QuadCoreMax

    Messages:
    767
    Ratings:
    +71
    What about putting an event to your script which detects whenever the car reaches for example 200 km/h & then dynamically changes your paint script on-screen/in-game ?

    So, we would have something like that :

    If car is below 100 km/h, it renders the acceleration for 0-100
    If car is equal or greater than 100 km/h & below 200km/h, it renders the acceleration for 100-200
    etc...
    to 300-400 km/h

    A TV shows about Veyrons Top Speed, demonstrating how slowly a Veyron needs to reach 400 from 350 km/h, it was something like 30s to more than 1 min if I recall correctly, I should check Googling...:)

    Lots of ideas really, I'll re-dive myself in C++ programming...

    P.S: We shall have more car/track events.
     
  14. QuadCoreMax

    QuadCoreMax

    Messages:
    767
    Ratings:
    +71
    I just thought about your script more deeply...It reminds me a bit those GPS PPC applications I've used in the past, which does basically the same but typically or originally, I had in mind something that works correctly.

    IMO, there should be another condition checking the nb. of seconds needed to reach actually the speed of 100km/h. So, the simulated/outputted values should be less than a nb. of seconds you defining. It could be programmed as a constant something like less than 10 secs, if car hasn't reached it in this range, don't output anything...

    Just an idea !?!
     
  15. Mr Whippy

    Mr Whippy

    Messages:
    2,992
    Ratings:
    +461
    Possibly better to look at the throttle state, if it stops being a wide open for longer than say 3s, then you are essentially stop timing as the run isn't valid?

    10s limit would rule out lots of slower cars and trucks etc :D

    Dave
     
  16. gtpdzbiz

    gtpdzbiz

    Messages:
    129
    Ratings:
    +0
    OK, now the brake test script is finished~

    This one works with Carlswood, so now the straight strip is a brake test area. It measures your brake time and distance. You can also easily port it to other track by using trigger lines.

    Installation:
    !This only works with latest version(0.8.16)!

    Remove/backup all your track script and copy all the files into carlswood_nt/scripts, replace the special.ini with the new one. That's it.

    How to use:
    Teleport to the start line by pressing Shift+p, drive straight through the drag lane and follow the on screen instruction, have fun and take good safety measures~:cool:
     

    Attached Files:

  17. Mr Whippy

    Mr Whippy

    Messages:
    2,992
    Ratings:
    +461
    Nice work.

    At work right now, but what does this actually test? Brake stopping distance and time?

    Thanks

    Dave
     
  18. MitchVL

    MitchVL

    Messages:
    150
    Ratings:
    +0
  19. KS95

    KS95
    RACER Moderator

    Messages:
    2,416
    Ratings:
    +196
    You should be!
     
  20. Mr Whippy

    Mr Whippy

    Messages:
    2,992
    Ratings:
    +461
    Should just post it in the thread here :D