[Mystara Database] Locations

Home of Thorf's myriad Secret Projects.

Moderators: Havard, agathokles, Thorf

Post Reply
User avatar
Thorf
Cartomancer
Posts: 2482
Joined: Fri May 23, 2008 2:41 am
Gender: male
Location: Akita, Japan
Contact:

[Mystara Database] Locations

Post by Thorf » Mon Jul 14, 2008 6:33 am

This is probably the hardest set of tables to work out, because it's just so complicated. There's a large variety of different types of location, each of which requires different fields to detail it. But I'll have a go. Brian (or anyone else!) can correct my mistakes...

First, the master location tables. The first table holds ID numbers for locations. This allows us to be very flexible with every aspect of a location. For example, it will be possible to enter multiple names, and indicate one of them as the main name.

mdb_location
id

Next, the names table. This table holds the names of all locations, from single buildings to settlements, regions, countries, continents, planets - even planes of existence. Because of the vast differences between all these things, the master tables will likely not hold much more than the name and some universal fields that split the locations into different types.

mdb_location_name
mdb_location_id @
name
mdb_language_id @
mdb_language_real_id @
meaning
corrected_name
notes
is_main_name (yes/no)
mdb_source_id @
source_reference

As you can see, the names table allows us to indicate the in-world language the name belongs to, as well as the real-world language it may be taken from, and the English meaning (if there is one). This allows us to enter multiple names for locations, which is important in some areas (for example Karameikos, where there are Traladaran and Thyatian names for the same thing).

Corrected name allows us to enter the corrected form of a name, for example with names on the Savage Coast which had lots of mistakes in their accents (based on real Spanish and Portuguese), and also special characters not used officially, (like the Scandinavian o and thorn).

Edit: Added a source to this table, so we can see where the name is from. This allows us to add alternate names while noting where they come from.

Next, a table to establish the hierarchy of locations:

mdb_location_hierarchy
id
mdb_location_id @
mdb_location_id @ (parent location)

This allows us to set up hierarchies such as:

Dimension > Plane of Existence > World > Continent > Region > Country > Province > Town > Building > Room.

And it's highly flexible, so for example a town could have multiple parents including the political region as well as the geographical region or terrain feature it's in. We will end up with a huge tree of locations.

User avatar
Thorf
Cartomancer
Posts: 2482
Joined: Fri May 23, 2008 2:41 am
Gender: male
Location: Akita, Japan
Contact:

Location Types

Post by Thorf » Mon Jul 14, 2008 6:55 am

Next we have to deal with terrain types. This is where things get tricky, because depending on the type, the fields needed with change completely.

First let's define the different overall types. Starting from the example above, we have: Dimension, Plane of Existence, World, Continent, Region, Country, Province, Settlement, Building, Room. Also Sea, Terrain, Moon. The locations are already arranged in a hierarchy, so we don't need to worry about putting the types into a hierarchy... Right? :? Or would it be better to put the types in a hierarchy too? (Could be confusing, though...)

mdb_location_type
id
type
description

Next we will implement sub-types of these main types.

mdb_location_sub-type
id
mdb_location_type_id @ (parent type)
sub-type
description

Some notes on possible sub-types:

Edit: The rule for having sub-types is simple: if the name of the location and its type do not clearly express all the necessary information, a sub-type is required.

Dimensions: No sub-type. (There are only a few anyway - Mystara Dimension, Dimension of Myth - and the names go in the master table.)
Planes of Existence: Outer Plane, Inner Plane. (Optional sub-type - Astral Plane and possibly Ethereal Plane have no sub-type, just the overall Plane of Existence type.)

World, Continent, Region, Country and Province don't really need sub-types.

Settlement, Building and Room can all be split into their possible sub-types:

Settlements: City, Large Town, Small Town, Village, Castle, Fort, Tower, Palace, Camp, Lighthouse, etc.
Building: Castle (or parts of a castle), Fort, Tower, Palace, Lighthouse, Inn, Tavern, House, Shop, Blacksmith, etc.
Room: Guard Room, Kitchen, Dining Room, Throne Room, Bed Room, etc.

Most rooms will probably be named according to their sub-type, but to support the few cases where they aren't, we need to institute a sub-type throughout.

Finally, Sea includes Ocean, Sea, Bay, Fjord, Inlet, and any other kind of water that is not situated on land. And Terrain encompasses water features on land (River, Ford, Lake, etc.) as well as all other forms of terrain (Mountains, Hills, etc.).

User avatar
Thorf
Cartomancer
Posts: 2482
Joined: Fri May 23, 2008 2:41 am
Gender: male
Location: Akita, Japan
Contact:

Condition

Post by Thorf » Mon Jul 14, 2008 7:05 am

You may have noticed the lack of a mention of Ruins in the Types section. Here's why: we're going to implement a field called Condition.

mdb_location_condition
id
condition
description

It looks simple, but what this allows us to do is mark any location as new, under construction, in decline or deteriorating, or ruined.

Conditions: New, Under Construction, Incomplete (and not being worked on), Deteriorating, Ruined, Haunted, Inhabited, Uninhabited, Abandoned.

This is a bit of a mix of ideas, actually. Perhaps it would be better to move Haunted, Inhabited, Uninhabited and Abandoned to a field of their own. Or we could just allow multiple conditions to be tagged to the same location (although this seems less good, especially since most of the first group would contradict each other if assigned to the same location).

Another, related concept is Time, and I am working on a post about that too.

User avatar
Thorf
Cartomancer
Posts: 2482
Joined: Fri May 23, 2008 2:41 am
Gender: male
Location: Akita, Japan
Contact:

Instances and Linkage

Post by Thorf » Mon Jul 14, 2008 7:41 am

This brings us to the point where we have to start splitting things up into different tables to deal with each type separately. (Because each type has its own specialised set of relevant fields.) Each location already has a name, a type, and in some cases a sub-type. We have to define all the rest, and then tie it all together.

This is the form each table will take:

mdb_location_instance
id
description
...
...
...
(the fields needed for that type or sub-type)

And then the linking tables:

mdb_location_linkage
id
mdb_location_id @
mdb_location_instance @

We could actually put an awful lot more in here, by merging this table with some other tables outlined above. But doing so may result in duplicate information being entered.

The next table links the sources for an area to a particular instance. I'm not sure if we want to make this more detailed, by adding the source linkage to lots of smaller tables to show precisely where everything comes from.

mdb_location_instance_source
id
mdb_location_instance @
mdb_source_id @

User avatar
Thorf
Cartomancer
Posts: 2482
Joined: Fri May 23, 2008 2:41 am
Gender: male
Location: Akita, Japan
Contact:

Fields needed for each type

Post by Thorf » Mon Jul 14, 2008 7:42 am

Under construction

Dimension fields:


Plane of Existence fields:


World fields:


Continent fields:


Region fields:


Country fields:
full_title (e.g. The Grand Duchy of Karameikos)
mdb_location_id @ (capital city)
mdb_government_type_id @
mdb_npc_id @ (ruler)
politics
laws
philosophy
attitude (possibly a reference table @ with multiple entries needed)
description
history (a summary - the rest is in the timeline)
geographic_coordinates
land_area
sea_area
land_boundaries (miles)
coastline (miles)
climate (possibly a reference table @)
terrain
elevation_extreme_high
elevation_extreme_low
natural_resources (possibly a reference table @ with multiple entries needed)
land_use_arable % (three percentages for arable land, permanent crops, other)
land_use_crops %
land_use_other %
natural_hazards
population
population_breakdown (could be split off into a sub-table with fields for race and percentage)
common_diseases (possibly a reference table @ with multiple entries needed)
nationality_noun (noun)
nationality_adjective (adjective)
ethnicity (possibly a reference table @ with multiple entries needed)
immortals_worshipped (possibly a reference table @ with multiple entries needed)
languages (possibly a reference table @ with multiple entries needed)
currency (possibly a reference table @ with multiple entries needed)
treasury
agriculture (possibly a reference table @ with multiple entries needed)
industries (possibly a reference table @ with multiple entries needed)
imports (possibly a reference table @ with multiple entries needed)
exports (possibly a reference table @ with multiple entries needed)
common_people_revenue
military (possibly a reference table @ with multiple entries needed)
notable_npcs (possibly a reference table @ with multiple entries needed)
notable_sites (probably mdb_location_id @, and multiple entries needed)

"Maps featured on" and "Bordering countries" are also desirable fields, but both can probably be done better with separate tables.

Province fields:
population
population_breakdown (could be split off into a sub-table with fields for race and percentage)
mdb_location_id @ (provincial capital)
mdb_npc_id @ (provincial leader)
notable_npcs (possibly a reference table @ with multiple entries needed)
notable_sites (probably mdb_location_id @, and multiple entries needed)
special Laws
special Taxes
area
description

Settlement fields:


Building fields:


Room fields:


Sea fields:


Terrain fields:
Area
Length
Average Height
Height
Depth
Population
Leader
etc.

Post Reply

Return to “Thorf's Projects”