Advertisement
Guest User

Untitled

a guest
Oct 19th, 2012
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.14 KB | None | 0 0
  1. ("Quick" overview. Skip to the botton if you just want to see the script.
  2.  
  3. Try running it first so you can see what it's supposed to do.
  4.  
  5. Each .tale file is split into two parts:
  6. the top describes how to display characters, and
  7. the bottom describes the story.
  8.  
  9. Characters are currently just a collection of bubbles and names.
  10. A bubble definition looks something like this:
  11. <envious> church
  12. .title = "Church"
  13. .button.border = #ffffff
  14. .button.image = /img/envious church.png
  15.  
  16. This definition says that if "church" is ever "envious", then
  17. his title changes to "Church", his bubble border color changes
  18. to white, and his bubble image changes to whatever's in the file
  19. "envious church.png" inside the folder "img".
  20.  
  21. There are a few things to notice here. First of all, there are
  22. three basic types that can be given. A text type is anything in
  23. quotes, "like this". A color type is a hash mark, "#", followed
  24. by either six hex digits or eight hex digits. Six hex digits means
  25. the color won't be transparent at all. Eight hex digits means the
  26. transparency, or alpha level, comes from the last two digits.
  27. A file type is anything that starts with a forward slash. How
  28. the program locates the file will probably change soon. Right now
  29. it just looks for the file in the same directory as wherever it was
  30. run from.
  31.  
  32. One question you probably have is "where does the 'envious' come from?".
  33. In the story, you can have a statement like "<envious> church", at
  34. which point the above character bubble description thingy would be
  35. used instead of whatever was being used before.
  36.  
  37. You can give more general character definitions too by replacing either
  38. the action or the character id with a question mark. For example,
  39. "<?> church" means "use this as church's default information". Also,
  40. "<envious> ?" means "use this for the default when a character is
  41. envious". "<envious> church" takes priority over any other matching
  42. description. "<envious> ?" comes second, "<?> church" third, and finally
  43. "<?> ?" comes last.
  44.  
  45.  
  46. Now for the story!
  47.  
  48. The story is broken up into multiple contexts. The player can only
  49. move forward in contexts. A context is really just a way to let the
  50. player decide from a set of options. Once the decision is made, the
  51. story can continue, and it cannot "continue" backwards. Each context
  52. can be guarded by a condition like [@church down] or
  53. [@churchs status = "down"], for example:
  54.  
  55. "unguarded context" {
  56. > @church down
  57. }
  58.  
  59. [@church down] {
  60. ...
  61. }
  62.  
  63.  
  64.  
  65. The conditions should be set when the player makes some decision or
  66. performs some action. There's more on setting these condions below,
  67. but first let me explain how options are given to the player.
  68.  
  69. You can optionally begin each context with a set of statements followed
  70. by a set of character options. When the player begins the context,
  71. s/he's immediately lead through the initial statements before
  72. being allowed to click on a character bubble to continue. Each
  73. character bubble/option can be made available to the player like so:
  74.  
  75. "context" {
  76. [@church state = "angry"]
  77. church {
  78. church: "go away!";
  79. }
  80.  
  81. [@church state = "happy"]
  82. church {
  83. church: "hello, player!"
  84. }
  85.  
  86. [present: church]
  87. sen {
  88. sen: "church is scaring me :("
  89. }
  90.  
  91. }
  92.  
  93. There are several things to note here. First of all, there are
  94. two options for "church". In this case, each option is guarded
  95. by a condition, and only options with satisfied conditions are
  96. made available to the player. Although it's not possible in this
  97. scenario, if both "church" options had their conditions satisfied,
  98. then the later one would be the one made available.
  99.  
  100. The second thing to note is that the user actually has two options:
  101. "church" and "sen". "sen" is only available as an option when "church"
  102. is present.
  103.  
  104. The characters aren't always present, or shown to the player. If a
  105. character is available as an option, then s/he's automatically
  106. made present at that time. A character can also be made present with
  107. a statement like:
  108.  
  109. <enter> church
  110.  
  111. Once a character is present, the only way to take him off the screen
  112. is with a statement like:
  113.  
  114. <exit> church
  115.  
  116. And of course you can have multiple character enter and exit with
  117.  
  118. <enter> church, sen
  119. <exit> church, sen
  120.  
  121. Similar to the "present" condition, you can require that a character
  122. is not present with:
  123.  
  124. [not present: church]
  125.  
  126. That covers character options, but there are also text options. If
  127. you want to have the player make a decision that's not "to whom
  128. should I talk next", this is probably what you want. Text options
  129. look like this:
  130.  
  131. church: "What say you?" {
  132. * "Yes" {
  133. church: "What do you mean \"yes\"?!"
  134. }
  135.  
  136. * "No" {
  137. church: "What do you mean \"no\"?!"
  138. }
  139. }
  140.  
  141. This gives the user two options: "Yes" and "No". The "church: What
  142. say you" part is optional.
  143.  
  144. And finally conditions. They're actually really simple. You set
  145. them like so:
  146.  
  147. > @lastest church fic = "How To, And How Not To, Write a Story"
  148.  
  149. or just
  150.  
  151. > @church sleeping
  152.  
  153. And after that, you can check them like so:
  154.  
  155. [@latest church fic = "Her Mother's Diary"]
  156.  
  157. or
  158. [@church sleeping]
  159.  
  160. If you're not inside a context or a character option, you can shortcut
  161. the conditions by removing the leading angled bracket like so:
  162.  
  163. @latest church fic = "How To, And How Not To, Write a Story"
  164.  
  165. You can get the program to change around things like images or music
  166. the same way:
  167.  
  168. @game.music = /bgm/smile.ogg
  169. > @game.background = /bg/bouncy pie.png
  170.  
  171.  
  172. Some finishing notes if you're still awake. There's currently no way to
  173. end a story, or show cut scenes, or have non-background-music sound effects,
  174. or easily credit people with the parts they made. I'm sure there are bunch
  175. of other really useful or nice or necessary things that this are missing that
  176. I haven't gotten to adding because I never had a real story to use with
  177. this.
  178.  
  179. )
  180.  
  181. ( ========== characters ========== )
  182.  
  183. (all values default to this)
  184. <?> ?
  185. .button.image = /characters/unknown.png
  186. .button.border = #FFFFFFFF
  187.  
  188.  
  189. <?> church
  190. .title = "Church"
  191. .button.border = #050D5E
  192. .button.image = /characters/church/neutral.png
  193.  
  194.  
  195. <?> sen
  196. .title = "Sen"
  197.  
  198. <?> cheer
  199. .title = "Cheerilee"
  200. .button.border = #AD4B8D
  201.  
  202.  
  203. (use this value only when cheerilee is <pissed>)
  204. <pissed> cheer
  205. .button.image = /characters/cheerilee/angry.png
  206.  
  207.  
  208. (use this value if any character is <pissed>)
  209. <pissed> ?
  210. .button.border = #808080
  211.  
  212.  
  213. ( ========== story ========== )
  214.  
  215. (anything in parentheses is ignored, by the way...)
  216.  
  217. (...
  218. ...!)
  219.  
  220. (onwards with the story!)
  221.  
  222.  
  223. (right after setting some... settings)
  224.  
  225. @game.page.color = #400040c0 (by the way, the color can be either RGB or RGBA)
  226. @game.page.text.color = #ffffff
  227. @game.music = /bgm/smile.ogg
  228. @game.background = /bg/bouncy pie.png
  229.  
  230. "IN THE BEGINNING" {
  231. <enter> church
  232. church: "-nd I just...
  233. Um, what just happened? And who are you?"
  234.  
  235. "Is he actually talking to me? Maybe if I just keep clicking..."
  236.  
  237. church: "You know I can hear you, and-"
  238.  
  239. <enter> sen
  240.  
  241. church: "Um... hi."
  242. > @game.screen.small
  243.  
  244. church {
  245. church: "Please stop poking me."
  246. }
  247.  
  248. sen {
  249. sen: "Hey, Church! I made this super useless thing that's kinda fun
  250. to play around with, and I thought you'd have fun playing around
  251. with it too!"
  252.  
  253. <pause for dramatic effect> sen
  254.  
  255. sen: "And by the way, you can't leave without finishing this story."
  256.  
  257. > @helpless church
  258.  
  259. }
  260. }
  261.  
  262. [@helpless church] {
  263. church: "What do you mean I can't leave without finishing the story?!"
  264.  
  265. sen: "I kinda need you here to explain something."
  266.  
  267. church: "Wait a second..." {
  268. * "Why me" {
  269. church: "Why am I, of all people, being used for... whatever
  270. it is that you're explaining?"
  271.  
  272. > @why church
  273. }
  274. * "Did you bring me here" {
  275. church: "Are you the one that brought me here? You are, aren't
  276. you? Why me?"
  277.  
  278. sen: "Well, I had to show someone what this thing could do,
  279. and what better way than to use you to do it!"
  280.  
  281. church: "Okay, but why me?"
  282.  
  283. > @why church
  284.  
  285. }
  286. * "Why do you look like that" {
  287. church: "What happened to your head? Why is it shaped like that?"
  288.  
  289. sen: "Oh, this isn't my real head. It's just a placeholder for
  290. arbitrary characters that don't yet have an image."
  291.  
  292. > @church asks about images
  293. }
  294. }
  295. }
  296.  
  297. [@church asks about images] {
  298. church: "What is that even supposed to mean?"
  299.  
  300. sen: "Well, you only have a normal head because it was defined
  301. in the .tale file I sent you. I mean, the .tale file that I
  302. will send you. I have a question mark head because my head was never
  303. defined, so my head is the default for characters without one!"
  304.  
  305. church: "Okay, fine. Why was I given
  306. a head in this... \"dot tale\" while you weren't?"
  307.  
  308. sen: "Because, silly, it was the easiest way to explain the heirarchy,
  309. which, by the way, is why you're here."
  310.  
  311. church: "You're going to have to expand on that."
  312.  
  313. > @why church
  314. }
  315.  
  316. [@why church] {
  317.  
  318. sen: "I'm trying to show your future self this awesome
  319. useless thing, so I brought in your past self, that's
  320. you, to do it!"
  321.  
  322. > @past church
  323. }
  324.  
  325. (have to satisfy both conditions!!)
  326. [@why church]
  327. [@past church] {
  328. church: "Alright, now that makes no sense. Why would you have to
  329. explain it to my \"future self\" if I'm already here and
  330. you could just explain it to me?"
  331.  
  332. sen: "That's an excellent question! You see, I didn't actually
  333. transport your brain into this place so you won't remember
  334. anything going on here."
  335.  
  336. church: "Lies. All lies."
  337.  
  338. sen: "And I didn't transport your brain
  339. so you wouldn't remember meeting Twilight here and-"
  340.  
  341. <enter> cheer
  342. <pissed> cheer
  343.  
  344. sen: "You know what? I think you've done your job. Bye!"
  345.  
  346. <exit> sen, cheer, church
  347.  
  348. > @done
  349. }
  350.  
  351. [@done] {
  352. > @game.page.clear
  353. "Take a look at the .tale file that came with this to change the
  354. script. It starts off with a giant overview of what it can do
  355. and ends with the characters and dialogue shown here."
  356.  
  357. "You can press escape to close this window."
  358. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement