Adventure

From MiniLDwiki

Jump to: navigation, search

Yo! This is the index of a choose-your-own adventure, or whatever it will become. It's actually a pretty lame idea, but I had to think of something that would work in PHP as I couldn't get cURL to work in C++. :P

"Play" the "game" here!

Feel free to add extra pages! All page names start with 'Adventure/'.

Adventure/Index - Start page

~AtkinsSJ

Contents

Wikiventure Documentation

Hopefully, playing should be pretty straightforward - this isn't help for that. This is documentation for the (hopefully also quite simple) code you can use in your area pages to let players do stuff.

Wiki Markup it Understands

  • [[Adventure/Foo|Bar]] Will link to Foo, and display Bar as the link text.
  • Italics using ''.
  • Bold using '''.
  • You can include images and they (should) show up! Yay! ([[File:Foo.png]])

Tags

Tags are where it gets interesting. Just put these in pages, and the game will parse them, letting you have a bit more interaction than just 'go here'. Most tags have a parameter after the '|' for what will be output when the tag is used - You can put other tags inside these, pretty-much infinitely, letting you have simple things like taking away an item when it is used, or advanced branching option trees.

Feel free to request new tags in the talk page - hopefully I'll be able to get notifications on it.

Miscellaneous

  • [[IFVISITED:Foo|Bar]] Will display Bar if the player has been to the area called Adventure/Foo before (since I added this functionality in.) You can leave Foo blank ([[IFVISITED:|Bar]]) to check the current location. IFNVISITED acts if you haven't been to the given location.
  • [[IFINPUT:Foo|Bar]] The presence of this tag will make a text box appear on the page. If the user enters Foo, then Bar is displayed. IFNINPUT will output when the user does not input Foo. Foo is case-insensitive.

Items

Items are currently just stored as strings in the player's 'inventory' array. You can use tags to offer them to the player, take one or all of them away, and check if the player does or does not have a specific item.

  • [[GET:Foo]] Will let you get an item called 'Foo' from that area. Please put this before any location links or it'll look really strange.
  • [[USE:Foo|Bar]] If the player uses Foo while in this area, Bar is output. Put a [[LOSE:Foo]] in there if you want the item to be used-up. NUSE will output text if the player does not use the given item.
  • [[LOSE:Foo]] Will make the player lose 'Foo' if they have it. You can take away all the user's items with [[LOSE:*ALL]]
  • [[IFHAVE:Foo|Bar]] and [[IFNHAVE:Foo|Bar]] With the first, if the player has the item 'Foo', then 'Bar' is displayed. The opposite is true for the IFNHAVE. Bar can contain other tags and formatting.

Conversations

Conversations are a little more complicated, but hopefully still simple! The two conversation tags are [[TALK:StageToGoTo,StageRequired|WhatYouWantToSay]] and [[SPEECH:StageRequired,WhatYouWantTheNPCToSay]]. Conversations work in 'stages'. You start at stage 0.

  • TALK tags create a link which let the player choose to say that thing. If the tag was [[TALK:1,0|Hello Johnny.]] then the link will say > Say: Hello Johnny., it will take the player to conversation stage 1, and the link will only appear in stage 0. If, instead of a 0, there is nothing, the link will always appear except when it has just been used.
  • SPEECH tags make their text display when the player is at the stage specified. You have to specify a stage because otherwise it's a bit pointless.

There's a bit of a demo at Adventure/TalkTest.

Cash

How much cash the player has can be measured and altered using these tags:

  • [[IFCASH:Low,High|Bar]] Outputs Bar if the player's cash level is between Low and High, inclusive. Either Low or High can be blank, eg, if the player should have at least 30 cash, then set Low to 30 and leave High blank. IFNCASH will output if the player's cash is not in the given range.
  • [[GIVECASH:Amount]] Gives this much cash to the player. A negative number will take it away.

Score

The player's score can be measured and altered using these tags:

  • [[IFSCORE:Low,High|Bar]] Outputs Bar if the player's score is between Low and High, inclusive. Either Low or High can be blank, eg, if the player should have a score of at least 30, then set Low to 30 and leave High blank. IFNSCORE will output if the player's score is not within the range.
  • [[GIVEPOINTS:Amount]] Gives this many points to the player. A negative number will take it away.
Personal tools