Pokegame allows you to easily create your own 'projects', your own game content, in which you can decide maps, NPCs, texts, wild Pokémon, and just about everything else you may encounter. Below is the content of the file that describes how you create those.
This text comes from that in the game's distribution. That one will always be more up to date to this one. For the most reliable information, check that file.
* POKéGAME *
* Project Creation *
* Documentation *
* Version 0.1 *
* Jeroen te Strake *
 Project Index
 Map file
 Map Array
 Event file
 Map tiles bmp
Pokegame is a customizable Pokémon game engine, currently using a GSC battle engine. The actual description can be found in the zip file the whole game should have come in.
In this document, the way these projects, the game's files that determine what you are actually playing, are set up is explained. It may not be very clear - I'm not that good at writing introductions - but if you've got any questions, you can ask at the PKMN.NET forums at http://pkmn.net/forums/
Since this is a beta, and thus a work in progress, there are probably still bugs and other problems. Although all the standard features from Pokémon Red, Blue, Yellow, Gold, Silver and Crystal are still a work in progress, and some more enhancements are planned, there may be more you desire. Feel free to send me a bug report or feature request at firstname.lastname@example.org , or by contacting me through the forum given above. I may have fixed something already, may already plan to implement something, or have done so, but you might also bring something to my attention. Do NOT send me messages of something not yet working, because this is an early beta, there are still many things to be done, and it will be implemented eventually.
The newest version of the game and this file will always be found on PKMN.NET/Pokémon UK : http://pkmn.net/
Jeroen te Strake
Each file starts with a version number. This is to check internally what should and should not be expected in the file, and whether it should even be used, or is too outdated to be of use. Keep it at the one mentioned in this file, and all should be okay.
Most values are defined like:
The all-caps word gives the name of the value, and after the '=' sign, there is the value. The all-caps word is used to keep things readable, and to make sure the file is correct. Replace the '#' with the wanted number.
Usually, the order of how things are included is important. If it isn't, it is mentioned here specifically.
References to tiles on a map are zero-based. In other words, the first row or column is 0, the second 1, and so on.
You can use flags to influence dialog choice, whether events show up, whether you can get certain items (again), and more. A flag that you set or that you check for is identified by three numbers.
The first number identifies the exact flag, and what should be done with it:
0-254: These are the actual flags. Each of these contains 32 flags (identified by the second number, which is between the 0 and 31 inclusive). For flags that are to be set: 1 sets them, 0 unsets them. For checks: 0 returns TRUE if the flag is unset, 1 returns TRUE if the flag is set.
255-258: These refer to a value; an integer that can hold a certain value. There are 513 (0-512) of these, and the first number does not matter - in other words, 255,1,1 and 256,1,1 would both refer to a specific value (1 in this case), but only do different things on it. For flags to be set: 255 sets the value to that of the third number, 256 increases the value by that of the third number, and 257 decreases it. 258 is unused here. For checking them: 255 returns TRUE if the value is equal to the third number, 256 returns TRUE if the value is greater than the third number, 257 returns TRUE if the value is lower than the third number, and 258 returns TRUE if the value is not equal to the third number.
In text blocks, the text
DESCRIBED VERSION: 1
This file must always be in the same directory as the pokegame executable with this name, and thus, only one may be present. This is where all the availabe projects are listed, and which is read to determine the first information about them.
INDEXCOUNT=# : This accepts only a numerical parameter, which must be equal to the number of projects in the file (and thus, should be increased by one for every project you add).
INDEX=# (...) END INDEX: The remainder of the file is between these blocks. Each describes one project. The number behind index should be increased by one each time.
NAME= : This accepts a text string as parameter. It's the name used and shown for the project.
DESCRIPTION= : The description that will be shown in the project dialog box.
CREATOR= : Your name, of the creator of the project.
PROJECTDIR= : The directory that contains the datafiles for the project. This should obviously be unique. You are allowed to use additional directory names when listing files, but all are assumed to be read from this directory.
PROJECTDATA= : This is the file that contains the index for the project. URL= : An URL associated with the project, of your own choosing. Can be mailto, http or others. Pick what you want, it's just a personal thing. It is currently not clickable, but may be in the future.
 Project Index
