Last active
August 26, 2025 13:00
-
-
Save xDShot/54c835ca2754f8274d345fde9b25a22b to your computer and use it in GitHub Desktop.
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
| #/bin/python | |
| ''' | |
| pStudioHdr2.reserved[53]: | |
| \x41\x42\x43\x44\x45\x46\x47\x48\x49\x4A\x4B\x4C\x4D\x4E\x4F\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5A\x00\x5A\x59\x58\x57\x56\x55\x54\x53\x52\x51\x50\x4F\x4E\x4D\x4C\x4B\x4A\x49\x48\x47\x46\x45\x44\x43\x42\x41\x00\x31\x32\x33\x34\x35\x36\x37\x38\x39\x00\x39\x38\x37\x36\x35\x34\x33\x32\x31\x00\x51\x57\x45\x52\x54\x59\x55\x49\x4F\x50\x00\x41\x53\x44\x46\x47\x48\x4A\x4B\x4C\x00\x5A\x58\x43\x56\x42\x4E\x4D\x00\x50\x59\x46\x47\x43\x52\x4C\x41\x4F\x45\x55\x49\x44\x48\x54\x4E\x53\x00\x00\x00\x49\x6E\x64\x69\x61\x00\x4A\x75\x6C\x69\x65\x74\x74\x00\x4B\x69\x6C\x6F\x00\x4C\x69\x6D\x61\x00\x4D\x69\x6B\x65\x00\x4E\x6F\x76\x00\x4F\x73\x63\x61\x72\x00\x50\x61\x70\x61\x00\x51\x62\x65\x63\x00\x52\x6F\x6D\x65\x6F\x00\x53\x69\x65\x72\x61\x00\x54\x61\x6E\x67\x6F\x00\x55\x6E\x66\x72\x6D\x00\x00\x00\x00\x00\x00\x10\x09\x08\x00\x00\x00\x00\x00\x00\x00\x00 | |
| ''' | |
| numbones = 126 | |
| numanims = 62 | |
| namebase = 452 | |
| bonestructsize = 216 | |
| bones_base = 664 | |
| def bad_bone_name(x): | |
| if (1 < x and x < 7 ) or ( 48 < x and x < 57 ) or (62 < x): | |
| return True | |
| return False | |
| def bonenameoffset(x, shift): | |
| return namebase + shift - ( bones_base + (bonestructsize * x ) ) | |
| shifting = -1 | |
| for i in range(numbones): | |
| if bad_bone_name(i): | |
| shifting += 1 | |
| if shifting == 26: | |
| shifting = 27 | |
| elif shifting == 53: | |
| shifting = 54 | |
| elif shifting == 63: | |
| shifting = 64 | |
| elif shifting == 73: | |
| shifting = 74 | |
| elif shifting == 84: | |
| shifting = 85 | |
| offset = bonenameoffset(i, shifting) | |
| #print( "Offset for bone %d = %d" % (int(i), int(offset) ) ) | |
| print( "%d" % (int(offset) ) ) | |
| else: | |
| print("this one is ok") | |
| print("___--____") | |
| animstructsize = 100 | |
| anims_base = 30684 | |
| def animnameoffset(x, shift): | |
| return namebase + shift - ( anims_base + (animstructsize * x ) ) | |
| shifting = -1 | |
| for i in range(numanims): | |
| if True: | |
| shifting += 1 | |
| if shifting == 26: | |
| shifting = 27 | |
| elif shifting == 53: | |
| shifting = 54 | |
| elif shifting == 63: | |
| shifting = 64 | |
| elif shifting == 73: | |
| shifting = 74 | |
| elif shifting == 84: | |
| shifting = 85 | |
| offset = animnameoffset(i, shifting) | |
| #print( "Offset for anim %d = %d" % (int(i), int(offset) ) ) | |
| print( "%d" % (int(offset) ) ) | |
| else: | |
| print("this one is ok") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment