Items Complete!

Posted by (twitter: @AtkinsSJ)
September 13th, 2009 12:04 pm

Items can now be gained and lost, there are IFHAVE and IFNHAVE to conditionally output text, and you can click on items in your inventory to use them: if that area has a [[USE:Foo|Bar]] tag, then it will display Bar if you use Foo. Tags can contain other tags, but not perfectly if there are multiple tags at the same level. eg:

[[IFHAVE:Foo| [[GET:Fish]] [[GET:Chips]] ]]

The Get tags are at the same level here, and so will display oddly. Though I think they might still work.

If anybody has any ideas of other things they’d like in, please comment below! And feel free to use tags in pages: They make it a game rather than a wiki browser. :)


6 Responses to “Items Complete!”

  1. Almost says:

    So basically, you just created a potentially infinitely large world game with limitless quests etc., right?

    • Almost says:

      Oh, and a minimal talk system(pick one of three questions, and you will see the response below it) would be cool.. although it could probably be faked by using a half dozen pages per conversation, I guess.

  2. Almost says:

    Hmm, inability to drop items means that any useless item you get is stuck forever, right?
    Also, if item X has a generic use that will happen when there is no specific use for the item at the moment..

    for example:
    [[GENERICUSE:Fish| [IFHAVE:Chips|You eat the fish and chips. [LOSE:Chips] [LOSE:Fish] ] [IFNHAVE:Chips|Fish isn’t tasty unless you have chips]]]
    So.. regardless of where you are, unless specified otherwise by the location, when you use the fish, it will try to eat fish and chips. otherwise it will ask for chips. To have something like this limited to a single location is pretty weird.

  3. Doches says:

    I really wish there was a way to persevere state without sticking an object in the inventory. For instance, it’d be nice to have something along the lines of [[IFHASBEENHEREBEFORE:]] (with a better tag, of course), so the world can change when you come back later.

    Actually, I guess you could partially fake it with lots of different pages, finite-automata style. Shudder.

    • AtkinsSJ says:

      Added! The format is [[IFVISITED:Location|Output]]. Leave location blank to check the current location. IFNVISITED works if you haven’t visited it. Only counts entering areas since I added it just now though.

  4. AtkinsSJ says:

    OK, now working on ‘if visited before’ code, as it should be pretty simple. Generic use of items will be harder, as I’d need somewhere to store the items – probably wiki pages in the form ‘Adventure/Item/Foo’ or something. I don’t know.
    Conversations could work… Maybe have the conversation tree with each bit of speech having an id and these hidden or shown by different inputs… Hmmm.
    Dropping items shouldn’t be too hard, as I can bung a session var in with items that you’ve dropped at various places… But really, I didn’t see the need to get rid of items, so it’s not a high priority.

    Thanks for the input guys! And any content you’ve added. 😀

Leave a Reply

You must be logged in to post a comment.

[cache: storing page]