Version 2 Scripts New

From Pokémon 3D Wiki
Jump to navigation Jump to search

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 are written as <construct.subconstruct> and can be used basically everywhere except itself.


A General Note to all GameMode Scripters ( Must Read )

  1. This list is currently updated as of v0.49.1 Script Library found in game.
  2. This list is the same as what you can see when typing @help(command). This will avoid too many typo error.
  3. Please do not blame darkfire as he is not the one who make the new design on this page :D ( Lets blame him somewhere else. )
  4. If you are a GameMode Scripter or trying to be one, you are recommended to download Notepad++ with our special syntax highlighter for checking typo mistake.
  5. There might be some missing command from the old page as well as the new page. You might want to refer both :)
  6. If you find that any command you found here doesn't work the way you want it to be, it might be a bug. Try report it over here.
    Make sure that your title include the game version and state clearly what you are trying to do.


Important info / definition of certain things before we get started.

By Default, the Argument Types are:

  • Str ( Str are define as letters or symbols )
  • Int ( Int are define as Integer numbers )
  • Sng ( Sng are define as Real numbers )
  • ItemCollection ( ItemCollection are define as {itemID|amount|price} )
  • Bool ( Bool are define as words such as True, False )
  • Rec
  • IntArr ( IntArr are define as an array of Integer numbers )
  • StrArr ( StrArr are define as an array of letters or symbols )
  • SngArr ( SngArr are define as an array of Real numbers )
  • BoolArr ( BoolArr are define as an array of words such as True, False )
  • PokemonData ( PokemonData are define as Pokemon Code )
  • Arr ( Arr are define as an array of something. )


For any Optional Argument, it will be engrave by a individual square bracket for example "[Str1],[Str2],[Str3],..."
For any Rec/Arr Argument, it will be engrave by a grouped square bracket for example "[Str1,Int2,Int3,Int4,Int5],Int6..."
For any Multiple Argument ( Either or ), it will be separated by the word "OR" for example "Str1,Int2,Int3,Int4,Int5 OR Str1,Int2,Int3"


Commands

Commands are scripts that tells the game what to do. It comes with @ and usually used with switches.

The table below is split into sections by Command.
You may use the sort feature to make it list according to alphanumeric order.

@Battle

Command [@Command.Subcommand(Argument Types)] Description Inputs [Argument Types = Argument Name]
@Battle.starttrainer
@Battle.trainer
@Battle.wild
@Battle.setvar


@Camera

Command [@Command.Subcommand(Argument Types)] Description Inputs [Argument Types = Argument Name]
@Camera.set
@Camera.reset
@Camera.setyaw
@Camera.setpitch
@Camera.setposition
@Camera.setx
@Camera.sety
@Camera.setz
@Camera.togglethirdperson
@Camera.activatethirdperson
@Camera.deactivatethirdperson
@Camera.fix
@Camera.defix
@Camera.togglefix


@Chat

Command [@Command.Subcommand(Argument Types)] Description Inputs [Argument Types = Argument Name]
@Chat.clear


@Daycare

Command [@Command.Subcommand(Argument Types)] Description Inputs [Argument Types = Argument Name]
@Daycare.takeegg
@Daycare.takepokemon
@Daycare.leavepokemon
@Daycare.removeegg
@Daycare.clean


@Daycare.call
@Daycare.cleardata


@Entity

Command [@Command.Subcommand(Argument Types)] Description Inputs [Argument Types = Argument Name]
@Entity.showmessagebulb
@Entity.warp
@Entity.scale
@Entity.remove
@Entity.setid
@Entity.setopacity
@Entity.setvisible
@Entity.setadditionalvalue
@Entity.setcollision
@Entity.settetxure
@Entity.addtoposition


@Environment

Command [@Command.Subcommand(Argument Types)] Description Inputs [Argument Types = Argument Name]
@environment.setweather
@environment.setregionweather
@environment.setcanfly
@environment.setcandig
@environment.setcanteleport
@environment.setwildpokemongrass
@environment.setwildpokemonwater
@environment.setwildpokemoneverywhere
@environment.setisdark
@environment.setrenderdistance
@environment.toggledarkness


