Resource icon

Other evoHUD 1.5.0

Login or Register an account to download this content
kenken submitted a new resource:

evoHUD - fully customizable HUD powered by squirrel

evoHUD is a fully customizable HUD powered by squirrel script language.

Installation
  1. copy d3d9.dll and evoHUD.nut to game root folder.
  2. copy evoHUD.dll and evoHUD folder to plugins folder.
Work with other graphical plugin
  1. rename d3d9.dll to something like d3d9_orig.dll.
  2. copy evoHUD.ini to game root folder and edit it.
[General]
OriginalD3D9DLL = d3d9.dll​
to
[General]
OriginalD3D9DLL =...​

Read more about this resource...
 
Sorry, there is a mistake in evoHUD.nut. Not critical one, but it might be cause some load or unexpected result. Please delete line 206 'pitboard();' in evoHUD.nut.
 
Thanks, looking forward to trying this. Is there a hotkey to switch it on and off by any chance? It would be good to use it in the garage and turn it off when driving out of pits.
 
Thanks, looking forward to trying this. Is there a hotkey to switch it on and off by any chance? It would be good to use it in the garage and turn it off when driving out of pits.
I found bug related with key input. I'm trying to fix now.

Anyway, current default script has not implemented on/off functions. But it can be implemented at script level. So, after fix bug, you can implement yourself. I will implement on/off function for some widgets, too.
 
Would you know any way of adding all drivers' sector times to the standings list? I haven't a clue myself but I wondered if it is possible. That would make a great pit display, with lap times, sector times, and indicator to show who is in the pit and who is on track.
 
Would you know any way of adding all drivers' sector times to the standings list? I haven't a clue myself but I wondered if it is possible. That would make a great pit display, with lap times, sector times, and indicator to show who is in the pit and who is on track.
Yes, you can. I'll show modified script to you later.
 
Here is modified code. Please replace original leadersboard function with following code.
Code:
function leadersboard()
{
    if (isKeyPressed(72)) { // 'H' key
        ::bLeadersBoard = !::bLeadersBoard;
    }

    if (!::bLeadersBoard) {
        return;
    }

    local num = getScoringInfo(SI_NumVehicles);
    local session = getScoringInfo(SI_Session);
    local height = 15 + num * 22;
    local bRace = (session >= 10 && session <= 13);

    beginWindow("Leaders Board", 10, 10, (bRace) ? 330: 510, height);
        beginColumns("Board colomn", (bRace) ? 4: 7, false);
            local sorted = getSortedVehicleIndex();
            local bestLapTime = getVehicleInfo(sorted[0], VI_BestLapTime);

            setColumnWidth(0, 30);
            setColumnWidth(1, 160);
            setColumnWidth(2, 80);

            if (!bRace) {
                setColumnWidth(3, 60);
                setColumnWidth(4, 60);
                setColumnWidth(5, 60);
                setColumnWidth(6, 50);
            } else {
                setColumnWidth(3, 50);
            }

            for (local i = 0; i < num; ++i) {
                local pos = sorted[i];

                text(format("%d", getVehicleInfo(pos, VI_Place)), AlignRight);
                nextColumn();

                text(getVehicleInfo(pos, VI_DriverName));
                nextColumn();

                if (bRace) {
                    if (i != 0) {
                        local lapBehind = getVehicleInfo(pos, VI_LapsBehindLeader);

                        if (lapBehind > 0) {
                            text(format("+%d Lap", lapBehind), AlignRight);
                        } else {
                            text(convLaptime(getVehicleInfo(pos, VI_TimeBehindLeader), true), AlignRight);
                        }
                    }
                } else {
                    local lapTime = getVehicleInfo(pos, VI_BestLapTime);

                    if (lapTime > 0.0) {
                        if (i != 0) {
                            text(convLaptime(lapTime - bestLapTime, true), AlignRight);
                        } else {
                            text(convLaptime(lapTime), AlignRight);
                        }
                    }

                    nextColumn();

                    local sec1Time = getVehicleInfo(pos, VI_BestSector1);

                    if (sec1Time > 0.0) {
                        text(convLaptime(sec1Time), AlignRight);
                    }

                    nextColumn();

                    local sec2Time = getVehicleInfo(pos, VI_BestSector2);

                    if (sec2Time > 0.0) {
                        text(convLaptime(sec2Time - sec1Time), AlignRight);
                    }

                    nextColumn();

                    if (lapTime > 0.0) {
                        text(convLaptime(lapTime - sec2Time), AlignRight);
                    }
                }

                nextColumn();

                local status = getVehicleInfo(pos, VI_FinishStatus);

                if (status == 2) {
                    text("DNF");
                } else if (status == 3) {
                    text("DSQ");
                } else if (getVehicleInfo(pos, VI_InPits)) {
                    text("PIT");
                }

                nextColumn();
            }
        endColumns();
    endWindow();
}
 
