:: Location - Location Name [location] [other optional location tags]
<>
<>
imagename (if different than passage name.)
<>
Location description text.
<>
Block that sets _canEnter to true if _enteringCharacter may enter this area. Any output produced by this will be appended to the output.
<>
Block that sets _canExit to true if _exitingCharacter may exit this area. Any output produced by this will be appended to the output.
<>
Default choice for this location. Use this for choices that you'll want to reuse several times in the game every time you are in this location. For example, looking in the mirror or changing clothes in a bedroom, showering in a bathroom, etc. Takes the same args as <>.
<>
Another choice, etc.
<>
------------------------------------
We're going to have to partition the game into a number of "locations" in order to model public/private/etc spaces. This will have to be separate from the actual twine-passages in which the story is defined.
When you try to move from location to location, checks will be done both to see if it is allowable to exit the current location and to enter the new one. In these checks, we can make sure the PC is dressed appropriately, has the things that they will need later, etc etc.
We'll build this into the choice blocks somehow. For example, let's say Shay is in his bedroom wearing something he ought not. The player clicks a link to make him leave the room. The game inserts a message above the choice block as to why he can't leave the room (or enter a non-fem location), and the choice block stays up so that he can choose a different option in order to take corrective action.
When we define the locations, we'll do it with passages that include both a location graphic and a location description. Both of these will be enclosed in if blocks so that we can suppress one or the other depending on the needs of the narrative. The story-passages will be responsible for <> these; it won't be done automatically.
FIXME: Or maybe the location passage will just be the description and an optional entry/exit function block, and we'll use some sort of ShowLocation() function to automagically pull in the image based on its name.
These location passages may have tags attached to them, to help automate the movement checking code:
AllowVagueCrossdress
AllowCrossdress
AllowSlutty
AllowLewd
DenyMale
DenyFemale
DenyAndro
We won't generally check these tags directly, but the default AllowExit and AllowEnter implementations used in the choice blocks will use them. If we want to define custom behaviors, we'll override the default AllowExit and AllowEnter implementations. Perhaps when the location is included, it will have a block to set temporary variables with these functions. Then we can include it with flags to show neither the image nor the location, in order to snag those override functions.
-----------------------
Separating Location and Narrative:
We want to implement our passages as blocks of narrative rather than as a location-based thing. Otherwise the narrative implementation will be spaghetti and hard to work with.
We'll define locations though, and move between then (with checks) as part of the narrative. We'll also have some default free-roam controls attached to locations that will fall-through to when a narrative block ends.
Macros:
MoveTo - Move a character (the viewpoint character by default) to a given location. If successful, evaluate a block of twinescript. If unsuccessful (disallowed for some reason) then evaluate a different one. Also include an option to force the move to happen regardless of the movement restrictions.
Choice - We need an easy way to turn choices on or off depending on similar critera to movement. This is most easly implemented with a set of functions to check these statuses for a given character.
Functions:
canMoveTo - Check to see if the given character (viewpoint character by default) can move to the given location. If not, an error message temporary variable is set.