Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2011-12-25 10:19:32

Miksy91
Member
Registered: 2010-10-16
Post 693/2,339

PKSV ⇔ Scripting Compendium

Here you can find a list of most common scripting commands is PKSV and their corresponding codes in Tauwasser's compendium.
Not all of the codes are listed here because I'm not familiar with the rest either and didn't feel like doing research on their commands in PKSV.

2call = Pointer code [2b+ret]
2jump = Pointer code [2b]
2writetext = Display text [2b]
3call = Pointer code [3b+ret]
3callasm - ASM code1 [3b]
3jump = Pointer code [3b]
3writetext = Display text [3b]
appear = Show person [xx]
applymovement = Moving code [xx + 2b]
blackoutmod = Blackout modifier [xxyy]
catchtutorial = Learn how to catch PKMN [xx]
changeblock = Change block code [xxyyzz]
checkbit1 = BitTable1 check [xxyy]
checkbit2 = BitTable2 check [xxyy]
checkcode = Check codes [xx]
checkcoins = Check for coins code [xxyy]
checkitem = Check for item code [xx]
checkmoney = Check for money code [xxyyzzaa]
checkpoke = Check for PKMN [xx]
checktime = Check time of day [xx]
clearbit1 = BitTable1 reset [xxyy]
clearbit2 = BitTable2 reset [xxyy]
closetext = Close text box code
copybytetovar = Copy variable code1 [xxyy]
credits = Credits code
cry = Cry code [xx00]
disappear = Hide person [xx]
domaptrigger = Activate trigger event from afar [xxyyzz]
dotrigger = De-/activate trigger event [xx]
earthquake = Earth quake [xx]
elevator = Elevator menu [2b]
end = Return code2
faceperson = Facing of people code [xxyy]
faceplayer = Talk-to facing code
follow = Following code1 [xxyy]
follownotexact = Following code2 [xxyy]
fruittree = Fruit tree code [xx]
give (-egg, -item, -money, -poke)
if
-false (08: When [RAM]=0...)
-true (09: When [RAM]<>0...)
-= D (When [RAM] = 0D...)
-!= D (When [RAM] <> 0D...)
- > D (...)
- < D (...)
jumptext = Text2 code [2b]
jumptextfaceplayer = Text1 code [2b]
jumpstd = 0C -codes
keeptextopen = Keep text box open code
loadfont = Text box&font code
loadmovesprites = Load moving sprites
loadpokedata = Load Pokémon data [xxyy]
loadtrainer = Load trainer data2 [xxyy]
moveperson = Move person [xxyyzz]
musicfadeout = Music fade-out code [xxyy][zz]
pause = Waiting code [xx]
playsound = Sound code [xxyy]
pocketisfull = Full item pocket code
pokemart = Mart menu [xxyyzz]
pokepic = Pokémon picture code [xx]
priorityjump = Priority jump1 [2b]
reloadandreturn = Return code3
reloadmap = Reload map code
resetfuncs = Reset sophisticated functions
return = Return code1
returnafterbattle = Return to In game engine after battle
setbit1 = BitTable1 set [xxyy]
setbit2 = BitTable2 set [xxyy]
showemote = Display emotion [xxyyzz]
special = 0F -codes
spriteface = Change facing [xxyy]
startbattle = Start battle
stopfollow = Stop following code
stringtotext = Display strings [2b + xx]
take (-coins, -item, -money)
talkaftercancel = Script talk-after-cancel
text -commands (better to be used with hex editing only)
trade = Trade menu [xx]
verbosegiveitem = Commented give item code [xxyy]
waitbutton = Key-down code
warp = Warp code [xxyyzzaa]
warpfacing = Facing warp
warpmod = Warp modifier [xxyyzz]
wildoff = Deactivate PKMN battles
wildon = Activate PKMN battles
winlosstext = Pointer Win/Loss [2b + 2b]
writebyte = Load variable [xxyyzz]
writecode = Input code2 [xxyy]
yesorno = YES/No box

Offline

#2 2011-12-25 14:15:21

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 1,123/3,578

Re: PKSV ⇔ Scripting Compendium

Thank you sir! Very useful post. Happy Christmas!

Offline

#3 2011-12-25 15:22:46

Kuroko Aizawa
Member
Registered: 2011-12-01
Post 93/499

Re: PKSV ⇔ Scripting Compendium

thanks, was looking for one of these! Merry Christmas!

Last edited by Kuroko Aizawa (2011-12-25 15:23:14)

Offline

#4 2011-12-25 20:21:03

Miksy91
Member
Registered: 2010-10-16
Post 694/2,339

Re: PKSV ⇔ Scripting Compendium

Thanks you guys.
Merry Christmas to you too :)

Offline

