[WIP] Race Engineer (Spotter) plugin for rFactor 2

I thought I would go about adding myself a "Tyres" and a "breaks" command. Mainly just to try and understand the plugin and how to use it. This, in conjunction with voice attack. The Tyres command is working, but the breaks is not, any advice? Voice attack is recognising my voice command so inputting the keystrokes required.



in Spotter.ini
Code:
Keyboard.Shortcut.count=2 // max 20
Keyboard.Shortcut.2.modifier.virtualCode=165     // right alt
Keyboard.Shortcut.2.key.virtualCode=75           // K key

in DefaultRules.ini
Code:
[Rule.22]
Trigger=Manual
Trigger.Shortcut=2
Event=BreakTempKey
Input1=BreakTemp
Input2=v:breakTooHot
Input3=v:breakTooCold

Also, am I correct in assuming the code for the keystrokes is the ASCII equivalent? Thanks for your awesome work dude!
 
For the key code, in the Spotter.ini, you have an url to the web site showing all codes.

What is your trouble. When you hit (manually) RightAlt+K nothing is said?
 
Exactly that mate.

Just tried with the file in the delivery and updating Spotter.ini with
Code:
Keyboard.Shortcut.count=2 // max 20
Keyboard.Shortcut.1.modifier.virtualCode=165     // right alt
Keyboard.Shortcut.1.key.virtualCode=74           // J key
Keyboard.Shortcut.2.modifier.virtualCode=165     // right alt
Keyboard.Shortcut.2.key.virtualCode=75           // K key

And DefaultRules.ini with
Code:
[Main]
Events.file=DefaultEvents.ini
Rules.count=22
......
......
......
[Rule.21]
Trigger=Manual
Trigger.Shortcut=1
Event=BreakTempKey
Input1=BreakTemp
Input2=v:breakTooHot
Input3=v:breakTooCold

[Rule.22]
Trigger=Manual
Trigger.Shortcut=2
Event=TireTempKey
Input1=TireInnerLayer
Input2=v:tireTooHot
Input3=v:tireTooCold

It works like expected. (Be sure to use RightAlt and not LeftAlt when you test).

I must look as some tell they don't listen sometime some message, may be a random issue somewhere.
 
Hi,
Can i reuse your video in the Wiki, to illustrate Shortcut+Voice recognition ?

of course ! feel free to use it in any way

this is the part of the FreePIE script used:

//switch to temperature info invoke Geralds spotter output
if said("check temps") then
if var.voice then
Playsound ("\GlovePie\WAVES-ENGL\metalclank.wav")
end if
keyboard.RightAlt+T = true
wait 100 ms
keyboard.RightAlt+T = false
keyboard.8 = true
wait 100 ms
keyboard.8 = false
wait 3000 ms
keyboard.Z = true
wait 100 ms
keyboard.Z = false
if var.voice then
Playsound ("\GlovePie\WAVES-ENGL\metalclank.wav")
end if
end if
 
Please, could you please test this full Text To Speech English pack and give me feedback (acceptable or awfull :))

- All sounds have been amplified, so normally you can use the default rF2 audio settings (all at 100% except opponent at 70%)

Thanks

Hi Gerald,

you are doing a really great work here!! :)
the sounds are very good for me.
the files "gap_060.wav"
"driver_nineteenth.wav"
"rc_m_best_lap_3.wav"
have a different voice.
thx alot
 
Hi Gerald,

you are doing a really great work here!! :)
the sounds are very good for me.
the files "gap_060.wav"
"driver_nineteenth.wav"
"rc_m_best_lap_3.wav"
have a different voice.
thx alot
I have reuploaded a version with this 3 sounds fixed, thanks

Does ver 0.7 have the full English pack you asked to be tested already installed?
Yes

Noob question !In the folder "bin64/plugin" ?
Thank you.

Yes for the 64bits DLL
 
this ``race engineer simulation`` is available since 2012 :o
for example have a look to this thread
http://isiforums.net/f/showthread.p...geneer-is-working-now?highlight=race+engineer

may be with the new work of Gerald I will release an atual version of it - if more people are interested ??

