PDA

View Full Version : No Race Results in sms_stats_data.json?



boris_s.
26-10-2017, 14:49
Is there a bug in the stats_data lua script?

My sms_stats_data.json doesnt contain any race results. There are always only qualify results inside.

Anyone else can confirm this?

yons
26-10-2017, 16:06
Yes I can confirm. It look's like it is saving only one stage at a time.

The lua file is equal to pcars1 at least when I looked was.. so the problem can not be from there.

I think we have to wait until they launch the patch to correct more critical issues. Then they will give some love to the DS. ;)

couffi
08-11-2017, 14:35
Same problem i've just noticed, in the sms_stats_data.json, the "stages" only contains the 1st stage "stages" : { "practice1" : { ...} }
I'll look at the lua script tonight on my DS, maybe the handle_session_stage_change isn't good for pcars2 ..
I'll tell you here what i'll find.

boris_s.
08-11-2017, 15:54
Same problem i've just noticed, in the sms_stats_data.json, the "stages" only contains the 1st stage "stages" : { "practice1" : { ...} }
I'll look at the lua script tonight on my DS, maybe the handle_session_stage_change isn't good for pcars2 ..
I'll tell you here what i'll find.

very cool ! =) thanks mate

couffi
08-11-2017, 20:01
I Found the solution, I've found this problem yesterday, wanted to collect informations for my team, so i share the solution
in pcars2 they add a game state : PostRace
It didn't exist in pcars1 .. and sms didn't modified theirs addons ..
in order to have a good sms_stats_data.json file you have to modify the file /DS folder/lua/sms_stats/sms_stats.lua
In the handle_session_game_state_change function,
Lines 646 to 654 i add the state PostRace :
elseif ( old_state == "Loading" ) and ( new_state == "PostRace" or new_state == "Race" ) then
handle_session_loaded()
elseif ( old_state == "PostRace" or old_state == "Race" ) and ( new_state ~= "PostRace" and new_state ~= "Race" ) then
if new_state == "None" then
handle_session_finished_prematurely()
else
handle_session_finished()
end
end

Brado23
08-11-2017, 21:37
Thanks couffi!

Here is the entire code block (lines 634 to 655) for anyone else that just wants to copy and paste the entire function over the existing one....



-- Session game state changes.
function handle_session_game_state_change( old_state, new_state )
if not old_state or old_state == "" then
old_state = "None"
end
session_game_state = new_state
if ( old_state == "None" ) and ( new_state == "Lobby" ) then
handle_new_session_lobby()
elseif ( old_state == "Returning" ) and ( new_state == "Lobby" ) then
handle_returning_session_lobby()
elseif ( old_state == "Lobby" ) and ( new_state == "Loading" ) then
handle_session_loading()
elseif ( old_state == "Loading" ) and ( new_state == "PostRace" or new_state == "Race" ) then
handle_session_loaded()
elseif ( old_state == "PostRace" or old_state == "Race" ) and ( new_state ~= "PostRace" and new_state ~= "Race" ) then
if new_state == "None" then
handle_session_finished_prematurely()
else
handle_session_finished()
end
end
end

boris_s.
09-11-2017, 08:40
Wuhu guys u are tha men!! =) Thank you very much! I was searching myself already in the lua scripts but i didn't find the right way to solve it! But now i have it! Thank you guys! Perfect one =)

Brado23
09-11-2017, 09:39
All couffi, not me :)

couffi
09-11-2017, 23:08
Im developer, and use sometime lua at work, so that helps ;)
I printed a lot of debug infos in the Lua stats , and find the new game_state wich wasn't handle !

Rodders
15-11-2017, 14:57
Nice find Couffi - I'd been going through the Lua config looking for something I could tweak to try and get this working with no results. Sorted now and a happy chappie - just in time for starting up our first PCars 2 full league :)

Krobo
17-11-2017, 07:37
Im developer, and use sometime lua at work, so that helps ;)
I printed a lot of debug infos in the Lua stats , and find the new game_state wich wasn't handle !

Thank you couffi ! our league Thanks you .. we all thank you ~~!~

Great find ! what else can you fix ?? lol JK~ If the API worked proper things would be gravy ;-)...

Does anyone know will these now work proper with the simresults.net ?
Reason I ask is I tried it and for the first time it read the file ! & showed me results of my test race plus all the old practice sessions, but in the info I am left out ! everyone's results are there but mine .. ??
They are missing .. I won the test race but there is no trace of me in any of the data even the earlier practice sessions before I made the code edit .. This is only at simresults.net .. If I open the un parsed file I do see my data .. I was host in all sessions on a rented DS ?? (in p2p no other config edits -first player join is host)

