M3 Tile Editor


Download link




Introduction:

A quick overview of what maps are before I focus on the tile editor. All maps in the m3 engine are built out of Tiles. Each tile, as is quite obvious, is a small rectangle that contains data. The visible data to players is quite simple, the frame displayed, or frames.

But theres more, tiles in the M3 engine have the following feature:

Support for multiple frames per tile, up to 255.

Configurable minimum and maximum delay between frame animations.

-Note: Frames can now use different parts of the same image, I.E you can have a large image from which you can make several frames, each taking a different part of the image.

Support for different tile sizes.

-Note: currently fixed to 16x16 but this is trivial to change if there is request for this.

-Support for multiple tile settings, such as:


-Support for vehicles types, such as whether they can drive or park on top of the tile.

Note: There are currently 8 vehicle types: Cars,Boats,Ships,two types of Airships(Airship1,Airship2) and three custom(Custom1 to Custom3) vehicle types.

-Support for damage if stepping on the tile.

-Support for different frequencies of battle on this tile.

-Notation whats the preferred background for battles occurring on this tile.


Now, several technical notes:


Important note: This version is beta, try it, play around with it, but stuff might change. Hopefully only for the better, but for all we know, the entire setup is currently not useful and we'll have to rewrite this.


Important note 2: If the program crashes, please pretty please tell me what you were doing, as much as you can remember, and send me an email at Acepace@libriumarcana.com

Missing features:

Right now, since this is a 0.5, theres quite a bit of stuff missing.

  1. Advance image support, this is coming, might even come in a few hours of this release.

  2. Help system.

  3. Built in help system so you don't have to use stupid help programs/files.

  4. Serious error checking. The editor currently checks that you don't input letters where there should not be letters, but it doesn't really tell you. Also it doesn't check if you input stuff thats way out of bounds.


Technical data:

If anyone wants to extend this program, please do so, or create their own.

Currently, the file format is as follows:


-4 bytes giving us a magic number, which is currently 'M' '3' 'T' 1. This is for versioning.

-A byte giving the number of frames.

-After this, each frames follows in the following format:

  1. A string containing the filename/file path of the frame image.

  2. An Int16 containing the minimum wait between frame animations.

  3. An Int16 containing the maximum wait between frame animations.

  4. An Int16 containing the starting X coordinate of the frame inside the image.

  5. An Int16 containing the starting Y coordinate of the frame inside the image.

  6. A byte containing the width of the frame inside the image.

  7. A byte containing the height of the frame inside the image.

-A byte containing bit flags regarding what vehicle types can drive on this tile.

-A byte containing bit flags regarding what vehicle types can park on this tile.

Note: The order of the vehicles in the bit flags is according to data provided in the start of these notes.

-A byte containing bit flags regarding tile properties in the following format:

-An Int16 containing the damage that occurs if the player steps on the tile.

-A byte containing the battle frequency on this tile.

Note: Battle frequency is calculated thus:

A Battle counter is randomly created. Each step decrease the battle frequency number from that counter. when it is <=0, a battle occurs.

Or in code:

start_over:

battleCounter = random(0, 255);

on each step:

battleCounter -= tile.battleFrequency;

if(battleCounter <= 0){

fight();

goto start_over;

}

goto on_each_step:

-A string containing the filename/File Path for the background to be used in event of battle.