• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Scripting Question] Trainer Customization

465
Posts
7
Years
  • Age 24
  • Seen Apr 22, 2024
Hi random person scrolling past;

So i've been trying to get trainer customization set up in the game however i've had no luck with my skills in coding yet.

I did find shiney570's old one from 2016 but i cant get the customizations to apply (note i am in 16.2 not 17.2 so thought it would work) cant see the full page as its only see able via archive.org

Is there any public script anyone knows of or if someone knows ways to set it up let me know.

i do know outfits exist but to have customization that'd require alot of outfits and ways for the game to work out which to apply to the player. (for reference i wanted to have various clothing choices; skin colours aswell; so would require alot for all combinations going the outfit route)
 
178
Posts
10
Years
Hi random person scrolling past;

So i've been trying to get trainer customization set up in the game however i've had no luck with my skills in coding yet.

I did find shiney570's old one from 2016 but i cant get the customizations to apply (note i am in 16.2 not 17.2 so thought it would work) cant see the full page as its only see able via archive.org

Is there any public script anyone knows of or if someone knows ways to set it up let me know.

i do know outfits exist but to have customization that'd require alot of outfits and ways for the game to work out which to apply to the player. (for reference i wanted to have various clothing choices; skin colours aswell; so would require alot for all combinations going the outfit route)

https://mega.nz/#!LhAFjIgS!FTEYqBZLK_aQOhLiUE6s7eu-13RVKmcCDZMNH6A9ZzA
Here's the entire thread about the Shiney customization script, you may find a solution there. It's compacted in 7zip, so make sure you have something to extract it.
 
465
Posts
7
Years
  • Age 24
  • Seen Apr 22, 2024
465
Posts
7
Years
  • Age 24
  • Seen Apr 22, 2024
thanks! this actually helped; page 2 had an error that i actually had (having .png on the end of the metadata) fixing that in metadata seems to make it work; going to do some testing; either way you got me further along!

Made Major Progress and got the clothes working; however i set up a new "category" being hair and works fine but if i have something on in the headgear one its under the hair. is there anyway around this? maybe as hair is set as the last check; its got the highest "priority" or the last to be added to the sprite?

edit: Also seems to happen to all categories
 
Last edited:
178
Posts
10
Years
Made Major Progress and got the clothes working; however i set up a new "category" being hair and works fine but if i have something on in the headgear one its under the hair. is there anyway around this? maybe as hair is set as the last check; its got the highest "priority" or the last to be added to the sprite?

edit: Also seems to happen to all categories
Actualy, I never used this script so I can't help you on that. The best I could do is suggest to make hair and headgear to be in the same category (but this would make it to be too much work since you would need to make it for each hair)
 
1,680
Posts
8
Years
  • Age 24
  • Seen today
So here's the thing. This script just pastes all of the layers on top of eachother in order. It's your job to make sure that you have them in the right order.

For the drawing, the order is here
Code:
def drawCharacterCustomizedBitmap(filepath,bmp,trainerClass=$Trainer)
  return nil if !filepath.is_a?(String)
  return bitmap if !trainerClass
  return bitmap if CHARACTER_CUSTOMIZATION==false 
  return bitmap if UNLOCK_CHARACTER_CUSTOMIZATION_BY_DEFAULT==false &&
                   trainerClass.character_customization==false
  # Adding Shoe Bitmap
  addAdditionalBitmap(filepath+"_shoe"+(trainerClass.shoe).to_s+".png",bmp)
  # Adding Lowerbody Bitmap
  addAdditionalBitmap(filepath+"_lowerbody"+(trainerClass.lowerbody).to_s+".png",bmp)
  # Adding Upperbody Bitmap
  addAdditionalBitmap(filepath+"_upperbody"+(trainerClass.upperbody).to_s+".png",bmp)
  # Adding Head Bitmap
  addAdditionalBitmap(filepath+"_head"+(trainerClass.head).to_s+".png",bmp)
  # Adding Headgear Bitmap
  addAdditionalBitmap(filepath+"_headgear"+(trainerClass.headgear).to_s+".png",bmp)
  # Adding Accessoire Bitmap
  addAdditionalBitmap(filepath+"_accessoire"+(trainerClass.accessoire).to_s+".png",bmp)
end
Since you want hair to go above head but below head gear, you would put it under the head addAdditionalBitmap, but above the headgear addAdditionalBitmap. Like a deck of cards, I guess. Or a Tower of Hanoi puzzle. You make the stack in the opposite order basically.

By doing this change, it should also work for the outfit customization, since it looks like it just uses what ever graphic the player currently has set up.
 
465
Posts
7
Years
  • Age 24
  • Seen Apr 22, 2024
So here's the thing. This script just pastes all of the layers on top of eachother in order. It's your job to make sure that you have them in the right order.

For the drawing, the order is here
Code:
def drawCharacterCustomizedBitmap(filepath,bmp,trainerClass=$Trainer)
  return nil if !filepath.is_a?(String)
  return bitmap if !trainerClass
  return bitmap if CHARACTER_CUSTOMIZATION==false 
  return bitmap if UNLOCK_CHARACTER_CUSTOMIZATION_BY_DEFAULT==false &&
                   trainerClass.character_customization==false
  # Adding Shoe Bitmap
  addAdditionalBitmap(filepath+"_shoe"+(trainerClass.shoe).to_s+".png",bmp)
  # Adding Lowerbody Bitmap
  addAdditionalBitmap(filepath+"_lowerbody"+(trainerClass.lowerbody).to_s+".png",bmp)
  # Adding Upperbody Bitmap
  addAdditionalBitmap(filepath+"_upperbody"+(trainerClass.upperbody).to_s+".png",bmp)
  # Adding Head Bitmap
  addAdditionalBitmap(filepath+"_head"+(trainerClass.head).to_s+".png",bmp)
  # Adding Headgear Bitmap
  addAdditionalBitmap(filepath+"_headgear"+(trainerClass.headgear).to_s+".png",bmp)
  # Adding Accessoire Bitmap
  addAdditionalBitmap(filepath+"_accessoire"+(trainerClass.accessoire).to_s+".png",bmp)
end
Since you want hair to go above head but below head gear, you would put it under the head addAdditionalBitmap, but above the headgear addAdditionalBitmap. Like a deck of cards, I guess. Or a Tower of Hanoi puzzle. You make the stack in the opposite order basically.

By doing this change, it should also work for the outfit customization, since it looks like it just uses what ever graphic the player currently has set up.

Just came back to right about this; but thanks for giving me extra knowledge on it; changing the hair and stuff around and making the head (skin colour) the lowest it made it all work fine.

However limitations like; reseting on rebooting the game (when changing one thing after restart it all resets to default on the others) or the limitation of how it works; if you save with an item/headgear thats bigger than it with no headgear then its forever stuck like that.

trying to not change it much so kind of being put of adding hats and stuff.

it also seems to not fully customize the trback sprite (might be as the ebs one is bigger than the base one? but cant seem to see where the script finds the size.

edit: screenie of it being cut off

B7ajccV.png
 
Last edited:
465
Posts
7
Years
  • Age 24
  • Seen Apr 22, 2024
Slight update;

Figured a work around to the cutting issue; seems its to do with it working with default essentials way of entry/throw animations; just cost the the moveability of the ebs one; one other issue however that comes to mind; if an item was to larger than the base or say a hat and having a remove option; would there be any way to reset (so completely wipe) the image file to remove the hat or have a way to remove that one category? (again second is harder because of how it works) just felt i'd ask ^^
 
Back
Top