#5 2012-03-11 20:53:07

kanzure
Member
From: Austin, Texas
Registered: 2012-01-15
Post 5/19
Website

Re: PKSV ⇔ Scripting Compendium

There are a few commands missing in the first post. Here's the (updated) pksv name table for Crystal:

pksv_crystal = {
    0x00: "2call",
    0x01: "3call",
    0x02: "2ptcall",
    0x03: "2jump",
    0x04: "3jump",
    0x05: "2ptjump",
    0x06: "if equal",
    0x07: "if not equal",
    0x08: "if false",
    0x09: "if true",
    0x0A: "if less than",
    0x0B: "if greater than",
    0x0C: "jumpstd",
    0x0D: "callstd",
    0x0E: "3callasm",
    0x0F: "special",
    0x10: "2ptcallasm",
    0x11: "checkmaptriggers",
    0x12: "domaptrigger",
    0x13: "checktriggers",
    0x14: "dotrigger",
    0x15: "writebyte",
    0x16: "addvar",
    0x17: "random",
    0x19: "copybytetovar",
    0x1A: "copyvartobyte", #loadvar?
    0x1C: "checkcode",
    0x1E: "writecode",
    0x1F: "giveitem",
    0x20: "takeitem",
    0x21: "checkitem",
    0x22: "givemoney",
    0x23: "takemoney",
    0x24: "checkmoney",
    0x25: "givecoins",
    0x26: "takecoins",
    0x27: "checkcoins",
    0x2B: "checktime",
    0x2C: "checkpoke",
    0x2D: "givepoke",
    0x2E: "giveegg",
    0x2F: "givepokeitem",
    0x31: "checkbit1",
    0x32: "clearbit1",
    0x33: "setbit1",
    0x34: "checkbit2",
    0x35: "clearbit2",
    0x36: "setbit2",
    0x37: "wildoff",
    0x38: "wildon",
    0x39: "xycompare",
    0x3A: "warpmod",
    0x3B: "blackoutmod",
    0x3C: "warp",
    0x41: "itemtotext",
    0x43: "trainertotext",
    0x44: "stringtotext",
    0x45: "itemnotify",
    0x46: "pocketisfull",
    0x47: "loadfont",
    0x48: "refreshscreen",
    0x49: "loadmovesprites",
    0x4B: "3writetext",
    0x4C: "2writetext",
    0x4E: "yesorno",
    0x4F: "loadmenudata",
    0x50: "writebackup",
    0x51: "jumptextfaceplayer",
    0x53: "jumptext",
    0x54: "closetext",
    0x55: "keeptextopen",
    0x56: "pokepic",
    0x57: "pokepicyesorno",
    0x58: "interpretmenu",
    0x59: "interpretmenu2",
    0x5D: "loadpokedata",
    0x5E: "loadtrainer",
    0x5F: "startbattle",
    0x60: "returnafterbattle",
    0x61: "catchtutorial",
    0x64: "winlosstext",
    0x66: "talkaftercancel",
    0x68: "setlasttalked",
    0x69: "applymovement",
    0x6B: "faceplayer",
    0x6C: "faceperson",
    0x6D: "variablesprite",
    0x6E: "disappear",
    0x6F: "appear",
    0x70: "follow",
    0x71: "stopfollow",
    0x72: "moveperson",
    0x75: "showemote",
    0x76: "spriteface",
    0x77: "follownotexact",
    0x78: "earthquake",
    0x7A: "changeblock",
    0x7B: "reloadmap",
    0x7C: "reloadmappart",
    0x7D: "writecmdqueue",
    0x7E: "delcmdqueue",
    0x7F: "playmusic",
    0x80: "playrammusic",
    0x81: "musicfadeout",
    0x82: "playmapmusic",
    0x83: "reloadmapmusic",
    0x84: "cry",
    0x85: "playsound",
    0x86: "waitbutton",
    0x87: "warpsound",
    0x88: "specialsound",
    0x89: "passtoengine",
    0x8A: "newloadmap",
    0x8B: "pause",
    0x8C: "deactivatefacing",
    0x8D: "priorityjump",
    0x8E: "warpcheck",
    0x8F: "ptpriorityjump",
    0x90: "return",
    0x91: "end",
    0x92: "reloadandreturn",
    0x93: "resetfuncs",
    0x94: "pokemart",
    0x95: "elevator",
    0x96: "trade",
    0x97: "askforphonenumber",
    0x98: "phonecall",
    0x99: "hangup",
    0x9A: "describedecoration",
    0x9B: "fruittree",
    0x9C: "specialphonecall",
    0x9D: "checkphonecall",
    0x9E: "verbosegiveitem",
    0xA0: "loadwilddata",
    0xA1: "halloffame",
    0xA2: "credits",
    0xA3: "warpfacing",
    0xA4: "storetext",
    0xA5: "displaylocation",
}

