Toggle NavigationStarfield Community Patch

Issue #964

Guards comment on your hat when you're not wearing one

CLOSED
TERAB1T
6 months ago

Security guards say "Nice hat" when you're not wearing a hat but have a neuroamp equipped.

Affected ID:

  • 0015DA49

Details

The game checks for the "ArmorTypeApparelHead" keyword, which is used for:

  • Hats
  • Neuroamps
  • Eyepatch (not playable, but still)
  • Fishworker's mask

Here's my proposed fix:

Let's break it down:

(PlayerRef [PLYR:00000014]).IsTrueForConditionForm(ActorShouldShowSpacesuitHelmet [CNDF:000BEA53]) = 0 OR
(PlayerRef [PLYR:00000014]).IsTrueForConditionForm(ActorShouldShowSpacesuit [CNDF:00194ABF]) = 0 AND

Here we ensure that the line does not trigger when the hat is hidden by a spacesuit.

(PlayerRef [PLYR:00000014]).WornCoversBipedSlot(4) = 1 AND

All hats use the HEAD slot (4), while neuroamps/eyepatch/mask use different slots. In a perfect world, this condition would be enough to fix our issue, but...

  1. Some outfits without actual hats use multiple slots, including HEAD. Example: Disciples Tagwear.
  2. You can use neuroamps and "HEAD" outfits at the same time.

So there's an edge case: if you're wearing Disciples Tagwear (or something similar) AND a neuroamp, you'll still trigger the "Nice hat" line.

(PlayerRef [PLYR:00000014]).WornHasKeyword(ArmorTypeNeuroamp [KYWD:0033B2DD]) = 0 OR
(PlayerRef [PLYR:00000014]).WornApparelHasKeywordCount(ArmorTypeApparelHead [KYWD:000E048B]) >= 2 AND

Here we make sure that the line only triggers when you have a hat or a hat+neuroamp.

(PlayerRef [PLYR:00000014]).GetEquipped(Clothes_Eyepatch_Lefteye_NOTPLAYABLE [ARMO:0002E554]) = 0 AND
(PlayerRef [PLYR:00000014]).GetEquipped(Clothes_Fishworker_Mask_01 [ARMO:0024EF42]) = 0

Here we're completely excluding an eyepatch/mask from the equation. The line won't trigger even if you wear a hat+mask. There are already too many conditions for such a short and unimportant line.


So the line will trigger if:

  • You're wearing a hat.
  • You're wearing a hat plus a neuroamp.

The line will NOT trigger if:

  • Your hat is hidden by a spacesuit helmet.
  • You're wearing a neuroamp/eyepatch/mask but are NOT wearing a hat.
  • You're wearing a hat plus an eyepatch/mask.

Game Version

1.11.36

Language

English (EN)

New Game

Yes

Reproduction Steps

  1. Go to New Atlantis (or any other city).
  2. Equip a neuroamp but don't wear a hat.
  3. Try to talk to any generic guard as many times as you can.
  4. Observe that guards occasionally comment on your hat.
Platform: PC (Steam)
Type: Missions & Dialogue
Fix Ready
GitHub LogoGitHub ↗
5 months ago

Comments (0)


Add Comment
You must be signed in to a Nexus Mods account to leave a comment.