Before uploading any images taken from Nintendo 3DS games, please take a moment to read this message.
Got a spare minute? The Archives need some love. See the to-do list to find a way to help.
If you upload a new image make sure you name and categorize it properly. If in doubt, ask an admin or see our FAQ page.

Difference between revisions of "User:Ribose"

From Bulbagarden Archives
Jump to: navigation, search
m
m (tl;dr)
 
Line 1: Line 1:
To Do (for me):
+
Nobody reads these anyways so here's how I make/verify G/S/C BACKsprites.
* Spr b 2c 002.png
+
  +
I'm using Script-Fu (GIMP) to crop and transparentize, Visual Boy Advance screenshots (I say it isn't illegal because I own all Gen I and II game carts), and Python to compare images.
  +
  +
The longest part is sitting here with GameShark codes and 3 VBA emulators (G, S, C) and modifying the species, switching the Pkmn out and taking screenshots every turn... 251 times x 2 for shinies (even though I've determined so far that G/S are almost always the same and G/S/C shiny are almost always the same, but I've found a couple exceptions!). Here are my notes:
  +
GAMESHARK CODES G/S/C
  +
=====================
  +
PkMn Data Structure
  +
  +
[00] Species
  +
[01] Held Item
  +
[02] Attack 1
  +
[03] Attack 2
  +
[04] Attack 3
  +
[05] Attack 4
  +
[06] OT ID (2)
  +
[07]
  +
[08] Experience (3)
  +
[09]
  +
[0A]
  +
[0B] EV data (10)
  +
[0C]
  +
[0D]
  +
[0E]
  +
[0F]
  +
[10]
  +
[11]
  +
[12]
  +
[13]
  +
[14]
  +
[15] DVs (2)
  +
[16]
  +
[17] PP1
  +
[18] PP2
  +
[19] PP3
  +
[1A] PP4
  +
[1B] Happiness
  +
[1C] Pokérus
  +
[1D] Caught data (2)
  +
[1E]
  +
[1F] Level
  +
[20] Status
  +
[21] ?
  +
[22] Current HP (2)
  +
[23]
  +
[24] Total HP (2)
  +
[25]
  +
[26] Attack (2)
  +
[27]
  +
[28] Defense (2)
  +
[29]
  +
[2A] Speed (2)
  +
[2B]
  +
[2C] Sp. Attack (2)
  +
[2D]
  +
[2E] Sp. Defense (2)
  +
[2F]
  +
  +
Offsets:
  +
Poké 1 2 3 4 5 6
  +
GS: DA2A DA5A DA8A DABA DAEA DB1A
  +
C: DCDF DD0F DD3F DD6F DD9F DDEF
  +
  +
Codes:
  +
GAME/POKé: GS/1 GS/2 C/1 C/2
  +
SPECIES: 01XX2ADA 01XX5ADA 91XXDFDC 91XX0FDD
  +
HP 100: 01644DDA 01647DDA 916402DD 916432DD
  +
HPMAX 100: 01644FDA 01647FDA 916404DD 916434DD
  +
DV NORMAL: 01FF3FDA 91FFF4DC
  +
01FF40DA 91FFF5DC
  +
DV SHINY: 01EA6FDA 91EA24DD
  +
01AA70DA 91AA25DD
  +
  +
Generated:
  +
gs:init
  +
01644DDA 01647DDA 01644FDA 01647FDA 01FF3FDA 01FF40DA 01EA6FDA 01AA70DA
  +
c:init
  +
916402DD 916432DD 916404DD 916434DD 91FFF4DC 91FFF5DC 91EA24DD 91AA25DD
  +
  +
gs
  +
01162ADA 01165ADA
  +
c
  +
9116DFDC 91160FDD
  +
  +
  +
Script-Fu is Scheme:
  +
(define (crop-sprite input) (let* (
  +
(img (car (file-png-load RUN-NONINTERACTIVE input input)))
  +
(dsp (car (gimp-display-new img)))
  +
(drw (car (gimp-image-get-active-drawable img)))
  +
(lyr (car (gimp-image-get-active-layer img)))
  +
)
  +
(gimp-image-crop img 58 57 7 39)
  +
(gimp-layer-add-alpha lyr)
  +
(gimp-fuzzy-select drw 0 0 15 CHANNEL-OP-ADD FALSE FALSE 0 FALSE)
  +
(gimp-edit-clear drw)
  +
; actual position: 56x56, at x=8px y=40px
  +
(gimp-image-crop img 56 56 1 1)
  +
(file-png-save-defaults 1 img drw input input)
  +
(gimp-display-delete dsp)
  +
;(gimp-image-delete img)
  +
))
  +
Python (with PIL) for compares (takes command line args for each image to compare "g_100" -> Spr b 2g 100.png, "c_100_s" -> Spr b 2c 100 s.png, etc):
  +
import Image
  +
import ImageChops
  +
import sys
  +
  +
im_name = "Spr b 2"
  +
ims = []
  +
  +
args = sys.argv
  +
i = 0
  +
if len(args) > 1:
  +
for arg in args:
  +
if i > 0:
  +
ims = ims + ["Spr_b_2" + arg + ".png"]
  +
i = i + 1
  +
  +
i = 0
  +
for im in ims:
  +
ims[i] = ims[i].replace("_", " ")
  +
i = i + 1
  +
  +
imo = []
  +
i = 0
  +
for im in ims:
  +
imo = imo + [Image.open(im)]
  +