@Item

Command [@Command.Subcommand(Argument Types)] Description Inputs [Argument Types = Argument Name]
@item.give
@item.remove
@item.clearitem
@item.messagegive
@item.repel


@Level

Command [@Command.Subcommand(Argument Types)] Description Inputs [Argument Types = Argument Name]
@level.wait
@level.update
@level.waitforevents
@level.waitforsave
@level.reload
@level.setsafari


@Music

Command [@Command.Subcommand(Argument Types)] Description Inputs [Argument Types = Argument Name]
@music.play
@music.setmusicloop
@music.stop
@music.pause
@music.resume


@NPC

Command [@Command.Subcommand(Argument Types)] Description Inputs [Argument Types = Argument Name]
@npc.remove
@npc.position
@npc.warp
@npc.addtoposition
@npc.register
@npc.unregister
@npc.wearskin
@npc.move
@npc.setMoveY
@npc.moveasync
@npc.turn
@npc.spawn
@npc.setspeed


@Options

Command [@Command.Subcommand(Argument Types)] Description Inputs [Argument Types = Argument Name]
@options.show
@options.setcancelindex


@Player

Command [@Command.Subcommand(Argument Types)] Description Inputs [Argument Types = Argument Name]
@player.receivepokedex
@player.receivepokegear
@player.renamerivel
@player.wearskin
@player.setonlineskin
@player.move
@player.moveasync
@player.turn
@player.turnasync
@player.turnto
@player.turntoasync
@player.warp
@player.warp
@player.warp
@player.warp
@player.stopmovement
@player.addmoney
@player.setmovement
@player.resetmovement
@player.getbadge
@player.achieveemblem
@player.addbp
@player.showrod
@player.hiderod
@player.showpokemonfollow
@player.hidepokemonfollow
@player.togglepokemonfollow
@player.save
@player.setrivalname


@Pokedex

Command [@Command.Subcommand(Argument Types)] Description Inputs [Argument Types = Argument Name]
@pokedex.setautodetect


@Pokemon

Command [@Command.Subcommand(Argument Types)] Description Inputs [Argument Types = Argument Name]
@pokemon.cry
@pokemon.remove
@pokemon.add
@pokemon.add
@pokemon.setadditionalvalue
@pokemon.setadditionaldata
@pokemon.setnickname
@pokemon.setstat
@pokemon.clear
@pokemon.removeattack
@pokemon.clearattacks
@pokemon.addattack
@pokemon.setshiny
@pokemon.changelevel
@pokemon.gainexp
@pokemon.setnature
@pokemon.npcTrade genderID: 0-2


@Radio

Command [@Command.Subcommand(Argument Types)] Description Inputs [Argument Types = Argument Name]
@radio.allowchannel
@radio.blockchannel


@Register

Command [@Command.Subcommand(Argument Types)] Description Inputs [Argument Types = Argument Name]
@register.register
@register.register
@register.unregister
@register.unregister
@register.registertime


@Screen

Command [@Command.Subcommand(Argument Types)] Description Inputs [Argument Types = Argument Name]
@screen.storagesystem
@screen.apricornkurt
@screen.trade
@screen.townmap
@screen.donation
@screen.blackout
@screen.fadein
@screen.fadeout
@screen.credits
@screen.halloffame
@screen.teachmoves
@screen.mailsystem
@screen.pvp
@screen.input
@screen.mysteryevent


@Script

Command [@Command.Subcommand(Argument Types)] Description Inputs [Argument Types = Argument Name]
@script.start
@script.text
@script.run


@Sound

Command [@Command.Subcommand(Argument Types)] Description Inputs [Argument Types = Argument Name]
@sound.play
@sound.playadvanced


@Storage

Command [@Command.Subcommand(Argument Types)] Description Inputs [Argument Types = Argument Name]
@storage.set
@storage.clear
@storage.update


@Text

Command [@Command.Subcommand(Argument Types)] Description Inputs [Argument Types = Argument Name]
@text.show
@text.setfont
@text.debug
@text.log


