PDA

View Full Version : [Scripting] Command Database Naming


HackMew
November 13th, 2008, 06:42 AM
While working on XSE, I decided to eventually adjust the commands names so they would fit better with yourselves.
Command names should be standardized from now on, but choosing a good name isn't a trivial job.
So, if you think you have a better name for an existing command, suggest it here as long as it wasn't suggested already.

Few notes: the fact your suggested a shorter name doesn't mean it's automatically better than an existing, longer one.
Names need to be concise yet descriptive so you don't type to type too much and, at the same time, you can grasp the meaning easily.
Whenever you suggest anything, try argumenting your choice(s).
Don't forget that you shouldn't suggest anything about a command you don't even know how it works. Especially for the unknown ones, of course.

Below you can find the full, actual list:


0x00 - nop
0x01 - nop1
0x02 - end
0x03 - return
0x04 - call
0x05 - goto
0x06 - if
0x07 - if2
0x08 - gotostd
0x09 - callstd
0x0A - gotostdif
0x0B - callstdif
0x0C - jumpram
0x0D - killscript
0x0E - setbyte
0x0F - loadpointer
0x10 - setbyte2
0x11 - writebytetooffset
0x12 - loadbytefrompointer
0x13 - setfarbyte
0x14 - copyscriptbanks
0x15 - copybyte
0x16 - setvar
0x17 - addvar
0x18 - subvar
0x19 - copyvar
0x1A - copyvarifnotzero
0x1B - comparebanks
0x1C - comparebanktobyte
0x1D - comparebanktofarbyte
0x1E - comparefarbytetobank
0x1F - comparefarbytetobyte
0x20 - comparefarbytes
0x21 - compare
0x22 - comparevars
0x23 - callasm
0x24 - cmd24
0x25 - special
0x26 - special2
0x27 - waitstate
0x28 - pause
0x29 - setflag
0x2A - clearflag
0x2B - checkflag
0x2C - cmd2c
0x2D - cmd2d
0x2E - resetvars
0x2F - sound
0x30 - checksound
0x31 - fanfare
0x32 - waitfanfare
0x33 - playsong
0x34 - playsong2
0x35 - fadedefault
0x36 - fadesong
0x37 - fadeout
0x38 - fadein
0x39 - warp
0x3A - warp2
0x3B - warpwalk
0x3C - warphole
0x3D - warpteleport
0x3E - warp3
0x3F - warpelevator
0x40 - warp4
0x41 - warp5
0x42 - getplayerpos
0x43 - countpokemon
0x44 - additem
0x45 - removeitem
0x46 - checkitemamount
0x47 - checkitem
0x48 - checkitemtype
0x49 - addpcitem
0x4A - checkpcitem
0x4B - adddecoration
0x4C - removedecoration
0x4D - testdecoration
0x4E - checkdecoration
0x4F - applymovement
0x50 - applymovement2
0x51 - waitmovement
0x52 - waitmovement2
0x53 - hidesprite
0x54 - hidesprite2
0x55 - showsprite
0x56 - showsprite2
0x57 - movesprite
0x58 - spritevisible
0x59 - spriteinvisible
0x5A - faceplayer
0x5B - spriteface
0x5C - trainerbattle
0x5D - repeattrainerbattle
0x5E - endtrainerbattle
0x5F - endtrainerbattle2
0x60 - checktrainerflag
0x61 - cleartrainerflag
0x62 - settrainerflag
0x63 - movesprite2
0x64 - moveoffscreen
0x65 - spritebehave
0x66 - waitmsgbox
0x67 - msgbox2
0x68 - closeonkeypress
0x69 - lockall
0x6A - lock
0x6B - releaseall
0x6C - release
0x6D - waitkeypress
0x6E - yesnobox
0x6F - multichoice
0x70 - multichoice2
0x71 - multichoice3
0x72 - showbox
0x73 - hidebox
0x74 - clearbox
0x75 - showpokepic
0x76 - hidepokepic
0x77 - showcontestwinner
0x78 - braille
0x79 - givepokemon
0x7A - giveegg
0x7B - setpkmnpp
0x7C - checkattack
0x7D - bufferpokemon
0x7E - bufferfirstpokemon
0x7F - bufferpokemon2
0x80 - bufferitem
0x81 - bufferdecoration
0x82 - bufferattack
0x83 - buffernumber
0x84 - bufferstd
0x85 - bufferstring
0x86 - pokemart
0x87 - pokemart2
0x88 - pokemart3
0x89 - pokecasino
0x8A - cmd8a
0x8B - choosecontestpkmn
0x8C - startcontest
0x8D - showcontestresults
0x8E - contestlinktransfer
0x8F - random
0x90 - givemoney
0x91 - paymoney
0x92 - checkmoney
0x93 - showmoney
0x94 - hidemoney
0x95 - updatemoney
0x96 - cmd96
0x97 - fadescreen
0x98 - fadescreen2
0x99 - darken
0x9A - lighten
0x9B - msgbox3
0x9C - doanimation
0x9D - setanimation
0x9E - checkanimation
0x9F - sethealingplace
0xA0 - checkgender
0xA1 - cry
0xA2 - setmaptile
0xA3 - resetweather
0xA4 - setweather
0xA5 - doweather
0xA6 - cmda6
0xA7 - setmapfooter
0xA8 - spritelevelup
0xA9 - restorespritelevel
0xAA - createsprite
0xAB - spriteface2
0xAC - setdooropened
0xAD - setdoorclosed
0xAE - doorchange
0xAF - setdooropened2
0xB0 - setdoorclosed2
0xB1 - cmdb1
0xB2 - cmdb2
0xB3 - checkcoins
0xB4 - givecoins
0xB5 - removecoins
0xB6 - setwildbattle
0xB7 - dowildbattle
0xB8 - setvirtualaddress
0xB9 - virtualgoto
0xBA - virtualcall
0xBB - virtualgotoif
0xBC - virtualcallif
0xBD - virtualmsgbox
0xBE - virtualloadpointer
0xBF - virtualbuffer
0xC0 - showcoins
0xC1 - hidecoins
0xC2 - updatecoins
0xC3 - cmdc3
0xC4 - warp6
0xC5 - waitcry
0xC6 - bufferboxname
0xC7 - textcolor
0xC8 - cmdc8
0xC9 - cmdc9
0xCA - msgboxsign
0xCB - msgboxnormal
0xCC - comparehiddenvar
0xCD - setobedience
0xCE - checkobedience
0xCF - executeram
0xD0 - setworldmapflag
0xD1 - warpteleport2
0xD2 - setcatchlocation
0xD3 - braille2
0xD4 - bufferitems
0xD5 - cmdd5
0xD6 - cmdd6
0xD7 - warp7
0xD8 - cmdd8
0xD9 - cmdd9
0xDA - hidebox2
0xDB - msgbox4
0xDC - fadescreen3
0xDD - buffertrainerclass
0xDE - buffertrainername
0xDF - pokenavcall
0xE0 - warp8
0xE1 - buffercontestype
0xE2 - bufferitems2


Thanks for your time.

cooley
November 13th, 2008, 07:06 PM
Is it alright if I tell you(them, everyone) a name for cmdC3?

Larsie13
November 14th, 2008, 08:13 AM
How about checknewday for cmd2D? Since you couldn't come up with a name, maybe this will work.
Oh, and it might be a good idea to explain warpelevator a little better in the next version's Command Help. 'Cause the way it is now, you'd think it is a normal warp command.

HackMew
November 14th, 2008, 01:19 PM
Is it alright if I tell you(them, everyone) a name for cmdC3?

Yeah, sure. That's what this thread is for ;)


How about checknewday for cmd2D? Since you couldn't come up with a name, maybe this will work.
Oh, and it might be a good idea to explain warpelevator a little better in the next version's Command Help. 'Cause the way it is now, you'd think it is a normal warp command.

And what about checkdailyflags ?
Also, what would you suggest for the warpelevator description?

Hiche..
November 14th, 2008, 02:13 PM
I would like to know what really cmdC3 does, and how it's used in a script.. :D

About this, it's a great command database. The naming is good. Isn't warpelevator a normal warp command, but gives the elevator animation only?

thethethethe
November 14th, 2008, 04:29 PM
About this, it's a great command database. The naming is good. Isn't warpelevator a normal warp command, but gives the elevator animation only?
No it's different. I haven't done any scripting lately, but from what I remember, it doesn't actually warp you anywhere. It just changes where the warp on the map will warp you to.

Since I'm posting I could rattle off some things that I use.
3A - warpmuted
CA - signmsg
CB - normalmsg
'tif' and 'fif' as aliases for 'if 0x1 goto 0xFF', and 'if 0x0 goto 0xFF' respectively.
'tcompjump 0x800D 0x1 0xFF' which was 'compare 0x800D 0x1: if 0x1 goto 0xFF'.

Hiche..
November 15th, 2008, 01:53 AM
No it's different. I haven't done any scripting lately, but from what I remember, it doesn't actually warp you anywhere. It just changes where the warp on the map will warp you to.

Since I'm posting I could rattle off some things that I use.
3A - warpmuted
CA - signmsg
CB - normalmsg
'tif' and 'fif' as aliases for 'if 0x1 goto 0xFF', and 'if 0x0 goto 0xFF' respectively.
'tcompjump 0x800D 0x1 0xFF' which was 'compare 0x800D 0x1: if 0x1 goto 0xFF'.

Oh ok, thanks thethethethe.
There is also warpteleport, and warpteleport2, that always confuses me. I tested them, but they didn't work. What is the difference between them?

Larsie13
November 15th, 2008, 04:05 AM
And what about checkdailyflags ?
Also, what would you suggest for the warpelevator description?

I think that's even better :P
And your second question, what about:
Sets where warps that lead to warp 127 of map 127.127 warp the player.

For an example of the warpelevator command, check the green "S" in the Inside of Truck in R/S/E, and check the warps there, too.

cooley
November 15th, 2008, 08:09 PM
Okay, well in my hack...There's a way that I removed the Pokemon...But the command I discovered was #raw 0xC3. My name would be removefirstpokemon but I think it's too long, anyone?

I do think it needs a bit more reversing to do though :\

liuyanghejerry
November 16th, 2008, 01:50 AM
I don't care it a lot,because I will check the command I want to use in game...

Spherical Ice
November 16th, 2008, 08:21 AM
I think 'nop' is kind of random for a name. I don't have a suggestion on what it could be, but I just thought I'd put it out there. That is okay, right?

Snowfield34
November 16th, 2008, 11:30 AM
May I then suggest and other Feature?
Raw Decompiling, Like Instead of
Applymovement 0xFF 0x834AA70
Waitmovement 0x0
Then
#Raw 0x4F 0xFF 0x70 0xAA 0x34 0x8 ' Applymovement 0xFF 0x834AA70
#Raw 0x51 0x0 ' Waitmovement 0x0

thethethethe
November 16th, 2008, 11:48 AM
May I then suggest and other Feature?
Raw Decompiling, Like Instead of


Don't you mean this? I know it's a little pointless.
#raw 0x4F 0xFF 0x0 0x70 0xAA 0x34 0x8
#raw 0x51 0x0 0x0

Snowfield34
November 16th, 2008, 12:33 PM
Don't you mean this? I know it's a little pointless.
#raw 0x4F 0xFF 0x0 0x70 0xAA 0x34 0x8
#raw 0x51 0x0 0x0
That's why I would like the Raw-Decompiling, So I could learn all that stuff...

thethethethe
November 16th, 2008, 09:30 PM
That's why I would like the Raw-Decompiling, So I could learn all that stuff...

Sorry, but I forgot to mention this earlier. There's no point. Just open up your hex editor and look at it. Why do you need a scripting tool to decompile the hex, into hex?

ZodiacDaGreat
November 16th, 2008, 10:10 PM
@snowfield34 - Um, what's the point of making XSE if you want to decompile a script in #raws. That wold make no difference at all -.-.

Snowfield34
November 17th, 2008, 04:02 AM
Sorry, but I forgot to mention this earlier. There's no point. Just open up your hex editor and look at it. Why do you need a scripting tool to decompile the hex, into hex?

@snowfield34 - Um, what's the point of making XSE if you want to decompile a script in #raws. That wold make no difference at all -.-.


Blame Hackmew.... If he hadn't came up with all those needed functions, I could come up with some...

No, But Basicly when People need help with Pokescript and stuff, and then I just would like to know what happen in my scripting tool.... Kind of when Jason just showed me, the zero's in the applymovement, I had no idea about them...

HackMew
November 17th, 2008, 06:18 AM
No it's different. I haven't done any scripting lately, but from what I remember, it doesn't actually warp you anywhere. It just changes where the warp on the map will warp you to.

Since I'm posting I could rattle off some things that I use.
3A - warpmuted
CA - signmsg
CB - normalmsg
'tif' and 'fif' as aliases for 'if 0x1 goto 0xFF', and 'if 0x0 goto 0xFF' respectively.
'tcompjump 0x800D 0x1 0xFF' which was 'compare 0x800D 0x1: if 0x1 goto 0xFF'.

