Version 2 Scripts

From Pokémon 3D Wiki
Jump to navigation Jump to search
There is a newer version of this documentation. It is incomplete but some missing commands have been reinserted into the new page.

If you want to take a look, visit: Version 2 Scripts New.

Version 2 scripts were started in version 0.32. Any script in Version 2 must have "version=2" as the first line of the script.

Commands are written as @command.subcommand and are no longer case sensitive. All commands require a subcommand.

Constructs were also expanded to be <construct.subconstruct> and can be used with switches to

Commands

Commands always have a subcommand. All combinations will be listed below.

The table is split into sections by Command.

* Unless otherwise specified a bool can be either 1(on) or 0(off).

** Unless otherwise specified X,Y,Z is a three dimensional position.

*** Unless otherwise specified tradeitem means an array defined as follows: {int1|int2|int3}

  • int1 - Item ID.
  • int2 - The amount of the item available for sale. -1 means infinite.
  • int3 - The price of the item. -1 uses the default.


Subcommand Job Inputs

@Battle

.resetvars Resets the battle variables to default. None
.setvars(str,bool) Changes the given variable to the given bool. str - The variable to change.
cancatch, canrun, canblackout, canreceiveexp, canuseitems, frontiertrainer, divebattle
int - The value to change the variable to.
.starttrainer(str) Starts a trainer battle. str - The file path of the file to start.
.trainer(str) Starts a trainer battle without displaying intro message or checking the register. str - The file path of the file to start.
.wild(int1,int2) Starts a wild battle against the given Pokemon. int1 - The dex number of the Pokemon to battle.
int2 - The level of the Pokemon to battle.
The Pokemon can also be defined by inserting the Pokemon Code between the parentheses.
.wildshiny(int1,int2) Starts a wild battle against a shiny version of the given Pokemon. Same as @battle.wild().

@Camera

.activatethirdperson Turns on third person. None
.deactivethirdperson Turns off third person. None
.reset Sets the camera to its default location. None
.set(X,Y,Z,sng1,sng2) Changes the position of the camera. X,Y,Z - The new position of the camera.
sng1 - The new yaw of the camera.
sng2 - The new pitch of the camera.
.setpitch(sng) Change the pitch of the camera. sng - The value to make the pitch.
.setposition(X,Y,Z) Changes the position of the camera. X,Y,Z - The new position for the camera.
.setx(sng) Change the X-coordinate of the camera. sng - The value to make the X-coordinate.
.sety(sng) Change the Y-coordinate of the camera. sng - The value to make the Y-coordinate.
.setyaw(sng) Change the yaw of the camera. sng - The value to make the yaw.
.setz(sng) Change the Z-coordinate of the camera. sng - The value to make the Z-coordinate.
.togglethirdperson Switch the camera mode. None

@Chat

.clear Clears the chat. None.

@Daycare

