|
|
(10 intermediate revisions by 2 users not shown) |
Line 1: |
Line 1: |
| There are numerous scripts that can be used withing the Pokemon 3D game.
| | The scripts folder contains all of the scripts for in-game events. It also contains the Trainer files and the files for the world maps. |
|
| |
|
| This is(will be) a full list of them, how to use them and what they do.
| | Starting with version 0.32 a second scripting language known as version=2 was implemented into the game. Starting with version 0.33 all new scripts for the main game are made in version=2 scripts. |
|
| |
|
| == Commands == | | ==[[Version 1 Scripts]]== |
| Commands often have a subcommand. All combinations will be listed below. | | These scripts follow the @Command:subcommand pattern with not all Commands needing sub commands. |
|
| |
|
| <nowiki>*</nowiki> unless otherwise specified a bool can bee either 1(on) or 0(off).
| | Version 1 is Case Sensitive. |
|
| |
|
| <nowiki>** Unless otherwise specified X,Y,Z is a three dimensional position.</nowiki>
| | These scripts are still supported but are not used by the dev team when making new scripts. |
| {|class="wikitable"
| |
| ! Subcommand
| |
| ! Job
| |
| ! Inputs
| |
| |-
| |
| | @Player:wearskin(text)
| |
| | Change the player's skin.
| |
| | text - the name of a skin in /content/textures/NPC.
| |
| |-
| |
| | @Player:move(#)
| |
| | Move the player in a straight line
| |
| | # - Number of step.
| |
| |-
| |
| | @Player:turn(#)
| |
| | Turns the player to the left
| |
| | # - Amount of quarter turns.
| |
| |-
| |
| | @Player:turnto(#)
| |
| | Turns to a specific direction.
| |
| | # - 0-3, specifies the direction to turn to.
| |
| |-
| |
| | @Player:warp(X,Y,Z)
| |
| | Warp to a specified place.
| |
| | Position values.
| |
| |-
| |
| | @Player:warp(text,X,Y,Z,R)
| |
| | Warps to a different map.
| |
| |
| |
| * text - Map name.
| |
| * X,Y,Z,R - Position and Rotation.
| |
| |-
| |
| | @Pokemon:remove(#)
| |
| | Removes a Pokemon from the party.
| |
| | # - 0-5, Party index of a Pokemon.
| |
| |-
| |
| | @Pokemon:add(#1,#2,text1,#3,text2,bool,text3)
| |
| | Adds a Pokemon to your party.
| |
| |
| |
| * #1 - Pokemon's National Dex number.
| |
| * #2 - Level.
| |
| * text1 - Catch Method. Optional.
| |
| * #3 - Catch Ball. Optional.
| |
| * bool - Is in an egg or not. Optional.
| |
| * text2 - Catch Trainer. Optional.
| |
| |-
| |
| | @Pokemon:Setadditionalvalue(#,info)
| |
| | Puts info into the AdditionalValue part of a pokemon's save. Example use: designate which Unown.
| |
| |
| |
| * # - 0-5, Party index of a Pokemon.
| |
| * info - Stuff to be added to AdditionalValue.
| |
| |-
| |
| | @Pokemon:setNickName(#,text)
| |
| | Change a Pokemon's name.
| |
| |
| |
| * # - 0-5, Party index of a Pokemon.
| |
| * text - New Name.
| |
| |-
| |
| | @Pokemon:setStat(#1,text,#2)
| |
| | Set a Pokemon's stat to a specific value.
| |
| |
| |
| * #1 - 0-5, Pary index of a Pokemon.
| |
| * text - Name of the stat to adjust. Possible values: hp, chp, attack, defense, spattack, spdefense, speed.
| |
| * #2 - Stat value.
| |
| |-
| |
| | @Pokemon:clear
| |
| | hrm?
| |
| | no value
| |
| |-
| |
| | @Pokemon:clearattacks(#)
| |
| | Removes all attacks from a specified pokemon.
| |
| | # - 0-5, Party index of a Pokemon.
| |
| |-
| |
| | @Pokemon:Addattack(#1,#2)
| |
| | Adds an attack to a specific Pokemon.
| |
| |
| |
| * #1 - 0-5, Party index of a Pokemon.
| |
| * #2 - [[Moves|Move ID number.]]
| |
| |-
| |
| | @Pokemon:Removeattack(#1,#2)
| |
| | Removes an attack from a Pokemon.
| |
| |
| |
| * #1 - 0-5, Party index of a Pokemon.
| |
| * #2 - 0-3, Move location ID(its spot on the Pokemon).
| |
| |-
| |
| | @Pokemon:setshiny(#,bool)
| |
| | Make a Pokemon shiny or not.
| |
| |
| |
| * # - 0-5, Party index of a Pokemon.
| |
| * bool - Turns the shiny on or off.
| |
| |-
| |
| | @NPC:remove(#)
| |
| | Removes an NPC from the map.
| |
| | # - NPC ID.
| |
| |-
| |
| | @NPC:Position(#,X,Y,Z)
| |
| | Moves an NPC to a specific point.
| |
| | # - NPC ID.
| |
| |-
| |
| | @NPC:register(text)
| |
| |
| |
| |
| |
| |-
| |
| | @NPC:unregiser(text)
| |
| |
| |
| |
| |
| |-
| |
| | @NPC:wearskin(#,text)
| |
| | Change the skin used on an NPC. Doesn't change until it is out of view.
| |
| |
| |
| * # - NPC ID.
| |
| * text - skin name in /Content/Textures/NPC.
| |
| |-
| |
| | @Music:text
| |
| | Plays designated music.
| |
| | text - name of a file in /Content/Songs/.
| |
| |-
| |
| | @Sound:text
| |
| | Plays designated sound.
| |
| | text - name of a file in /Content/Sounds/.
| |
| |-
| |
| | @Options:text,text,...
| |
| | Creates a menu with multiple options. Uses the :when construct(see below)
| |
| | text - The options. Can be as many as you want.
| |
| |-
| |
| | @Text:text
| |
| | Displays text '~' breaks it to a new line, and '*' resets the text box.
| |
| | text - the display text
| |
| |-
| |
| | @Camera:set(X,Y,Z,#1,#2)
| |
| |
| |
| |
| |
| |-
| |
| | @Camera:reset
| |
| |-
| |
| | @Camera:yaw(#)
| |
| |-
| |
| | @Camera:pitch(#)
| |
| |-
| |
| | @Camera:position(X,Y,Z)
| |
| |-
| |
| | @Camera:x(#)
| |
| |-
| |
| | @Camera:y(#)
| |
| |-
| |
| | @Camera:z(#)
| |
| |-
| |
| | @Wait:#
| |
| | Waits a certain amount of time.
| |
| | # - Amount of time to wait.
| |
| |-
| |
| | @Action:StorageSystem
| |
| | Activates the storage system.
| |
| | No input.
| |
| |-
| |
| | @Action:ApricornKurt
| |
| | Opens up the Appricorn menu to have 'Kurt' make you an appricorn.
| |
| | No input.
| |
| |-
| |
| | @Action:DayCare(#1,#2)
| |
| |-
| |
| | @Action:Trade(#)
| |
| |-
| |
| | @Action:getpokemon(see@Pokemon:add)
| |
| | same as @Pokemon:add
| |
| |
| |
| |-
| |
| | @Action:townmap,text
| |
| | Opens the town map.
| |
| | text - region name. Only Johto is currently available.
| |
| |-
| |
| | @Action:Network
| |
| | Opens the co-op menu.
| |
| | No input.
| |
| |-
| |
| | @Action:Opendonation
| |
| | Opens the list of Donars(needs updating).
| |
| | No input.
| |
| |-
| |
| | @Action:RecievePokedex
| |
| | Gives you the Pokedex.
| |
| | No input.
| |
| |-
| |
| | @Action:RenamePokemon(#)
| |
| | Allows a player to rename a Pokemon.
| |
| | # - Party index Number
| |
| |-
| |
| | @Action:RenameRival
| |
| | Rename your rival.
| |
| | No input.
| |
| |-
| |
| | @Action:PlayCry(#)
| |
| | Plays the cry of the specified Pokemon
| |
| | # - National Dex Number.
| |
| |-
| |
| | @Action:Show0Pokemon(bool)
| |
| | Turns Following Pokemon on or off.
| |
| |-
| |
| | @Action:ToggleThirdPerson
| |
| | Change between third and first person.
| |
| | No input.
| |
| |-
| |
| | @Action:ActivateThirdPerson
| |
| | Goto third person.
| |
| | No input.
| |
| |-
| |
| | @Action:DeactivateThirdPerson
| |
| | Goto first person
| |
| | No input.
| |
| |-
| |
| | @Action:SetFont(text)
| |
| | Change the font
| |
| | text - Can be standard or Unown.
| |
| |-
| |
| | @Action:SetRenderDistance(#)
| |
| | Set the Renderdistance.
| |
| | # - 0-4, A render distance option.
| |
| |-
| |
| | @Action:wearskin(see @Player:wearskin)
| |
| | see @Player:wearskin.
| |
| | see @Player:wearskin.
| |
| |-
| |
| | @Action:ToggleDarkness
| |
| | Turn darkness on or off.
| |
| | No input.
| |
| |-
| |
| | @MessageBulb:#,X,Y,Z
| |
| |-
| |
| | @Battle:Wild(#1,#2)
| |
| | Start a wild pokemon battle
| |
| |
| |
| * #1 - National Dex Number.
| |
| * #2 - Level.
| |
| |-
| |
| | @Battle:Trainer(text)
| |
| | Battle a trainer
| |
| | text - Trainer file in /Scripts/Trainer/.
| |
| |-
| |
| | @Trainer:text
| |
| | Same as @Battle:Trainer.
| |
| | Same as @Battle:Trainer.
| |
| |-
| |
| | @Achievement:{#}<nowiki>|</nowiki>text
| |
| | Activates an Achievement.
| |
| |
| |
| * # - Number of the Achievement.
| |
| * text - Not important. Must have the pipe character
| |
| |-
| |
| | @Register:text
| |
| | Adds text to Register.dat.
| |
| | text - What to add.
| |
| |-
| |
| | @Unregister:text
| |
| | Removes text from Register.dat.
| |
| | text - What to remove.
| |
| |-
| |
| | @Script:text
| |
| | Activates a script file.
| |
| | text - Script in /Scripts/.
| |
| |-
| |
| | @Heal
| |
| | Heals all Pokemon
| |
| | No input.
| |
| |-
| |
| | @Move:#1,#2
| |
| | Move a certain number of spaces.
| |
| |
| |
| * #1 - NPC ID number. Can also be 'Player'.
| |
| * #2 - Number of spaces.
| |
| |-
| |
| | @Warp:#,X,Y,Z
| |
| | Warps a sprite to a new position. Will not appear until a movement script has been activated
| |
| | # - NPC ID number. Can also be 'Player'.
| |
| |}
| |
|
| |
|
| == Constructs == | | ==[[Version 2 Scripts]]== |
| Constructs are functions in scripts that are not doing something in the game but rather with the script itself.
| | 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. |
| Constructs start with a : at the beginning of the line and are case sensitive!
| |
| Here's the list of constructs:
| |
|
| |
|
| {|class="wikitable"
| | Commands are written as @command.subcommand and are no longer case sensitive. All commands require a subcommand. |
| ! Construct
| |
| ! Use
| |
| |-
| |
| | :end
| |
| | Ends the script.
| |
| |-
| |
| | :if
| |
| | See Below.
| |
| |-
| |
| | :then
| |
| | Follows an :if statement. Continues here if true.
| |
| |-
| |
| | :else
| |
| | Continues here when an :if statement if False.
| |
| |-
| |
| | :endif
| |
| | Ends an :if statement.
| |
| |-
| |
| | :when
| |
| | Works as a switch for the @options command.
| |
| |-
| |
| | :endwhen
| |
| | Ends a when statement
| |
| |}
| |
|
| |
|
| === :if statements ===
| | Constructs were also expanded to be <construct.subconstruct> and can be used with switches too |
| :if statements can be either 'if true' statements or 'if false' statements
| |
|
| |
|
| 'if true:'
| | There are numerous scripts that can be used withing the Pokemon 3D game. |
| <pre>:if:register(elm1)</pre>
| |
| | |
| 'if false'
| |
| <pre>:if:not register(elm1)</pre>
| |
| | |
| :if statements can take a variety of conditions as the argument. Here is the full list.
| |
| | |
| {|class="wikitable"
| |
| ! Argument
| |
| ! Variable
| |
| ! Description
| |
| |-
| |
| | :register(text)
| |
| | text - A register value in the register.dat file of the save folder.
| |
| | Checks to see if the 'text' is in the register.dat file. Considered true if found.
| |
| |-
| |
| | :daytime(#)
| |
| | # - A time of day value. 0 = night, 1 = morning, 2 = Day, 3 = Evening.
| |
| | Checks the time of day against the given value.
| |
| |-
| |
| | :freeplaceinparty
| |
| | no variable
| |
| | Checks to see if your party is full.
| |
| |-
| |
| | :nopokemon
| |
| | No variable
| |
| | Checks to see if you have any Pokemon.
| |
| |-
| |
| | :day(#)
| |
| | # - A 'day' code. (0-6) 0 = Sunday and goes from there.
| |
| | Checks if the current weekday matches the code given.
| |
| |-
| |
| | :aurora
| |
| | no variable
| |
| | Checks for the 'Aurora' effect?
| |
| |-
| |
| | :random(#)
| |
| | # - The max value.
| |
| | Produces a Random integer?
| |
| |-
| |
| | :position(#,X,Y,Z)
| |
| |
| |
| * # - The NPC ID of an NPC on the Map. Can also be 'Player' to check the player's position
| |
| * X,Y,Z - A three coordinate position.
| |
| | Checks if the given NPC(or the player) is in the given place
| |
| |-
| |
| | :weather(#)
| |
| | # - A weather ID. 0 = Clear, 1 = Rain, 2 = Snow, 3 = Bubbles
| |
| | Checks the map weather against the given weather. This is not the random weather effect but rather permanent weather such as Route 33's eternal rain.
| |
| |-
| |
| | :regionWeather(#)
| |
| | # - A weather ID. 0 = Clear, 1 = Rain, 2 = Snow, 3 = Bubbles
| |
| | Checks to see if the random weather is the same as the given weather.
| |
| |-
| |
| | :hasBadge(#)
| |
| | # - the number of a gym badge. Remember Brock = 1, Falkner = 9.
| |
| | Checks if you have the given badge.
| |
| |-
| |
| | :hasItem(#)
| |
| | # - [[Items|An Item's ID number.]]
| |
| | Checks if the given item is in your bag
| |
| |}
| |
| | |
| == Trainer Files ==
| |
| Each trainer file has is put in the /Scripts/Trainer/ folder.
| |
| | |
| These files can be made in 2 formats; the 'Old' and 'New' formats
| |
| | |
| === Old Trainer file Format ===
| |
| The Old Trainer File Format was not very descriptive and required a lot of knowledge about which line was which.
| |
| <pre>
| |
| $$
| |
| Class
| |
| Name
| |
| Start Battle Speech
| |
| Defeat message
| |
| Post Battle Speech
| |
| Sprite
| |
| Music1|Music2
| |
| 1|Pokemon
| |
| 2|Pokemon
| |
| 3|Pokemon
| |
| 4|Pokemon
| |
| 5|Pokemon
| |
| 6|Pokemon
| |
| Items
| |
| AI code
| |
| Gender code
| |
| </pre>
| |
| | |
| The file would look exactly like that.
| |
| | |
| {|class="wikitable"
| |
| ! Line
| |
| ! Description
| |
| |-
| |
| | $$
| |
| | The prize you receive after beating this trainer.
| |
| |-
| |
| | Class
| |
| | Displays before the name of the trainer.
| |
| |-
| |
| | Name
| |
| | The name of the trainer.
| |
| |-
| |
| | Start Battle Speech
| |
| | The speech given before the battle is started.
| |
| |-
| |
| | Defeat Message
| |
| | The message displayed after defeating the opponent while still in the battle.
| |
| |-
| |
| | Post Battle Speech
| |
| | Displays when interacting with the trainer after defeating them.
| |
| |-
| |
| | Sprite
| |
| | The name of a sprite located in the /Content/Textures/NPC folder.
| |
| |-
| |
| | Music
| |
| | Searches for the music files:
| |
| * Music1_Music2_intro
| |
| * Music2_defeat
| |
| * Music1_Music2
| |
| |-
| |
| | Pokemon
| |
| | Only one Pokemon needs to be defined. Can be defined 2 ways:
| |
| * #1,#2 where #1 is the Pokemon's dex number and #2 is its level.
| |
| * Using the full [[Pokemon Code]].
| |
| |-
| |
| | Items
| |
| | List of the [[Items|item codes]] of the items a trainer can use. Will use each item once however items can be listed multiple times and will be used once for each listing.
| |
| |-
| |
| | AI Code
| |
| | Defines the abilities of the trainer's AI. there are 5 settings:
| |
| * 0 - Aggressive.
| |
| * 1 - Defensive.
| |
| * 2 - Normal.
| |
| * 3 - Special.
| |
| * 4 - Simple.
| |
| | |
| If not given Normal is used.
| |
| |-
| |
| | Gender Code
| |
| | Decides the genders of any of the trainer's randomly generated Pokemon. If the Pokemon code is given for a Pokemon the gender used there will be used.
| |
| * -1 - Random
| |
| * 0 - Male
| |
| * 1 - Female
| |
| * 2 - Genderless
| |
| | |
| If not given Random genders are given.
| |
| |}
| |
|
| |
|
| === New Trainer File Format === | | ==[[Trainer Files]]== |
| The new trainer file format was introduced in version 0.28. This format is very descriptive about what each line does.
| | Trainer files all have the extension .trainer. |
| | There are 2 types of trainer files, one that is less descriptive and one that is more. |
|
| |
|
| <pre>
| | == [[World Map]] == |
| [TRAINER FORMAT] | | World map files are stored in the /Scripts/worldmap/ folder and are named for the region the represent. |
| Name|
| |
| TrainerClass|
| |
| Money|
| |
| IntroMessage|
| |
| OutroMessage|
| |
| DefeatMessage|
| |
| TextureID|
| |
| Region|
| |
| IniMusic|
| |
| DefeatMusic|
| |
| BattleMusic|
| |
| Pokemon1|
| |
| Pokemon2|
| |
| Pokemon3|
| |
| Pokemon4|
| |
| Pokemon5|
| |
| Pokemon6|
| |
| Items|
| |
| Gender|
| |
| AI|
| |
| IntroSequence|
| |
| </pre>
| |
|
| |
|
| {|class="wikitable" | | As part of the header for a map file the {"CurrentRegion"{str[regionname]}} is listed which dictates which map is looked at when viewing the town map or when flying. |
| ! Line
| |
| ! Description
| |
| |-
| |
| | Name<nowiki>|</nowiki>
| |
| | Trainer's Name.
| |
| |-
| |
| | TrainerClass<nowiki>|</nowiki>
| |
| | Trainer's Class. Displays before the Name.
| |
| |-
| |
| | Money<nowiki>|</nowiki>
| |
| | How much money is earned after being defeated.
| |
| |-
| |
| | IntroMessage<nowiki>|</nowiki>
| |
| | Message that displays before battle starts. '...' means no message.
| |
| |-
| |
| | OutroMessage<nowiki>|</nowiki>
| |
| | Message that displays after the battle ends. '...' means no message.
| |
| |-
| |
| | DefeatMessage<nowiki>|</nowiki>
| |
| | Message that displays when interacting with the trainer after the battle has ended. '...' means no message.
| |
| |-
| |
| | TextureID<nowiki>|</nowiki>
| |
| | The name of a sprite in /Content/Textures/NPC/
| |
| |-
| |
| | Region<nowiki>|</nowiki>
| |
| | The name of the region the trainer is in. Use is unknown.
| |
| |-
| |
| | IniMusic<nowiki>|</nowiki>
| |
| | Music used to start the battle.
| |
| |-
| |
| | DefeatMusic<nowiki>|</nowiki>
| |
| | Music used after the battle.
| |
| |-
| |
| | BattleMusic<nowiki>|</nowiki>
| |
| | Music used during the battle.
| |
| |-
| |
| | Pokemon1<nowiki>|</nowiki>
| |
| | The first Pokemon. The only Pokemon that needs to be defined. Can be made by defining only the Pokemon and the level(Pokemondex#,Level) or by defining the whole Pokemon([[Pokemon Code]]).
| |
| |-
| |
| | Pokemon2<nowiki>|</nowiki>
| |
| | The second Pokemon. Does not need to be defined. See 'Pokemon1|' for how to define.
| |
| |-
| |
| | Pokemon3<nowiki>|</nowiki>
| |
| | The third Pokemon. Does not need to be defined. See 'Pokemon1|' for how to define.
| |
| |-
| |
| | Pokemon4<nowiki>|</nowiki>
| |
| | The fourth Pokemon. Does not need to be defined. See 'Pokemon1|' for how to define.
| |
| |-
| |
| | Pokemon5<nowiki>|</nowiki>
| |
| | The fifth Pokemon. Does not need to be defined. See 'Pokemon1|' for how to define.
| |
| |-
| |
| | Pokemon6<nowiki>|</nowiki>
| |
| | The sixth Pokemon. Does not need to be defined. See 'Pokemon1|' for how to define.
| |
| |-
| |
| | Items<nowiki>|</nowiki>
| |
| | List of Items to be used by their [[Items|Item Code]]. Used once for each listing of the code.
| |
| |-
| |
| | Gender<nowiki>|</nowiki>
| |
| | Decides the genders of any of the trainer's randomly generated Pokemon. If the Pokemon code is given for a Pokemon the gender used there will be used.
| |
| * -1 - Random
| |
| * 0 - Male
| |
| * 1 - Female
| |
| * 2 - Genderless
| |
|
| |
|
| If not given Random(-1) is assumed.
| | This feature was implemented in version 0.3 along with [[Fly]]. |
| |-
| |
| | AI<nowiki>|</nowiki>
| |
| | Defines the abilities of the trainer's AI. there are 5 settings:
| |
| * 0 - Aggressive.
| |
| * 1 - Defensive.
| |
| * 2 - Normal.
| |
| * 3 - Special.
| |
| * 4 - Simple.
| |
|
| |
|
| If not given Normal(2) is used.
| | {{FilePaths}} |
| |-
| |
| | IntroSequence<nowiki>|</nowiki>
| |
| | Calls specified colored VS sign and bar, respectively. There are 4 colors of VS and 11 colors of bar they are:
| |
| *VS
| |
| **Orange
| |
| **Blue
| |
| **Red
| |
| **Green
| |
| *Bar
| |
| **Orange
| |
| **Blue
| |
| **Red
| |
| **Green
| |
| **Gray
| |
| **Violet
| |
| **Yellow
| |
| **Brown
| |
| If an improper color is given they default to blue.
| |
| |}
| |