eterniti / xv2patcher

A dll that patches Xenoverse 2 to improve modding functionalities
12 stars 5 forks source link

[Feature Request] Expand types of colorable materials for custom transformations #3

Closed Dee-Ayy closed 10 months ago

Dee-Ayy commented 1 year ago

So the current patcher/set of tools only allows "HAIR" and "eye" materials to be colorable, but I found out a while back that any material that uses BCS coloring can be changed with a transformation. "SKIN_", "PAINTX", the NMC/FRI "SKINX", even the colorable clothing materials like "CCXXBUST". All that's really missing is a pointer to the name of the material prefix. like here in this example I edited the SSBE transformation code to jump to a custom set of code I wrote to color the hair purple, skin green, and eyes white before jumping back to the original code. https://cdn.discordapp.com/attachments/406727448307433472/953480248228446238/unknown.png And here is another example where I edited the code for the new Beast transformation to color materials with "SKINA", "SKINB", "SKINC" to make a concept Orange Namakian transformation. https://cdn.discordapp.com/attachments/414271278523088896/1089245871360720926/DRAGON_BALL_XENOVERSE_2_2023-03-25_12-48-29-1.mp4 The example of the code i wrote and jumped to for that 2nd example I did as so.

--start of custom part color code 1 48 8B 8B 98 04 00 00 48 8B 01 4C 8D 0D C4 00 00 00 --pointer for SKINA BA 1A 00 00 00 --color to use (0x1A) 44 8D 42 BE FF 90 00 04 00 00 --call coloring function

--start of custom part color code 2 48 8B 8B 98 04 00 00 48 8B 01 4C 8D 0D AC 00 00 00 --pointer for SKINB BA 1F 00 00 00 --color to use (0x1F) 44 8D 42 BE FF 90 00 04 00 00 --call coloring function

--start of custom part color code 3 48 8B 8B 98 04 00 00 48 8B 01 4C 8D 0D 94 00 00 00 --pointer for SKINC BA 0A 00 00 00 --color to use (0x0A) 44 8D 42 BE FF 90 00 04 00 00 --call coloring function

--start of custom part color code 4 48 8B 8B 98 04 00 00 48 8B 01 4C 8D 0D 7C 00 00 00 --pointer for eye_ BA 09 00 00 00 --color to use (0x09) 44 8D 42 BE FF 90 00 04 00 00 --call coloring function

--Jump back to main transformation code E9 79 E5 74 FE

I'm unsure how much work it might be to do this, but it would open up some nice new options for modding even if you only include the ability for the body material types excluding clothing.

eterniti commented 10 months ago

This feature is implemented now and will be available in patcher/Skill Creator 4.2 Because adding separate logic for each of the materials would be annoying, I opted for a solution that allowed to support all possible materials without adding too much logic and without cluttering the gui of the Skill Creator.

As it can be seen in first image, it is implemented as a "," separated list of a pair of values material:number. Of course, the "Add from" simplifies this for user by allowing to select one of game race bcs files (or a external one), then select material (second image, "eye_" and "HAIR" are excluded in this list), and then bring the user to the color selection screen.

screen1 screen2

Dee-Ayy commented 10 months ago

Oh wow, this is way better than my PoC method I did. Great work and thanks a ton for taking time to add this feature!

Dee-Ayy commented 10 months ago

Since this seems to be done now and to be added in the future, I'll go ahead and close this. Thanks again!