print ims[i],imo[i]
  +
i = i + 1
  +
  +
diffs = []
  +
i = 0
  +
for im in ims:
  +
if i > 0:
  +
diffs = diffs + [ImageChops.difference(imo[i - 1], imo[i])]
  +
if len(diffs[i-1].getcolors()) > 1:
  +
print ims[i-1]," and ",ims[i]," do not match: color count = ", len(diffs[i-1].getcolors())
  +
print diffs[i-1].getcolors()[0][0],diffs[i-1].getcolors()[1][0]
  +
diffs[i-1].show()
  +
i = i + 1
  +
  +
Sprites that need correction:
  +
* File:Spr b 2c 002.png (I can't overwrite the redirect with an image)

Latest revision as of 23:05, 4 May 2011

Nobody reads these anyways so here's how I make/verify G/S/C BACKsprites.

I'm using Script-Fu (GIMP) to crop and transparentize, Visual Boy Advance screenshots (I say it isn't illegal because I own all Gen I and II game carts), and Python to compare images.

The longest part is sitting here with GameShark codes and 3 VBA emulators (G, S, C) and modifying the species, switching the Pkmn out and taking screenshots every turn... 251 times x 2 for shinies (even though I've determined so far that G/S are almost always the same and G/S/C shiny are almost always the same, but I've found a couple exceptions!). Here are my notes:

GAMESHARK CODES G/S/C
=====================
PkMn Data Structure

[00] Species
[01] Held Item
[02] Attack 1
[03] Attack 2
[04] Attack 3
[05] Attack 4
[06] OT ID (2)
[07]
[08] Experience (3)
[09]
[0A]
[0B] EV data (10)
[0C]
[0D]
[0E]
[0F]
[10]
[11]
[12]
[13]
[14]
[15] DVs (2)
[16]
[17] PP1
[18] PP2
[19] PP3
[1A] PP4
[1B] Happiness
[1C] Pokérus
[1D] Caught data (2)
[1E]
[1F] Level
[20] Status
[21] ?
[22] Current HP (2)
[23]
[24] Total HP (2)
[25]
[26] Attack (2)
[27]
[28] Defense (2)
[29]
[2A] Speed (2)
[2B]
[2C] Sp. Attack (2)
[2D]
[2E] Sp. Defense (2)
[2F]

Offsets:
Poké 1    2    3    4    5    6
GS: DA2A DA5A DA8A DABA DAEA DB1A
C:  DCDF DD0F DD3F DD6F DD9F DDEF

Codes:
GAME/POKé: GS/1     GS/2      C/1      C/2
SPECIES:   01XX2ADA 01XX5ADA  91XXDFDC 91XX0FDD
HP 100:    01644DDA 01647DDA  916402DD 916432DD  
HPMAX 100: 01644FDA 01647FDA  916404DD 916434DD
DV NORMAL: 01FF3FDA           91FFF4DC 
           01FF40DA           91FFF5DC
DV SHINY:           01EA6FDA           91EA24DD
                    01AA70DA           91AA25DD

Generated:
gs:init
01644DDA 01647DDA 01644FDA 01647FDA 01FF3FDA 01FF40DA 01EA6FDA 01AA70DA
c:init
916402DD 916432DD 916404DD 916434DD 91FFF4DC 91FFF5DC 91EA24DD 91AA25DD

gs
01162ADA 01165ADA
c
9116DFDC 91160FDD


Script-Fu is Scheme:

(define (crop-sprite input) (let* (
   (img (car (file-png-load RUN-NONINTERACTIVE input input)))
   (dsp (car (gimp-display-new img)))
   (drw (car (gimp-image-get-active-drawable img)))
   (lyr (car (gimp-image-get-active-layer img)))
   )
   (gimp-image-crop img 58 57 7 39)
   (gimp-layer-add-alpha lyr)
   (gimp-fuzzy-select drw 0 0 15 CHANNEL-OP-ADD FALSE FALSE 0 FALSE)
   (gimp-edit-clear drw)
   ; actual position: 56x56, at x=8px y=40px
   (gimp-image-crop img 56 56 1 1)
   (file-png-save-defaults 1 img drw input input)
   (gimp-display-delete dsp)
   ;(gimp-image-delete img)
))

Python (with PIL) for compares (takes command line args for each image to compare "g_100" -> Spr b 2g 100.png, "c_100_s" -> Spr b 2c 100 s.png, etc):

import Image
import ImageChops
import sys

im_name = "Spr b 2"
ims = []

args = sys.argv
i = 0
if len(args) > 1:
    for arg in args:
        if i > 0:
            ims = ims + ["Spr_b_2" + arg + ".png"]
        i = i + 1

i = 0
for im in ims:
    ims[i] = ims[i].replace("_", " ")
    i = i + 1

imo = []
i = 0
for im in ims:
    imo = imo + [Image.open(im)]
    print ims[i],imo[i]
    i = i + 1

diffs = []
i = 0
for im in ims:
    if i > 0:
        diffs = diffs + [ImageChops.difference(imo[i - 1], imo[i])]
        if len(diffs[i-1].getcolors()) > 1:
            print ims[i-1]," and ",ims[i]," do not match: color count = ", len(diffs[i-1].getcolors())
            print diffs[i-1].getcolors()[0][0],diffs[i-1].getcolors()[1][0]
            diffs[i-1].show()
    i = i + 1

Sprites that need correction:

  • File:Spr b 2c 002.png (I can't overwrite the redirect with an image)