thx I remember to the thread :)
Thank you for posting the script example!

ps: I'm sure there are many interested people but it is not the easiest stuff and not all here are familiar with scripting.:confused:
Combine the both as we can see in your video is a really great thing. Love it !

Thanks for the update Gerald !
 
Are these 2 rules still in effect? Taken from post on previous build.

1. The provided configuration tell you lap and sector time information only in practice and qualifying.

2. Relative gap with behind and front car (place) is told only in race, every 3 lap and if car behind make the previous lap faster than you (if diff average previous laptime<3s), and if you make the prevous laps faster than the driver in front (if diff average previous laptime< 3s)
 
Looking for some help to do this.

I want to add last laptime feature (just get the NUM_xxxx.wav of the ISI Commentary MAS and look the event PlayerLaptime from their ini, you will be able to add it in my spotter)
 
If you want the spotter tell your time when you cut the start line.

Add the two event from ISI (PlayerLaptime and the one it call) and create a new rule (if based on S3, use Laptime, if based on another trigger, use LastLaptime)
Code:
[Rule.23]
Trigger=S3
Event=PlayerLaptime 
Input1=Laptime

And don't forget to update the rules count
 
Last edited by a moderator:
If you want the spotter tell your time when you cut the start line.

Add the two event from ISI (PlayerLaptime and the one it call) and create a new rule (if based on S3, use Laptime, if based on another trigger, use LastLaptime)
Code:
[Rule.23]
Trigger=S3
Event=PlayerLaptime 
Input1=Laptime

And don't forget to update the rules count

Didn't quite understand this (language barrier). Could you be more specific :) What do you mean by "the one it call" or how is "Laptime" different from "LastLaptime" ?
 
What do you mean by "the one it call"
Code:
Event=PlayerLaptime // Input1 will be last laptime
{
  // Event properties (note that these are not applied if this event is played by another event)
  Detail=1  // lap time is based on option, so this needs to be played at all detail levels
  Spacing=0.0
  Priority=0.5
  Probability=1.0
  TTL=10.0
  Break=0.25

  // Repeat until duration ends
  Repeat=Off
  Duration=0.0

  // Play introduction to laptime
  Volume=1.0

  // Variable used to choose one File to play for this Sound (Variable compared to Value)
  Variable=Random   // random number from 0.0 to 1.0
  {
    Value=(>=0.0,< 0.5) { File=lap_time.wav }
    Value=(>=0.5,<=1.0) { File=lap_time2.wav }
  }

  // Variable used to choose one File to play for this Sound (Variable compared to Value).
  // Tenths or hundredths?  Comment out the one you don't want:
  // In tenths:
//  Variable=Input1RoundFunc,10,60000,0  // hundreds of minutes (no valid modulus, so 1000 minutes returns 10 here)
//  {
//    Value=0  // only say laptime if less than 100 minutes (that's the maximum that the "LaptimeTenth" event supports)
//    {
//      Variable=Input1 { PlayEvent=LaptimeTenth } // pass our input1 into the played event as its input1
//    }
//  }
  // In hundredths
  Variable=Input1RoundFunc,100,600000,0  // hundreds of minutes (no valid modulus, so 1000 minutes returns 10 here)
  {
    Value=0  // only say laptime if less than 100 minutes (that's the maximum that the "LaptimeHundredth" event supports)
    {
      Variable=Input1 { PlayEvent=LaptimeHundredth } // pass our input1 into the played event as its input1
    }
  }
}
If you let as is, you see that the ISI event named "PlayerLaptime" make a call to "LaptimeHundredth", so you need those two events. And if you choose to uncomment the "LaptimeTenth" part and comment "LaptimeHundredth", you will need "PlayerLaptime" and "LaptimeTenth".


how is "Laptime" different from "LastLaptime" ?
Like described in the wiki
Code:
[B]Laptime [/B] : your laptime of the just finished lap (if trigger S3), else it is the current laptime
I see i forgot to provide access to LastLaptime input. i will add it (LastLaptime will always be the last laptime)
 
Back
Top