Eschalon Savefile EditorMain | Installation | Usage | Mapping Information | Screenshots (character) | Screenshots (maps) |
Some of how Eschalon's map files are used may not be immediately obvious, so I figure I'll enumerate some points here.
Eschalon keeps all its global maps in the "data" directory of the folder where it was installed. Once your character enters a new map, the game engine loads in that global map file and from that point on only uses that new copy of the map, which is the version that's saved in your savegame folder when you save the game. The format of the global map files and the savegame map files is slightly different, in the following two ways:
For entities, the global map files only specify the type of creature, its facing direction, and a script to execute when the entity is killed. Savegame maps add in a number of other values such as entity friendliness (NPCs are set to "1", monsters to "0"), health level, and a few other values.
For containers like chests and bags, the global map files only specify a single string for the item contents. The savegame map files specify a full item structure for each slot.
Because of these differences, our utility won't let you save a global map file as a savegame map file, and vice-versa. If you load in a global map file, it will remain one when you save it. You can see what kind of map you've loaded from inside the "Map Properties" dialog (also the path shown in the bottom status bar will probably be informative enough).
The map names for the main "outisde" area of Eschalon are named with a two-digit number which corresponds to where the map is placed. The first digit is the y-coordinate (or row), and the second is the x-coordinate (or column). 11.map, if it existed, would be the upper-left-hand corner, and 55.map, if it existed, would be the lower-right-hand corner. The first map your character starts out in is 35.map. The various dungeon level names are, for the most part, pretty obvious. Here's an index of the numbered maps:
- 14 - Barrier Range Region
- 15 - Northeast Thaermore
- 22 - Vela
- 23 - Baron's Thicket
- 24 - Northern Tangletree Forest
- 25 - North Parish
- 32 - Blackwater Region
- 33 - Western Tanglewood
- 34 - Central Tangletree Forest
- 35 - South Parish
- 41 - Rotwood
- 42 - Northern Crakamir
- 43 - Northeastern Crakamir
- 44 - Western Salted Coast
- 45 - Eastern Salted Coast
- 51 - Western Crakamir
- 52 - Eastern Crakamir
- 53 - The Gulf of Madria
There's not much to say about the basic tile attributes, actually. There's one unknown value in the "Main Attributes" tab, but I believe it's always been zero for every tile I've ever loaded in.
As mentioned above, if you're editing a global map file, you'll only be able to edit entity type, orientation, and a post-death script. Savegame files will have extra information like friendliness and health, and a few other values. For the most part, I recommend leaving those other values alone. Two of them I've never seen set to anything other than zero, one appears to get set automatically by the game engine regardless of what you had in there, and the other seems to be either 1 or 0, but I've yet to find any pattern for it.
One value found in a savegame file is, for some reason, the initial starting location of the entity, when the map was first loaded. This value is simply the number of the tile, if you start counting at the upper-left and go left-to-right, top-to bottom. I'm not sure why it's stored, but it's best to just leave it alone. The map editor will populate this automatically when you add a new entity.
The "Friendly?" flag is zero for enemies, 1 for NPCs, and 2 for NPCs who are attacking you (having witnessed you commit a crime, for instance).
If you want to add new monsters to the game without worrying all the extra values, the best way to do so would be to edit the global map files before your character enters the map. That way, when the game loads the global file, the engine will populate those values in ways that seem appropriate.
As I mention on the Entity tab itself, there are six NPCs who can ONLY face North. If you add one of these facing any other direction, or something in the game causes them to turn, Eschalon will crash. So be careful about that.
Entities added with zero health are "stuck" on the board and can't be attacked, so make sure to give new entities at least 1 health, if you're adding to savegame files.
I used to call these "scripts," and internally my code still refers to them as such, but "object" makes much more sense as a name.
There are actually two related values here: an Object Type and an actual Object. Most object types require an associated object to be defined, and some don't. Here's a list of the types which do require an object:
- 1 - Containers with no open/close difference (open barrels, hives, spider egg sacs, coffins, etc)
- 2 - Corpse Containers (chance of disease when examining)
- 3 - Containers with open/close differences (chests, dressers, etc)
- 4 - There's just one single cabinet in the entire game which uses this, in 25_crypt. It'd be best to not use this value
- 5 - Doors
- 6 - Map Links (for cave exits, etc)
- 7 - Wells, Levers, and other misc items
- 9 - Signs which highlight wall decals (plaques, bookcases, etc)
- 10 - Signs which highlight walls (signs, gravestones, etc)
- 11 - Sealed Barrels
- 12 - Miscellaneous Scripts
- 13 - Sconces
- 14 - Traps / Teleporters / Other Tile-triggered scripts
- 15 - Blackpowder Kegs
And then there are some object types which do not require an associated object:
- 25 - Light Source (note that the light produced is actually quite weak)
- 30 - Inn Sound Generator
- 31 - Church Sound Generator (chanting)
- 32 - Windy Rift Sound Generator
- 33 - Running Water Sound Generator
- 34 - Magic Shop Sound Generator
- 35 - Blacksmith Sound Generator
- 36 - Woodland Sound Generator
- 37 - Crowd Sound Generator
- 38 - Waterfall Sound Generator
It's worth noting that there is no instance within the game of a tile having an object but no Object Type defined, so bear that in mind.
It's also worth noting that there are three times (over the span of every single map in Eschalon) where a tile has two objects defined. In each case, it looks like the game engine is only recognizing one of the two, so I'm guessing that their presence is just a mistake. Because I want the editor to support any situation which the game can generate, the map editor supports adding multiple objects to a tile. I don't recommend doing so, though.
For Object Type 6 (Map Links), the main "Description" field on the Object will be the name of the map to link to, and the "Extra Text" field is the coordinate within the map that the player will be sent to.
I mention coordinates there, and you'll also see coordinates mentioned occasionally in various objects' script text. The game has a somewhat odd notation - the coordinate pair (56, 129) would become "12956". The coordinate pair (3, 40) would become "4003". It's a bit counterintuitive but it does work well since the x coordinate can be at most 99.
If the "Lock Level" on a container or door is set to zero, then the container isn't locked. A Lock Level of 1 is the weakest lock, and a Lock Level of 60 is the highest encountered in the game (the door behind Gramuk at the end of the game), though very few locks in the game get above 30. The special lock value of "99" denotes that it's a slider lock. The next field after "Lock Level" on the GUI will store the slider lock combination, and otherwise will be a value from zero to three. I still haven't figured out what that value means when the lock isn't a slider lock.
The "Destructible" flag will determine whether or not the player can destroy the object, which is typically only used on chests, doors, and barrels. The "sturdiness" field determines how strong the object is, and seems to just be the starting percentage of "health" that the object starts out with. Almost all objects in the game start with a sturdiness of 89.
The "contents" section is actually somewhat interesting. As mentioned above, global maps just specify a string. When the map is saved out in a savegame, the file includes a whole Item structure (including things like weight, cost, special abilities, etc). Until a container is actually opened, though, the only field which is populated in that whole structure is the name. Once the user opens the container for the first time, the game engine populates the rest of the item attributes based on the name. That's why you'll see buttons like the one seen in the "Tile Editing - Scripts" section of the map screenshots page. Note that the special name "Random" is used to randomly fill up a container. The "Random" keyword will possibly fill up more than one item, as well, so containers which specify Random shouldn't have anything but the one "Random" item.