@Title

Command [@Command.Subcommand(Argument Types)] Description Inputs [Argument Types = Argument Name]
@title.add
@title.clear


Constructs

Constructs are script that return a specific values in game. It is used with commands or switches.

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 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.


Battle

Construct [<Construct.SubConstruct(Argument Types)>] Description Inputs [Argument Types = Argument Name]
@Battle.defeatmessage
@Battle.intromessage
@Battle.outromessage
@Battle.won


Camera

Construct [<Construct.SubConstruct(Argument Types)>] Description Inputs [Argument Types = Argument Name]
@Camera.isfixed
@Camera.x
@Camera.y
@Camera.z


Daycare

Construct [<Construct.SubConstruct(Argument Types)>] Description Inputs [Argument Types = Argument Name]
@Daycare.pokemonID
@Daycare.pokemonName
@Daycare.pokemonSprite
@Daycare.shinyIndicator
@Daycare.countpokemon
@Daycare.haspokemon
@Daycare.canswim
@Daycare.hasegg
@Daycare.grownlevels
@Daycare.currentlevel
@Daycare.canbreed


Entity

Construct [<Construct.SubConstruct(Argument Types)>] Description Inputs [Argument Types = Argument Name]
@Entity.visible
@Entity.opacity
@Entity.position
@Entity.positionx
@Entity.positiony
@Entity.positionz
@Entity.scale
@Entity.additionalvalue
@Entity.collision


Environment

Construct [<Construct.SubConstruct(Argument Types)>] Description Inputs [Argument Types = Argument Name]
@environment.daytime
@environment.daytimeID
@environment.season
@environment.seasonID
@environment.day
@environment.dayofyear
@environment.dayinformation
@environment.week
@environment.year
@environment.weather
@environment.mapweather
@environment.currentmapweather
@environment.weatherid
@environment.mapweatherid
@environment.currentmapweatherid
@environment.regionweather
@environment.regionweatherid
@environment.canfly
@environment.candig
@environment.canteleport
@environment.wildpokemongrass
@environment.wildpokemonwater
@environment.wildpokemoneverywhere
@environment.isdark


Inventory

Construct [<Construct.SubConstruct(Argument Types)>] Description Inputs [Argument Types = Argument Name]
@inventory.countitem
@inventory.countitems
@inventory.name
@inventory.ID


Level

Construct [<Construct.SubConstruct(Argument Types)>] Description Inputs [Argument Types = Argument Name]
@level.mapfile
@level.levelfile
@level.filename
@level.riding
@level.surfing


Math

Construct [<Construct.SubConstruct(Argument Types)>] Description Inputs [Argument Types = Argument Name]
@math.int
@math.sng
@math.abs
@math.ceiling
@math.floor
@math.isint
@math.issng


NPC

Construct [<Construct.SubConstruct(Argument Types)>] Description Inputs [Argument Types = Argument Name]
@npc.position
@npc.exists
@npc.ismoving
@npc.moved
@npc.skin
@npc.facing
@npc.ID
@npc.name
@npc.action
@npc.additionalvalue
@npc.movement
@npc.hasmoverectangles
@npc.trainertexture


Phone

Construct [<Construct.SubConstruct(Argument Types)>] Description Inputs [Argument Types = Argument Name]
@phone.callflag
@phone.got


Player

Construct [<Construct.SubConstruct(Argument Types)>] Description Inputs [Argument Types = Argument Name]
@player.position
@player.hasbadge
@player.skin
@player.velocity
@player.ismoving
@player.facing
@player.compass
@player.money
@player.name
@player.gender
@player.bp
@player.badges
@player.thirdperson
@player.rival
@player.rivalname
@player.ot
@player.gamejoltid


Pokedex

Construct [<Construct.SubConstruct(Argument Types)>] Description Inputs [Argument Types = Argument Name]
@pokedex.caught
@pokedex.seen
@pokedex.shiny


Pokemon

