Difference between revisions of "Version 2 Scripts New"

From Pokémon 3D Wiki
Jump to navigation Jump to search
m
Line 14: Line 14:
== Commands  ==
== Commands  ==
Commands always have a subcommand. All combinations will be listed below.
Commands always have a subcommand. All combinations will be listed below.
 
<br /><br />
The table is split into sections by Command.
The table is split into sections by Command.
 
<br /><br />
By Default, the Argument Types are:
By Default, the Argument Types are:
*Str ( Str are define as letters or words )
*Str ( Str are define as letters or symbols )
*Int ( Int are define as numbers from 0 to 2147483647 )
*Int ( Int are define as Integer numbers from 0 to 2147483647 )
*Sng  
*Sng ( Sng are define as Real numbers from 0 to 2147483647 )
*ItemCollection
*ItemCollection
*Bool ( Bool are define as words such as True, False )
*Bool ( Bool are define as words such as True, False )
Line 30: Line 30:
*PokemonData ( PokemonData are define as [[Pokemon_Code|Pokemon Code]] )
*PokemonData ( PokemonData are define as [[Pokemon_Code|Pokemon Code]] )
*Arr
*Arr
 
For any optional Argument, it will be engrave by a square bracket for example "<nowiki>[str]</nowiki>"
For any optional Argument, it will be engrave by a square braket for example "<nowiki>[str]</nowiki>"
<br /><br />
By Default, the Argument Name are:
*trainerFile ( Define as Trainer File path inside ...\Scripts\trainer folder )
*musicloop ( Define as Music File path inside ...\Content\Songs folder )


=== @Battle ===
=== @Battle ===
Line 42: Line 45:
! data-sort-type="text" | Command [ @Command.Subcommand(Argument Types) ]
! data-sort-type="text" | Command [ @Command.Subcommand(Argument Types) ]
! data-sort-type="text" | Description
! data-sort-type="text" | Description
! data-sort-type="text" | Inputs
! data-sort-type="text" | Inputs [ Argument Types = Argument Name ]
|-
|-
| @Battle.starttrainer(Str1)
| @Battle.starttrainer(Str1)
Line 60: Line 63:
|
|
*PokemonData = [[Pokemon_Code|Refer Pokemon Code]]
*PokemonData = [[Pokemon_Code|Refer Pokemon Code]]
*Str1 = musicloop  
*Str1 = musicloop
*Int1 = pokemonID
*Int1 = pokemonID
*Int2 = level
*Int2 = level

Revision as of 12:42, 15 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]"

By Default, the Argument Name are:

  • trainerFile ( Define as Trainer File path inside ...\Scripts\trainer folder )
  • musicloop ( Define as Music File path inside ...\Content\Songs folder )

@Battle

Command [ @Command.Subcommand(Argument Types) ] Description Inputs [ Argument Types = Argument Name ]
@Battle.starttrainer(Str1) Initializes a trainer interaction and checks if the player has already beaten that trainer.
  • Str1 = trainerFile
@Battle.trainer(Str1) Initializes a trainer battle.
  • Str1 = trainerFile
@Battle.wild(PokemonData,[Str1])

OR
@Battle.wild(Int1,Int2,[Int3],[Str1],[Int4])

Initializes the battle with a wild Pokémon.
  • PokemonData = Refer Pokemon Code
  • Str1 = musicloop
  • Int1 = pokemonID
  • Int2 = level
  • Int3 = shiny ( Default value = -1 )
  • Int4 = introtype ( Default value = 0-10 )