And here it is for G/S, although I am not 100% confident that the additions are correct.

pksv_gs = {
    0x00: "2call",
    0x01: "3call",
    0x02: "2ptcall",
    0x03: "2jump",
    0x04: "3jump",
    0x05: "2ptjump",
    0x06: "if equal",
    0x07: "if not equal",
    0x08: "if false",
    0x09: "if true",
    0x0A: "if less than",
    0x0B: "if greater than",
    0x0C: "jumpstd",
    0x0D: "callstd",
    0x0E: "3callasm",
    0x0F: "special",
    0x10: "2ptcallasm",
    0x11: "checkmaptriggers",
    0x12: "domaptrigger",
    0x13: "checktriggers",
    0x14: "dotrigger",
    0x15: "writebyte",
    0x16: "addvar",
    0x17: "random",
    0x19: "copybytetovar",
    0x1A: "copyvartobyte", #loadvar ?
    0x1C: "checkcode",
    0x1E: "writecode",
    0x1F: "giveitem",
    0x20: "takeitem",
    0x21: "checkitem",
    0x22: "givemoney",
    0x23: "takemoney",
    0x24: "checkmoney",
    0x25: "givecoins",
    0x26: "takecoins",
    0x27: "checkcoins",
    0x2B: "checktime",
    0x2C: "checkpoke",
    0x2D: "givepoke",
    0x2E: "giveegg",
    0x2F: "givepokeitem",
    0x31: "checkbit1",
    0x32: "clearbit1",
    0x33: "setbit1",
    0x34: "checkbit2",
    0x35: "clearbit2",
    0x36: "setbit2",
    0x37: "wildoff",
    0x38: "wildon",
    0x39: "xycompare",
    0x3A: "warpmod",
    0x3B: "blackoutmod",
    0x3C: "warp",
    0x41: "itemtotext",
    0x43: "trainertotext",
    0x44: "stringtotext",
    0x45: "itemnotify",
    0x46: "pocketisfull",
    0x47: "loadfont",
    0x48: "refreshscreen",
    0x49: "loadmovesprites",
    0x4B: "3writetext",
    0x4C: "2writetext",
    0x4E: "yesorno",
    0x4F: "loadmenudata",
    0x50: "writebackup",
    0x51: "jumptextfaceplayer",
    0x52: "jumptext",
    0x53: "closetext",
    0x54: "keeptextopen",
    0x55: "pokepic",
    0x56: "pokepicyesorno",
    0x57: "interpretmenu",
    0x58: "interpretmenu2",
    0x5C: "loadpokedata",
    0x5D: "loadtrainer",
    0x5E: "startbattle",
    0x5F: "returnafterbattle",
    0x60: "catchtutorial",
    0x63: "winlosstext",
    0x65: "talkaftercancel",
    0x67: "setlasttalked",
    0x68: "applymovement",
    0x6A: "faceplayer",
    0x6B: "faceperson",
    0x6C: "variablesprite",
    0x6D: "disappear",
    0x6E: "appear",
    0x6F: "follow",
    0x70: "stopfollow",
    0x71: "moveperson",
    0x74: "showemote",
    0x75: "spriteface",
    0x76: "follownotexact",
    0x77: "earthquake",
    0x79: "changeblock",
    0x7A: "reloadmap",
    0x7B: "reloadmappart",
    0x7C: "writecmdqueue",
    0x7D: "delcmdqueue",
    0x7E: "playmusic",
    0x7F: "playrammusic",
    0x80: "musicfadeout",
    0x81: "playmapmusic",
    0x82: "reloadmapmusic",
    0x83: "cry",
    0x84: "playsound",
    0x85: "waitbutton",
    0x86: "warpsound",
    0x87: "specialsound",
    0x88: "passtoengine",
    0x89: "newloadmap",
    0x8A: "pause",
    0x8B: "deactivatefacing",
    0x8C: "priorityjump",
    0x8D: "warpcheck",
    0x8E: "ptpriorityjump",
    0x8F: "return",
    0x90: "end",
    0x91: "reloadandreturn",
    0x92: "resetfuncs",
    0x93: "pokemart",
    0x94: "elevator",
    0x95: "trade",
    0x96: "askforphonenumber",
    0x97: "phonecall",
    0x98: "hangup",
    0x99: "describedecoration",
    0x9A: "fruittree",
    0x9C: "checkphonecall",
    0x9D: "verbosegiveitem",
    0x9E: "loadwilddata",
    0x9F: "halloffame",
    0xA0: "credits",
    0xA1: "warpfacing",
    0xA2: "storetext",
    0xA3: "displaylocation",
}

