Welcome to the AFK Mods bug tracker. In order to report an issue, you need to have a VALIDATED account to post one. Once you have followed the link the registration email sent you, please select a project from the drop down menu below. Select “Open New Issue” and fill out the form with as many details as possible.

Please also consider sending your bug report to Bethesda if you are reporting on an issue with Skyrim Special Edition, Fallout 4, or Starfield. Doing so will help everyone on all platforms.

Issue Data
Status: Closed
Issue Type: Bug Report
Project: Unofficial Fallout 4 Patch
Component: Unofficial Fallout 4 Patch
Category: Perks & Stats
Assigned To: Nobody
Platform: All
Severity: Medium
Votes: 1
Watching: N/A
Opened By EyeDeck on Apr 30, 2020 7:52 pm
Last Edited By BlackPete on Apr 30, 2020 8:25 pm
Closed By Arthmoor on May 11, 2020 2:55 pm
Resolution: Fixed
Comment: Fixed for UFO4P 2.1.2.

Issue #29027: Nuclear Physicist perk fix revisions

 
The bug report is at the end, but first I'm taking this opportunity to explain exactly how the PA battery system works, as much of this info is probably not widely known.

These are the actions, hard-coded into the engine, that will drain a PA battery, with their default values:
  • fPowerArmorPowerDrainPerActionPoint [GMST:001C8FB5] = 0.05
  • fPowerArmorPowerDrainPerImpactLand [GMST:001C8FB7] = 0.0
  • fPowerArmorPowerDrainPerJump [GMST:001C8FB3] = 0.0
  • fPowerArmorPowerDrainPerMeleeAttack [GMST:001C8FB6] = 0.0
  • fPowerArmorPowerDrainPerSecondRunning [GMST:001C8FB4] = 0.05
So, in vanilla, the only actions that drain PA are running (0.05% per second), and recharging Action Points (0.05% per AP).
The three other game settings are implemented, and can be modded to non-zero values, but are obviously unused.

These values are deducted from the following Actor Value, also hard-coded, after multiplication by the PABatteryDamageRate AV.
    PowerArmorBattery [AVIF:0000035C]
This AV can be read to check the charge value of the currently loaded core, and returns a percentage value from 0.0 to 100.0.
It is also possible to artificially charge or discharge an active PA battery by manipulating the same AV with a magic effect/script/etc.
Changes made will persist onto the Fusion Core ammo item, though an ammo item cannot be overcharged above 100%.

Note that ObjectReference.GetItemHealthPercent() can also be used to check ammo health via Papyrus if you have an ObjectRef pointer to it as an item, but instead returns 0.0-1.0.

Damage dealt to PowerArmorBattery is multiplied by this AV
    PABatteryDamageRate "Power Armor Battery Damage Rate" [AVIF:0015A8B2]
The default base value is 1.0.
As one would expect, setting it to 0.5 doubles core health, while setting it to 2.0 halves drain rate.

The health value set on the base ammo item is not used for PA, so a vanilla Fusion Core with 500 health lasts exactly as long as a hypothetical "Fusion Button Cell" with 1 health.
On that subject, it is possible to register additional ammo types as valid PA fuel, you just need to add isPowerArmorBattery [KYWD:0005BDAA] to the base ammo object, and set up a COBJ similar to co_PA_FusionCore01 [COBJ:0005BB6B] for it.
I suspect it would be possible to give new battery types a custom model by pointing the COBJ to a custom OMOD, but I haven't tried this.

================

Anyway, the first three are my fault:
  • In AbPerkNuclearPhysicist "Nuclear Physicist" [SPEL:0022E2FC], Condition #1 should also check that Subject.HasPerk(NuclearPhysicist02) = 1.0, otherwise the intended effect for ranks 1 and 2 apply simultaneously at rank 1. This erroneously caused rank 1 to give you 238% core efficiency, instead of the intended 125%. Oops...
  • Effect #0 should also have a magnitude of 0.2, not 0.25, because 1/(1-0.2)=125%, but 1/(1-0.25)=133%
  • Might as well change effect #1's magnitude from 0.33 to 0.333333 to improve accuracy slightly (~149.2537% -> %149.9999)
  • The Subject.WornHasKeyword(ArmorTypePower [KYWD:0004D8A1]) = 1.0 check was correctly removed from NuclearPhysicist01 and NuclearPhysicist03, but remains in NuclearPhysicist02

Attached is a revised version of my fixes from #22528.



Attached Files:

NuclearPhysicistFix.esp

Related Issues: 22528  33925  

Comments

2 comment(s) [Closed]
EyeDeck said:
 
Errata (unrelated to the bug report; or, corrigenda if I want to be the best kind of correct):
  • and recharging Action Points (0.05% per AP).
  • On further investigation, draining AP is what discharges the core, not recharging AP. Easily verified by modding fPowerArmorPowerDrainPerActionPoint to a value like 0.5 and sprinting.
  • while setting it to 2.0 halves drain rate.
  • should read: while setting it to 2.0 doubles drain rate; or while setting it to 2.0 halves core health if you prefer.

Comment #1 May 1, 2020 8:30 pm  Edited by EyeDeck on May 1, 2020 8:36 pm
Arthmoor said:
 
Thanks for that. It'll be corrected in the next update.

Showing Comments 1 - 2 of 2