Zwift Ride Ons

Zwift Ride Ons 0.32

Boondoggler

New Member
Boondoggler submitted a new resource:

Zwift Ride Ons - Get Ride On counts and names from Zwift's log file and output them direct to a text source

Script reads Zwift Log file and outputs the names of anyone giving you a thumbs up to a selected text source. A total count of the ride ons received and given can also be output to individual sources.

You can control the rate that the names are shown and how many to show on screen at once.

Script will assume a default install directory of homedrive\homepath\documents\zwift\zwift\logs\log.txt - This is usually something like C:\Users\usrname\documents\zwift\logs\log.txt. If this matches...

Read more about this resource...
 

Boondoggler

New Member
Boondoggler updated Zwift Ride Ons with a new update entry:

Route name, distance info and lap counter added

Updated Since version 0.11
  1. -- 0.12 - Added Lap Counter with option display current or completed lap, tidied up source list in props
  2. -- 0.13 - Added Current Route name, changed naming convention of sources for consistency
  3. -- 0.14 - Added Route Length (km), leadin (km) and Ascent (m) - these are written to the 'route stats' source
  4. -- 0.15 - Added Rounding to Route Length and Lead-in values to limit to 2 decimal places
  5. -- 0.16 - Added reset for lap counter when current...

Read the rest of this update entry...
 

MortenTillquist

New Member
I can't get details about route selection to show right at startup. I have to press "reset valuet" and when I have paced a lap then it takes about 1m 30sec before laps are updated
 

Boondoggler

New Member
Boondoggler updated Zwift Ride Ons with a new update entry:

Chat messages and Timing Arch Info added

Chat messages and timing arch info added. Filter Chat messages by Zwift user ID - add a comma separated list of IDs to the script parameters and only see messages from those users. Chat messages continually append - set the text source as a chat log for best effect.

View attachment 58499
0.19 - Added parsing for Chat messages with option to filter by user Zwift ID.
0.20 - Added parsing for Timing Arch lines in log file, outputs name, time and avg power. Name not always...

Read the rest of this update entry...
 

Boondoggler

New Member
I can't get details about route selection to show right at startup. I have to press "reset valuet" and when I have paced a lap then it takes about 1m 30sec before laps are updated

Hi Morten,

Fixed the route info issue - let me know if you still have problems with it.
Still looking at the lap update - but this looks like it's the result of a difference between when the game shows a lap and when it writes it to the log file. The lap count in the log may lag as a result. I have some ideas for other ways of doing this. If I get chance, I'll try to implement it.
 

Boondoggler

New Member
Boondoggler updated Zwift Ride Ons with a new update entry:

Event name and subgroup added, 'says Ride On!' now optional some other small improvements

  1. Made text displayed after the name of user giving ride on user definable - will deafult to ' says Ride On!'
  2. Changed Lap counter logic, now ignores the log files lap count figure as this lags behind the game.
  3. Added mitigation for strings not found where changing character position causes arithmetic issues.
  4. Added option to include or exclude chat types (world, Paddock and GroupEvent)
  5. Added formatting to arch timing and changed output string to be more concise...

Read the rest of this update entry...
 

Boondoggler

New Member
Hi,
What are you looking to do? The lua script won't error if run from the command line, but, it won't output anything either.

There's a function in the script called 'get_ride_ons()' that does the actual parsing of the log file, you could copy that out and pipe the output to a file if that's the sort of thing you were wanting to do?

Cheers,
 

Baron ZuZu

New Member
Sorry for dumb questions, my son (9 yrs old) is a first time streamer with big ambitions and eager to try your script :) He's a keen Zwifter along with his sister (7 years old) - alas they are relying on me to get it sorted out :p

I installed the plug ins and created some text boxes as per your instructions:
  • I assume I need to create 2 text boxes in order to show 'Total Ride-Ons' - One for the script and one for "Total Ride Ons Received: "
  • For the chat content/timing arch. I assume one text box (for each) with no text in it? Mind you when I create that I cannot move it or resize it in OBS