Last edited:
That works perfectly, thank you again. Just one more question if you don't mind. When I press the H key to switch the standings on or off, the key is extremely sensitive - it flickers on and off several times with one key press so it is a bit difficult to make it stay on or off, it takes a few attempts.
Do you know if there's any way to slow this sensitivity down?

Anyway, it is a useful utility in the pits, so thanks again for the sector code. :)
 
Thanks for reporting. I'm going to fix it.

By the way, you want popup that widget only when you are in a garage, right? Unfortunately, we can't detect whether you are in a garage or not from the information we can get. But if condition is you are in a pit lane(including garage) and vehicle is nearly stopped, we can implement widget auto popup.

Replace
Code:
   if (isKeyPressed(72)) { // 'H' key
       ::bLeadersBoard = !::bLeadersBoard;
   }

   if (!::bLeadersBoard) {
       return;
   }

   local num = getScoringInfo(SI_NumVehicles);
with
Code:
    local num = getScoringInfo(SI_NumVehicles);

    if (isKeyPressed(72)) { // 'H' key
        ::bLeadersBoard = !::bLeadersBoard;
    }

    if (!::bLeadersBoard) {
        local index = -1;

        for (local i = 0; i < num; ++i) {
            if (getVehicleInfo(i, VI_IsPlayer)) {
                index = i;
                break;
            }
        }

        if (index < 0 || !getVehicleInfo(index, VI_InPits)) {
            return;
        }

        local vel = getVehicleInfo(index, VI_LocalVel);

        if (fabs(vel[0]) > 0.01 || fabs(vel[1]) > 0.01 || fabs(vel[2]) > 0.01) {
            return;
        }
    }
And also change 'bLeadersBoard <- true;' to 'bLeadersBoard <- false;' at the beginning of file.
 
Thanks for reporting. I'm going to fix it.
By the way, you want popup that widget only when you are in a garage, right? Unfortunately, we can't detect whether you are in a garage or not from the information we can get. But if condition is you are in a pit lane(including garage) and vehicle is nearly stopped, we can implement widget auto popup.

The pit lane/garage will do the job just as well, thanks a lot for this! I'll add your code and try it.

EDIT YES! Works perfectly, standings only appear when car is at complete standstill in pit lane/garage. Thank you :)
 
Last edited:
This is alpha 2 test version.

download link: https://www.mediafire.com/?39q1lfp32y654py

changelog since alpha 1
  • Alt-G is a key for reloading. It can be changed by using setReloadKey in evoHUD.nut.
  • Due to internal modification, you can't use \x escape sequences anymore. Please replace \x escape sequences with \u(e.g. replace \xb0 with \u00b0).
  • Fixed flicker on certain track(e.g. kansai).
  • Added sector time widget.
  • Fixed no scoringInfo and vehicleInfo data at entering realtime.
  • Fixed getBestLaptime CTD.
Please report anything unusual or unexpected behavior of this version.
 
Hi kenken
I've been using the alpha 2 version, it's working great on my end, really happy with it.
Can you please advise how to get widgets like brakeInfo, tireInfo, & fuelinfo to turn off/on with keystrokes, just like DRS and leaderboard? I tried what I thought I knew, turns out I don't know quite as much as I thought I did lol

Great hud, loving it!
 
This MOD is fully customizable by squirrel script language、not ready-made MOD with fixed features. In a sense, you should program it everything to create your ideal HUD.
I have to say, read evoHUD.nut and API manual. What you want is in there.

Or put below code at the top of function.
Code:
    if (isKeyPressed(keyCode)) { // or if (isKeyPressed(keyCode) && isKeyPressed(modifier)) {
        ::statusHolder = !::statusHolder;
    }

    if (!::statusHolder) {
        return;
    }
Then, put in this code in initialize().
Code:
statusHolder <- true;
Important: 'keyCode' and 'statusHolder' are just example. You have to replace them with proper key code value and variable name.

By they way, I'm pending 1.2.0 release since new AMS version is coming.
 

Latest News

What would make you race in our Club events

  • Special events

    Votes: 62 29.7%
  • More leagues

    Votes: 40 19.1%
  • Prizes

    Votes: 43 20.6%
  • Trophies

    Votes: 24 11.5%
  • Forum trophies

    Votes: 13 6.2%
  • Livestreams

    Votes: 32 15.3%
  • Easier access

    Votes: 114 54.5%
  • Other? post your reason

    Votes: 33 15.8%
Back
Top