Open
Conversation
|
Is this compatible with custom skins? |
Author
Yes, but skin must have same arms like Alex |
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.
https://www.youtube.com/watch?v=xQfvLOPQsFs
Description
This patch added the character Alex with slim arms that can be used on other future skins.
Changes
Previous Behavior
Before this change, when adding the Alex skin, the texture on the hands was displayed incorrectly.
Root Cause
When I saw this problem, I decided to edit the code to add the ability to add such skins without big problems.
New Behavior
In the skin selection menu, the game checks if the new skin from the skin list == a specific skin from the list, then the slim model is used instead of the default model. Roughly the same thing happens in the game itself, only the check for this skin is a little different, but everything works perfectly fine under my supervision
Fix Implementation
The skin itself was added to the scripts: Textures.cpp, Textures.h, Definitions.h, UIScene_SkinSelectMenu.cpp, and Player.cpp. In HumanoidModel.h and HumanoidModel.cpp, I added body creation with a slim arms option, where switching a boolean would create either slim or non-slim arms. A skin check was added to UIControl_PlayerSkinPreview.cpp so that if the skin is, for example, the eighth (Alex skin), the arms should be slim. A slim model option was added to EntityRenderer.h and EntityRenderer.cpp, which will be empty if mobs are spawned instead of a player. PlayerRenderer.h and PlayerRenderer.cpp contain similar functionality as UIControl_PlayerSkinPreview.cpp, but for the first-person hand and similar features. LivingEntityRenderer.cpp contains new functionality for rendering a player model in a third- or second-person game, with or without slim arms. The functionality works as follows. PlayerRenderer.cpp in LivingEntityRenderer.cpp starts creating and rendering the regular and slim models, which are saved in the EntityRenderer.h and EntityRenderer.cpp scripts, but these models are used in the skin menu display script (UIControl_PlayerSkinPreview.cpp).
AI Use Disclosure
I'll be honest, I tried using AI, but it didn't give me any good solutions. Ultimately, I found solutions by searching scripts for clues that would allow me to come up with and write logic in a script to implement slim models.