Construct [<Construct.SubConstruct(Argument Types)>] Description Inputs [Argument Types = Argument Name]
@pokemon.id
@pokemon.number
@pokemon.data
@pokemon.level
@pokemon.hasfullhp
@pokemon.hp
@pokemon.atk
@pokemon.def
@pokemon.spatk
@pokemon.spdef
@pokemon.speed
@pokemon.maxhp
@pokemon.isegg
@pokemon.additionaldata
@pokemon.nickname
@pokemon.name
@pokemon.ot
@pokemon.trainer
@pokemon.itemid
@pokemon.friendship
@pokemon.itemname
@pokemon.catchball
@pokemon.catchmethod
@pokemon.catchlocation
@pokemon.hasattack
@pokemon.countattacks
@pokemon.attackname
@pokemon.isShiny
@pokemon.nature
@pokemon.ownpokemon
@pokemon.islegendary
@pokemon.freeplaceinparty
@pokemon.nopokemon
@pokemon.count
@pokemon.countbattle
@pokemon.has
@pokemon.selected
@pokemon.selectedmove
@pokemon.hasegg
@pokemon.maxpartylevel
@pokemon.evhp
@pokemon.evatk
@pokemon.evdef
@pokemon.evspatk
@pokemon.evspdef
@pokemon.evspeed
@pokemon.ivhp
@pokemon.ivatk
@pokemon.ivdef
@pokemon.ivspatk
@pokemon.ivspdef
@pokemon.spawnwild
@pokemon.itemdata
@pokemon.countHallofFame
@pokemon.learnedTutorMove
@pokemon.totalexp
@pokemon.needexp
@pokemon.currentexp
@pokemon.generateFrontier
@pokemon.spawnwild
@pokemon.spawn
@pokemon.OTmatch
@pokemon.randomOT
@pokemon.status
@pokemon.canevolve
@pokemon.type1
@pokemon.type2
@pokemon.istype


Radio

Construct [<Construct.SubConstruct(Argument Types)>] Description Inputs [Argument Types = Argument Name]
@radio.currentchannel


Register

Construct [<Construct.SubConstruct(Argument Types)>] Description Inputs [Argument Types = Argument Name]
@register.registered
@register.count
@register.type
@register.value


Rival

Construct [<Construct.SubConstruct(Argument Types)>] Description Inputs [Argument Types = Argument Name]
@rival.name


Storage

Construct [<Construct.SubConstruct(Argument Types)>] Description Inputs [Argument Types = Argument Name]
@storage.get
@storage.count


System

Construct [<Construct.SubConstruct(Argument Types)>] Description Inputs [Argument Types = Argument Name]
@system.random
@system.unixtimestamp
@system.dayofyear
@system.year
@system.booltoint
@system.calcint
@system.int
@system.calcsng
@system.sng
@system.sort
@system.isinsightscript
@system.lastinput
@system.return
@system.isint
@system.issng
@system.chrw


Switches

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

:if:

If you want to make the script run by certain condition, :if: will do the job.

Typical Usage:

:if:Conditions
@Command.Subcommand(Argument Types)
:else
@Command.Subcommand(Argument Types)
:endif

:if: Conditions

There are some valid command that you can use.

The script will run if a value that returns from the constructs match the value given.

<Construct.SubConstruct(Argument Types)>=value

The script will run if a value that returns from the constructs does not match the value given.

<not><Construct.SubConstruct(Argument Types)>=value

The script will run if a value that returns from the constructs is more than the value

<Construct.SubConstruct(Argument Types)>>value

The script will run if a value that returns from the constructs is less than the value

<Construct.SubConstruct(Argument Types)><value

The script will run if a value that returns from the constructs is not more than the value

<not><Construct.SubConstruct(Argument Types)>>value

The script will run if a value that returns from the constructs is not less than the value

<not><Construct.SubConstruct(Argument Types)><value

The script will run if two or more value that returns from the constructs match the value given.

<Construct.SubConstruct(Argument Types)>=value <and> <Construct.SubConstruct(Argument Types)>=value

The script will run if at least one value that returns from the constructs match the value given.

<Construct.SubConstruct(Argument Types)>=value <or> <Construct.SubConstruct(Argument Types)>=value