Difference between revisions of "Database editing"
(Created page with "Pixelmon uses an [http://www.h2database.com/html/main.html H2 database] to store a variety of Pokémon data, including stats, moves, and spawn biomes. It is possible t...") |
|||
Line 32: | Line 32: | ||
!{{tt|Can delete|Whether users can safely delete existing entries in this table without making Pixelmon function incorrectly or crash.}} | !{{tt|Can delete|Whether users can safely delete existing entries in this table without making Pixelmon function incorrectly or crash.}} | ||
|- | |- | ||
− | |ABILITIES | + | |[[Database editing#ABILITIES|ABILITIES]] |
|style="text-align:center"|Yes | |style="text-align:center"|Yes | ||
|style="text-align:center"|No | |style="text-align:center"|No | ||
Line 38: | Line 38: | ||
|style="text-align:center"|No | |style="text-align:center"|No | ||
|- | |- | ||
− | |BADGES | + | |[[Database editing#BADGES|BADGES]] |
|style="text-align:center"|No | |style="text-align:center"|No | ||
|style="text-align:center"|N/A | |style="text-align:center"|N/A | ||
Line 44: | Line 44: | ||
|style="text-align:center"|N/A | |style="text-align:center"|N/A | ||
|- | |- | ||
− | |BIOMES | + | |[[Database editing#BIOMES|BIOMES]] |
− | | | ||
− | |||
− | |||
|style="text-align:center"|No | |style="text-align:center"|No | ||
+ | |style="text-align:center"|N/A | ||
+ | |style="text-align:center"|N/A | ||
+ | |style="text-align:center"|N/A | ||
|- | |- | ||
− | |CUSTOM_DROPS | + | |[[Database editing#CUSTOM_DROPS|CUSTOM_DROPS]] |
|style="text-align:center"|No | |style="text-align:center"|No | ||
|style="text-align:center"|N/A | |style="text-align:center"|N/A | ||
Line 56: | Line 56: | ||
|style="text-align:center"|N/A | |style="text-align:center"|N/A | ||
|- | |- | ||
− | |CUSTOM_MESSAGES | + | |[[Database editing#CUSTOM_MESSAGES|CUSTOM_MESSAGES]] |
|style="text-align:center"|No | |style="text-align:center"|No | ||
|style="text-align:center"|N/A | |style="text-align:center"|N/A | ||
Line 62: | Line 62: | ||
|style="text-align:center"|N/A | |style="text-align:center"|N/A | ||
|- | |- | ||
− | |CUSTOM_TEAMMEMBERS | + | |[[Database editing#CUSTOM_TEAMMEMBERS|CUSTOM_TEAMMEMBERS]] |
|style="text-align:center"|No | |style="text-align:center"|No | ||
|style="text-align:center"|N/A | |style="text-align:center"|N/A | ||
Line 68: | Line 68: | ||
|style="text-align:center"|N/A | |style="text-align:center"|N/A | ||
|- | |- | ||
− | |CUSTOM_TRAINER | + | |[[Database editing#CUSTOM_TRAINER|CUSTOM_TRAINER]] |
|style="text-align:center"|No | |style="text-align:center"|No | ||
|style="text-align:center"|N/A | |style="text-align:center"|N/A | ||
Line 74: | Line 74: | ||
|style="text-align:center"|N/A | |style="text-align:center"|N/A | ||
|- | |- | ||
− | |EGGGROUPS | + | |[[Database editing#EGGGROUPS|EGGGROUPS]] |
|style="text-align:center"|Yes | |style="text-align:center"|Yes | ||
|style="text-align:center"|No | |style="text-align:center"|No | ||
− | |style="text-align:center"| | + | |style="text-align:center"|No |
|style="text-align:center"|No | |style="text-align:center"|No | ||
|- | |- | ||
− | |HMREQUIREMENTS | + | |[[Database editing#HMREQUIREMENTS|HMREQUIREMENTS]] |
|style="text-align:center"|No | |style="text-align:center"|No | ||
|style="text-align:center"|N/A | |style="text-align:center"|N/A | ||
Line 86: | Line 86: | ||
|style="text-align:center"|N/A | |style="text-align:center"|N/A | ||
|- | |- | ||
− | |MOVEANIMATIONS | + | |[[Database editing#MOVEANIMATIONS|MOVEANIMATIONS]] |
|style="text-align:center"|No | |style="text-align:center"|No | ||
|style="text-align:center"|N/A | |style="text-align:center"|N/A | ||
Line 92: | Line 92: | ||
|style="text-align:center"|N/A | |style="text-align:center"|N/A | ||
|- | |- | ||
− | |MOVECATEGORIES | + | |[[Database editing#MOVECATEGORIES|MOVECATEGORIES]] |
|style="text-align:center"|Yes | |style="text-align:center"|Yes | ||
|style="text-align:center"|No | |style="text-align:center"|No | ||
Line 98: | Line 98: | ||
|style="text-align:center"|No | |style="text-align:center"|No | ||
|- | |- | ||
− | |MOVEEFFECTS | + | |[[Database editing#MOVEEFFECTS|MOVEEFFECTS]] |
|style="text-align:center"|No | |style="text-align:center"|No | ||
|style="text-align:center"|N/A | |style="text-align:center"|N/A | ||
Line 104: | Line 104: | ||
|style="text-align:center"|N/A | |style="text-align:center"|N/A | ||
|- | |- | ||
− | |MOVES | + | |[[Database editing#MOVES|MOVES]] |
− | | | ||
|style="text-align:center"|Yes | |style="text-align:center"|Yes | ||
|style="text-align:center"|Yes | |style="text-align:center"|Yes | ||
+ | |style="text-align:center"|No | ||
|style="text-align:center"|No | |style="text-align:center"|No | ||
|- | |- | ||
− | |PIXELMON | + | |[[Database editing#PIXELMON|PIXELMON]] |
|style="text-align:center"|Yes | |style="text-align:center"|Yes | ||
|style="text-align:center"|Yes | |style="text-align:center"|Yes | ||
Line 116: | Line 116: | ||
|style="text-align:center"|No | |style="text-align:center"|No | ||
|- | |- | ||
− | |PIXELMONDROPS | + | |[[Database editing#PIXELMONDROPS|PIXELMONDROPS]] |
|style="text-align:center"|Yes | |style="text-align:center"|Yes | ||
|style="text-align:center"|Yes | |style="text-align:center"|Yes | ||
Line 122: | Line 122: | ||
|style="text-align:center"|Yes | |style="text-align:center"|Yes | ||
|- | |- | ||
− | |PIXELMONEGGSKILLS | + | |[[Database editing#PIXELMONEGGSKILLS|PIXELMONEGGSKILLS]] |
|style="text-align:center"|Yes | |style="text-align:center"|Yes | ||
|style="text-align:center"|Yes | |style="text-align:center"|Yes | ||
Line 128: | Line 128: | ||
|style="text-align:center"|Yes | |style="text-align:center"|Yes | ||
|- | |- | ||
− | |PIXELMONEVOLUTIONS | + | |[[Database editing#PIXELMONEVOLUTIONS|PIXELMONEVOLUTIONS]] |
|style="text-align:center"|Yes | |style="text-align:center"|Yes | ||
|style="text-align:center"|Yes | |style="text-align:center"|Yes | ||
Line 134: | Line 134: | ||
|style="text-align:center"|Yes | |style="text-align:center"|Yes | ||
|- | |- | ||
− | |PIXELMONFLY | + | |[[Database editing#PIXELMONFLY|PIXELMONFLY]] |
|style="text-align:center"|Yes | |style="text-align:center"|Yes | ||
|style="text-align:center"|Yes | |style="text-align:center"|Yes | ||
Line 140: | Line 140: | ||
|style="text-align:center"|No | |style="text-align:center"|No | ||
|- | |- | ||
− | |PIXELMONHELDITEMS | + | |[[Database editing#PIXELMONHELDITEMS|PIXELMONHELDITEMS]] |
|style="text-align:center"|No | |style="text-align:center"|No | ||
|style="text-align:center"|N/A | |style="text-align:center"|N/A | ||
Line 146: | Line 146: | ||
|style="text-align:center"|N/A | |style="text-align:center"|N/A | ||
|- | |- | ||
− | |PIXELMONLEVELSKILLS | + | |[[Database editing#PIXELMONLEVELSKILLS|PIXELMONLEVELSKILLS]] |
|style="text-align:center"|Yes | |style="text-align:center"|Yes | ||
|style="text-align:center"|Yes | |style="text-align:center"|Yes | ||
Line 152: | Line 152: | ||
|style="text-align:center"|Yes | |style="text-align:center"|Yes | ||
|- | |- | ||
− | |PIXELMONRIDE | + | |[[Database editing#PIXELMONRIDE|PIXELMONRIDE]] |
|style="text-align:center"|Yes | |style="text-align:center"|Yes | ||
|style="text-align:center"|Yes | |style="text-align:center"|Yes | ||
Line 158: | Line 158: | ||
|style="text-align:center"|No | |style="text-align:center"|No | ||
|- | |- | ||
− | |PIXELMONSPAWNBIOMES | + | |[[Database editing#PIXELMONSPAWNBIOMES|PIXELMONSPAWNBIOMES]] |
|style="text-align:center"|Yes | |style="text-align:center"|Yes | ||
|style="text-align:center"|Yes | |style="text-align:center"|Yes | ||
Line 164: | Line 164: | ||
|style="text-align:center"|Yes | |style="text-align:center"|Yes | ||
|- | |- | ||
− | |PIXELMONSPAWNLOCATIONS | + | |[[Database editing#PIXELMONSPAWNLOCATIONS|PIXELMONSPAWNLOCATIONS]] |
|style="text-align:center"|Yes | |style="text-align:center"|Yes | ||
|style="text-align:center"|Yes | |style="text-align:center"|Yes | ||
Line 170: | Line 170: | ||
|style="text-align:center"|Yes | |style="text-align:center"|Yes | ||
|- | |- | ||
− | |PIXELMONSPAWNTIMES | + | |[[Database editing#PIXELMONSPAWNTIMES|PIXELMONSPAWNTIMES]] |
|style="text-align:center"|Yes | |style="text-align:center"|Yes | ||
|style="text-align:center"|Yes | |style="text-align:center"|Yes | ||
Line 176: | Line 176: | ||
|style="text-align:center"|No | |style="text-align:center"|No | ||
|- | |- | ||
− | |PIXELMONSWIM | + | |[[Database editing#PIXELMONSWIM|PIXELMONSWIM]] |
|style="text-align:center"|Yes | |style="text-align:center"|Yes | ||
|style="text-align:center"|Yes | |style="text-align:center"|Yes | ||
Line 182: | Line 182: | ||
|style="text-align:center"|No | |style="text-align:center"|No | ||
|- | |- | ||
− | |PIXELMONTMHMSKILLS | + | |[[Database editing#PIXELMONTMHMSKILLS|PIXELMONTMHMSKILLS]] |
|style="text-align:center"|Yes | |style="text-align:center"|Yes | ||
|style="text-align:center"|Yes | |style="text-align:center"|Yes | ||
Line 188: | Line 188: | ||
|style="text-align:center"|Yes | |style="text-align:center"|Yes | ||
|- | |- | ||
− | |PIXELMONTRADES | + | |[[Database editing#PIXELMONTRADES|PIXELMONTRADES]] |
|style="text-align:center"|Yes | |style="text-align:center"|Yes | ||
|style="text-align:center"|Yes | |style="text-align:center"|Yes | ||
Line 194: | Line 194: | ||
|style="text-align:center"|Yes | |style="text-align:center"|Yes | ||
|- | |- | ||
− | |PIXELMONTUTORSKILLS | + | |[[Database editing#PIXELMONTUTORSKILLS|PIXELMONTUTORSKILLS]] |
|style="text-align:center"|Yes | |style="text-align:center"|Yes | ||
|style="text-align:center"|Yes | |style="text-align:center"|Yes | ||
Line 200: | Line 200: | ||
|style="text-align:center"|Yes | |style="text-align:center"|Yes | ||
|- | |- | ||
− | |SHOPITEMS | + | |[[Database editing#SHOPITEMS|SHOPITEMS]] |
|style="text-align:center"|No | |style="text-align:center"|No | ||
|style="text-align:center"|N/A | |style="text-align:center"|N/A | ||
Line 206: | Line 206: | ||
|style="text-align:center"|N/A | |style="text-align:center"|N/A | ||
|- | |- | ||
− | |SHOPKEEPERITEMS | + | |[[Database editing#SHOPKEEPERITEMS|SHOPKEEPERITEMS]] |
|style="text-align:center"|No | |style="text-align:center"|No | ||
|style="text-align:center"|N/A | |style="text-align:center"|N/A | ||
Line 212: | Line 212: | ||
|style="text-align:center"|N/A | |style="text-align:center"|N/A | ||
|- | |- | ||
− | |SHOPKEEPERS | + | |[[Database editing#SHOPKEEPERS|SHOPKEEPERS]] |
|style="text-align:center"|No | |style="text-align:center"|No | ||
|style="text-align:center"|N/A | |style="text-align:center"|N/A | ||
Line 218: | Line 218: | ||
|style="text-align:center"|N/A | |style="text-align:center"|N/A | ||
|- | |- | ||
− | |TRAINER | + | |[[Database editing#TRAINER|TRAINER]] |
|style="text-align:center"|No | |style="text-align:center"|No | ||
|style="text-align:center"|N/A | |style="text-align:center"|N/A | ||
Line 224: | Line 224: | ||
|style="text-align:center"|N/A | |style="text-align:center"|N/A | ||
|- | |- | ||
− | |TRAINERDROPS | + | |[[Database editing#TRAINERDROPS|TRAINERDROPS]] |
|style="text-align:center"|No | |style="text-align:center"|No | ||
|style="text-align:center"|N/A | |style="text-align:center"|N/A | ||
Line 230: | Line 230: | ||
|style="text-align:center"|N/A | |style="text-align:center"|N/A | ||
|- | |- | ||
− | |TRAINERMESSAGES | + | |[[Database editing#TRAINERMESSAGES|TRAINERMESSAGES]] |
|style="text-align:center"|No | |style="text-align:center"|No | ||
|style="text-align:center"|N/A | |style="text-align:center"|N/A | ||
Line 236: | Line 236: | ||
|style="text-align:center"|N/A | |style="text-align:center"|N/A | ||
|- | |- | ||
− | |TRAINERPIXELMONPOOL | + | |[[Database editing#TRAINERPIXELMONPOOL|TRAINERPIXELMONPOOL]] |
|style="text-align:center"|No | |style="text-align:center"|No | ||
|style="text-align:center"|N/A | |style="text-align:center"|N/A | ||
Line 242: | Line 242: | ||
|style="text-align:center"|N/A | |style="text-align:center"|N/A | ||
|- | |- | ||
− | |TRAINERSPAWNBIOMES | + | |[[Database editing#TRAINERSPAWNBIOMES|TRAINERSPAWNBIOMES]] |
|style="text-align:center"|Yes | |style="text-align:center"|Yes | ||
|style="text-align:center"|Yes | |style="text-align:center"|Yes | ||
Line 248: | Line 248: | ||
|style="text-align:center"|Yes | |style="text-align:center"|Yes | ||
|- | |- | ||
− | |TRAINERTYPES | + | |[[Database editing#TRAINERTYPES|TRAINERTYPES]] |
|style="text-align:center"|Yes | |style="text-align:center"|Yes | ||
|style="text-align:center"|No | |style="text-align:center"|No | ||
Line 254: | Line 254: | ||
|style="text-align:center"|No | |style="text-align:center"|No | ||
|- | |- | ||
− | |TYPES | + | |[[Database editing#TYPES|TYPES]] |
|style="text-align:center"|Yes | |style="text-align:center"|Yes | ||
|style="text-align:center"|No | |style="text-align:center"|No | ||
Line 265: | Line 265: | ||
This table is not currently used by Pixelmon. | This table is not currently used by Pixelmon. | ||
===BIOMES=== | ===BIOMES=== | ||
− | This table | + | This table is not currently used by Pixelmon. Spawn biomes are defined directly in [[Database editing#PIXELMONSPAWNBIOMES|PIXELMONSPAWNBIOMES]]. |
===CUSTOM_DROPS=== | ===CUSTOM_DROPS=== | ||
This table is not currently used by Pixelmon. | This table is not currently used by Pixelmon. | ||
+ | ===CUSTOM_MESSAGES=== | ||
+ | This table is not currently used by Pixelmon. | ||
+ | ===CUSTOM_TEAMMEMBERS=== | ||
+ | This table is not currently used by Pixelmon. | ||
+ | ===CUSTOM_TRAINER=== | ||
+ | This table is not currently used by Pixelmon. | ||
+ | ===EGGGROUPS=== | ||
+ | This table assigns numerical IDs to all [[Egg Groups]]. This table should not be modified. | ||
+ | ===HMREQUIREMENTS=== | ||
+ | This table is not currently used by Pixelmon. | ||
+ | ===MOVEANIMATIONS=== | ||
+ | This table is not currently used by Pixelmon. | ||
+ | ===MOVECATEGORIES=== | ||
+ | This table assigns numerical IDs to all move categories. This table should not be modified. | ||
+ | ===MOVEEFFECTS=== | ||
+ | This table is not currently used by Pixelmon. Move effects are defined directly in the [[Database editing#MOVES|MOVES]] table. | ||
+ | ===MOVES=== | ||
+ | This table contains data about all moves in Pixelmon. Existing moves should not be removed, and new moves should not be added. | ||
+ | *MOVEID: The numerical ID of the move. Do not modify this field. | ||
+ | *NAME: The English name of the move, which is referenced in Pixelmon's code and used to obtain the translated name of the move. Do not modify this field. | ||
+ | *TMID: The move's [[TM]] number, or ''null'' if the move is not a TM. Do not modify this field. | ||
+ | *HMID: The move's [[HM]] number, or ''null'' if the move is not an HM. Do not modify this field. | ||
+ | *TYPEID: The ID of the move's [[type]], corresponding to the ID in the [[Database editing#TYPES|TYPES]] table. | ||
+ | *MOVECATEGORYID: The ID of the move's move category, corresponding to the ID in the [[Database editing#MOVECATEGORIES|MOVECATEGORIES]] table. If changed, client-side database installation is required. | ||
+ | *POWER: The move's base power, or ''null'' if the move has no base power. If changed, client-side database installation is required. | ||
+ | *ACCURACY: The move's base accuracy, or ''null'' if the move does not use accuracy checks. If changed, client-side database installation is required. | ||
+ | *PP: The move's base PP. If changed, client-side database installation is required. | ||
+ | *PPMAX: Unused. | ||
+ | *EFFECT: The move's additional effect. Semicolons can be used to separate multiple effects on one move, while colons are used to pass arguments into an effect. New effects cannot be added. A list of possible effects can be seen by entering the following query: | ||
+ | SELECT DISTINCT EFFECT FROM MOVES ORDER BY EFFECT | ||
+ | *MAKESCONTACT: Whether the move makes contact with its target, triggering effects from sources such as [[Static]] and [[Rocky Helmet]]. | ||
+ | *Targeting data: These fields define data about move targeting in double battles. If changed, client-side database installation is required. | ||
+ | **HITSALL: Whether the move hits all of its possible targets at once. | ||
+ | **HITSOPPOSITEFOE: Whether the move can target the opponent directly opposite of the user. | ||
+ | **HITSADJACENTFOE: Whether the move can target opponents adjacent to the user. | ||
+ | **HITSEXTENDEDFOE: Unused. | ||
+ | **HITSSELF: Whether the move can target the user. | ||
+ | **HITSADJACENTALLY: Whether the move can target the user's partner. | ||
+ | **HITSEXTENDEDALLY: Unused. | ||
+ | *DESCRIPTION: Unused. | ||
+ | *ATTACKANIMATIONS: Unused. | ||
+ | *TUTORTYPE: Whether the move is a tutor move (1), an event tutor move (2), or not a tutor move (''null''). | ||
+ | ===PIXELMON=== | ||
+ | This table contains data about all Pokémon in Pixelmon, along with unimplemented Pokémon up to Generation 6. Pokémon should not be added or removed from this table. | ||
+ | *PIXELMONID: The Pokémon's numerical ID. Do not modify this field. | ||
+ | *NATIONALPOKEDEXNUMBER: The Pokémon's [[Pokédex]] number. Do not modify this field. | ||
+ | *PIXELMONFULLNAME: The Pokémon's unlocalized species name, used in Pixelmon code and for translation. Do not modify this field. | ||
+ | *PIXELMONNAME: Unused. | ||
+ | *Types: These fields define the Pokémon's [[types]] using IDs from the [[Database editing#TYPES|TYPES]] table. If changed, client-side database installation is required. | ||
+ | **PIXELMONTYPE1ID: The Pokémon's primary type. | ||
+ | **PIXELMONTYPE2ID: The Pokémon's secondary type, or ''null'' if the Pokémon only has one type. | ||
+ | *Abilities: These fields define the Pokémon's [[Abilities]] using IDs from the [[Database editing#ABILITIES|ABILITIES]] table. If changed, client-side database installation is required. | ||
+ | **ABILITY1ID: The Pokémon's first Ability. | ||
+ | **ABILITY2ID: The Pokémon's second Ability, or ''null'' if the Pokémon only has one normal Ability. | ||
+ | **ABILITYHIDDENID: The Pokémon's hidden Ability, or ''null'' if the Pokémon has no hidden Ability. | ||
+ | *Egg Groups: These fields define the Pokémon's [[Egg Groups]] using IDs from the [[Database editing#EGGGROUPS|EGGGROUPS]] table. | ||
+ | **EGGGROUP1ID: The Pokémon's first Egg Group. | ||
+ | **EGGGROUP2ID: The Pokémon's second Egg Group, or ''null'' if the Pokémon only has one Egg Group. | ||
+ | *EGGCYCLES: The number of [http://bulbapedia.bulbagarden.net/wiki/Egg_cycle Egg cycles] needed to hatch an [[Egg]] containing the Pokémon. | ||
+ | *Dimensions: These fields define scaling for the Pokémon's model. If changed, client-side database installation is required. | ||
+ | **POKEDEXHEIGHT: The height-wise scale of the Pokémon. | ||
+ | **POKEDEXWIDTH: The width-wise scale of the Pokémon. | ||
+ | **POKEDEXLENGTH: The length-wise scale of the Pokémon. | ||
+ | *POKEDEXWEIGHT: The weight of the Pokémon in kilograms. This affects the Pokémon's [[Pokédex]] entry and certain moves such as [[Low Kick]]. If changed, client-side database installation is required. | ||
+ | *POKEDEXDESCRIPTION: Unused. | ||
+ | *MALEPERCENT: The percentage chance of the Pokémon being male. -1 means that the Pokémon is genderless. | ||
+ | *CATCHRATE: The Pokémon's [[catch rate]]. | ||
+ | *RARITY: The relative rarity of the Pokémon when spawning naturally. -1 means that the Pokémon uses the [[Legendary Pokémon]] spawn rate and displays a message when the Pokémon spawns. | ||
+ | *SPAWNTIMEID: The [[spawn time]] of the Pokémon, using IDs from the [[Database editing#PIXELMONSPAWNTIMES|PIXELMONSPAWNTIMES]] table. | ||
+ | *MINGROUPSIZE: The minimum number of Pokémon that spawn in a group whenever the Pokémon spawns. | ||
+ | *MAXGROUPSIZE: The maximum number of Pokémon that spawn in a group whenever the Pokémon spawns. | ||
+ | *BASEEXP: A value used when calculating experience gained from defeating the Pokémon in battle. A higher BASEEXP causes the Pokémon to give more experience when defeated. | ||
+ | *EXPERIENCEGROUP: The rate at which the Pokémon's levels up from experience gained. More details can be found [http://bulbapedia.bulbagarden.net/wiki/Experience#Relation_to_level here]. | ||
+ | *Base stats: These fields define the Pokémon's base stats. | ||
+ | **BASEHP: The Pokémon's base HP. | ||
+ | **BASEATK: The Pokémon's base Attack. | ||
+ | **BASEDEF: The Pokémon's base Defense. | ||
+ | **BASESPATK: The Pokémon's base Special Attack. | ||
+ | **BASESPDEF: The Pokémon's base Special Defense. | ||
+ | **BASESPD: The Pokémon's base Speed. | ||
+ | *EV yield: These fields define the Pokémon's [[EV yield]]. | ||
+ | **EVGAINHP: The Pokémon HP EV yield. | ||
+ | **EVGAINATK: The Pokémon Attack EV yield. | ||
+ | **EVGAINDEF: The Pokémon Defense EV yield. | ||
+ | **EVGAINSPATK: The Pokémon Special Attack EV yield. | ||
+ | **EVGAINSPDEF: The Pokémon Special Defense EV yield. | ||
+ | **EVGAINSPD: The Pokémon Speed EV yield. | ||
+ | *MINSPAWNLEVEL: The minimum level that the Pokémon will spawn at. | ||
+ | *MAXSPAWNLEVEL: One level higher than the maximum level that the Pokémon will spawn at. If this value is the same as MINSPAWNLEVEL, the Pokémon will always spawn at MINSPAWNLEVEL. | ||
+ | *MODELSCALE: The amount to scale the Pokémon's model in all directions by. If changed, client-side database installation is required. | ||
+ | *Behavior: These fields define how often the Pokémon spawns with a certain behavior. The remainder of the time (100 - PERCENTTIMID - PERCENTAGRESSIVE), the Pokémon has a neutral behavior and ignores players outside of battle. | ||
+ | *PERCENTTIMID: The percent of the time that the Pokémon timid. This causes the Pokémon to attempt to move away from players when outside of battle. | ||
+ | *PERCENTAGRESSIVE: The percent of the time that the Pokémon is aggressive. This causes the Pokémon to approach and engage nearby players in battle. | ||
+ | *ISRIDEABLE: Whether the Pokémon can be [[mounted]]. | ||
+ | *CANFLY: If true, a rideable Pokémon becomes a flying mount. | ||
+ | *CANSWIM: If true, a rideable Pokémon becomes a water mount. | ||
+ | *DOESHOVER: This affects the Pokémon's animation. Do not modify this field. | ||
+ | *BASEFRIENDSHIP: The initial [[happiness]] that the Pokémon starts at after being captured. After being [[traded]], the Pokémon also resets to this happiness. | ||
+ | *FORM: The [[form index]] of the Pokémon. Do not modify this field. | ||
+ | ===PIXELMONHELDITEMS=== | ||
+ | This table is not currently used by Pixelmon. | ||
+ | ===SHOPITEMS=== | ||
+ | This table is not currently used by Pixelmon. [[Shopkeeper]] [[items]] are defined in the shopkeeper [[external JSON files]]. | ||
+ | ===SHOPKEEPERSITEMS=== | ||
+ | This table is not currently used by Pixelmon. [[Shopkeeper]] [[items]] are defined in the shopkeeper [[external JSON files]]. | ||
+ | ===SHOPKEEPERS=== | ||
+ | This table is not currently used by Pixelmon. [[Shopkeepers]] are defined in the shopkeeper [[external JSON files]]. | ||
+ | ===TRAINER=== | ||
+ | This table is not currently used by Pixelmon. [[NPC Trainers]] are defined in the [[NPC]] [[external JSON files]]. | ||
+ | ===TRAINERDROPS=== | ||
+ | This table is not currently used by Pixelmon. | ||
+ | ===TRAINERMESSAGES=== | ||
+ | This table is not currently used by Pixelmon. [[NPC Trainer]] dialogue is defined in the [[NPC]] [[external JSON files]]. | ||
+ | ===TRAINERPIXELMON=== | ||
+ | This table is not currently used by Pixelmon. [[NPC Trainer]] Pokémon are defined in the [[NPC]] [[external JSON files]]. |
Revision as of 19:20, 4 January 2017
Pixelmon uses an H2 database to store a variety of Pokémon data, including stats, moves, and spawn biomes. It is possible to edit the database to change these aspects.
Contents
- 1 Notes
- 2 Setting up a custom database
- 3 Editing database tables
- 4 Tables
- 4.1 ABILITIES
- 4.2 BADGES
- 4.3 BIOMES
- 4.4 CUSTOM_DROPS
- 4.5 CUSTOM_MESSAGES
- 4.6 CUSTOM_TEAMMEMBERS
- 4.7 CUSTOM_TRAINER
- 4.8 EGGGROUPS
- 4.9 HMREQUIREMENTS
- 4.10 MOVEANIMATIONS
- 4.11 MOVECATEGORIES
- 4.12 MOVEEFFECTS
- 4.13 MOVES
- 4.14 PIXELMON
- 4.15 PIXELMONHELDITEMS
- 4.16 SHOPITEMS
- 4.17 SHOPKEEPERSITEMS
- 4.18 SHOPKEEPERS
- 4.19 TRAINER
- 4.20 TRAINERDROPS
- 4.21 TRAINERMESSAGES
- 4.22 TRAINERPIXELMON
Notes
Before attempting to edit the database, there are a few notes to keep in mind.
- Knowledge of SQL is not required to edit the database because the default H2 console GUI has a visual editor that provides the functionality of simpler SQL commands. However, knowledge of relational databases will provide a significant advantage in understanding the Pixelmon database structure, and knowing how to construct SQL queries will allow data to be manipulated much more easily.
- This guide uses the default H2 console to edit the database. It is possible to use other database editors such as SQuirreL SQL, but this guide will not include any features and installation steps for these alternate editors.
- Most database modifications only need to be done server-side. However, certain fields in the database are used client-side; if editing these fields, the custom database should be provided to players on the server to install client-side. If a field is used client-side, it will be mentioned as such.
- This guide assumes that the database is being modified for a server. However, it is also possible to modify the database on singleplayer by following similar steps.
Setting up a custom database
- If you haven't already, run the server with Pixelmon installed in order to generate a "database" folder in the root Minecraft directory.
- In the root Minecraft directory, create a "customdatabase" folder.
- Copy the "Pixelmon2.h2.db" file from the "database" folder to the "customdatabase" folder.
- In the database folder, run the "h2-<numbers>.jar" file. This will open a window in your internet browser with the H2 console.
- In the "JDBC URL" text box, put "jdbc:h2:" followed by the full file path to the "Pixelmon2.h2.db" file inside the "customdatabase" folder. Include a slash at the beginning of the path, and omit the ".h2.db" extension from the file name (i.e., just use "Pixelmon2"). Leave the "User Name" and "Password" fields blank.
- Click the "Connect" button.
- You should see a screen similar to the image below. Make sure that you can see a list of database table names on the left sidebar; if you cannot, you did not connect to the database correctly.
Editing database tables
Note: If you know how to use SQL queries to edit the database, you can skip this section.
- To view a table, click on its entry in the left sidebar.
- To edit a table after viewing it, scroll to the bottom of the table and click the "Edit" button.
- To edit an existing row, click the
icon in the row you want to edit. The row's values will become editable text boxes. Again, click the
icon on the left to save the row, or click the
icon to cancel the modification.
- To delete a row, click the
icon on the left of the row you want to delete.
Tables
Table | Used | Can edit | Can add | Can delete |
---|---|---|---|---|
ABILITIES | Yes | No | No | No |
BADGES | No | N/A | N/A | N/A |
BIOMES | No | N/A | N/A | N/A |
CUSTOM_DROPS | No | N/A | N/A | N/A |
CUSTOM_MESSAGES | No | N/A | N/A | N/A |
CUSTOM_TEAMMEMBERS | No | N/A | N/A | N/A |
CUSTOM_TRAINER | No | N/A | N/A | N/A |
EGGGROUPS | Yes | No | No | No |
HMREQUIREMENTS | No | N/A | N/A | N/A |
MOVEANIMATIONS | No | N/A | N/A | N/A |
MOVECATEGORIES | Yes | No | No | No |
MOVEEFFECTS | No | N/A | N/A | N/A |
MOVES | Yes | Yes | No | No |
PIXELMON | Yes | Yes | No | No |
PIXELMONDROPS | Yes | Yes | Yes | Yes |
PIXELMONEGGSKILLS | Yes | Yes | Yes | Yes |
PIXELMONEVOLUTIONS | Yes | Yes | Yes | Yes |
PIXELMONFLY | Yes | Yes | Yes | No |
PIXELMONHELDITEMS | No | N/A | N/A | N/A |
PIXELMONLEVELSKILLS | Yes | Yes | Yes | Yes |
PIXELMONRIDE | Yes | Yes | Yes | No |
PIXELMONSPAWNBIOMES | Yes | Yes | Yes | Yes |
PIXELMONSPAWNLOCATIONS | Yes | Yes | Yes | Yes |
PIXELMONSPAWNTIMES | Yes | Yes | Yes | No |
PIXELMONSWIM | Yes | Yes | Yes | No |
PIXELMONTMHMSKILLS | Yes | Yes | Yes | Yes |
PIXELMONTRADES | Yes | Yes | Yes | Yes |
PIXELMONTUTORSKILLS | Yes | Yes | Yes | Yes |
SHOPITEMS | No | N/A | N/A | N/A |
SHOPKEEPERITEMS | No | N/A | N/A | N/A |
SHOPKEEPERS | No | N/A | N/A | N/A |
TRAINER | No | N/A | N/A | N/A |
TRAINERDROPS | No | N/A | N/A | N/A |
TRAINERMESSAGES | No | N/A | N/A | N/A |
TRAINERPIXELMONPOOL | No | N/A | N/A | N/A |
TRAINERSPAWNBIOMES | Yes | Yes | Yes | Yes |
TRAINERTYPES | Yes | No | Yes | No |
TYPES | Yes | No | No | No |
ABILITIES
This table assigns numerical IDs to all Abilities. This table should not be modified.
BADGES
This table is not currently used by Pixelmon.
BIOMES
This table is not currently used by Pixelmon. Spawn biomes are defined directly in PIXELMONSPAWNBIOMES.
CUSTOM_DROPS
This table is not currently used by Pixelmon.
CUSTOM_MESSAGES
This table is not currently used by Pixelmon.
CUSTOM_TEAMMEMBERS
This table is not currently used by Pixelmon.
CUSTOM_TRAINER
This table is not currently used by Pixelmon.
EGGGROUPS
This table assigns numerical IDs to all Egg Groups. This table should not be modified.
HMREQUIREMENTS
This table is not currently used by Pixelmon.
MOVEANIMATIONS
This table is not currently used by Pixelmon.
MOVECATEGORIES
This table assigns numerical IDs to all move categories. This table should not be modified.
MOVEEFFECTS
This table is not currently used by Pixelmon. Move effects are defined directly in the MOVES table.
MOVES
This table contains data about all moves in Pixelmon. Existing moves should not be removed, and new moves should not be added.
- MOVEID: The numerical ID of the move. Do not modify this field.
- NAME: The English name of the move, which is referenced in Pixelmon's code and used to obtain the translated name of the move. Do not modify this field.
- TMID: The move's TM number, or null if the move is not a TM. Do not modify this field.
- HMID: The move's HM number, or null if the move is not an HM. Do not modify this field.
- TYPEID: The ID of the move's type, corresponding to the ID in the TYPES table.
- MOVECATEGORYID: The ID of the move's move category, corresponding to the ID in the MOVECATEGORIES table. If changed, client-side database installation is required.
- POWER: The move's base power, or null if the move has no base power. If changed, client-side database installation is required.
- ACCURACY: The move's base accuracy, or null if the move does not use accuracy checks. If changed, client-side database installation is required.
- PP: The move's base PP. If changed, client-side database installation is required.
- PPMAX: Unused.
- EFFECT: The move's additional effect. Semicolons can be used to separate multiple effects on one move, while colons are used to pass arguments into an effect. New effects cannot be added. A list of possible effects can be seen by entering the following query:
SELECT DISTINCT EFFECT FROM MOVES ORDER BY EFFECT
- MAKESCONTACT: Whether the move makes contact with its target, triggering effects from sources such as Static and Rocky Helmet.
- Targeting data: These fields define data about move targeting in double battles. If changed, client-side database installation is required.
- HITSALL: Whether the move hits all of its possible targets at once.
- HITSOPPOSITEFOE: Whether the move can target the opponent directly opposite of the user.
- HITSADJACENTFOE: Whether the move can target opponents adjacent to the user.
- HITSEXTENDEDFOE: Unused.
- HITSSELF: Whether the move can target the user.
- HITSADJACENTALLY: Whether the move can target the user's partner.
- HITSEXTENDEDALLY: Unused.
- DESCRIPTION: Unused.
- ATTACKANIMATIONS: Unused.
- TUTORTYPE: Whether the move is a tutor move (1), an event tutor move (2), or not a tutor move (null).
PIXELMON
This table contains data about all Pokémon in Pixelmon, along with unimplemented Pokémon up to Generation 6. Pokémon should not be added or removed from this table.
- PIXELMONID: The Pokémon's numerical ID. Do not modify this field.
- NATIONALPOKEDEXNUMBER: The Pokémon's Pokédex number. Do not modify this field.
- PIXELMONFULLNAME: The Pokémon's unlocalized species name, used in Pixelmon code and for translation. Do not modify this field.
- PIXELMONNAME: Unused.
- Types: These fields define the Pokémon's types using IDs from the TYPES table. If changed, client-side database installation is required.
- PIXELMONTYPE1ID: The Pokémon's primary type.
- PIXELMONTYPE2ID: The Pokémon's secondary type, or null if the Pokémon only has one type.
- Abilities: These fields define the Pokémon's Abilities using IDs from the ABILITIES table. If changed, client-side database installation is required.
- ABILITY1ID: The Pokémon's first Ability.
- ABILITY2ID: The Pokémon's second Ability, or null if the Pokémon only has one normal Ability.
- ABILITYHIDDENID: The Pokémon's hidden Ability, or null if the Pokémon has no hidden Ability.
- Egg Groups: These fields define the Pokémon's Egg Groups using IDs from the EGGGROUPS table.
- EGGGROUP1ID: The Pokémon's first Egg Group.
- EGGGROUP2ID: The Pokémon's second Egg Group, or null if the Pokémon only has one Egg Group.
- EGGCYCLES: The number of Egg cycles needed to hatch an Egg containing the Pokémon.
- Dimensions: These fields define scaling for the Pokémon's model. If changed, client-side database installation is required.
- POKEDEXHEIGHT: The height-wise scale of the Pokémon.
- POKEDEXWIDTH: The width-wise scale of the Pokémon.
- POKEDEXLENGTH: The length-wise scale of the Pokémon.
- POKEDEXWEIGHT: The weight of the Pokémon in kilograms. This affects the Pokémon's Pokédex entry and certain moves such as Low Kick. If changed, client-side database installation is required.
- POKEDEXDESCRIPTION: Unused.
- MALEPERCENT: The percentage chance of the Pokémon being male. -1 means that the Pokémon is genderless.
- CATCHRATE: The Pokémon's catch rate.
- RARITY: The relative rarity of the Pokémon when spawning naturally. -1 means that the Pokémon uses the Legendary Pokémon spawn rate and displays a message when the Pokémon spawns.
- SPAWNTIMEID: The spawn time of the Pokémon, using IDs from the PIXELMONSPAWNTIMES table.
- MINGROUPSIZE: The minimum number of Pokémon that spawn in a group whenever the Pokémon spawns.
- MAXGROUPSIZE: The maximum number of Pokémon that spawn in a group whenever the Pokémon spawns.
- BASEEXP: A value used when calculating experience gained from defeating the Pokémon in battle. A higher BASEEXP causes the Pokémon to give more experience when defeated.
- EXPERIENCEGROUP: The rate at which the Pokémon's levels up from experience gained. More details can be found here.
- Base stats: These fields define the Pokémon's base stats.
- BASEHP: The Pokémon's base HP.
- BASEATK: The Pokémon's base Attack.
- BASEDEF: The Pokémon's base Defense.
- BASESPATK: The Pokémon's base Special Attack.
- BASESPDEF: The Pokémon's base Special Defense.
- BASESPD: The Pokémon's base Speed.
- EV yield: These fields define the Pokémon's EV yield.
- EVGAINHP: The Pokémon HP EV yield.
- EVGAINATK: The Pokémon Attack EV yield.
- EVGAINDEF: The Pokémon Defense EV yield.
- EVGAINSPATK: The Pokémon Special Attack EV yield.
- EVGAINSPDEF: The Pokémon Special Defense EV yield.
- EVGAINSPD: The Pokémon Speed EV yield.
- MINSPAWNLEVEL: The minimum level that the Pokémon will spawn at.
- MAXSPAWNLEVEL: One level higher than the maximum level that the Pokémon will spawn at. If this value is the same as MINSPAWNLEVEL, the Pokémon will always spawn at MINSPAWNLEVEL.
- MODELSCALE: The amount to scale the Pokémon's model in all directions by. If changed, client-side database installation is required.
- Behavior: These fields define how often the Pokémon spawns with a certain behavior. The remainder of the time (100 - PERCENTTIMID - PERCENTAGRESSIVE), the Pokémon has a neutral behavior and ignores players outside of battle.
- PERCENTTIMID: The percent of the time that the Pokémon timid. This causes the Pokémon to attempt to move away from players when outside of battle.
- PERCENTAGRESSIVE: The percent of the time that the Pokémon is aggressive. This causes the Pokémon to approach and engage nearby players in battle.
- ISRIDEABLE: Whether the Pokémon can be mounted.
- CANFLY: If true, a rideable Pokémon becomes a flying mount.
- CANSWIM: If true, a rideable Pokémon becomes a water mount.
- DOESHOVER: This affects the Pokémon's animation. Do not modify this field.
- BASEFRIENDSHIP: The initial happiness that the Pokémon starts at after being captured. After being traded, the Pokémon also resets to this happiness.
- FORM: The form index of the Pokémon. Do not modify this field.
PIXELMONHELDITEMS
This table is not currently used by Pixelmon.
SHOPITEMS
This table is not currently used by Pixelmon. Shopkeeper items are defined in the shopkeeper external JSON files.
SHOPKEEPERSITEMS
This table is not currently used by Pixelmon. Shopkeeper items are defined in the shopkeeper external JSON files.
SHOPKEEPERS
This table is not currently used by Pixelmon. Shopkeepers are defined in the shopkeeper external JSON files.
TRAINER
This table is not currently used by Pixelmon. NPC Trainers are defined in the NPC external JSON files.
TRAINERDROPS
This table is not currently used by Pixelmon.
TRAINERMESSAGES
This table is not currently used by Pixelmon. NPC Trainer dialogue is defined in the NPC external JSON files.
TRAINERPIXELMON
This table is not currently used by Pixelmon. NPC Trainer Pokémon are defined in the NPC external JSON files.