DESCRIBED VERSION: 1
Each project must have one, and no more than one Project index file, named in the PROJECTDATA= line of the gameindex. After the version identifier, the whole data must be contained between a BEGIN PROJECT... END PROJECT block.
STARTMAP= : The filename of the map file that the player should start at when beginning the game.
STARTY=# : These two determine the starting position on the map of the player.
FACING=# : The way the player faces when starting the game. (1 is up, 2 is right, 3 is down, 4 is left).
ENGINE=# : This determines the battle engine used in the game (1 is RBY, 2 is Stadium 1, 3 is Gold/Silver, 4 is Crystal, 5 is Stadium 2). This is currently ignored because I'm still implementing the engine and don't have time for adding deviations yet. Crystal is the current default.
STARTPKMN=# : The Pokemon the player starts with. Will be removed in the future so that it can be chosen while playing the game (like at the Professor) or in a startup script, but is available for testing now.
 Map file
DESCRIBED VERSION: 1
This file describes general information about a map. One of these should exist for every map. After the version identifier the whole data must be contained in a BEGIN MAP..END MAP block.
MAPNAME= : The name of the map. This does not need to be unique, and is used for when it needs to be named: "XX was caught at level YY on MAPNAME", popups when entering a place, and checking for happiness increases when battling on the route a Pokemon is 'caught' on.
MAPARRAY= : The filename for the map array file.
EVENTFILE= : The filename for the events file for this map.
BEGIN WILDMONS... END WILDMONS : In this block, all the information for wild Pokemon is contained.
WILDDENSITY: You have a WILDDENSITY-in-1 chance that you encounter a wild Pokemon. Set to zero to disable wild Pokemon for this map.
BEGIN DAY.. END DAY, BEGIN NIGHT.. END NIGHT, BEGIN MORN.. END MORN: This describes the catchable wild Pokemon during the day (12:00-18:00), night (18:00-6:00) and morning (6:00-12:00). These are seven pair where the first number gives the number for the Pokemon, and the second the level. The chances to find each one are (in order) 30%, 30%, 20%, 10%, 5%, 4%, 1%.
BEGIN OLDROD.. END OLDROD: As above, but when fishing with an Old Rod. Chances: 70%, 15%, 15%
BEGIN GOODROD.. END GOODROD: As above, but when fishing with a Good Rod. Chances: 35%, 35%, 20%, 10%
BEGIN SUPERROD.. END SUPERROD: As above, but when fishing with a Super Rod. Chances: 40%, 30%, 20%, 10%
BEGIN SURF.. END SURF: As above, but when surfing. Chances: 60%, 30%, 10%
BEGIN ROCKSMASH.. END ROCKSMASH: As above, but when using Rock Smash. Chances: 90%, 10%
BEGIN HEADBUTT1.. END HEADBUTT1, BEGIN HEADBUTT2.. END HEADBUTT2: As above, but when using Headbutt. Headbutt 1 is used with 90% of the trees, Headbutt 2 with 10% of the trees (depending on a few formulae, which haven't been implemented yet). Chances for Headbutt 1: 65%, 15%, 15%, 5%. Chances for Headbutt 2: 50%, 30%, 15%, 5%
 Map array
DESCRIBED VERSION: 1
This file describes the looks of a map, and part of its behaviour. They do not need to be unique for each map, and can be easily reused for similar places, like Pokecentres, Pokemarts, and general houses, by simply using a different event file. It also describes generic properties of some tiles, so that they do not have to be redefined for every single occurence, like headbuttable and cuttable trees. After the version identifier, the data must be contained ina BEGIN MAP..END MAP block.
TILES= : This gives the filename of the tiles bmp file.
BLOCKWIDTH=# : These give the height and width of the tiles. These can be any value, but it's recommended to keep it at 31 or 32, since the sprite width of 31 (which really should be 32) is hardcoded in. The sprite size hardcodings will be removed in the future, at which point it should be the same as BLOCKHEIGHT and BLOCKWIDTH.
BEGIN BLOCKSTRUCT..END BLOCKSTRUCT : This describes the individual tiles. You must use the same order as you use in the TILES BMP file here, since these are matched up together.
BLCKSTRCTCNT=# : The number of tiles used.
After this, the blockstructure itself follows. This starts with a zero, so the last should have a number one less than the BLCKSTRCTCNT.
Each line consists of seven numbers. The first is the number of the tile (this is zero-based again, so the first is tile '0'!). The second gives the blocktype. 0: Normal, 1: Water (needs Surf to pass, can be fished) 2: Grass (you can encounter wild Pokemon here - use for all cave tiles), 3: Waterfall (needs Surf and Waterfall to pass) 4: Ledge (You'll automatically move on to the next tile. Should be impassible from all other side - this is currently not functional and will require further testing.).
The third gives the blockevent. 0: None, 1: Headbutt, 2: Cut, 3: Rock Smash, 4: Strength (May become an event instead, because it changes position), 5: Whirlpool. This list is not yet definite!
The last four described whether the tile can be entered or left in a certain direction - if it is 1, you are blocked. It is in the order up, right, down, left. Note that the list needs to end with a comma!
BEGIN MAPARRAY..END MAPARRAY: In this block, the actual looks of the map are described.
MAPARRAYX=# : The number of tiles in the X and Y direction.
After this, a large block describing the map through tile numbers is described. I use 'Mappy' for this, http://www.tilemap.co.uk/mappy.php - use the GB header export option (not sure of the exact name) to export a file which also contains part of this structure. Note that each line needs to end with a comma!
 Event files
DESCRIBED VERSION: 1
The event file is probably the most important part of making a game. Here, you define NPCs, trainers, teleports and more. It is seperate because that allows you to reuse them (Pokecentres and the like, perhaps, and maps that change looks after you do something), and because it is read more extensively during gameplay.
Because this file is still being developed, some details may be changed in the future, and more things will be added.
Again, start with a version identifier. The remainder of the events are contained in a BEGIN EVENTS...END EVENTS block.
IMAGES= : To minimize memory usage, the images you wish to use for events need to be determined beforehand. The number of images you use are defined here. This must contain an integer between 0 and 50.
EVENTIMAGE#= : Replace # with the number of the image, starting at 1, and going on until the value of IMAGES= . This gives the filename of the image.
EVENTCOUNT= : The number of events
EVENT= ... END EVENT : In this block, we describe an event. This can be repeated as often as possible.
EVENTY= : The X- and Y-coordinates of the event.
FLAG= : If this flag evaluates as TRUE, the event shows up.
SPRITETYPE= : This determines the looks etc of the sprite, and what images we can expect. It also determines the next few entries.
* SPRITETYPE=0 : Event does not show up (transparent). No following entries.
* SPRITETYPE=1 : Event image has only one image, so it always looks the same. Followed only by an IMAGEID= , which gives the number of the eventimage to use. Use this for, for example, itemballs.
* SPRITETYPE=2 : Event image has four images, looking up, down, left and right. Followed by a FACING= , indicating the event's initial facing direction, and an IMAGEID= , which gives the number of the event image to use. Use this for non-walking trainers and other NPCs.
TRIGGER= : This is again for all spritetypes. This determines what will cause the event to run. Currently valid are 1, talk to (use the spacebar), and 3, walk over it. For the future, 2: Walk up to you and talk (trainers) are planned.
MOVING= : Whether and how the sprite moves: 0, always look the same and 1, turn around (spin) in the same spont. For future implementation: 2, walk randomly.
MOVECHANCE: Every 0.5 seconds, we check whether an event should turn, and every 2 seconds, we check whether a sprite should move. Every time this is done, the sprite has a 1 in MOVECHANCE+1 chance of turning/moving.
EVENTTYPE= : This determines what the event does. The remainder of an event entry depends on the value of this. The event always faces the player if SPRITETYPE is higher than or equal to 2.
* EVENTTYPE=1 : Only tells you some text. This is followed by a block of text between START TEXT EVENT...END TEXT markers. Four lines are displayed per screen before spacebar needs to be pressed, and these can be set apart through line breaks, and are automatically broken after 40 characters.
* EVENTTYPE=2 : 'Teleports' you to a different map. This is followed by a TELEPMAP= : The map file you want to teleport the character to, TELEPX= and TELEPY= : The coordinates on the new map you should teleport to.
* EVENTTYPE=3 : A 'basic' trainerbattle. There is no support yet for different trainers, an initial trainer image, or money given out. Followed by:
+++ TRNRFLAG= : A flag that is checked to see whether the trainer has been battled, and to use to set once the trainer has been battle. It is advisable you only use bitflags for this.
+++ TRAINERNAME= : The name of the trainer.
+++ START TEXT BEFOREBATTLE...END TEXT : The text that the trainer should say before the battle.
+++ TRAINERMON= : A set of twelve number, set in pairs of Pokémon and level. Once no more Pokémon should be added, continue with zeroes. Movesets etc are automatically generated.
+++ START TEXT AFTERBATTLE...END TEXT : The text that the trainer should say once you defeat him (still on the battle screen).
+++ START TEXT DEFEATED...END TEXT : The text the trainer should say when you talk to him after you already defeated him.
* EVENTTYPE=4 : Giftitem that is automatically given when activated, without any text except a XXX picked up YYY. Followed by GIVEITEM= : The item that should be given. (See list of to be released, or test) in the category, specific item format; and SETFLAG= : The flag that should be set once the item has been given.
* EVENTTYPE=5 : Gives an item with some text before and some when given. Followed by GIVEITEM= (as above), FLAG= : The flag to be checked and set; START TEXT BEFOREGIFT...END TEXT: The text to be said before the item is given; START TEXT AFTERGIFT...END TEXT: The text to be said after the item is given.
* EVENTTYPE=6 : These are more complicated events. The above are more efficient and faster in parsing, optimizing common events, and should thus be used in those cases (and the events will be expanded to suit more common events), but sometimes, more complicated things are required, like with gym leaders or those that make large changes to a map. In those cases, you can use this eventtype, which allows for a greater number of options and for flexibility at the cost of speed. All of the following blocks can be used in any order desired, as long as the block itself is set up correctly. THIS EVENT IS A RECENT IMPLEMENTATION, AND ALTHOUGH I EXPECT IT TO WORK, ODDITIES MAY OCCUR. PLEASE SEND ME A BUGREPORT IF THIS IS THE CASE.
+++ START TEXT STANDARD...END TEXT : Starts a standard text as in EVENTTYPE=1
+++ REST : Makes the game do nothing for 0.5 seconds. Can for example be used to give the player time to look at something.
+++ START TELEPORT : Is NOT followed by an 'END TELEPORT'. Teleports to a new map, as with EVENTTYPE=2
+++ SETFLAG= : Sets a flag.
+++ GIVEITEM= : Gives the player an item.
+++ More to follow...
* More to follow..
 Map tiles bmp
This is very simple - they're just all the tiles on a long line. If you use Mappy to create your map, as above, it can also easily export this file at the same time. Make sure the images all end up on one line then.
This is how most sprites are described. They are a number of tiles on a row. <
0: The first tile is ignored and is best left empty
1: The next is the sprite looking up.
2: The sprite looking to the right.
3: The sprite looking down.
4: The sprite looking to the left.
5: The sprite stepping up.
6: The sprite stepping to the right.
7: The sprite stepping down.
8: The sprite stepping to the left.
9: Cycle standing still facing up
10: As above, but to the right
11: As above, but down
12: As above, but to the left.
13: Cycling up
14: Cycling to the right
15: Cycling down
16: Cycling to the left
17: Surfing standing still, facing up
18: As above, but to the right
19: As above, but down
20: As above, but to the left.
21: Fishing looking up
22: Fishing looking right
23: Fishing looking down
24: Fishing looking to the left.
25: A one-frame flying animation. May be removed or changed in the future.
For stepping animations, it is recommended you do not mirror, and make the character step using the same foot each time - it will be internally mirrored in the future to make the walking less monotonous.
Note that the player's initial sprite needs to be named 'sprites.bmp'.
Pokegame, this file, the various included sample projects, and other files included in the distribution are Copyrighted (C) 2003-2004 Jeroen te Strake unless mentioned otherwise. Pokémon and all related names and characters are Copyrighted (C) by and a Registered Trademark of Nintendo, Creatures and Game Freak.
Page written by Psythor.
Digg this! | del.icio.us | Reddit | Stumble Upon | Facebook
There are currently 0 comments on this story... you could be first!