Advertiser Content

Scripting Question Trainer Customization

Started by ArchyTheArc February 14th, 2019 12:32 PM
  • 766 views
  • 8 replies
Seen 1 Week Ago
Posted 2 Weeks Ago
190 posts
3 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)
Male
Brazil
Seen February 9th, 2020
Posted November 8th, 2019
181 posts
6.1 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.
Seen 1 Week Ago
Posted 2 Weeks Ago
190 posts
3 Years
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.
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!
Seen 1 Week Ago
Posted 2 Weeks Ago
190 posts
3 Years
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
Male
Brazil
Seen February 9th, 2020
Posted November 8th, 2019
181 posts
6.1 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)

Vendily

Female
Seen 2 Days Ago
Posted 4 Days Ago
1,112 posts
4.6 Years
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
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.
Seen 1 Week Ago
Posted 2 Weeks Ago
190 posts
3 Years
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
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

Seen 1 Week Ago
Posted 2 Weeks Ago
190 posts
3 Years
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 ^^
Advertiser Content