Thanks again couffi ;-)

Brado23
17-11-2017, 22:41
I read a post by F1racer68 I think where he said the dev for simresults was updating the site to support pCars2. Not sure how far he has got with the updates yet though.

satco1066
18-11-2017, 00:44
if you follow mouseriffle (simresults coder) to github you can see there is a new development branch for pCARS2.
i think many here hope, that mouseriffle and his supporters will be successful.

And do not forget, there is a DONATE button on the simresults page. :rolleyes:

couffi
20-11-2017, 16:21
Im in the VirtualDrivers TX3 league,
I've made a live view with the DS API, in Javascript
and a litle result view from the sms_stats_data in php.
I looked into simresult code too, i had to adapt event and results from the history data,
if the simresults coder is on the pcars2, im sure he'll find easyly how to fix it.

http://virtualdrivers.org/index.php/serveurs-tx3

couffi
20-11-2017, 16:28
Does anyone know will these now work proper with the simresults.net ?
Reason I ask is I tried it and for the first time it read the file ! & showed me results of my test race plus all the old practice sessions, but in the info I am left out ! everyone's results are there but mine .. ??
They are missing .. I won the test race but there is no trace of me in any of the data even the earlier practice sessions before I made the code edit .. This is only at simresults.net .. If I open the un parsed file I do see my data .. I was host in all sessions on a rented DS ?? (in p2p no other config edits -first player join is host)
Thanks again couffi ;-)

I think the sms stat addon isn't yet ready ..
i notice many bugs in the file, name of players aren't all the time in the member or participant section .. maybe this is the case of your race ?
Hope SMS will fix it, there is a patch V3.0 coming soon, i heard the DS will be upgraded too, like the bug with the IA when you create a new DS and you don't want IA ..

Krobo
21-11-2017, 05:03
I think the sms stat addon isn't yet ready ..
i notice many bugs in the file, name of players aren't all the time in the member or participant section .. maybe this is the case of your race ?
Hope SMS will fix it, there is a patch V3.0 coming soon, i heard the DS will be upgraded too, like the bug with the IA when you create a new DS and you don't want IA ..

Thx couffi , glad its not just me ! ;-)

For us it seems to leave the host's data out of the parsed results .

couffi
21-11-2017, 08:07
Maybe you'll have to edit manually the file too add your name, or id somewhere..
What did you have in the sms_stats_config ?
i set to -1 to have infinite history, and true events and results.

Krobo
22-11-2017, 01:30
Maybe you'll have to edit manually the file too add your name, or id somewhere..
What did you have in the sms_stats_config ?
i set to -1 to have infinite history, and true events and results.
All my info is in the sms_stats_data file ..

I will check my cfg !

Rodders
29-11-2017, 17:12
After the patch I tried to upload the race logs to simresults but only get the practice session showing up again. I checked I'd not over-written the sms_stats.lua file and I've not - couffi's changes are still in there. Anyone else or should I go back check for me being stupid :p?

couffi
30-11-2017, 14:24
After the patch I tried to upload the race logs to simresults but only get the practice session showing up again. I checked I'd not over-written the sms_stats.lua file and I've not - couffi's changes are still in there. Anyone else or should I go back check for me being stupid :p?

Look in the sms_stat_config if you have the event : true
after the patch i always had my modifications on the sms_stat_lua, but not in the config.

Zincau
02-12-2017, 14:08
hello, i have them similar problem. I modifed the /DS folder/lua/sms_stats/sms_stats.lua as you mentioned at top. But it still says no results if i try to upload sms_stats_data.json file to simresults.net.

Any ideas? what did i miss here?

satco1066
04-12-2017, 15:58
http://forum.projectcarsgame.com/showthread.php?56405-No-Race-Results-in-sms_stats_data-json&p=1434885&viewfull=1#post1434885

its just one post before yours ;)

BTW you have to edit the "sms_stats_config.json" file
in DS-FOLDER\lua_config\
not that "sms_stats_default_config.json" file
in DS-FOLDER\lua\sms_stats\

Zincau
06-12-2017, 18:38
http://forum.projectcarsgame.com/showthread.php?56405-No-Race-Results-in-sms_stats_data-json&p=1434885&viewfull=1#post1434885

its just one post before yours ;)

