fix(npcs): grounded on real blocks, brighter avatars, per-NPC variety - #714
Merged
Conversation
…ety (#711) Floating: Floor() the +0.5 marker Y at settlement/camp spawns (regression from #492; stations already had it), ground bandits/enemies via the creatures' real-block probe instead of the noise SurfaceHeight, and re-ground settlement NPCs each step (+-2) so mined floors drop them. Darkness: mean-normalise the grey avatar tint textures at load (~40 % of authored brightness before), widen + lift the outfit palettes, and give bandit/Guardian materials the standard _Floor/_Fill lift. Variety: per-NPC size, independent trouser colour (additive NetNpc.LegsRgb), varied android chassis tones (~60 % of researchers robotic, was all), and stable-seeded face jitter + hair on the client. Co-Authored-By: Claude Fable 5 <[email protected]>
# Conflicts: # TODO.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #711
Settlement/station NPCs floated half a block over the ground, rendered near-black, and looked like identical clones. Three fixes in one branch:
Grounding (server)
+0.5, and the settlement spawner'sMax(Min.Y + 1, markerY)clamp never fired. Spawn Y is nowFloor()ed — the same fix the station-crew spawner already carried — while template upper-floor markers keep their storey. Bandit-camp guards get the sameFloor().SurfaceHeight, blind to stamped structures and player edits, so camp guards floated over their own carved camp floor. Both now use the creatures'GroundFeetYAtprobe (Creatures are blind to real blocks: they walk through player-built walls and float over dug pits #650), falling back to the noise surface only when the chunk isn't loaded. Spawns use it too.TryGroundFeetYAt, capped at ±2 blocks): doorsteps lift them, mining the floor out from under them drops them instead of leaving them hanging forever. Unloaded/blocked columns fall back to the home marker's floor Y — never the noise surface, which inside a stamped settlement can be metres off.Darkness (client)
LitColorcomputes_Color * tex, so every avatar rendered at ~40 % of its authored perceptual brightness.LoadTexnow mean-normalises the texture toward ~200/255, keeping the pixel detail._Floor/_Filland ran at the shader defaults (0.35/0) — ~2× darker on the shadow side than every other humanoid (avatars/creatures use 0.62/0.3). They now share the standard lift.Variation
Size0.92–1.08 (the wire field existed but was hardcoded1f).NetNpc.LegsRgb(contractless MessagePack; 0 = older server → client derives from the outfit as before).GetHashCodeis per-process randomised and would have re-rolled every face each login.Tests
-warnaserror; local Unity client build verified (client/Assets changed — PR CI doesn't build Unity).🤖 Generated with Claude Code