Repository navigation
NPCs wear their armor: chest, helm, boots, gauntlets; plate on the armored body - #47
Merged
Merged
Conversation
NPCs only ever resolved es_weapon_hand/es_shield_hand; es_chest, es_head, es_feet and es_forearms were ignored, so Elddim's Legionnaire guards (whose [aspect][textures] authors just the skin) drew in the bare citizen body. Feed the template + instance [inventory][equipment] slots through the player's EquipmentResolver: chest armor swaps body slot 1 to b_c_pos_*, helm/boots/gauntlets draw as shared skinned layers posed with the body's clip. Companion paperdoll swaps refresh the armor too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 805ae51984439dfc24f72f6586eab95872f65fd6)
The first pass drew helm/boot/gauntlet layers and swapped body slot 1 to b_c_pos_a1_<style>, but the chest texture was drawn on the template's thin pos_a1 body, where Legionnaire plate (armor_type a3) reads as a plain shirt - the guards still looked like townsfolk. DS1 picks the body mesh from the chest item's armor_type: plate is drawn on m_c_gah_fb_pos_a3 with b_c_pos_a3_<style>. ActorSpawner now spawns plain (non-hero) actors on the armored body when their worn es_chest names another aN body type and that mesh ships; the chest texture and boot/gauntlet subtypes resolve against the body actually drawn. The hero spawn opts out (his armor stays a live texture swap on the picked body). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 8a064a49bb0bfb15cd1a18b9be24f71fab02f53b)
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.
Split out of #36 (one fix per PR, as suggested there).
ResolveNpcEquippedGearonly handledes_weapon_hand/es_shield_hand, so a guard's[inventory][equipment]chest, helm, boots and gauntlets never showed and Legionnaire guards looked like townsfolk.EquipmentResolver.Resolveas the hero: chest armor swaps body texture slot 1, helm/boots/gauntlets are shared skinned layers posed with the body's clip.armor_typealso picks the body mesh: plate (a3) spawns onm_c_gah_fb_pos_a3withb_c_pos_a3_*, instead of drawing the plate texture on the thinpos_a1body where it reads as a shirt. The hero keeps his live texture swap.Checks: rebased on
main(bef1f38);dotnet build SiegeFX.sln -c Release -warnaserrorclean;dotnet testpasses (newNpcArmorTests, data-free). Play-tested onmultiplayer_worldElddim: the guards wear full plate.🤖 Generated with Claude Code