Page 1 of 5 123 ... LastLast
Results 1 to 10 of 50

Thread: No Race Results in sms_stats_data.json?

  1. #1
    Kart Driver
    Join Date
    Oct 2017
    Posts
    34
    Platform
    PC

    No Race Results in sms_stats_data.json?

    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?

  2. #2
    Kart Driver
    Join Date
    May 2015
    Posts
    13
    Platform
    PC
    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.
    Last edited by yons; 26-10-2017 at 16:08.

  3. #3
    Kart Driver
    Join Date
    Jun 2015
    Posts
    27
    Platform
    PC
    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.

  4. #4
    Kart Driver
    Join Date
    Oct 2017
    Posts
    34
    Platform
    PC
    Quote Originally Posted by couffi View Post
    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

  5. #5
    Kart Driver
    Join Date
    Jun 2015
    Posts
    27
    Platform
    PC
    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
    The following 7 users likes this Post: Brado23, F1_Racer68, M. -VIPER- Morgan, Rodders, satco1066, SimonJ, yons


  6. #6
    Superkart Pilot
    Join Date
    Sep 2017
    Location
    Wollongong
    Posts
    210
    Platform
    PC
    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....

    Code:
    -- 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
    Last edited by Brado23; 08-11-2017 at 20:41.
    Motherboard: ASUS Z270 ROG Maximus IX Hero Processor: Intel i7-7700K Memory: 16GB 3333MHz Corsair Vengeance LPX Video Card: ASUS GeForce GTX 980 Strix DirectCU II 4GB OS: Win10 x64 Storage: Samsung 850 PRO 512 GB SSD Controllers: Logitech G29, Fanatec V3i Pedals, Fanatec CS Handbrake v1.5 Other: HTC Vive, RS Dash, Voiceattack, OVRdrop
    The following 5 users likes this Post: boris_s., Luke Townsend, Marc Wieneke, SimonJ, yons


  7. #7
    Kart Driver
    Join Date
    Oct 2017
    Posts
    34
    Platform
    PC
    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 =)

  8. #8
    Superkart Pilot
    Join Date
    Sep 2017
    Location
    Wollongong
    Posts
    210
    Platform
    PC
    All couffi, not me
    Motherboard: ASUS Z270 ROG Maximus IX Hero Processor: Intel i7-7700K Memory: 16GB 3333MHz Corsair Vengeance LPX Video Card: ASUS GeForce GTX 980 Strix DirectCU II 4GB OS: Win10 x64 Storage: Samsung 850 PRO 512 GB SSD Controllers: Logitech G29, Fanatec V3i Pedals, Fanatec CS Handbrake v1.5 Other: HTC Vive, RS Dash, Voiceattack, OVRdrop

  9. #9
    Kart Driver
    Join Date
    Jun 2015
    Posts
    27
    Platform
    PC
    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 !
    The following user likes this Post: Krobo


  10. #10
    Superkart Pilot Rodders's Avatar
    Join Date
    Dec 2015
    Posts
    381
    Platform
    PC
    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

Similar Threads

  1. Race results screwed up?
    By Mon Pavion in forum Project CARS 2 on XBOX One
    Replies: 0
    Last Post: 24-09-2017, 18:14
  2. sms_stats_data.json question
    By Zincau in forum Multiplayer
    Replies: 0
    Last Post: 07-06-2017, 12:29
  3. race class results
    By Chap904 in forum Feature Suggestions
    Replies: 0
    Last Post: 29-03-2016, 02:46
  4. Purpose of sms_stats_data File?
    By Alan_Bernardo in forum Multiplayer
    Replies: 3
    Last Post: 13-10-2015, 20:18
  5. Results from the previous race - online race mode
    By GrimGrnninGhost in forum PS4 - Technical Help & Support
    Replies: 4
    Last Post: 04-06-2015, 14:48

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •