Opening and closing doors
Now that I’m good on the world map for a while, it’s time to get other systems for the local maps in place. I decided to redo the starting location from a town to a ruined temple, but there’s still going to be a cottage with a door that can open.
Why this first? Doors are a bit more complex than one would think at first. Doors have a binary state – open or closed. Doors also can be lockable or not. They can ALSO be locked or not. So if a local map shows that a door should be at a tile (in this case the 2 digit alphanumeric is “70”), how do I represent if a door is locked? And if it is, how do I represent what key is needed to open it?
In answer to the above, every premade map is going to need an extra layer that gets saved – much like how the worldmap has an extra layer to specifically name a local tile. For example, if a forest on the worldmap is “XJ” and the extra letter is “c” (so “XJc”), I can have the game look up a table to say that a forest with a third alphanumeric of “c” represents the “Forest of Darkness” or whatever. So I’m going to do the same for all maps. But not every tile is the same. How will the game know what a “c” means? I’m going to have to set up a special variable saved with each LOS_Maptile called something like “specialproperty”. For a door, if “specialproperty” is “c”, I can have an index that tells the game that means “Silver Key 03” opens it, which assumes it’s now locked to start. For something like a treasure chest, the “specialproperty” could represent a specific treasure, a roll table, or whatever! The only thing I can think of that’s going to be tricky is something like a chest that by default contains several specific items, or a bookshelf with several specific books. I do have quite the spread of Unicode characters I can use, so if the game has a table that indexes both map number AND third alphanumeric in concert, I think I can safely do whatever I may want with a single character for the third alphanumeric.



