Skip to content

Support for 64x64 skins#1453

Draft
Langtanium wants to merge 2 commits intosmartcmd:mainfrom
Langtanium:feat/64x64-skins
Draft

Support for 64x64 skins#1453
Langtanium wants to merge 2 commits intosmartcmd:mainfrom
Langtanium:feat/64x64-skins

Conversation

@Langtanium
Copy link
Copy Markdown

@Langtanium Langtanium commented Apr 1, 2026

Description

Adds code to support 64x64 classic and slim skins. Also adds the remaining default skins.
https://www.youtube.com/watch?v=lX_AaVbohZE

Changes

  1. Added code to handle 64x64 classic and slim skins.
  2. Added missing default skins.

Previous Behavior

Skins and skin packs that were or had 64x64 dimension textures would not render properly or cause the game to crash. Also skin boxes would not be mirrored if the skin box had the mirror bit set to true.

Root Cause

Lack of 64x64 skin support.

New Behavior

Skins and skin packs that are or have 64x64 dimension textures will render properly and mostly won't cause the game to crash (Certain skins cause the game to crash and the reason is difficult to determine). Skin boxes are properly mirrored when the mirror bit is present. Some code for handling DLC skin offsets was added, but not fully implemented (Don't know how to fully implement).

Fix Implementation

References to the added default skins texture were added to the files: Textures.cpp, Textures.h, Definitions.h, UIScene_SkinSelectMenu.cpp, and Player.cpp. In SkinBox.h more enums and floats were added. In HumanoidModel.cpp and HumanoidModel.h code was added to handle whether the skin is 64x32 or 64x64, a Boolean was added to determine if it is slim or classic, and code was added to handle the skin box mirror bit value and scale of skin box if attached to the second layer (jacket, sleeve0, sleeve1, pants0, pants1). A check was added to UIControl_PlayerSkinPreview.cpp to make the Alex skins use the 64x64 slim model and make the Developer Steve skin use the 64x64 classic model. A classic and slim model options were added to EntityRenderer.cpp and EntityRenderer.h, which will be empty if a mob is spawned instead of a player. PlayerRenderer.cpp and PlayerRenderer.h contain similar functionality as UIControl_PlayerSkinPreview.cpp, but for the first-person hand and similar features and uses the DLC skin files bit mask to determine whether to use the default model or the 64x64 variants. LivingEntityRenderer.cpp contains new functionality for rendering a player model in a third-person or second-person game and include the same functionality of using the DLC skin bit mask to determine the model type. The functionality works as follows: PlayerRenderer.cpp passes a parameter to LivingEntityRenderer.cpp which creates and renders the regular, classic and slim models, which are saved in the EntityRenderer.cpp and EntityRenderer.h scripts, these models are also used in the skin menu display script (UIControl_PlayerSkinPreview.cpp). Code was added to Console_App.cpp to make DLC skin boxes render on the 64x64 classic and slim models.
An extra enum was added to DLCManager.cpp and DLCManager.h for DLC skin offsets. SkinOffset.h was created to store the DLC skin offset data in a class, like SkinBox.h, which includes body part, direction, and amount to move the part. Code was added to DLCSkinFile.cpp and DLCSkinFile.h to store the extra data values of skin boxes and store DLC skin offset data in a vector of SKIN_OFFSETs.

AI Use Disclosure

No AI was used in the writing of this code.
Some code was taken from ItzSonicFaner's pull request (#1183), but has more development.

Related Issues

  • Related to #[issue-number]

Help

I would appreciate if someone can help with the implementation of DLC skin offests.

Added code for 64x64 classic and slim skins. Also added the remaining default skins.
@Langtanium Langtanium changed the title Added support for 64x64 skins Support for 64x64 skins Apr 1, 2026
Corrected some code in DLCSkinFile.cpp for getting the DLC skin offsets was getting too many parameters that don't exist.
@Langtanium Langtanium marked this pull request as draft April 1, 2026 04:20
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