Chuckleberry-Finn / Skill-Recovery-Journal

Mod for Project Zomboid which allows users to craft journals, record gained skills, and recover lost skill progression.
https://steamcommunity.com/sharedfiles/filedetails/?id=2503622437
GNU Affero General Public License v3.0
29 stars 32 forks source link

Professions and Traits May Be Getting Boosted Regardless Of Sandbox Settings. #47

Closed TheByrd92 closed 1 year ago

TheByrd92 commented 1 year ago

Line 97 on the Skill Recovery Journal XP.lua I think needs to be changed back to...

if SandboxVars.SkillRecoveryJournal.RecoverProfessionAndTraitsBonuses ~= false then

If it's supposed to match the comment above. I was running into an issue with professions and stat bonuses getting more xp than it should. I'm not a Project Zomboid modder but, this looks like it may be an issue.

Chuckleberry-Finn commented 1 year ago

~= false was too accommodate saves from before the sandbox options were added. I've actually not tested it with non-sandbox games - was your save non-sandboxed?

TheByrd92 commented 1 year ago

It's a problem on the server not run by me actually. How can I tell if it's non-sandboxed? I know the owner said they have the setting set to false but, I seem to be able to create a character with a profession and it seemingly gives me the bonuses from the traits I selected and from the profession multiplying the XP. Should they set it to true? I went from level 6 in sprinting, dying making a new character, then reading to level 10 after being at 4 on the other character that had bonuses to that XP.

I think that's what this code is looking at I see it's trying to adjust a multiplier. I don't know what values it's pulling though from Project Zomboid exactly though and when it's called. I thought it was called whenever XP is added. When my character dies again I'll try making a character that doesn't have any sprint bonus and see if I get back to 10.

Chuckleberry-Finn commented 1 year ago

If you're getting the levels you start out with that was an earlier bug that was fixed. You're stuck with that XP though.

As for bonus XP - it should not be calculated. I'll have to check what non-sandboxed variables are read as.

Chuckleberry-Finn commented 1 year ago

Things should be sorted. That particular character may just be locked in with that XP. Going-forward those extra levels shouldn't carry over.