• "Mwoah" - Kimi Räikkönen
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Dear Guest. Follow RaceDepartment on Twitter, Facebook, Instagram, Twitch, Steam and YouTube.

Other evoHUD 1.5.0

fully customizable HUD powered by squirrel

  1. kenken

    kenken

    Messages:
    581
    Ratings:
    +286
    kenken submitted a new resource:

    evoHUD - fully customizable HUD powered by squirrel

    Read more about this resource...
     
    • Like Like x 1
  2. kenken

    kenken

    Messages:
    581
    Ratings:
    +286
    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.
     
  3. Keith Windsor

    Keith Windsor

    Messages:
    1,767
    Ratings:
    +588
    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.
     
  4. kenken

    kenken

    Messages:
    581
    Ratings:
    +286
    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.
     
    • Like Like x 1
  5. kenken

    kenken

    Messages:
    581
    Ratings:
    +286
  6. Keith Windsor

    Keith Windsor

    Messages:
    1,767
    Ratings:
    +588
    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.
     
  7. kenken

    kenken

    Messages:
    581
    Ratings:
    +286
    Yes, you can. I'll show modified script to you later.
     
    • Like Like x 1
  8. kenken

    kenken

    Messages:
    581
    Ratings:
    +286
    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: Jun 18, 2017
  9. Keith Windsor

    Keith Windsor

    Messages:
    1,767
    Ratings:
    +588
    that's fantastic, thanks very much for taking time to write this, I will give it a go. :)
     
  10. Keith Windsor

    Keith Windsor

    Messages:
    1,767
    Ratings:
    +588
    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. :)
     
  11. kenken

    kenken

    Messages:
    581
    Ratings:
    +286
    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.
     
    • Like Like x 1
  12. Keith Windsor

    Keith Windsor

    Messages:
    1,767
    Ratings:
    +588
    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: Jun 19, 2017
  13. kenken

    kenken

    Messages:
    581
    Ratings:
    +286
    • Like Like x 1
  14. roby13

    roby13

    Messages:
    381
    Ratings:
    +49
    this looks absolutely promising. i hope it could attract reiza's interest
     
  15. kenken

    kenken

    Messages:
    581
    Ratings:
    +286
    kenken updated evoHUD with a new update entry:

    1.1.0 minor update release

    Read the rest of this update entry...
     
  16. kenken

    kenken

    Messages:
    581
    Ratings:
    +286
  17. Keith Windsor

    Keith Windsor

    Messages:
    1,767
    Ratings:
    +588
    Hope to get chance to try this latest version in the next couple of days, thanks
     
  18. kenken

    kenken

    Messages:
    581
    Ratings:
    +286
    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.
     
  19. SVG97

    SVG97

    Messages:
    10
    Ratings:
    +0
    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!
     
  20. kenken

    kenken

    Messages:
    581
    Ratings:
    +286
    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.