Late to the Party

  • -snip-


    No problem at all! I'm happy to help.

    Here is a copy of the log as well as where server seems to stop processing any other data.

    It looks like server is logging them as client requests and I don't see anything that really stands out in the server log - is the issue on the .dll side?

    I'll try to disable the loot ranking config line and see what happens!

    Note: Disabling that line in the server-side config file yields the same results - it still halts on "[Late to the Party] Could not find FN40GL Mk2 grenade launcher in trader assorts."

  • Interesting... I get the same message, but my server doesn't freeze there. Here is what I see:


    [2023-05-16T03:46:47.885Z] info: [Late to the Party] Could not find FN40GL Mk2 grenade launcher in trader assorts.

    [2023-05-16T03:46:47.886Z] info: [Late to the Party] Creating preset for FN40GL Mk2 grenade launcher...

    [2023-05-16T03:46:47.886Z] info: [Late to the Party] Creating preset for FN40GL Mk2 grenade launcher...found FN40GL Mk2 grenade launcher

    [2023-05-16T03:46:47.887Z] info: [Late to the Party] Getting properties for FN40GL Mk2 grenade launcher... Final: Width=3,Height=1,Weight=2.92

    [2023-05-16T03:46:47.887Z] info: [Late to the Party] Found weapon FN40GL Mk2 grenade launcher: Width=3,Height=1,Weight=2.92


    Those messages are written by the server code, but it's certainly possible that something could be deadlocked (i.e. my mod doesn't play nicely with others).


    It looks like the server log you attached doesn't contain the messages in your screenshot. Maybe you attached a log generated after disabling the loot-ranking parameter? If you open the log file, you should be able to search for "FN40GL" and see the messages in your screenshot. If you find that log file from today, could you please share it? Maybe there are some messages that were logged but not shown in the console because the program was frozen.


    Also, I know this is a total PITA considering your extensive mod list, but... if you have time, could you try disabling the other mods one-by-one to see which one has the incompatibility with mine? Based on what you just found, searching for the "mechSKSv1" template might be a dead end for me. I'm a bit afraid of going down a rabbit hole without actually understanding the problem.


    Thanks for your help!

  • -snip-


    Thanks for your help!


    I double checked all the logging switches... Curious issue, but when the bug is happening it doesn't seem that Server is properly writing that information to the log file.

    That said, I immediately disabled Realism to help with testing and verified that something in the relationship between Realism and LttP seemed to cause the issue - that makes some sense as it's the only mod I use that is doing anything to traders, presets, etc.

    Interestingly enough, I did a couple things:
    - Removed Realism and verified the game launches fine, I also generated a "clean" log file that contained the proper debug info.
    - Reinstalled Realism and...

    This is where it gets interesting - reinstalling Realism seems to have resolved the issue... I'm not sure what would've caused the snag as there are no changes in the mod versions, client version or anything else.

    I'm sorry for the colossal waste of time - maybe if anybody else reports it they can try reinstalling specific mods like Realism as well.

    Sincere thanks for your time and attention.

  • Very interesting! This was not a waste of time at all; clearly there's a problem with either my mod or Fontaine's. I'll try running my mod alongside his and see if I can reproduce the problem. Ultimately, I'm sure both of us want for everybody to be able to use our mods with as little headache as possible, so any improvements to make them more robust are welcome.


    Thanks for your help!

  • DanW added a new version:

    Quote
    • Fixed incompatibility with SPT Realism Mod that would prevent the game from loading
    • Fixed enabled flag in config.json not actually disabling everything when set to false
    • Set destroy_loot_during_raid.loot_ranking.alwaysRegenerate=true by default to minimize chances of accidental loot-ranking-data corruption


    config.json files from the 1.1.9 or later releases are compatible with this release.


    Thanks to oshtwtf for helping with troubleshooting issues with SPT Realism Mod!

  • I tested v1.1.10 of my mod with Realism, and I was able to reproduce the bug you found. After some digging, I found it's caused by two issues:

    • A silly mistake in my server code
    • Realism making unorthodox changes to certain item properties


    I just posted v1.1.11 that should fix this. I would definitely recommend upgrading to v1.1.11 if you have destroy_loot_during_raid.loot_ranking.enabled=true because your loot-ranking data is likely corrupted. Please let me know if you still have issues with it.


    Thanks again for your help!

  • Next item! :)

    It seems version 1.1.11 is causing pretty wicked stuttering for me. While standing idle I'm getting the expected 70+ FPS, when moving it's dropping into the 20-30 FPS range and is causing a 'stop motion" sensation.

    My hunch, knowing nothing at all, is that it's probably related to the generation of loot ranking as I move throughout the map and get closer/further from loose loot spawns, containers, etc.

    I tested against version 1.1.8 which doesn't seem to introduce the same performance issues.

    I don't see anything that really stands out in the logs but I'm more than happy to assist with any ideas you may have.

  • My work is never done!


    You're right that new stuttering is almost definitely related to loot ranking. Fortunately, that isn't nearly as much code to sort through. I'm fairly busy the next few days, but I'll try to improve it by early next week. In the meantime, setting destroy_loot_during_raid.loot_ranking.enabled=false should restore the performance from 1.1.8.


    There is an easy way to generate log data that should confirm our suspicions:

    1) Set debug=true in config/config.json

    2) In BepInEx\config\BepInEx.cfg, change line 48 to Enabled = true

    3) Restart the server and reproduce the issue in the game. A new console with bepinex messages will also appear when the game starts.

    4) In the bepinex console, you should see a lot of yellow "Waiting for next frame" messages after the stuttering happens (having multiple monitors helps with this, but you can ALT-TAB out of the game to check). I attached an example of what it looks like for me. If your cycle times in those messages are more than ~20ms, that definitely explains the stuttering, and it means my code is trying to do too much per frame.

    5) Exit the game and share BepInEx\LogOutput.log before starting the game again.


    Another thing that will help me understand the issue: are you significantly increasing the amount of loot or bots in raids compared to vanilla SPT?


    Thanks for helping me troubleshoot!

  • FYI - I started working on this, and... it's harder to fix than I originally thought. It'll probably be another week before I'm able to post an update, but I haven't forgotten. ;)


    I was able to revise the way the loot processing runs to improve performance, but... now I'm causing random game crashes. Obviously I need to fix that. I might share a pre-release version with you to make sure the performance improvements actually work, but I want to make an honest effort to fix the crashing issue first. I'll keep you posted.

  • Sorry for the late reply!

    I'd be happy to help test - feel free to send a pre-release to me any time.

    Unfortunately, I had to give up on the approach I was working on, but I did implement some changes that should improve performance a little. Would you mind testing it when you get a chance? Here is a link to a pre-release version: https://github.com/dwesterwick…LateToTheParty-1.1.12.zip. Only the bepinex DLL has changed from 1.1.11.


    Regardless of how different performance is for you compared to 1.1.11, would you mind sharing your BepInEx\LogOutput.log file following the steps in post #29? Before bots spawn, I was getting almost ~115 fps on Customs using the new version, and I'm pretty sure I was only getting ~90 fps with 1.1.11.


    Thanks!


    EDIT: I just posted 1.1.12 (non-alpha) to work with SPT-AKI 3.5.7. If you're still finding performance issues, I'll try to deploy fixes for them in the next release.


    EDIT 2: I just posted 1.1.13, which should have even better performance compared to 1.1.11. However, it's only compatible with 3.5.7.

    Edited 2 times, last by DanW ().

  • DanW added a new version:

    Quote
    • Updated for SPT-AKI 3.5.7
    • Improved performance of loot-despawning system
    • Fixed frequent NRE's in the bepinex console when ending raids
    • Added crash logs for unhandled exceptions (WIP)


    config.json files from the 1.1.9 or later releases are compatible with this release.


    This release is NOT compatible with SPT-AKI 3.5.6 or below.

  • DanW added a new version:

    Quote
    • Further improved performance of loot-despawning system
    • Fixed possible race condition when despawning loot while leaving a raid
    • Removed deprecated client-side code
    • Fixed incorrect client-side namespaces


    config.json files from the 1.1.9 or later releases are compatible with this release.

  • DanW added a new version:

    Quote
    • Airdrop loot is now able to be despawned starting destroy_loot_during_raid.min_loot_age seconds after the crate lands
    • Full backpacks/rigs are less likely to be despawned via new config parameters for child-item count and total weight limits
    • Slightly devalued weapons so they despawn later
    • When debug=true, a CSV file will be generated containing all loot generated during the raid and its spawn/despawn times. The CSV will be generated when leaving the raid.


    You can use your config.json file from the 1.1.9 release or later, but it's not recommended. If you do, the mod is more likely to despawn full backpacks/rigs.

  • DanW added a new version:

  • DanW added a new version:

  • posting the config files that you asked about. I am attaching my config from SWAG and also LttP. Thanks a ton for the rapid response on this as well as coming up with a solution rather than just brushing me off. That is much appreciated!!


    Edit: I thought I should also note, I only did testing on Woods, with the goons and Shturman.


    EDIT: I just ran 10 raids with the configs that I posted. Only diff. is that I set Bloodhounds to 0 in the config as well. 7 out of the 10 raids, some form of boss spawned. HOWEVER!, I disabled the mod, ran another 3 raids and got a boss every time...So it is not this mod that is acting up. Needless to say, for now, I deleted my review as I overstepped and didn't do proper testing. My mistake.


    I will continue testing things on my end to get things working and let you know if I find any issues. Again, my apologies.

  • posting the config files that you asked about. I am attaching my config from SWAG and also LttP. Thanks a ton for the rapid response on this as well as coming up with a solution rather than just brushing me off. That is much appreciated!!


    Edit: I thought I should also note, I only did testing on Woods, with the goons and Shturman.

    You're welcome! I can't test every combination of mods, so ultimately I have to rely on other people to give me feedback to let me know what doesn't work. I looked at SWAG's code, and in theory it should be totally compatible. I'll see what I can find using your files. Maybe I overlooked something.


    Also regarding your feedback about the over-complication, I can definitely understand where you're coming from. It's easy for me to tweak my dozens of settings because I developed the mod, but it's probably information overload for most people. It's easy for me to get complacent because I know what every setting does.


    Realistically, do you think your feeling of the mod being too complicated would be alleviated if I included a GUI to help you tweak the config and turn systems on/off based on what you want from it? At this time, I'm still not interested in splitting this up into multiple mods (for several reasons), but I'm open to adding a GUI.


    Thanks.

  • **Please see EDIT on original support thread post.


    Reply to this post: I do not think that splitting the mod apart is necessary. If you had A GUI that would allow the user to enable/disable what they wanted to do I think that is a really good idea!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!