Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ("Quick" overview. Skip to the botton if you just want to see the script.
- Try running it first so you can see what it's supposed to do.
- Each .tale file is split into two parts:
- the top describes how to display characters, and
- the bottom describes the story.
- Characters are currently just a collection of bubbles and names.
- A bubble definition looks something like this:
- <envious> church
- .title = "Church"
- .button.border = #ffffff
- .button.image = /img/envious church.png
- This definition says that if "church" is ever "envious", then
- his title changes to "Church", his bubble border color changes
- to white, and his bubble image changes to whatever's in the file
- "envious church.png" inside the folder "img".
- There are a few things to notice here. First of all, there are
- three basic types that can be given. A text type is anything in
- quotes, "like this". A color type is a hash mark, "#", followed
- by either six hex digits or eight hex digits. Six hex digits means
- the color won't be transparent at all. Eight hex digits means the
- transparency, or alpha level, comes from the last two digits.
- A file type is anything that starts with a forward slash. How
- the program locates the file will probably change soon. Right now
- it just looks for the file in the same directory as wherever it was
- run from.
- One question you probably have is "where does the 'envious' come from?".
- In the story, you can have a statement like "<envious> church", at
- which point the above character bubble description thingy would be
- used instead of whatever was being used before.
- You can give more general character definitions too by replacing either
- the action or the character id with a question mark. For example,
- "<?> church" means "use this as church's default information". Also,
- "<envious> ?" means "use this for the default when a character is
- envious". "<envious> church" takes priority over any other matching
- description. "<envious> ?" comes second, "<?> church" third, and finally
- "<?> ?" comes last.
- Now for the story!
- The story is broken up into multiple contexts. The player can only
- move forward in contexts. A context is really just a way to let the
- player decide from a set of options. Once the decision is made, the
- story can continue, and it cannot "continue" backwards. Each context
- can be guarded by a condition like [@church down] or
- [@churchs status = "down"], for example:
- "unguarded context" {
- > @church down
- }
- [@church down] {
- ...
- }
- The conditions should be set when the player makes some decision or
- performs some action. There's more on setting these condions below,
- but first let me explain how options are given to the player.
- You can optionally begin each context with a set of statements followed
- by a set of character options. When the player begins the context,
- s/he's immediately lead through the initial statements before
- being allowed to click on a character bubble to continue. Each
- character bubble/option can be made available to the player like so:
- "context" {
- [@church state = "angry"]
- church {
- church: "go away!";
- }
- [@church state = "happy"]
- church {
- church: "hello, player!"
- }
- [present: church]
- sen {
- sen: "church is scaring me :("
- }
- }
- There are several things to note here. First of all, there are
- two options for "church". In this case, each option is guarded
- by a condition, and only options with satisfied conditions are
- made available to the player. Although it's not possible in this
- scenario, if both "church" options had their conditions satisfied,
- then the later one would be the one made available.
- The second thing to note is that the user actually has two options:
- "church" and "sen". "sen" is only available as an option when "church"
- is present.
- The characters aren't always present, or shown to the player. If a
- character is available as an option, then s/he's automatically
- made present at that time. A character can also be made present with
- a statement like:
- <enter> church
- Once a character is present, the only way to take him off the screen
- is with a statement like:
- <exit> church
- And of course you can have multiple character enter and exit with
- <enter> church, sen
- <exit> church, sen
- Similar to the "present" condition, you can require that a character
- is not present with:
- [not present: church]
- That covers character options, but there are also text options. If
- you want to have the player make a decision that's not "to whom
- should I talk next", this is probably what you want. Text options
- look like this:
- church: "What say you?" {
- * "Yes" {
- church: "What do you mean \"yes\"?!"
- }
- * "No" {
- church: "What do you mean \"no\"?!"
- }
- }
- This gives the user two options: "Yes" and "No". The "church: What
- say you" part is optional.
- And finally conditions. They're actually really simple. You set
- them like so:
- > @lastest church fic = "How To, And How Not To, Write a Story"
- or just
- > @church sleeping
- And after that, you can check them like so:
- [@latest church fic = "Her Mother's Diary"]
- or
- [@church sleeping]
- If you're not inside a context or a character option, you can shortcut
- the conditions by removing the leading angled bracket like so:
- @latest church fic = "How To, And How Not To, Write a Story"
- You can get the program to change around things like images or music
- the same way:
- @game.music = /bgm/smile.ogg
- > @game.background = /bg/bouncy pie.png
- Some finishing notes if you're still awake. There's currently no way to
- end a story, or show cut scenes, or have non-background-music sound effects,
- or easily credit people with the parts they made. I'm sure there are bunch
- of other really useful or nice or necessary things that this are missing that
- I haven't gotten to adding because I never had a real story to use with
- this.
- )
- ( ========== characters ========== )
- (all values default to this)
- <?> ?
- .button.image = /characters/unknown.png
- .button.border = #FFFFFFFF
- <?> church
- .title = "Church"
- .button.border = #050D5E
- .button.image = /characters/church/neutral.png
- <?> sen
- .title = "Sen"
- <?> cheer
- .title = "Cheerilee"
- .button.border = #AD4B8D
- (use this value only when cheerilee is <pissed>)
- <pissed> cheer
- .button.image = /characters/cheerilee/angry.png
- (use this value if any character is <pissed>)
- <pissed> ?
- .button.border = #808080
- ( ========== story ========== )
- (anything in parentheses is ignored, by the way...)
- (...
- ...!)
- (onwards with the story!)
- (right after setting some... settings)
- @game.page.color = #400040c0 (by the way, the color can be either RGB or RGBA)
- @game.page.text.color = #ffffff
- @game.music = /bgm/smile.ogg
- @game.background = /bg/bouncy pie.png
- "IN THE BEGINNING" {
- <enter> church
- church: "-nd I just...
- Um, what just happened? And who are you?"
- "Is he actually talking to me? Maybe if I just keep clicking..."
- church: "You know I can hear you, and-"
- <enter> sen
- church: "Um... hi."
- > @game.screen.small
- church {
- church: "Please stop poking me."
- }
- sen {
- sen: "Hey, Church! I made this super useless thing that's kinda fun
- to play around with, and I thought you'd have fun playing around
- with it too!"
- <pause for dramatic effect> sen
- sen: "And by the way, you can't leave without finishing this story."
- > @helpless church
- }
- }
- [@helpless church] {
- church: "What do you mean I can't leave without finishing the story?!"
- sen: "I kinda need you here to explain something."
- church: "Wait a second..." {
- * "Why me" {
- church: "Why am I, of all people, being used for... whatever
- it is that you're explaining?"
- > @why church
- }
- * "Did you bring me here" {
- church: "Are you the one that brought me here? You are, aren't
- you? Why me?"
- sen: "Well, I had to show someone what this thing could do,
- and what better way than to use you to do it!"
- church: "Okay, but why me?"
- > @why church
- }
- * "Why do you look like that" {
- church: "What happened to your head? Why is it shaped like that?"
- sen: "Oh, this isn't my real head. It's just a placeholder for
- arbitrary characters that don't yet have an image."
- > @church asks about images
- }
- }
- }
- [@church asks about images] {
- church: "What is that even supposed to mean?"
- sen: "Well, you only have a normal head because it was defined
- in the .tale file I sent you. I mean, the .tale file that I
- will send you. I have a question mark head because my head was never
- defined, so my head is the default for characters without one!"
- church: "Okay, fine. Why was I given
- a head in this... \"dot tale\" while you weren't?"
- sen: "Because, silly, it was the easiest way to explain the heirarchy,
- which, by the way, is why you're here."
- church: "You're going to have to expand on that."
- > @why church
- }
- [@why church] {
- sen: "I'm trying to show your future self this awesome
- useless thing, so I brought in your past self, that's
- you, to do it!"
- > @past church
- }
- (have to satisfy both conditions!!)
- [@why church]
- [@past church] {
- church: "Alright, now that makes no sense. Why would you have to
- explain it to my \"future self\" if I'm already here and
- you could just explain it to me?"
- sen: "That's an excellent question! You see, I didn't actually
- transport your brain into this place so you won't remember
- anything going on here."
- church: "Lies. All lies."
- sen: "And I didn't transport your brain
- so you wouldn't remember meeting Twilight here and-"
- <enter> cheer
- <pissed> cheer
- sen: "You know what? I think you've done your job. Bye!"
- <exit> sen, cheer, church
- > @done
- }
- [@done] {
- > @game.page.clear
- "Take a look at the .tale file that came with this to change the
- script. It starts off with a giant overview of what it can do
- and ends with the characters and dialogue shown here."
- "You can press escape to close this window."
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement