Skip to content

Modification to the skin system and implementation in the root code of the Default and Slim 64x64 skin system with layer support.#1109

Open
OliverLesen wants to merge 15 commits intosmartcmd:mainfrom
OliverLesen:main
Open

Modification to the skin system and implementation in the root code of the Default and Slim 64x64 skin system with layer support.#1109
OliverLesen wants to merge 15 commits intosmartcmd:mainfrom
OliverLesen:main

Conversation

@OliverLesen
Copy link

Description

This PR reorganizes part of the skin system, correcting the loading and display of default player skins and preparing a more consistent foundation for support of Default and Slim models.

Changes

Previous Behavior

Before this change, some skins were displayed incorrectly due to inconsistencies in the texture-model association. The system did not reliably differentiate between the skin shape and the body type that should be used in rendering.

Root Cause

The main cause was the lack of a clear separation between skin type, texture shape, and expected model. The current flow also lacks an external mechanism to explicitly define which default skin and which model variant should be used.

New Behavior

After the change, default skins are loaded and displayed more consistently. Gameplay remained stable during testing, with no crashes introduced by this change.

As a known limitation, 4J Studios' custom 3D skins still exhibit incorrect behavior and require separate handling.

Fix Implementation

The fix consisted of reorganizing the logic for reading, identifying, and applying player skins, improving the association between texture and model and preparing the basis for more consistent differentiation between Default and Slim variants.

It was also decided that, for the system to function correctly from end to end, it will be necessary to implement a new system in the launcher to:

  • change the player's default skin
  • support layers, something that was previously lacking, only 64x64 skins with flags
  • register a flag indicating the desired model

The planned variants for this flag are:

  • Default 64x32 without flag
Capturar
  • Default 64x64, 0x00040000
560587497-ec0f05f9-71b3-4f85-87ac-1aa9088e431e
  • Slim 64x64, 0x00080000
560587180-5a2d3b23-929c-46f3-92a4-cda52f5b563f

This will allow the game to know exactly which model to use, instead of relying solely on the default model.

AI Usage Disclosure

No code in this PR was generated by AI.

AI was used only as textual support for organizing the technical description and reviewing the PR documentation. All implementation, adaptation, testing, and validation of the code were done manually.

Obs: I deleted the DLC, but it's not something necessary.

Player model type

Slim or standard tonearm

Correct support for 64x32 and 64x64
Player model type

Slim or standard tonearm

Correct support for 64x32 and 64x64
This file now assembles the model according to the skin:

If it's Steve, it uses a 4-pixel arm.

If it's Alex, it uses a 3-pixel arm.

If the skin is 64x64, it assembles the modern layers correctly.

If there's no flag, it falls into the classic 64x32 format.

Old classic skin

Modern 64x64 skin

Steve

Alex
Switch between Steve and Alex

Respect 64x32 and 64x64

React to the skin flag
Switch between Steve and Alex

Respect 64x32 and 64x64

React to the skin flag
0x00040000 → Steve + 64x64

0x00080000 → Alex + 64x64

no flag → Steve + 64x32
Previously, the menu previews were all the same, with the same Steve model.

One slim skin influencing the others.

One preview contaminating the next.

And even causing crashes.
This file now makes each UI preview build its own HumanoidModel, according to the skin of that specific slot.

Steve 64x32 preview shows Steve 64x32

Standard 64x64 preview shows Skin 64x64

Slim 64x64 preview shows Slim 64x64
Update UIControl_PlayerSkinPreview.cpp
This file now makes each UI preview build its own HumanoidModel, according to the skin of that specific slot.

Steve 64x32 preview shows Steve 64x32

Standard 64x64 preview shows Skin 64x64

Slim 64x64 preview shows Slim 64x64
Update UIControl_PlayerSkinPreview.h
Previously, the menu previews were all the same, with the same Steve model.

One slim skin influencing the others.

One preview contaminating the next.

And even causing crashes.
@OliverLesen OliverLesen marked this pull request as ready for review March 10, 2026 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant