Difference between revisions of "Version 2 Scripts New"

From Pokémon 3D Wiki
Jump to navigation Jump to search
m
Line 45: Line 45:
}}
}}


=== @camera ===
=== @Camera ===
{{ScriptCommandTableV2|Command|
{{ScriptCommandTableV2|Command|
{{ScriptCommandV2|Camera|set|{{ScriptArgumentV2|x|Sng|1|False||}},{{ScriptArgumentV2|y|Sng|2|False||}},{{ScriptArgumentV2|z|Sng|3|False||}},{{ScriptArgumentV2|yaw|Sng|4|False||}},{{ScriptArgumentV2|pitch|Sng|5|False||}}|Sets the given properties of the camera.|{{ScriptArgumentV2|x|Sng|1|False||Input}}<br />{{ScriptArgumentV2|y|Sng|2|False||Input}}<br />{{ScriptArgumentV2|z|Sng|3|False||Input}}<br />{{ScriptArgumentV2|yaw|Sng|4|False||Input}}<br />{{ScriptArgumentV2|pitch|Sng|5|False||Input}}|False}}
{{ScriptCommandV2|Camera|set|{{ScriptArgumentV2|x|Sng|1|False||}},{{ScriptArgumentV2|y|Sng|2|False||}},{{ScriptArgumentV2|z|Sng|3|False||}},{{ScriptArgumentV2|yaw|Sng|4|False||}},{{ScriptArgumentV2|pitch|Sng|5|False||}}|Sets the given properties of the camera.|{{ScriptArgumentV2|x|Sng|1|False||Input}}<br />{{ScriptArgumentV2|y|Sng|2|False||Input}}<br />{{ScriptArgumentV2|z|Sng|3|False||Input}}<br />{{ScriptArgumentV2|yaw|Sng|4|False||Input}}<br />{{ScriptArgumentV2|pitch|Sng|5|False||Input}}|False}}
Line 79: Line 79:
{{ScriptCommandTableV2|Command|
{{ScriptCommandTableV2|Command|
{{ScriptCommandV2|Chat|clear||Clears the chat.||False}}
{{ScriptCommandV2|Chat|clear||Clears the chat.||False}}
}}
=== @Daycare ===
{{ScriptCommandTableV2|Command|
{{ScriptCommandV2|Daycare|takeegg|{{ScriptArgumentV2|daycareID|Int|1|False||}}|Removes the egg from the daycare and adds it to the player's party.|{{ScriptArgumentV2|daycareID|Int|1|False||Input}}|False}}
{{ScriptCommandV2|Daycare|takepokemon|{{ScriptArgumentV2|daycareID|Int|1|False||}},{{ScriptArgumentV2|pokemonIndex|Int|2|False||}}|Takes a Pokémon from the daycare to the player's party.|{{ScriptArgumentV2|daycareID|Int|1|False||Input}}<br />{{ScriptArgumentV2|pokemonIndex|Int|2|False||Input}}|False}}
{{ScriptCommandV2|Daycare|leavepokemon|{{ScriptArgumentV2|daycareID|Int|1|False||}},{{ScriptArgumentV2|PokemonDaycareIndex|Int|2|False||}},{{ScriptArgumentV2|pokemonIndex|Int|3|False||}}|Removes a Pokémon from the player's party and fills the given PokemonDaycareIndex with that Pokémon.|{{ScriptArgumentV2|daycareID|Int|1|False||Input}}<br />{{ScriptArgumentV2|PokemonDaycareIndex|Int|2|False||Input}}<br />{{ScriptArgumentV2|pokemonIndex|Int|2|False||Input}}|False}}
{{ScriptCommandV2|Daycare|removeegg|{{ScriptArgumentV2|daycareID|Int|1|False||}}|Removes the egg from the daycare.|{{ScriptArgumentV2|daycareID|Int|1|False||Input}}|False}}
{{ScriptCommandV2|Daycare|clean|{{ScriptArgumentV2|daycareID|Int|1|False||}}|Cleans all data for the given daycare. This doesn't remove the data, just rearranges it.|{{ScriptArgumentV2|daycareID|Int|1|False||Input}}|False}}
{{ScriptCommandV2|Daycare|call|{{ScriptArgumentV2|daycareID|Int|1|False||}}|Initializes a call with the daycare. This checks if the daycare is registered in the Pokégear.|{{ScriptArgumentV2|daycareID|Int|1|False||Input}}|False}}
{{ScriptCommandV2|Daycare|cleardata|{{ScriptArgumentV2|daycareID|Int|1|False||}}|Clears all the data for one daycare. That includes the Pokémon stored there and a potetial egg.|{{ScriptArgumentV2|daycareID|Int|1|False||Input}}|False}}
}}
}}


Line 136: Line 154:


{{ScriptCommandV2|Camera|z||Returns the current z position of the camera.||True}}
{{ScriptCommandV2|Camera|z||Returns the current z position of the camera.||True}}
}}
=== Daycare ===
{{ScriptCommandTableV2|Construct|
{{ScriptCommandV2|Daycare|pokemonID|{{ScriptArgumentV2|daycareID|Int|1|False||}},{{ScriptArgumentV2|pokemonIndex|Int|2|False||}}|Returns the Pokémon ID of a Pokémon in the daycare.|{{ScriptArgumentV2|daycareID|Int|1|False||Input}}<br />{{ScriptArgumentV2|pokemonIndex|Int|2|False||Input}}|True}}
{{ScriptCommandV2|Daycare|pokemonName|{{ScriptArgumentV2|daycareID|Int|1|False||}},{{ScriptArgumentV2|pokemonIndex|Int|2|False||}}|Returns the name of a Pokémon in the daycare.|{{ScriptArgumentV2|daycareID|Int|1|False||Input}}<br />{{ScriptArgumentV2|pokemonIndex|Int|2|False||Input}}|True}}
{{ScriptCommandV2|Daycare|pokemonSprite|{{ScriptArgumentV2|daycareID|Int|1|False||}},{{ScriptArgumentV2|pokemonIndex|Int|2|False||}}|Returns the sprite of a Pokémon in the daycare.|{{ScriptArgumentV2|daycareID|Int|1|False||Input}}<br />{{ScriptArgumentV2|pokemonIndex|Int|2|False||Input}}|True}}
{{ScriptCommandV2|Daycare|shinyIndicator|{{ScriptArgumentV2|daycareID|Int|1|False||}},{{ScriptArgumentV2|pokemonIndex|Int|2|False||}}|Returns the Shiny Indicator of a Pokémon in the daycare (either "N" or "S").|{{ScriptArgumentV2|daycareID|Int|1|False||Input}}<br />{{ScriptArgumentV2|pokemonIndex|Int|2|False||Input}}|True}}
{{ScriptCommandV2|Daycare|countpokemon|{{ScriptArgumentV2|daycareID|Int|1|False||}}|Returns the amount of Pokémon in the daycare.|{{ScriptArgumentV2|daycareID|Int|1|False||Input}}|True}}
{{ScriptCommandV2|Daycare|haspokemon|{{ScriptArgumentV2|daycareID|Int|1|False||}},{{ScriptArgumentV2|pokemonIndex|Int|2|False||}}|Returns the Pokémon ID of a Pokémon in the daycare.|{{ScriptArgumentV2|daycareID|Int|1|False||Input}}<br />{{ScriptArgumentV2|pokemonIndex|Int|2|False||Input}}|True}}
{{ScriptCommandV2|Daycare|canswim|{{ScriptArgumentV2|daycareID|Int|1|False||}},{{ScriptArgumentV2|pokemonIndex|Int|2|False||}}|Returns if the Pokémon in the daycare can swim.|{{ScriptArgumentV2|daycareID|Int|1|False||Input}}<br />{{ScriptArgumentV2|pokemonIndex|Int|2|False||Input}}|True}}
{{ScriptCommandV2|Daycare|hasegg|{{ScriptArgumentV2|daycareID|Int|1|False||}}|Returns if the daycare has an egg.|{{ScriptArgumentV2|daycareID|Int|1|False||Input}}|True}}
{{ScriptCommandV2|Daycare|grownlevels|{{ScriptArgumentV2|daycareID|Int|1|False||}},{{ScriptArgumentV2|pokemonIndex|Int|2|False||}}|Returns the amount of levels the Pokémon has grown in the daycare.|{{ScriptArgumentV2|daycareID|Int|1|False||Input}}<br />{{ScriptArgumentV2|pokemonIndex|Int|2|False||Input}}|True}}
{{ScriptCommandV2|Daycare|currentlevel|{{ScriptArgumentV2|daycareID|Int|1|False||}},{{ScriptArgumentV2|pokemonIndex|Int|2|False||}}|Returns the current level of the Pokémon in the daycare.|{{ScriptArgumentV2|daycareID|Int|1|False||Input}}<br />{{ScriptArgumentV2|pokemonIndex|Int|2|False||Input}}|True}}
{{ScriptCommandV2|Daycare|canbreed|{{ScriptArgumentV2|daycareID|Int|1|False||}},{{ScriptArgumentV2|pokemonIndex|Int|2|False||}}|Returns the chance the Pokémon in the daycare can breed (in %).|{{ScriptArgumentV2|daycareID|Int|1|False||Input}}<br />{{ScriptArgumentV2|pokemonIndex|Int|2|False||Input}}|True}}
}}
}}

Revision as of 16:47, 17 June 2014

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 expected to be <construct.subconstruct> and can be used with switches too

A General Note to all GameMode Scripters ( Must Read )

  1. This list is currently updated as of v0.49.0
  2. I, jianmingyong have ensure minimal typo in the list here.
  3. This list is the same as what you can see when typing @help(command).
  4. Please do not blame darkfire as he is not the one who make the new design on this page :D
  5. Also 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.

Commands

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

The table is split into sections by Command.

By Default, the Argument Types are:

  • Str ( Str are define as letters or symbols )
  • Int ( Int are define as Integer numbers from 0 to 2147483647 )
  • Sng ( Sng are define as Real numbers from 0 to 2147483647 )
  • ItemCollection
  • Bool ( Bool are define as words such as True, False )
  • Rec
  • IntArr
  • StrArr
  • SngArr
  • BoolArr
  • PokemonData ( PokemonData are define as Pokemon Code )
  • Arr

For any optional Argument, it will be engrave by a square bracket for example "[str]"

@Battle

Command [@Command.Subcommand(Argument Types)] Description Inputs [Argument Types = Argument Name]
@Battle.starttrainer
@Battle.trainer
@Battle.wild
@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

Constructs

Constructs can be used in place of any parameter for command and are used with :if: , :while: 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.

By Default, the Argument Types are:

  • Str ( Str are define as letters or symbols )
  • Int ( Int are define as Integer numbers from 0 to 2147483647 )
  • Sng ( Sng are define as Real numbers from 0 to 2147483647 )
  • ItemCollection
  • Bool ( Bool are define as words such as True, False )
  • Rec
  • IntArr
  • StrArr
  • SngArr
  • BoolArr
  • PokemonData ( PokemonData are define as Pokemon Code )
  • Arr

For any optional Argument, it will be engrave by a square bracket for example "[str]"

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