I know it's cheating, but it's a shame you can't export the scene and we simply import it
 

Boondoggler

New Member
Sorry for dumb questions, my son (9 yrs old) is a first time streamer with big ambitions and eager to try your script :) He's a keen Zwifter along with his sister (7 years old) - alas they are relying on me to get it sorted out :p

I installed the plug ins and created some text boxes as per your instructions:
  • I assume I need to create 2 text boxes in order to show 'Total Ride-Ons' - One for the script and one for "Total Ride Ons Received: "
  • For the chat content/timing arch. I assume one text box (for each) with no text in it? Mind you when I create that I cannot move it or resize it in OBS
I know it's cheating, but it's a shame you can't export the scene and we simply import it


Hi,

Sorry it's taken me a while to reply.

Point 1, yes one box for the number amd one for the label.

Point 2, yes, not so much need for a label for those 2, so just the 2 empty text fields will do.

If I get chance later I'll add an export of a sample scene and attach here.

Hope that helps.
 

leventyalcin

New Member
Hi,

I wish this script was on GitHub that we could contribute because it fails on macOS. The main reason for that is the line 45.

This function below should help with the issue.

Lua:
log_default = set_log_default
function set_log_default()
    local p
    if os.getenv("ZWIFT_LOG_PATH") ~= nil and os.getenv("ZWIFT_LOG_PATH") ~= '' then
        p = os.getenv("ZWIFT_LOG_PATH")
    elseif os.getenv("HOMEDRIVE") ~= nil  and os.getenv("HOMEDRIVE") ~= '' then
        p = os.getenv("HOMEDRIVE")..os.getenv("HOMEPATH").."\\Documents\\Zwift\\Logs\\Log.txt"
    else
        p = os.getenv("HOME").."/Documents/Zwift/Logs/Log.txt"
    end
    return p
end
 

Boondoggler

New Member
Hi,

Thanks for this, not a Mac user so never had chance to test there. If I get chance I'll add this in, failing that, on github here:


Many thanks,
 

Boondoggler

New Member
Hi,

I wish this script was on GitHub that we could contribute because it fails on macOS. The main reason for that is the line 45.

This function below should help with the issue.

Lua:
log_default = set_log_default
function set_log_default()
    local p
    if os.getenv("ZWIFT_LOG_PATH") ~= nil and os.getenv("ZWIFT_LOG_PATH") ~= '' then
        p = os.getenv("ZWIFT_LOG_PATH")
    elseif os.getenv("HOMEDRIVE") ~= nil  and os.getenv("HOMEDRIVE") ~= '' then
        p = os.getenv("HOMEDRIVE")..os.getenv("HOMEPATH").."\\Documents\\Zwift\\Logs\\Log.txt"
    else
        p = os.getenv("HOME").."/Documents/Zwift/Logs/Log.txt"
    end
    return p
end


Updated to ver 0.3 using your function, thanks!
 

rapasave

New Member
Hi everyone, why I can't get ride on received and the source of ride on received. Other fields are ok.

Do you have any idea?

I use obs latest version on W10.

Thanks
 

Boondoggler

New Member
Hi everyone, why I can't get ride on received and the source of ride on received. Other fields are ok.

Do you have any idea?

I use obs latest version on W10.

Thanks
Hi,
If you have the fields mapped to active gdi sources it should work OK.

Attach one of your log files here and I'll have a look at it in case zwift have changed how they write the log entries.
 

rapasave

New Member
Hello,

here is my latest log. I tried again the counter keep always to 0 and I have received a lots of Ride On

Thanks in advance for your support
 

Attachments

  • Log.zip
    132.1 KB · Views: 46

Boondoggler

New Member
Hello,

here is my latest log. I tried again the counter keep always to 0 and I have received a lots of Ride On

Thanks in advance for your support
Hi,

Ok, I see the problem. The script is looks for some English text before 'Ride On!', I'm guessing your language is set to Italian? I'll hopefully get some time later and find another way to get the name out.

Thanks,
 
Top