Hacking Editing the Trainer Icon image via PKHex for Pokémon Scarlet/Violet

quantumboy

Casual Hacker, Avid Dreamer
OP
Member
Joined
Jun 26, 2013
Messages
424
Trophies
0
Age
38
Location
San Francisco, CA
XP
603
Country
United States
In Pkhex when you open a save from scarlet or violet and go to block data there is an object block for trainer icon, *Object KPlayerTrainerIcon.
any way when dumping the block I have viewed it and several different versions of it from different saves I made with hex workshop
here's what I have figured out, but I am still at a loss on a few aspects, and would appreciate any one joining me in the experimentation.
  • the image aspect of the block is from byte 0 up to 6200 (in HEX addresses)
  • each pixel seems to be represented by 8 bytes, which is not a image format I am familiar with
  • when making all bytes in a pixel 00 I get black
  • when making just byte 0 for each pixel FF and rest 00, I get Blue
  • when making just byte 1 for each pixel FF and rest 00, I get Yellow
  • when making just byte 2 for each pixel FF and rest 00, I get Black
  • bytes 4,5,6,7 seem to have to do with some kind of of transparency or something
  • no idea what byte 3 does
This doesn't seem to be any kind of RGB or RGBA, HSV, or any color system I can figure out. I suppose through trial and error I can figure out some sample color codes, and eventually make a primative image editor, but


EDIT:
  • turns out the first two bytes are actually 16bit color, using BGR 5, 6, 5 bits layout similar to rgb565
  • getting closer....

EDIT2:
  • the bite layout is actually BRG 556, and the image is not square I am using a mine craft cicle generator to attempt to fit it properly but my pixel count is off by less than 10
 
Last edited by quantumboy,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • S @ salazarcosplay:
    hunter x hunter
  • S @ salazarcosplay:
    he has not allowed anyone to continue it for him for example
  • Xdqwerty @ Xdqwerty:
    @salazarcosplay, theres a dragon ball af mod for budokai 3
  • Xdqwerty @ Xdqwerty:
    updated ship of harkinian, gonna install some hd texture pack
  • Xdqwerty @ Xdqwerty:
    I might download rayman revolution for my ps3
  • BigOnYa @ BigOnYa:
    I may try the new ram site, and download more RAM to my Switch. Not sure if ddr3 is the right ram
    for it tho. Edit- no it uses floppy Ram, just like @AncientBoi
    +1
  • Xdqwerty @ Xdqwerty:
    aeiou
  • BigOnYa @ BigOnYa:
    And sometimes Z
  • SylverReZ @ SylverReZ:
    @K3Nv2, MAGA supporters be wearing tin foil hats lol.
    +1
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, whats maga?
  • BigOnYa @ BigOnYa:
    It stands for Maniacs Against General Acceptance
    +1
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, people rejecting general consensus about stuff?
    +1
  • BigOnYa @ BigOnYa:
    Yup, nuh its really just Trump followers
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, im not american so i dont care about trump
    +1
  • Xdqwerty @ Xdqwerty:
    or us elections
  • BigOnYa @ BigOnYa:
    Me niether, us north Koreans don't care
  • Xdqwerty @ Xdqwerty:
    good night
  • BakerMan @ BakerMan:
    i don't care either, even if i'm american
  • BakerMan @ BakerMan:
    truth be told, i agree with psi, i dislike both candidates, but i'd probably vote trump simply because the economy was better during his presidency
  • AngryCinnabon @ AngryCinnabon:
    Just be careful, if trump ends up winning and using project 2025 America might really change...for the worse.
  • AngryCinnabon @ AngryCinnabon:
    I'm not american and even that sends shivers down my spine.
  • AngryCinnabon @ AngryCinnabon:
    anything that offers trump an opportunity to become an actual dictator
    is bad in my book, i could care less if it wasn't for that...
  • K3Nv2 @ K3Nv2:
    Canada: America's Russia
  • NinStar @ NinStar:
    people are so dramatic that I can't even tell if they are being serious
    NinStar @ NinStar: people are so dramatic that I can't even tell if they are being serious