Well, yeah. setwarpplace would be a better name. What do you people think about it?

warpmuted, signmsg and normalmsg are fine with me. I'll see what the others will say about them.

Talking about the others... Too many ifs may be a bit confusing...


Oh ok, thanks thethethethe.
There is also warpteleport, and warpteleport2, that always confuses me. I tested them, but they didn't work. What is the difference between them?

Whish I knew that... those are still kinda mysterious...
From what I saw, the first one is used in R/S/E while the latter is used on FR/LG.
On FR/LG it's always used together with specials, so that would act more like a trigger.
Probably something similar to warpelevator - soon to become setwarpplace.


I think that's even better :P
And your second question, what about:
Sets where warps that lead to warp 127 of map 127.127 warp the player.

For an example of the warpelevator command, check the green "S" in the Inside of Truck in R/S/E, and check the warps there, too.

Yeah, something similar may be good.


Okay, well in my hack...There's a way that I removed the Pokemon...But the command I discovered was #raw 0xC3. My name would be removefirstpokemon but I think it's too long, anyone?

I do think it needs a bit more reversing to do though :\

Sadly cmdC3 is a multi-purpose command...
It is used for sure in:


Pokémon Contests
Daycare Center
Pokémon Center
Berry Trees


I would say it's something like comparehiddenvar which is used in FR/LG though I'm not sure. BTW... cmd96 is quite similar too...
I'll need to reverse more I guess :P


I think 'nop' is kind of random for a name. I don't have a suggestion on what it could be, but I just thought I'd put it out there. That is okay, right?

NOPe, it's anything but random. The name comes directly from assembly language, meaning No OPEration. For further info, see this (http://en.wikipedia.org/wiki/NOP).
Also, did you know the nop1 command is used for the #reserve directive as a place-holder (to be replaced by active commands later on) ?


May I then suggest and other Feature?
Raw Decompiling, Like Instead of [...]

Something like this, right?

#raw 0x4F word 0xFF pointer 0x834AA70
#raw 0x51 word 0x0

