Starfield-Community-Patch / Starfield-Community-Patch

The Community Patch project for Starfield.
MIT License
192 stars 19 forks source link

Deception Skill Level 4 Broken #1177

Closed ebkarlson404 closed 1 month ago

ebkarlson404 commented 1 month ago

Deception Level 4 does not increase one's chance to evade a contraband scan beyond what is already provided by level 3.

Details

The root problem is the list provided to the PlayerSkillMults property on the SQ_ParentScript attached to the SQ_Parent quest is missing an element. It is currently [0, 0.25, 0.60, 1.00]. This really should have 5 elements (skill levels 0 to 4). One can see how it is used, including the clamp call in SQ_ParentScript.psc @ 1195. The AVIF called PayloadLevel is set by the Deception skill into the PlayerSkills quest using stages 1401-1404 and is set to 1, 2, 3 or 4. Then that AVIF is clamped to the size of the PlayerSkillMults list, which is only 4 elements long - so Deception Level 3 and 4 both use the same, final, element in the list.

The fix is to add the missing element to the PlayerSkillMults property. Its not entirely clear how the values there correspond to the description in the skill of making an scan "less effective". But from the math in the SQ_ParentScript, it looks like the idea is that 50% less effective means doubling one's base chance of evasion. If one uses that interpretation, the 5 values in the list should be [0.00, 1/0.90, 1/0.80, 1/0.70, 1/0.50] which gives: [0.00, 0.11, 0.25, 0.43, 1.00] (yeah, I cannot make any sense of the 0.60 value found in the current list given the description of what the Deception Skills provide)

I have the fix for this issue up on my Nexus page (linked below). In my testing it seems that one does not have to start a new game to see the fix - adding the form override to an existing save game seemed to apply the fix immediately (I was concerned that the saved state for the already-running quest would not see the change to the property bindings, but it seems to work from what I can tell)

Game Version

this is a day-zero bug as far as I can tell

Language

English (EN)

Have you recreated this issue on a new game?

Yes, I can recreate this issue.

Reproduction Steps

To repo the issue, do the following:

  1. Load a game with a player that has no points in the Deception Skill
  2. Get a ship with a small amount of shielded cargo and no scan jammer
  3. Add contraband to almost entirely fill the shielded cargo - it is important to start with a sufficiently low base chance to evade so that one does not bang into the hard-coded limit of 90% - in my repo my initial chance to evade was 43%
  4. Fly to a settled system and observe the detection chance
  5. Fly away, and increase the Deception Skill by using "player.addperk 2cfcaf
  6. Fly back and observe the new evasion chance
  7. Repeat the previous two steps to see the evasion chance for every level of Deception - one will notice that there is no change moving from level 3 to level 4

Note that increasing the Deception skill also changes the AVIF for PayloadLevel and GBOF's for Ships_Piracy_Low and Ships_Piracy_High. So simply lowering/removing the Deception Skill via console commands will not revert these other values. To truly lower the Deception Skill level, one must also adjust these AVIF/GBOF forms to match.

Deebz96 commented 1 month ago

Given this a test, and it appears to work as advertised. Appreciate you doing the research and providing the fix!

ebkarlson404 commented 1 month ago

BTW - just downloaded Shattered Space and verified that the Deception Skill bug is still present in the update.

Deebz96 commented 1 month ago

Yep. This fix will be included in the SFCP update going out (hopefully) today.