BTW you have to edit the "sms_stats_config.json" file
in DS-FOLDER\lua_config\
not that "sms_stats_default_config.json" file
in DS-FOLDER\lua\sms_stats\

thank you very very much. I cant tell you how i'm happy now..

Zincau
07-12-2017, 21:41
Well, I'm getting results now but there are some issues.

1. All drivers seems as AI
2. Vehicle names not seen.

We tested 3 races with friends (race 1,4,5). Here is the link: http://simresults.net/171207-96g

Could you give an advice?


Thanks

Mauserrifle
10-12-2017, 10:20
Well, I'm getting results now but there are some issues.

1. All drivers seems as AI
2. Vehicle names not seen.

We tested 3 races with friends (race 1,4,5). Here is the link: http://simresults.net/171207-96g

Could you give an advice?


Thanks

I just fixed both issues.

Cheers,
Maurice

satco1066
10-12-2017, 18:57
great work !!

Zincau
14-12-2017, 09:18
I just fixed both issues.

Cheers,
Maurice

thank you very very much :)

Zincau
14-12-2017, 11:54
I just fixed both issues.

Cheers,
Maurice

I uploaded new results. But it has still same issues (No Vehicle and Pilot as AI).
Should i do something on config files or i inform you every time after upload for the fix these issues??

Mauserrifle
14-12-2017, 14:07
No you should not :)

Provide me the URL. I will look into it.

Zincau
14-12-2017, 20:51
No you should not :)

Provide me the URL. I will look into it.

its ok.. my bad.. thanks again :)

Krobo
08-01-2018, 04:44
So I am assuming once the code edits are made it wont be working until the next race session ? or I messed it up .. ?
here is my code edits:

<-- Session game state changes.
function handle_session_game_state_change( old_state, new_state )
if not old_state or old_state == "" then
old_state = "None"
end
session_game_state = new_state
if ( old_state == "None" ) and ( new_state == "Lobby" ) then
handle_new_session_lobby()
elseif ( old_state == "Returning" ) and ( new_state == "Lobby" ) then
handle_returning_session_lobby()
elseif ( old_state == "Lobby" ) and ( new_state == "Loading" ) then
handle_session_loading()
elseif ( old_state == "Loading" ) and ( new_state == "PostRace" or new_state == "Race" ) then
handle_session_loaded()
elseif ( old_state == "PostRace" or old_state == "Race" ) and ( new_state ~= "PostRace" and new_state ~= "Race" ) then
if new_state == "None" then
handle_session_finished_prematurely()
else
handle_session_finished()
end
end
end

but


& this is what I get so far .. we have not ran a race on the server after the txt edits so can that be why ? or did I mess up the code edits?

Thx in advance ;-)

Krobo
08-01-2018, 06:13
Ok testing after data edits confirms its working but not all the drivers results are shown , The admin is never shown in the results >
or its just me ? lol but my data is never shown and Im the admin every time ..

Look here we had a test of myself and 3 others (4 drivers) I took 2nd but my name is not even listed .. this has been the case every time for us = no results for the admin/ or just me?.. so we are using screen shots to record results for league scoring atm ..

Any Ideas or suggestion's ?? thanks ! ;-)

LCCMarc
08-01-2018, 17:02
He only inscribes 1 lap while he has to make 5 turns (he does the same at home but I see myself in the results)

Excuse me for my bad english

Krobo
08-01-2018, 19:22
Yes In my pic only 1 lap recorded for a 5 lap race ......
Does anyone have this working properly ? I saw a post in another thread by the author of simresults stating he fixed a few things ..but its not working properly yet for us ..

Thx ;-)

satco1066
08-01-2018, 22:52
no problem here with exact modifications like in post#5 and post#6.

Krobo
09-01-2018, 03:19
Thanks ! I did the same edits , i think it works as it now shows the race (2nd pic)
Do you see any errors with my code above? I quadruple checked it but that doesn’t mean its ok . Lol

I want to add that this issue with ‘my info never in the parsed results’ was happining the first time (pre last patch) i did the edits ..
We rent a server & when a new build of the DS comes out they update and i have to do the edits again .. so for me my data (as admin using -selectds or any method as it did it with direct join As well) never gets parsed .


If i open the data_stats or whatever its called up with say notepad I cannot read any of it but i can see names of all the drivers and my name IS in there it just never gets parced . ?
& then there’s the issue with only one lap being shown ..?
This is driving us nuts we have 2 championships going on and we cant parce the results.. there must be a setting i screwed up or somthing?. Thanks for any help guys:-)