Well, "raw decompiling" defeats the whole purpose of decompling (http://en.wikipedia.org/wiki/Decompiling)...
Decompiling is translating those apparently meaningless numbers into something human beings can (or at least should) undestand.

Anyway, please stay on topic. This is not a feature request thread.
If you're willing to suggest something, my Tools Factory in the Toolbox is the right place.

thethethethe
November 17th, 2008, 12:42 PM
Sadly cmdC3 is a multi-purpose command...
It is used for sure in:


Pokémon Contests
Daycare Center
Pokémon Center
Berry Trees


I would say it's something like comparehiddenvar which is used in FR/LG though I'm not sure. I'll need to reverse more I guess :P
I'm not sure if you've seen this, but in a couple of the interviewer's events in RSE it is used aswell. I think it was used to store what you're input was into a buffer, but I can't remember totally. I did that a while ago. I'm sure it's used by the interviewer at the Contests in Lilycove.

ZodiacDaGreat
November 17th, 2008, 07:57 PM
I'm not sure if you've seen this, but in a couple of the interviewer's events in RSE it is used aswell. I think it was used to store what you're input was into a buffer, but I can't remember totally. I did that a while ago. I'm sure it's used by the interviewer at the Contests in Lilycove.
Um, it is also used by the guy at dewford for the things that are Hip and Trendy.

cooley
November 22nd, 2008, 04:05 PM
Well whatever CmdC3 is, I know it is not a stand-alone command. It has 1 parameter(including the command) so far...

Anyways, I've been thinking about a new name for warphole..Maybe you can try Warpfall?

HackMew
December 15th, 2008, 07:46 AM
Well whatever CmdC3 is, I know it is not a stand-alone command. It has 1 parameter(including the command) so far...

Anyways, I've been thinking about a new name for warphole..Maybe you can try Warpfall?

Why warpfall? Wouldn't that be less obvious, as a name?

Besides, even if the poll ended, you can still post your suggestions. Don't let this thread down, please: I made it for all of you, after all.
Thanks for reading.

Hiche..
December 15th, 2008, 07:53 AM
Hackmew, can't you shorten some commands? Like, the comparebank commands. Some of them are long.

Also, I have a question, what does bufferstring do? Does it have to do something with the text?

HackMew
December 15th, 2008, 07:59 AM
HackMew, can't you shorten some commands? Like, the comparebank commands. Some of them are long.

Also, I have a question, what does bufferstring do? Does it have to do something with the text?

To shorten a command name, the new name must have some sense. I posted the "rules" in the first post. So, if you have anything to suggest, just post.
The bufferstring command will simply put a string loaded at a specific offset into the selected buffer. That is used for berry trees in R/S/E, for example.

Hiche..
December 19th, 2008, 05:33 AM
I have a couple of suggestions:

0x34 - playsong2

Change playsong2 to playsound

0x42 - getplayerpos

Change it to getplayerxy

0x50 - applymovement2

Change it to applymovementendat

0x56 - showsprite2

Chane it to reappearat

0x59 - spriteinvisible

Change it to spritehide

0x68 - closeonkeypress

Change it to closemsg

0xD8 - cmdd8

I think this is also a warp. Call it warp8. Not sure though

That's all. I might post some later on. However, you don't have to do them if you don't like them, they are just suggestions.

sab
January 1st, 2009, 05:50 PM
I have a couple of suggestions:

0x34 - playsong2

Change playsong2 to playsound

0x42 - getplayerpos

Change it to getplayerxy

0x50 - applymovement2

Change it to applymovementendat

0x56 - showsprite2

Chane it to reappearat

0x59 - spriteinvisible

Change it to spritehide

0x68 - closeonkeypress

Change it to closemsg

0xD8 - cmdd8

I think this is also a warp. Call it warp8. Not sure though

That's all. I might post some later on. However, you don't have to do them if you don't like them, they are just suggestions.

I like the whole idea of "commands make more sense" but, serriously people if this is changed to that and that to this, nobody will know what the commands are and all totorials will be worthless.(unless they get translated..) I think that if a command dosn't make sense, it's fine to change the names, but don't go on a rampage saying rename this, that and the other. The commands make sense as is. Sorry if I seem harsh, and I'm not trying to spam... I'm just trying to state my what I feel.

Hiche..
January 2nd, 2009, 12:05 AM
I like the whole idea of "commands make more sense" but, serriously people if this is changed to that and that to this, nobody will know what the commands are and all totorials will be worthless.(unless they get translated..) I think that if a command dosn't make sense, it's fine to change the names, but don't go on a rampage saying rename this, that and the other. The commands make sense as is. Sorry if I seem harsh, and I'm not trying to spam... I'm just trying to state my what I feel.

You got a point. However, I only suggested. I didn't tell him they are better, and he should change them.
The commands he used in the new XSE should not be changed. People are used to them by now.

Full Metal
January 31st, 2009, 08:01 PM
You got a point. However, I only suggested. I didn't tell him they are better, and he should change them.
The commands he used in the new XSE should not be changed. People are used to them by now.
with this in mind...maybe he(assuming Hackmew is a he don't get mad if I'm wrong) could add support for the syntax of the previous versions...

droomph
December 4th, 2011, 01:52 PM
Here are some suggestions:
0x1B - cmpbanks
0x1C - cmpbanktob
0x1D - cmpbanktofarb
0x1E - cmpfarbtobank
0x1F - cmpfarbtob
0x20 - cmpfarbs
0x21 - cmp
0x22 - cmpvars

The THUMB command for "compare" is "cmp", and we all can understand what "cmp" means, so yeah...just sayin'

Shiny Quagsire
December 5th, 2011, 07:30 PM
I like the whole idea of "commands make more sense" but, serriously people if this is changed to that and that to this, nobody will know what the commands are and all totorials will be worthless.(unless they get translated..) I think that if a command dosn't make sense, it's fine to change the names, but don't go on a rampage saying rename this, that and the other. The commands make sense as is. Sorry if I seem harsh, and I'm not trying to spam... I'm just trying to state my what I feel.

On the topic of renaming, it'd be nice to have overrides for (un)used commands, that way if someone were to add a custom command (via ASM hacking), It'd have a name. Just a thought. :)

Or, have different databases of overrides, that way people can use the old command names until they get used to or convert their old scripts. Thus, everyone's happy with their commands, improved or not

DavidJCobb
December 11th, 2011, 03:17 AM
My own research, back when I was active in FR hacking, revealed that the purposes and even the argument structures of certain commands were not consistent between Advance-gen games. I'd strongly advise having multiple command databases as resource files, independent of XSE itself and alterable with a simple text editor.

This would allow the program to account for the variations and for ASM-based custom commands, and would allow anyone who conducts research similar to mine to extend the database as needed.

Of course, this thread is only back as the result of a necropost, so no one should expect updates to be made based on any posts here.