Anatomy of a FreeCities event (for inclusion in the dev notes?)
So here's a little text I just hammered together. Needs a bit of love, and possibly some expansion and code examples ... maybe? What do you guys think?
Anatomy of a FreeCities event
Type
There are several types of events. They all happen during the end-of-week calculation, AFTER the normal changes to the slaves and all the economic effects (including you messing with your corporation) happened.
- Scheduled events
- Nonrandom events
- Random nonindividual events
- Random individual events
The differences between them are almost non-existent. If they happen, they happen in this order, so you could say it's a kind of event priority ordering. The last two events pre-select a slave (in $eventSlave), with the "nonindividual" events using all your slaves while the "individual" events use only non-fuckdolls, typically from your penthouse. When writing your event, you're free to ignore this and choose your own slave or create a new one. By convention, scheduled events tend to go back to the "Scheduled Event" passage so that other such events can run; all the others tend to just skip to the next event category. Nothing in code forces you to do it this way for your events.
Preconditions
Most events have some kind of precondition for when they happen. Scheduled events always happen when their preconditions are true. Nonrandom events happen when their preconditions are true and no other nonrandom events get picked first (so writing a too-often-true precondition is a good way to break the game by blocking any further such events). The two other types of events get put in a pool ($events) if they match the precondition, then at most one event gets pulled from the pool per type.
Immediate effects
Every event can have immediate effects, which happen when the event gets chosen. For most events, those are what should happen if the player ignores the event (by hitting "Continue" or the space bar on the keyboard). Choice effects (see below) can override or roll back those.
Main event text
The bulk of the writing will be in the main event text. There are quite a few rules to deal with here.
- The PC is referred to in the second person singular ("you"), everyone else in third person.
- The PC has no direct speech. All the things "you" say are described, not quoted.
- A slave can be linked with the macro
<<EventNameLink _Slave>>
. This allows the player to click on the slave name and view their description, then go back to the event. WARNING: Going back triggers the event passage again, so if your event has immediate effects (see above), make sure to NOT repeat them by setting corresponding flags (this is harder than it sounds in general). -
<<SlaveTitle _Slave>>
sets $desc (which ends up being a string like "slavegirl", "MILF", "futanari" and so on, depending on slave). -
<<SlavePronouns _Slave>>
allows you to use the variables $pronoun ("she"/"he"/"it"), $pronounCap ("She"/"He"/"It"), $possessive ("her"/"his"/"its"), $possessiveCap ("Her"/"His"/"Its") and $object ("her"/"him"/"it"). There is NO variable for self-possession ("hers"/"his"/"its") and for "herself", you need to use<<= $object>>self
. - One more macro initialises several others and is required when you have a slave speak and want to use direct quotes:
<<Enunciate _Slave>>
allows you to use<<Master>>
,<<WrittenMaster>>
,<<says>>
(which turns into "lisps" when that's the case) and the lisping replacers<<s>>
,<<ss>>
,<<S>>
,<<c>>
and<<z>>
.
The text should be about large enough to fit on the screen assuming typical monitor sizes. In terms of visible text, about 1000 words are a fine limit to aim for. There's a lot to keep in mind in terms of different appearances and circumstances, so keep your document with slave variables as a reference nearby.
It's fine - and a part of the normal workflow - to first write an event without any variation, then go through it and vary the text here and there.
Choices
You should keep the amount of choices small, but not too small. About three to five is generally a good number. Choices which can't be taken due to the current situation should be displayed as such ("You lack the funds ...") if they are an obvious choice, hidden when they aren't (for example, in event chains you might want to hide choices if the player didn't do something specific or didn't acquire some specific bit of knowledge). Every choice should be a simple sentence of the form "Do something." followed by a short explanation of the obvious effects.
Choices should also be hidden when they run against the game rules, like for example the setting if the player wants to see "extreme" content.
Remember that "do nothing" is almost always a choice (it's called "Continue" and can be found on the left side of the screen) so your events don't need this as an extra choice.
Choice text
This should be a short text describing the effects of your choice. Generally shorter than the main text, but all the other things mentioned there apply.
Try to keep surprise buttsex to a minimum.
Choice effect
A choice doesn't need to have a specific effect. If your event has an immediate effect, remember to take that into account when you decide on the choice's effects.