Krobo
12-01-2018, 21:50
I don't know what to do .. its working fine except the admin of servers race data is never shown in the results ;-( ...
here is my data file its all correct for the last 2 races except no results for the admin who finished 6th in 1st race 2nd in second race ..

Mauserrifle
14-01-2018, 13:30
I fixed so you are now in the results. But note that you have no "events" in your data. So all results are 1 lap only (final result data). I cannot help fixing the events as I do not know and am just parsing. Please seek help with the other admins on the forum.

Cheers!

Maurice

Krobo
14-01-2018, 22:59
Thanks Maurice !
So now I need to open another thread for the devs to see why all my events have only 1 lap ..
Anyone have any Ideas ?
Thx ;-)

Krobo
14-01-2018, 23:35
Hi , thx for reading !
I have this on going issue .. from day one all my event data from the server shows 0 events .
Im one of the admins at SRO and do all the pc2 league events ,we have edited our sms_stats_lua for it to work with simresults web site , I also had the issue of my data not parsed ,Maurice has fixed this for me but has explaind I have no data ! ???


quote:
Hi Rob,

Thanks for the detailed info! I fixed so you are now in the results. But note that you have no "events" in your data. So all results are 1 lap only (final result data). I cannot help fixing the events as I do not know and am just parsing. Please seek help with the other admins on the forum.

Cheers!

Maurice

So now I am dumbfounded as to why ?

You can see in the pic I have 2nd place finish But nothing in the stats_data ?

Im using win7 and a rented server from rackservice using -selectds we have not edited our server cfg or lua to keep the ded up 24/7 ,we simply use the -selectds and build the event before hand & log on ,everything race wize works great !

Pleas have a dev check this out if possible ;-) I don't have a clue as to why this happens unless it has something to do with me being the in game admin ? that's the one common denominator ....
As of now Maurice says he has fixed the issue with my data not being parsed but has nothing to do with the fact its not recording data fro me .. ( I will post another new* sms_stats_data after our next race on the server to see if my data gets parsed )

I have attached our server cfg & the sms_stats_data file ..

Thanks for any help guys !! ;-)


more info can be found here > http://forum.projectcarsgame.com/showthread.php?56405-No-Race-Results-in-sms_stats_data-json&p=1461236&viewfull=1#post1461236





"last_joined" : 1515781290,
"name" : "Rob Milliken"
},_stats_
"76561198023243551" : {
"counts" : {
"qualify" : {
"positions" : {},
"positions_per_size" : {},
"states" : {}
},
"race" : {
"positions" : {
"4" : 1,
"5" : 1
},
"positions_per_size" : {
"0" : {
"4" : 1,
"5" : 1
}
},
"states" : {
"finished" : 2
}
},
"race_finishes" : 0,
"race_joins" : 6,
"race_loads" : 6,
"race_loads_done" : 6,
"track_distances" : {
"-52972612" : 417211,
"521933422" : 143340
},
"tracks" : {},
"vehicle_distances" : {
"1626504761" : 560551
},
"vehicles" : {}

satco1066
15-01-2018, 01:29
in "sms_stats_config.json" in Lua_config folder, is there "track_events" : true?

Krobo
15-01-2018, 03:15
Im wondering if me have 0 as my partisapent number (as host?) has anything to do with it ..

,
"is_player" : true,
"name" : "Rob Milliken",
"participantid" : 0,
"refid" : 58944,
"time" : 1512331370

Krobo
15-01-2018, 21:10
in "sms_stats_config.json" in Lua_config folder, is there "track_events" : true?

Oh my ,In lua_config no its not ..

// Should the history track session events?
// If enabled, these participant event types will be tracked per stage:
// Lap, State, Impact, CutTrackStart, CutTrackEnd
"track_events" : false,

In my Lua folder (not Lua_config) In the sms_stats_default_config.json it is true :

// Should the history track session events?
// If enabled, these participant event types will be tracked per stage:
// Lap, State, Impact, CutTrackStart, CutTrackEnd
"track_events" : true,


I have now edited the sms_stats_config.json from false to true !

I will go have a look !

Thanks satco !@!

satco1066
15-01-2018, 22:44
i wrote it allready in post #22 of that thread

http://forum.projectcarsgame.com/showthread.php?56405-No-Race-Results-in-sms_stats_data-json&p=1438995&viewfull=1#post1438995

Krobo
16-01-2018, 20:58
i wrote it allready in post #22 of that thread

http://forum.projectcarsgame.com/showthread.php?56405-No-Race-Results-in-sms_stats_data-json&p=1438995&viewfull=1#post1438995

Yes I see now that I edited one of the 2 files but not the lua_cnfg ! DOH ..
It seems to be working now !!! ;-)

Thank you for all the help !!!

satco1066
16-01-2018, 23:35
about 15 nervous posts , just cause not reading the thread carefully.

Hope you learned from that :p

Krobo
17-01-2018, 19:59
Well I learned from all of it ..Im not a programmer ,I have never worked with a lua file[s] and there are thousands of identical lines of code in all these different files so ya ,I learned a lot ..
Thanks for all the help !

Krobo
22-02-2018, 21:29
I have a question regarding the on going collection of results that the data file stores ..

so far it has every thing ever done on the server from day 1 tons of results etc..

I see this line in the config: // Number of gameplay events stored on the server. Oldest ones will be discarded once the game logs more.
eventsLogSize : 10000

If I change this to a lower number will it at some point only store the selected amount ?
Ideally I would like to clear it after every Race/P/Q session so we have only the latest results stored ,as it is now the file is so big I need to compress it to download it from the server files ..lol

Thx ...

Ploddy
30-04-2018, 23:43
silly question but do we have to enable the lua api to get results? Does anyone know of a way to use simresults.net or similar with PCars2 without using the lua api?

F1_Racer68
27-05-2018, 18:27
Has anyone else noticed the results are missing info since Patch 5?

Laps compelted only shows "1" for every driver, and all of the incident data, etc are missing.

Prior to Patch 5 the results looked like this.....

http://simresults.net/180409-H1h

And the Race menu had all these entries....
255168

Since Patch 5, the results look like this.....

http://simresults.net/180523-t7Z

And the "Race" menu only has these entries...

255169

We have had the same issue on two separate servers.

Has anyone else had this issue? Any idea what the fix is?

EDIT: I installed a third, brand new server on a local system. Still the same issue. 2 server were with the sms_stats.lua fix, and the third one was with default files.

satco1066
28-05-2018, 22:34
cannot confirm that.
Our Server is in sportsplay mode, since patch 5 we have always date 1970, but no problem with laps.
This results are from sunday, may 27th

http://simresults.net/180527-r5b

F1_Racer68
28-05-2018, 23:51
Hmmm.

I'll try a clean reinstall again and see what happens.

EDIT: A clean install didn't work.

F1_Racer68
29-05-2018, 00:46
cannot confirm that.
Our Server is in sportsplay mode, since patch 5 we have always date 1970, but no problem with laps.
This results are from sunday, may 27th

http://simresults.net/180527-r5b

Am I correct in assuming you have still made the changes to the sms_stats.lua file mentioend in posts 5 and 6 in this thread?
http://forum.projectcarsgame.com/showthread.php?56405-No-Race-Results-in-sms_stats_data-json&p=1418467&viewfull=1#post1418467

Would you mind sharing your server.cfg file and sms_stats.lua file with me so I can compare to mine? PLease be sure to remove any IP addresses and usernames/passwords. I don't need or want that info ;)

satco1066
30-05-2018, 00:18
sorry, have no access to the server.
But our admin says, all that was changed is from post 6 and 7. Nothing edited since months.

F1_Racer68
30-05-2018, 00:22
OK, thanks. I will have to keep looking at it and see if I can figure anything out.

Rodders
26-06-2018, 22:16
Anyone notice if Simresults has changed something recently as our race results all look like this now:

http://simresults.net/180617-Jr0

This result looked fine when originally posted but now as soon as a space is seen in the name it only shows one more character then cuts it off.

F1_Racer68
27-06-2018, 03:16
Anyone notice if Simresults has changed something recently as our race results all look like this now:

http://simresults.net/180617-Jr0

This result looked fine when originally posted but now as soon as a space is seen in the name it only shows one more character then cuts it off.

Noticed that with our latest results as well.

http://simresults.net/180620-5tk

F1_Racer68
01-07-2018, 05:07
Anyone notice if Simresults has changed something recently as our race results all look like this now:

http://simresults.net/180617-Jr0

This result looked fine when originally posted but now as soon as a space is seen in the name it only shows one more character then cuts it off.


Noticed that with our latest results as well.

http://simresults.net/180620-5tk

So it seems the "Shorten Surnames" option is what's causing this. By default it is checked. If the driver has a Steam ID that is two or more words it will treat it as a first and last name. Remove it, and the names show properly again.

257012