The old G/S version can be found here. Here goes:

pksv_gs = {
    0x00: "2call",
    0x01: "3call",
    0x03: "2jump",
    0x04: "3jump",
    0x06: "if equal",
    0x07: "if not equal",
    0x08: "if false",
    0x09: "if true",
    0x0A: "if less than",
    0x0B: "if greater than",
    0x0C: "jumpstd",
    0x0E: "3callasm",
    0x0F: "special",
    0x12: "domaptrigger",
    0x14: "dotrigger",
    0x15: "writebyte",
    0x19: "copybytetovar",
    0x1C: "checkcode",
    0x1E: "writecode",
    0x1F: "giveitem",
    0x20: "takeitem",
    0x21: "checkitem",
    0x22: "givemoney",
    0x23: "takemoney",
    0x24: "checkmonkey",
    0x25: "givecoins",
    0x26: "takecoins",
    0x27: "checkcoins",
    0x2B: "checktime",
    0x2C: "checkpoke",
    0x2D: "givepoke",
    0x2E: "giveegg",
    0x31: "checkbit1",
    0x32: "clearbit1",
    0x33: "setbit1",
    0x34: "checkbit2",
    0x35: "clearbit2",
    0x36: "setbit2",
    0x37: "wildoff",
    0x38: "wildon",
    0x3A: "warpmod",
    0x3B: "blackoutmod",
    0x3C: "warp",
    0x44: "stringtotext",
    0x46: "pocketisfull",
    0x47: "loadfont",
    0x49: "loadmovesprites",
    0x4B: "3writetext",
    0x4C: "2writetext",
    0x4E: "yesorno",
    0x51: "jumptextfaceplayer",
    0x52: "jumptext",
    0x53: "closetext",
    0x54: "keeptextopen",
    0x55: "pokepic",
    0x5C: "loadpokedata",
    0x5D: "loadtrainer",
    0x5E: "startbattle",
    0x5F: "returnafterbattle",
    0x60: "catchtutorial",
    0x63: "winlosstext",
    0x65: "talkaftercancel",
    0x68: "applymovement",
    0x6A: "faceplayer",
    0x6B: "faceperson",
    0x6D: "disappear",
    0x6E: "appear",
    0x6F: "follow",
    0x70: "stopfollow",
    0x71: "moveperson",
    0x74: "showemote",
    0x75: "spriteface",
    0x76: "follownotexact",
    0x77: "earthquake",
    0x79: "changeblock",
    0x7A: "reloadmap",
    0x80: "musicfadeout",
    0x83: "cry",
    0x84: "playsound",
    0x85: "waitbutton",
    0x8A: "pause",
    0x8C: "priorityjump",
    0x8F: "return",
    0x90: "end",
    0x91: "reloadandreturn",
    0x92: "resetfuncs",
    0x93: "pokemart",
    0x94: "elevator",
    0x95: "trade",
    0x9A: "fruittree",
    0x9D: "verbosegiveitem",
    0xA0: "credits",
    0xA1: "warpfacing",
}

Remember, the command list is slightly different between GS/C:

def translate_command_byte(crystal=None, gold=None):
    """takes a command byte from either crystal or gold
    returns the command byte in the other (non-given) game

    The new commands are values 0x52 and 0x9F. This means:
        Crystal's 0x00–0x51 correspond to Gold's 0x00–0x51
        Crystal's 0x53–0x9E correspond to Gold's 0x52–0x9D
        Crystal's 0xA0–0xA5 correspond to Gold's 0x9E–0xA3

    see: http://www.pokecommunity.com/showpost.php?p=4347261
    """
    if crystal: #convert to gold
        if crystal <= 0x51: return crystal
        if crystal == 0x52: return None 
        if 0x53 <= crystal <= 0x9E: return crystal-1
        if crystal == 0x9F: return None 
        if 0xA0 <= crystal <= 0xA5: return crystal-2
        if crystal > 0xA5: raise "dunno yet if crystal has new insertions after crystal:0xA5 (gold:0xA3)"
    elif gold: #convert to crystal
        if gold <= 0x51: return gold 
        if 0x52 <= gold <= 0x9D: return gold+1
        if 0x9E <= gold <= 0xA3: return gold+2
        if gold > 0xA3: raise "dunno yet if crystal has new insertions after gold:0xA3 (crystal:0xA5)"
    else: raise "translate_command_byte needs either a crystal or gold command"

or see translate_command_byte in the pokecrystal git repo, or its description in iimarckus' PC post.

Offline

#6 2012-03-13 01:42:45

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 1,257/3,578

Re: PKSV ⇔ Scripting Compendium

Whoa! Thanks!

Offline

Board footer

Powered by FluxBB