.clean(int) Organizes the save data for the given daycare. int - The ID of the daycare(Route 34's is 0).
.leavepokemon(int1,int2,int3) Leaves the given Pokemon in the given daycare. int1 - The ID of the daycare(Route 34's is 0).
int2 - Daycare slot for pokemon to be stored in(0 or 1).
Party ID of pokemon to be deposited(0-5).
.removeegg(int) Removes the egg from the given daycare permanently. int - The ID of the daycare(Route 34's is 0).
.takeegg(int) Takes the egg from the given daycare. int - The ID of the daycare(Route 34's is 0).
.takepokemon(int1,int2) Takes the given Pokemon from the given daycare. int1 - The ID of the daycare(Route 34's is 0).
int2 - Daycare slot for pokemon to be stored in(0 or 1).

@Entity

.remove(int) Removes the given entity. int - ID of an entity on the map.
.setadditionalvalue(int,str) Changes the additionalvalue of the given entity to the given value. int - ID of an entity on the map.
str - The value to change the additionalvalue to.
.setcollision(int,bool) Changes the collision of the given entity to the given bool. int - ID of an entity on the map.
bool - The value to change the collision to.
.setid(int1,int2) Changes the ID of the given entity. int1 - ID of an entity on the map.
int2 - The new ID for the entity.
.setopacity(int1,int2) Changes the opacity of the given entity to the given value. int1 - ID of an entity on the map.
int2 - The opacity to set the entity to.
.setscale(int,X,Y,Z) Changes the scale of the given entity to the given value. int1 - ID of an entity on the map.
X,Y,Z - The value to change the scale to.
.settexture(int1,int2,[str,int3,int4,int5,int6]) Changes the given face to the given texture. int1 - ID of an entity on the map.

int2 - The face of the given entity to change.
str - The texture file from which to get the new texture.
int3 - Start pixel (x axis).
int4 - Start pixel (y axis).
int5 - Length(x axis) in pixels.
int6 - Height(y axis) in pixels.

.setvisible(int,bool) Changes the visibility of the given entity to the given bool. int - ID of an entity on the map.
bool - The value to change the visibility to.
.showmessagebulb(int|X|Y|Z) Displays the given message bulb at the given position int - The type of messagebulb to display.
0=..., 1=!, 2=>:(, 3=?, 4=music note, 5=heart, 6=:(, 7=Pokéball, 8=:D, 9=:)
X|Y|Z - The position of the messagebulb.
.warp(int,X,Y,Z) Warps the given entity to the given position. int1 - ID of an entity on the map.
X,Y,Z - The new position.

@Environment

.setcandig(bool) Changes the candig option for the map to 'bool'. bool - A bool for candig.
.setcanfly(bool) Changes the canfly option for the map to 'bool'. bool - A bool for canfly.
.setcanteleport(bool) Changes the canteleportoption for the map to 'bool'. bool - A bool for canteleport.
.setisdark(bool) Changes the isdark option for the map to 'bool'. bool - A bool for isdark.
.setregionweather(int) Changes the random weather for all of the maps to the given weather. int - Clear=0, Rain=1, Snow=2, Underwater=3, Sunny=4, Fog=5, Sandstorm=6
.setrenderdistance(int\str) Sets the render distance to the int or str given. int - 0-4
str - tiny, small, normal, far, or extreme.
.setweather(int) Changes the weather for the map to the given weather. int - Clear=0, Rain=1, Snow=2, Underwater=3, Sunny=4, Fog=5, Sandstorm=6
.setwildPokemoneverywhere(bool) Turns wild encounters on\off. bool - A bool for wild encounters.
.setwildPokemongrass(bool) Turns wild encounters on\off for grass. bool - A bool for wild encounters.
.setwildPokemonwater(bool) Turns wild encounters on\off for water. bool - A bool for wild encounters.
.toggledarkness Changes the darkness to whatever it isn't. None

@Item

.clearitem(int1,int2) The same as @item.remove() but does not display the text. int1 - The ID of the item to remove.
int2 - The amount of the item to remove. Must be defined.
.give(int1,int2) Gives int2 number of int1 items. int1 - The ID of the item to give.
int2 - The amount of the item to give. If not defined it is 1.
.messagegive(int1,int2) Displays the message for what @item.give() did. int1 - The ID of the item to give.
int2 - The amount of the item to give. If not defined it is 1.
.remove(int1,int2) Removes int2 number of int1 items. int1 - The ID of the item to remove.
int2 - The amount of the item to remove. Must be defined.
.repel(int) Adds repel steps based on the item ID of the repel int - The item ID of a repel.
20 = 100 steps, 42 = 200 steps, 43 = 250 steps

@Level

.reload Completely reloads the map None
.update Reloads the current map. None
.wait(int) Waits at that command for a given amount of time. int - Time to wait in hundredths of a second.
.waitforevents Waits for all other scripts to finish before continuing(including @npc.moveasync()).

@Music

.pause Pauses music. None
.play(str) Plays song 'str' until the song is changed by another script or a new map. str - The song file to play.
.resume Resumes music. None
.setmusicloop(str) Makes song 'str' the map's song until the player leaves the map or this command is used again. str - Song file to play.
.stop Fully stops the music. None

@NPC

.move(int1,int2) Moves the given NPC the given amount of steps. int1 - The ID of an NPC on the map.
int2 - The amount of steps for the NPC to move.
.moveasync(int1,int2) Moves the given npc the given amount of steps while still executing the scripts after it. int1 - The ID of an NPC on the map.
int2 - The amount of steps for the NPC to move.
.position(int,X,Y,Z) Warps the NPC to the given position. int - The ID of an NPC on the map.
X,Y,Z - The new position.
.register(str) Creates a register in the NPC register file of the save. str - The string to register.
Ex. @npc.register(map.dat|0|remove|0)
.remove(int) Removes the given NPC from the map. int - The ID of an NPC on the map.
.spawn(X,Y,Z,int1,str1,str2,bool,int2,str3,int3,str4) Creates a new NPC. X,Y,Z - The position of the new NPC.
int1 - The action value of the new NPC.
str1 - The additionalvalue of the new NPC.
str2 - The skin of the new NPC.
bool - The animateidle value of the new NPC.
int2 - The rotation of the new NPC.
str3 - The Name of the new NPC.
int3 - The ID of the new NPC.
str4 - The movement type of the new NPC.
.turn(int1,int2) Turns the given NPc in the given direction. int1 - The ID of an NPC on the map.
int2 - The direction for the NPC to turn to.
.unregister(str) Removes a register in the NPC register file of the save. str - The string to unregister.
Ex. @npc.unregister(map.dat|0|remove|0)
.warp(int,X,Y,Z) Warps the NPC to the given position. int - The ID of an NPC on the map.
X,Y,Z - The new position.
.wearskin(int,str) Changes the skin an NPC is using. int - The ID of an NPC on the map.
str - The name of the skin to change it to.

@Options

.setcancelindex(int) Sets the option chosen when pressing 'E'. int - The index chosen.
.show(str) See section below. str - Options.

@Player

.achieveemblem(str) Awards the player an emblem. str - Emblem name.
.addbp(int) Give the player Battle Points. int - Amount of Battle Points to give.
.getbadge(int) Given the player the given badge. int - The badge to give(zephyr=9).
.hiderod Removes the fishing rod if activated. None
.hidepokemonfollow Hides the following pokemon. None
.money(int) Gives player money. int - Money to add.
.move(int) Moves the player the given number of steps int - Steps to move
.receivepokedex Gives the player the pokedex. None
.receivepokegear Gives the player the pokegear. None
.renamerival Allows the player to rename their rival. None
.save Saves the game. None
.setrivalname(str) Changes the rival's name to the given string. str - Rival's new name.
.showrod Shows the fishing rod. None
.showpokemonfollow Shows the following pokemon. None
.stopmovement Stops the player. None
.togglepokemonfollow Toggles the following pokemon. None
.turn(int) Turns the player the given number of rotations. int - The number of rotations to turn.
.turnto(int) Turns the player to the given rotation. int - The rotation to turn to.
.warp(str,X,Y,Z,int) Warps the player. str(optional) - Map destination file.
X,Y,Z - The new position.
int - Turns from start.
.wearskin(str) Changes the player's skin. str - Skin to change to.

@Pokemon

.add(int1,int2,str1,int3,str2,bool,str3) Adds the given Pokemon to your party. Only the first 2 parameters are necessary. int1 - Pokemon dex number.
int2 - Level
str1 - Catch Method(defaults to "random reason")
int3 - Catch Ball(defaults to Master Ball)
str2 - Catch Location(defaults to current location
bool - Isegg(defaults to 0(no))
str3 - Catch Trainer(defaults to <player.name>)
.addattack(int1,int2) Adds the given attack to the given party member. int1 - Party index(0-5).
int2 - Attack ID(1-562)
.addfriendship(int1,int2) Adds the given amount of friendship to the given party member. int1 - Party index(0-5).
int2 - Amount of friendship to add.
.calcstats(int) Recalculates the stats of the given party member. int - Party index(0-5).
.changelevel(int1,int2) Changes the level of the given party member. int1 - Party index(0-5).
int2 - Level to change to.
.clear Resets the party. None
.clearattacks(int) Clears the attacks from the selected party member. int - Party index(0-5).
.cry(int) Plays the cry of the selected Pokemon. int - Pokemon dex number.
.evolve(int) Evolves the given party member. int - Party index(0-5).
.gainexp(int1,int2) Adds exp to the given party member. int - Party index(0-5).
.heal Heals the party None
.hide Hides the overworld Pokemon. None
.learnattack(int1,int2) Allows the player to teach the given attack to the given party member. int1 - Party index(0-5).
int2 - Attack ID
.newroaming(int1|int2|int3|str) Sets a roaming pokemon into the region. int1 - Pokemon dex number.

int2 - Pokemon level.
int3 - Region number(johto = 0)
str - Start map.

.npctrade(int1|int2|int3|int4|intarr|bool|int5|
str1|int6|int7|str2|str3|str4|str5|str6|str7)
Creates a trade with an npc. int1 - Pokemon wanted by NPC.
int2 - Pokemon given by NPC.
int3(optional) - Level of Pokemon given by NPC. If blank defaults to own Pokemon's level.
int4 - Gender of given Pokemon. -1 = random, 0 = Male, 1 = female, 2 = genderless
intarr(optional) - Attack IDs for the given Pokemon.
bool(optional) - Defines shininess.
int5 - OT ID.
str1 - OT Name.
int6 - CatchBall.
int7(optional) - Held Item.
str2 - Catch Location.
str3 - CatchMethod
str4 - Nickname.
str5 - Accept trade message.
str6 - Reject trade message.
str7 - Register after trade.
.read(int) Determines which stat has more EVs. int - Party index(0-5).
.registerhalloffame Registers the current team in the Hall of Fame. None
.remove(int) Removes the given party member. int - Party index(0-5).
.removeattack(int1,int2) Removes given attack from the given party member. int1 - Party index(0-5).
int2 - Move Order ID(0-3).
.rename(int) Renames the given party member. int - Party index(0-5).
May also be 'last' to choose the last Pokemon in the party.
.select(bool) Opens the party menu to allow the player to choose a Pokemon.
Selection is returned with <Pokemon.selected>.
bool - Allows the player to exit the selection menu.
.selectmove(int,bool1,bool2) Opens the attack menu to allow the player to choose an attack fromthe given party member.
Selection is returned with <Pokemon.selectedmove>.
int - Party index(0-5).
bool1 - allows HMs to be removed.
bool2 - Allows menu to be exited.
.setability(int1,int2) Changes the ability of the given Pokemon. int1 - Party index(0-5).
int2 - New ability's index number.
.setadditionalvalue(int,str) Changes the additional value of the given Pokemon. int - Party index(0-5).
str - New additionalvalue.
.setfriendship(int1,int2) Changes the friendship value of the given Pokemon. int1 - Party index(0-5).
int2 - New friendship value.
.setgender(int1,int2) Changes the gender of the given pokemon. int1 - Party index(0-5).
int2 - New gender value.
.setnature(int1,int2) Changes the nature of the given Pokemon. int1 - Party index(0-5).
int2 - New Nature.
.setnickname(int,str) Changes the nickname of the given Pokemon. int - Party index(0-5).
str - New Nickname.
.setshiny(int,bool) Changes the shininess of the given Pokemon. int - Party index(0-5).
bool - Represtens the shininess.
.setstat(int1,str,int2) Changes the given stat of the given Pokemon. int1 - Party index(0-5).
str - The stat to change. Possible inputs:
chp, maxhp, hp, atk, attack, def, defense, spatk, spattack, specialattack, spdef, spdefense, specialdefense, speed
int2 - New value for the stat.

@Register

.change(str1,str2) Changes the given registered value to str2. str1 - the name of the value to change.

str2 - the value to replace the old one.

.register(str[,str1,str2]) Registers str in the register file of the save. If str1 and str2 are included then it registers a value, str2. of type str1. str - the string to register. Is the name of the value if registering a value

str2 - type to register(str,bool,int,sng)
str3 - the value to be stored

.registertime(str1,value,str2) str1 - A string to register.
value - An amount of some form of time to wait before unregistering it. Must fit with the form.
str2 - a form of time to wait.
Valid inputs for str2:
  • day
  • days
  • hour
  • hours
  • minuet
  • minuets
  • second
  • seconds
  • year
  • years
  • month
  • months
  • week
  • weeks
  • dayofweek
Stores a str for a specified amount of time.
.unregister(str[,str1]) Unregisters str from the register file of the save. Str1 needed to unregister a value. str - the string to unregister

str1 - the type of the register value to be unregistered.

@Screen

.apricornkurt Displays the apricorn selection screen. None
.blackout Displays the team was defeated message. None
.credits Plays the credits. None
.daycare(int1,int2) Opens the daycare. int1 - Daycare to open.
int2 - Number of possible slots in the daycare.
.donation Displays the list of donators. None
.fadein Fades the screen in from black. None
.fadeout Fades the screen out to black. None
.friendhub Activates the Friend Hub. None
.gamejoltlogin Allows the player to login to gamejolt. None
.globalhub Activates the Global Hub. None
.halloffame(int) int - The Hall of Fame record to display. If not given displays all. Displays the given Hall of Fame record(s).
.input(str1,int1,str2,int2)
No inputs are needed.
Displays a Keyboard for text based input. str1 - The text that appears when the button "Default" is clicked.
int1 - The input mode; 0 for normal, and 1 for numbers only(uniplemented)
str2 - The text that displays in the input box when the screen is first loaded.
int2 - Number of characters allowed.
.mailsystem Displays the PC inbox. None
.mysteryevent Displays mystery events. None
.network Allows the player to connect to a local network for co-op. None
.pvp Will connect the player to the pvp system.(PVP not ready yet) None
.showPokemon(int,bool1,bool2) Displays a box and an image of the given Pokemon. int - A Pokemon dex number.
bool1 - Determines if the Pokemon is shiny
bool2 - Determines if the front(1) or back(0) is shown.
.storagesystem Opens Bill's PC. None
.townmap(str) Opens the given townmap(s) str - Name of map(s) to view separated by comas.
.trade(tradeitems,bool1,bool2) Opens a store with the given items. tradeitems - A list of tradeitems as defined before this table.
bool1 - Allows the player to buy items from this store.
bool2 - Allows the player to sell items to this store.

@Script

.run(str) Does the given commands. str - Contains the commands to execute.
.start(str) Starts the given script. str - The file name of the script to start.
.text(str) Displays the given text. str - The text to display.

@Sound

.play(str) Play sound str. str - the sound to play.

@Storage

.clear Clears all stored values. None
.set(str1,str2,str3) Creates a storage with type of str 1, name of str2, and value of str3. str1 - the type of value being stored(integer, string, Pokemon, boolean, item)
str2 - The name of the Value.
str3 - The Value to be stored.

@Text

.log(str) Logs the given string in log.dat str - The text to log.
.show(str) Displays str str - The text to display.
.setfont(str) Changes the font. str - Either 'standard' or 'unown'.

@Value

.add(str,int) Adds int to valuse str. str - The value to be added to.
int - The amount to add to the value.
.change(str1,str2) Changes the contents of value str1 to str2. str1 - The value to be changed.
str2 - the content replacing the contents of str1.
.create(str1,str2) Create value str1 with contents str2. str1 - Name of value to be created.
str2 - Contents of value to be created.
.delete(str) Delete the named value. str - The name of the value to delete.

Switches

Switches do a comparison between a given parameter and a construct. Examples:

:if:<Pokemon.level(int)>>3

:if:<register.registered(str)>=true

:if:<not><Pokemon.level(int)>>3
# The above condition will be met if the Pokemon level is not more than 3

switches may use multiple parameter as well by using <and> and <or> Examples:

:if:<Pokemon.level(int)><3 <and> <register.registered(str)>=true

:if:<Pokemon.level(int)>>=3 <or> <register.registered(str)>=false

:if:

:if: switches start with the line containing

:if:

Starting with Version 0.38, ':then' is no longer needed.

to switch to the opposite of the condition use, the else statement is not necessary.

:else

to end an if statement use:

:endif

here is an example of the basic layout:

:if:conditions
:then
scripts to execute if conditions are met.
:else
scripts to execute if conditions are not met.
:endif

If you want the script to take the opposite condition without using :else, then you can use

:if:<not>conditions
scripts to execute if conditions are met.
:else
scripts to execute if conditions are not met.
:endif

Example: * [ This opposite condition script seem to be not able to mix with <and> <or>. ]

:if:<not><Player.facing>=0
scripts to execute if player is not facing up.
:else
scripts to execute if player is facing up.
:endif

:select:

:select: switches begin with a select statement and a condition

:select:<player.position>
when: is used to switch the script, if the value(s) after the :when: match those returned by the construct it will execute the scripts after it
:when:0,0,0

to end a select statement use

:endwhen

Example:

:select:condition
:when:value1
Scripts to execute if value1=condition.
:when:value2
Scripts to execute if value2=condition.
:endwhen

@options.show()

@options.show(str,str,...) displays up to 10 options at a time for the player to choose from. :when:, and :endwhen are used here similarly to the way they are used in select Example:

@options.show(Yes,No)
:when:Yes
Scripts to execte when the layer chooses Yes.
:when:No
Scripts to execte when the layer chooses No.
:endwhen

if a choice is not given a coinciding :when: then it will simply skip to the :endwhen

:end

:end is used to end the script.

If an executing script comes to :end the script will cease to execute and control will be returned to the player. Example:

version=2
:if:<register.registered(str1)>=true
:then
:end
:endif
@text.show(str2)
@register.register(str1)
:end

In the example above, the player will activate the script without registering str1, so the script will skip past :endif, display str2, register str1, and then end. The next time the player activates the script, str1 will be registered, so the script will begin executing the :if: statement. This will end the script without displaying str2 or registering str1.

If a script does not reach an :end, it will continue looping through itself until it does.

:while:

:while: is used to loop a certain line of script until it met the condition given.

For example:

:while:<Entity.opacity(121)><100
@Entity.setopacity(121,<Entity.opacity(121)>+10)
@Level.wait(1)
@Level.update
:endwhile

The above script will loop when the opacity of the entity is less than 100. Every time it loop, it will add a value of 10 opacity of the entity. It will stop when it hit 100.

How if the loop never stops? You can use :exitwhile if your condition will never be met.

For example:

:while:<Register.registered(random)>=true
@Text.show(blah)
:endwhile

It never stop this way if it is true so... to stop this, add :exitwhile

:while:<Register.registered(random)>=true
@Text.show(blah)
:exitwhile
:endwhile

Constructs

Constructs can be used in place of any parameter for command and are used with :if: and :select: statements.
They can even be used in trainer files. Constructs always have a subconstruct. All combinations will be listed below.

Constructs that return numbers such as <Pokemon.level(int)> may be used in math mathematical functions including:

  • +: Addition
  • -: Subtraction
  • /: Division
  • *: Multiplication
  • ^: Exponent
  • %: Percent
  • =: Equals
  • >: Greater Than
  • <: Less Than
  • m: Mod (ex. 25m4=1)
  • r: Root(ex. 27r3=3)

The table is split into sections by Construct.

* Unless otherwise specified X,Y,Z is a three dimensional position.

** Unless otherwise specified bool is either true or false.

Sub-construct Inputs Output

Battle

.defeatmessage(str) str - A trainer file path. Returns the defeat message of the given trainer.
.intromessage(str) str - A trainer file path. Returns the intro message of the given trainer.
.outromessage(str) str - A trainer file path. Returns the outro message of the given trainer.
.won None Returns true if you won the last trainer battle.

Daycare

.canbreed(int) int - The daycare ID, the Route 34 daycare is ID = 0. Returns the returns the percent chance the pokemon in the given daycare will have an egg.
.canswim(int1,int2) int1 - The daycare ID, the Route 34 daycare is ID = 0.
int2 - The Pokemon's ID in the daycare(0 or 1)
Returns a bool based on the pokemon data file entry "canswim".
.countpokemon(int) int - The daycare ID, the Route 34 daycare is ID = 0. Returns the number of pokemon in the given daycare.
.currentlevel(int1,int2) int1 - The daycare ID, the Route 34 daycare is ID = 0.
int2 - The Pokemon's ID in the daycare(0 or 1)
Returns the current level of the given pokemon.
.grownlevels(int1,int2) int1 - The daycare ID, the Route 34 daycare is ID = 0.
int2 - The Pokemon's ID in the daycare(0 or 1)
Returns the amount of levels a pokemon has grown.
.hasegg(int) int - The daycare ID, the Route 34 daycare is ID = 0. Returns a bool based on if there is an egg in the given daycare.
.haspokemon(int) int - The daycare ID, the Route 34 daycare is ID = 0. Returns a bool based on if there are pokemon in the given daycare.
.pokemonid(int1,int2) int1 - The daycare ID, the Route 34 daycare is ID = 0.
int2 - The Pokemon's ID in the daycare(0 or 1)
Returns the dex number of the selected pokemon.
.pokemonname(int1,int2) int1 - The daycare ID, the Route 34 daycare is ID = 0.
int2 - The Pokemon's ID in the daycare(0 or 1)
Returns the name of the selected pokemon.
.shinyindicator(int1,int2) int1 - The daycare ID, the Route 34 daycare is ID = 0.
int2 - The Pokemon's ID in the daycare(0 or 1)
Returns 'S' if shiny and 'N' if not.

Entity

.additionalvalue(int) int - an Entity ID The contents of the additionalValue of the given entity.
.collision(int) int - an Entity ID A bool representing the collision of the given entity.
.opacity(int) int - an Entity ID An int representing the percent see through the given entity is.
.position(int) int - an Entity ID The X,Y,Z position of the given entity.
.scale(int) int - an Entity ID The X,Y,Z scale of the given entity
.visible(int) int - an Entity ID A bool representing the visibility of the given entity.

Environment

.candig None A bool representing if the player can dig from the map.
.canfly None A bool representing if the player can fly from the map.
.canteleport None A bool representing if the player can teleport from the map.
.currentmapweather None Same as .weather.
.currentmapweatherid None Same as .weatherid.
.day None Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, or Saturday
.dayinformation None day,daytime
.daytime None night, morning, day, or evening
.daytimeid None The ID for the time of day.
night=0, morning=1, day=2, or evening=3
.isdark None A bool representing the darkness of the map.
.mapweather None Same as .weather.
.mapweatherid None Same as .weatherid.
.regionweather None Returns the random weather effecting the whole area.
Uses the same names as .weather.
.regionweatherid None Returns the ID of random weather effecting the whole area.
Uses the same IDs as .weatherid.
.season None winter, spring, summer, or fall
.seasonid None The ID for the season.
winter=0, spring=1, summer=2, or fall=3
.weather None Returns the Weather effecting the current map.
Clear, Rain, Snow, Underwater, Sunny, Fog , Sandstorm
.weatherid None Returns the ID of the Weather effecting the current map.
Clear=0, Rain=1, Snow=2, Underwater=3, Sunny=4, Fog=5, Sandstorm=6
.week None The current week in the year.
.wildPokemoneverywhere None A bool representing if the player can find Pokemon on the map.
.wildPokemongrass None A bool representing if the player can find Pokemon in the grass on the map.
.wildPokemonwater None A bool representing if the player can find Pokemon in the water on the map.
.year None The current year(e.g. 2013)

Inventory

.countitem(int) int- Item ID. The amount of the given item in the bag.
.countitems None The number of Items in the bag.
.name(int) int- Item ID. The name of the given item.

Level

.filename None Returns the name of the current map file without extension.
.levelfile None Returns the file path of the current map relative to the maps folder.
.mapfile None Same as .levelfile.
.riding None Returns a bool representing if the player is riding.
.surfing None Returns a bool representing if the player is surfing.
.musicloop None Returns the file path of the music loop that belongs to the current level.

Math

.abs(sng) str - A value to convert Takes the absolute value of the given value.
.ceiling(sng) str - A value to convert Rounds the given value up.
.floor(sng) str - A value to convert Rounds the given value down.
.int(int) str - A value to convert. Converts the given value to an integer.
.sng(sng) str - A value to convert. Converts the given value to an single.

NPC

.action(int) int - ID of an NPC on the map. Returns the action value of the given NPC.
.additionaldata(int) int - ID of an NPC on the map. Returns the additionaldata of the given NPC.
.exists(int) int - ID of an NPC on the map. Checks if there is an NPC on the map with that ID.
.facing(int) None Returns the ID of the direction the player is facing.
.hasmoverectangles(int) int - ID of an NPC on the map. Returns a bool reflecting if the given NPC has moverectangles assigned.
.id(int) int - ID of an NPC on the map. Returns the ID of the given NPC.
.ismoving int - ID of an NPC on the map. Returns a bool representing if the player is moving or not.
.moved(int) int - ID of an NPC on the map. Returns the distance moved by that NPC.
.movement(int) int - ID of an NPC on the map. Returns the type of movement used by the given NPC.
.name(int) int - ID of an NPC on the map. Returns the name of the given NPC.
.position(int) int - ID of an NPC on the map. Returns the position of the given NPC.
.skin(int) int - ID of an NPC on the map. Returns the name of the skin used by the given NPC.
.trainertexture(str) str - A trainer file, file path. Returns the name of the texture used by the given trainer.

Phone

.callflag None Returns calling if you are calling or receiving if someone is calling you.
.got None A bool representing if the player has received the Phone.

Player

.badges None Returns the number of badges obtained.
.bp None Returns the amount of battle points the player has.
.compass None Returns the name of the direction the player is facing.
.facing None Returns the ID of the direction the player is facing.
.gender None Returns 1 if male, 0 if Female.
.hasbadge(int) int - A badge ID. Returns a bool representing if the player has that badge.
.ismoving None Returns a bool representing if the player is moving or not.
.money None Returns the amount of money the player has.
.name None Returns the name of the player.
.position None Returns the player's position.
.rival None Returns the rival's name.
.rivalname None Returns the rival's name.
.skin None Returns the name of the skin used by the player.
.thirdperson None Returns a bool representing if third person mode is on.
.velocity None Returns the velocity of the player.

Pokedex

.caught None Returns the number of pokemon caught.
.seen None Returns the number of pokemon seen.
.shiny None Returns the number of shiny pokemon caught.

Pokemon

.additionaldata(int) int - Party index of a Pokemon(0-5) Returns the additionaldata of the given party member.
.atk(int) int - Party index of a Pokemon(0-5) Returns the attack stat of the given party member.
.attackname(int1,int2) int1 - Party index of a Pokemon(0-5)
int2 - Attack index of a Pokemon's attack(0-3).
Returns the name of the given attack from the given party member.
.catchball(int) int - Party index of a Pokemon(0-5) Returns the catchball of the given party member.
.catchlocation(int) int - Party index of a Pokemon(0-5) Returns the catchlocation of the given party member.
.catchmethod(int) int - Party index of a Pokemon(0-5) Returns the catchmethod of the given party member.
.count None Returns the number of Pokemon in the party.
.countattacks(int) int - Party index of a Pokemon(0-5) Returns the number of attacks on the given party member.
.countbattle None Returns the number of battle-usable Pokemon in the party.
.counthalloffame None. Returns the number of Hall of Fame registers the player has.
.currentexp(int) int - Party index of a Pokemon(0-5) Returns the exp for the current level of the given party member.
.data(int) int - Party index of a Pokemon(0-5) Returns the save data for the given party member.
.def(int) int - Party index of a Pokemon(0-5) Returns the defense stat of the given party member.
.freeplaceinparty None Returns a bool representing if there is an empty slot in the party.
.friendship(int) int - Party index of a Pokemon(0-5) Returns the friendship value of the given party member.
.generatefrontier(int1,int2)
.has(int) int - dex number of a Pokemon Returns a bool representing if the given Pokemon is in the party.
.hasattack(int1,int2) int1 - Party index of a Pokemon(0-5)
int2 - Attack index.
Returns a bool representing if the given party member has the given attack.
.hasegg None Returns a bool representing if there is an egg in the party.
.hasfullhp(int) int - Party index of a Pokemon(0-5) Returns a bool representing if the given party member has full hp.
.hp(int) int - Party index of a Pokemon(0-5) Returns the current HP of the given party member.
.id(int) int - Party index of a Pokemon(0-5) Returns the dex number of the given party member
.isegg(int) int - Party index of a Pokemon(0-5) Returns a bool representing if the given party member is an egg.
.islegendary(int) int - Party index of a Pokemon(0-5) Returns a bool representing if the given party member is a legendary.
.isshiny(int) int - Party index of a Pokemon(0-5) Returns a bool representing if the given party member is shiny.
.item(int) int - Party index of a Pokemon(0-5) Returns the name of the item held by the given party member.
.itemdata(int) int - Party index of a Pokemon(0-5) Returns the stored data for the held item of the given pokemon(used for mail).
.itemid(int) int - Party index of a Pokemon(0-5) Returns the id of the item held by the given party member.
.itemname(int) int - Party index of a Pokemon(0-5) Returns the name of the item held by the given party member.
.learnedtutormove None. Returns a bool based on if a move was just learned via the Move Relearner.
.level(int) int - Party index of a Pokemon(0-5) Returns the level of the given party member.
.maxhp(int) int - Party index of a Pokemon(0-5) Returns the max HP of the given party member.
.maxpartylevel None Returns the highest level of among the Pokemon in the player's party.
.name(int) int - Party index of a Pokemon(0-5) Returns the name of the given party member.
.nature(int) int - Party index of a Pokemon(0-5) Returns the nature of the given party member.
.needexp(int) int - Party index of a Pokemon(0-5) Returns the exp needed for the next level of the given party member.
.nickname(int) int - Party index of a Pokemon(0-5) Returns the nickname of the given party member.
.noPokemon None Returns a bool representing if there are no Pokemon in the party.
.number(int) int - Party index of a Pokemon(0-5) Returns the dex number of the given party member.
.ot(int) int - Party index of a Pokemon(0-5) Returns the ot of the given party member.
.otmatch(int,str) int - OT to check against.

str - value to return.(has, id, number, name, maxhits)

Returns a different value based on str:
  • has: a bool for if you have a pokemon with a matching OT.
  • id, number: the number of the matching pokemon.
  • name: the name of the matching pokemon.
  • maxhits: the amount of digits that match
.ownPokemon(int) int - Party index of a Pokemon(0-5) Returns a bool representing if the given party member was caught by the current trainer.
.randomot None Produces a random OT number.
.selected None Returns the Party index of the Pokemon selected using @Pokemon.select.
.selectedmove None Returns the index of the Pokemon's attack selected using @Pokemon.selectmove.
.spatk(int) int - Party index of a Pokemon(0-5) Returns the spec. attack stat of the given party member.
.spawn(int1,int2) int1 - Pokemon dex number.

int2 - Level

Produces the save data for the given pokemon.
.spawnwild(int) int - encounter type Produces the save data for a random wild pokemon encountered the given way.
.spdef(int) int - Party index of a Pokemon(0-5) Returns the spec. defense stat of the given party member.
.speed(int) int - Party index of a Pokemon(0-5) Returns the speed stat of the given party member.
.totalexp(int) int - Party index of a Pokemon(0-5) Returns the total exp of the given party member.
.trainer(int) int - Party index of a Pokemon(0-5) Returns the catch trainer of the given party member.

Register

.count None Returns the number of registers.
.registered(str) str - A register string. A bool representing if the string has been registered.
.type(str) str - Register value to get the type of. Returns the type of the value stored under the given name.
.value(str) str - Register name. Returns the value stored as the given register.

Rival

.name None Returns the rival's name.

Storage

.count(str) str1 - The type of values to count(integer, string, Pokemon, boolean, item).
Does not need to be defined.
Returns the number of different stored values of that type.
If str is not defined then it returns a count of all types.
.get(str1,str2) str1 - The type of value is stored(integer, string, Pokemon, boolean, item).
str2 - the name of the stored value.
Returns the value stored as str2.

System

.booltoint(str) Either "true", "false", or a construct that returns one of those. Returns 0 for false and 1 for true.
.calcint(str) A str representing an integer, or a Construct that returns one. Returns the str as an integer.
.calcsng(str) A str representing a single, or a Construct that returns one. Returns the str as a single. (A single is a number that is a decimal)
.dayofyear None Returns the day of the year as a number.
.isinsightscript None Returns a bool based on if the script it is in was triggered by the player stepping into the line of sight of an NPC.
.issng(int) int - A value to test. Returns true if the value is a single.
.isint(int) int - A value to test. Returns true if the value is an integer.
.lastinput None Returns the last thing input via @screen.input.
.random(int1,int2) int1 - If it is the only argument then it is the max of the range, otherwise it is the min.
int2 - The max of the range. Does not need to be defined.
Returns a random integer between the int1 and int2 if both are defined.
If int2 is not defined then it chooses from between 1 and int1.(Ranges are inclusive)
.sort(str,int,list) str - either 'Ascending' or 'Descending'
int - position in sorted list to return
list - List of numbers to sort.
Returns a number from a list of numbers after it is sorted.
.unixtimestamp None Returns the Unix time stamp. (See here for more details.)
.year None Returns the current year.

Value

.get(str) str - The name of the stored value. Returns the value stored as str.
Game Folder
Pokemon Folder Launcher
Content ContentPacks GameModes Saves Screenshots Version History
Pokemon Data GameMode.dat Save Folder
Data maps Scripts Party.dat Player.dat Options.dat
poke V1 V2 trainer map