Tuesday, October 4, 2011

Still the popup


Thanks to Redcape for the redesign of the popup. Spent the majority of last night working on that and changing how the data structure works to go to classes the way I should have done it originally. Also decided to parse in the data for the quests rather then have a 20+ long function call... I'm still not sure what I was thinking there.

The original function call:

questGirlTurnInPopUp(0, 0, 2, "Realtor wants a pair of matching slaves.", false, "", 0, "", 0, true,"", 0, "", 0, true, "", 0, "", 0, true, "", 0, "", 0, true, true, "virgin", "", "", "", false, 2);

And the xml version (tentative)

on pastebin

Not much better but its sure easier to find errors and going to xml would have been required eventually anyways to allow for more user created content.

Daisy

3 comments:

  1. I have no idea what your saying, but Yay!

    ReplyDelete
  2. If you're parsing it in anyways, you might want to reformat the input for cleanliness.

    So off the top of my head I'd go -
    'classes = "class 1, class 2, class 3"'
    'effects = "effect 1, effect 2, effect 3"'

    Or another possibility, depending on your xml parser, is to take the tests and results and turn them into a sub tag.

    So -
    [quest
    name = "quest"
    description = "blah blah"
    ok = "ok"
    cancel = "cancel"
    girltotal = "1"
    keptlost = "true"
    special = "none"]

    [test
    posneg = "true"
    class = "class 1"
    check = "0"
    effects = "effect 1, effect 2"]
    [test
    posneg = "true"
    class = "class 2"
    check = "0"
    effects = "effect 3, effect 4"]

    [/quest]

    Just a thought, but it makes it easier for people to deal with later. Everything sort of exists as a logical object, and we just need to bolt on or strip off objects to fit our purposes.

    ReplyDelete
  3. I like wut ur doing keep it up.

    ReplyDelete