[WIP][ADMIN/TOOL] QuestWriter v0.16.1 - Quest Writing for Citizens.

Discussion in 'Bukkit Tools' started by Cryptite, Oct 12, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    Cryptite

    QW.jpg

    Over 10,000 quests written with QuestWriter!

    Description
    -Find yourself constantly trying to figure out the complexities of writing quests for the popular Citizens plugin? QuestWriter is your tool of choice for creating quests, leaving you without having to worry about proper yml syntaxing, spacing, looking up block id's and fretting whether or not you have your color codes correct. QuestWriter helps to accomplish everything you need for writing quests for Citizens; all the way down to generating your quests.yml file for you! Save yourself some time and stress, don't worry about how to write the quest, just write it!

    QuestWriter is a standalone executable written in Python and PyQt.

    Download: QuestWriter

    Features
    • Load/Save your existing quests.yml files. If properly formatted, QW should have no issues loading them.
    • QuestWriter notifies you when your quest fulfills all the necessary requirements to being a complete quest!
    • View a preview of your quest text as you write it. Use color codes, <br> tags, whatever, and you'll see what you'll get in Minecraft right below!
    • Block Id fields feature auto-completion, so you won't have to stare at the Minecraft Wiki to look up your block id's!
    • Drag and drop your quest objectives between steps if you find they need a bit of re-ordering.
    • Supports all current objective types, commands, rewards, and modifiers, usually as of the latest dev build of Citizens!
    • Various tooltips, with more coming soon, help to describe what each quest node means, and what it means when you're typing it in!
    • QW will always remind you when there's an update available, and updating is a simple, automatic, one-click experience!
    • Triple rainbows!
    Screenshots


    Show Spoiler

    The Quest Text tab
    qw_text.jpg

    The Quest Objectives tab
    qw_objectives.jpg

    The Quest Rewards tab
    qw_rewards.jpg


    Download
    QuestWriter is still in its beta stage, so we'll take all the bug reporting we can get. If QuestWriter crashes, say Yes to submitting the bug report! Found a bug that doesn't crash QW or have a suggestion? Submit a Bug Report/Suggestion under the help menu!

    Download: QuestWriter

    Changelog
    Show Spoiler

    0.16.1
    -Quest text is now supports UTF-8 encoding
    -Loading quests should no longer 'lock out' the editing interface.
    -Updating quest objectives should work again.
    -Inputting the item id, and not the full format of: Item Name (ID) should work for adding item-based objectives.
    -Removed Herobrine virus

    0.16
    -There was bug in which creating a new quest did not cause QW to properly store the data of the previous quest. This has been fixed.
    -Added "Monster Buttons" in the Hunt Objective area to assist with creating hunt quests.
    -Other random bug fixes.
    0.15.9
    -Bug fixes
    -QW will attempt to repair a yml with spacing issues, but only in very specific situations.

    0.15.8
    -Fixed bug in which new quests would inherit data from the last-selected quest.
    0.15.7
    -Added a "hearts indicator" to the Health Reward section for clarity on how it works.
    -Added missing icons for about 30 blocks.
    -Health Amount and Money Amount changed to spinboxes, since they should never be text anyway.
    0.15.5
    -Autocomplete added to all Block ID fields. No more looking up material id's!
    -Updated color code tags because fullwall likes to keep changin stuff.
    -Fixed some bugs in the stepped quest objective listing.



    To-Do List
    • Implement Quest Pre-requisites
    • Add more tooltips for the rest of the quest options
    • Add a color-code, wysiwyg-esque picker to help with quest text writing.
    • Clean up the UI
    • Remove Herobrine suicide code.
     
  2. Offline

    Chett

    After a Update 15-20 Minutes ago everything is working fine so far. Giving Feedback if finding some issue's.

    Very well done.
     
  3. Offline

    Cryptite

    Thanks, I've been getting a barrage of bug-reports from some of the testers so far. Some are tough to track down though, so if you could describe what caused the bugs so I can try to reproduce them, that'd be stellar!
     
  4. Offline

    JargonTheRed

    Found a bug! If I add a quest when there's already quests in quests.yml and switches to another quest without editing it, it gets all the data from the first quest in quests.yml.

    (I might not be making sense. If so, tell me :p)

    Otherwise everything is working fabulously!

    EDIT: Oh, and the descriptions when you hover your mouse over a test field is cut in half with only the top part showing.
     
  5. Offline

    Cryptite

    I think I understand what you mean, Jargon, could you explain step-by-step how to reproduce the bug?

    0.15.7
    -Added a "hearts indicator" to the Health Reward section for clarity on how it works.
    -Added missing icons for about 30 blocks.
    -Health Amount and Money Amount changed to spinboxes, since they should never be text anyway.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 20, 2016
  6. Offline

    JargonTheRed

    @Cryptite

    Sure.
    1. Make sure there is at least two working quests in quests.yml.
    2. Choose one of the working quests.
    3. Click on the plus in QuestWriter to add a new quest.
    4. Do not edit the new empty quest, but instead switch to the already completed one.
    5. Switch back to the empty quest.
    6. The formerly empty quest should now contain the info of your last visited quest.

    This should do the trick :)
    Oh, and the movelocation objective does not seem to be working. Might just be crap behind the wheel though :rolleyes:
     
  7. Offline

    Cryptite

    One line of code off; easy enough to fix. Update to 0.15.8 available!

    I've had no troubles with move location quests, can you verify?
     
  8. Offline

    Chett

    I made one with ur tool, worked perfectly.
     
  9. Offline

    Darkvoltage3

    how do you set it up cause i just see a whole lot of files and the main ones i'm guessing is updater and questwriter..
     
  10. Offline

    JargonTheRed

    No setup needed :p Just start questwrite.exe in the folder you download.
     
  11. Offline

    Akjosch

    Great idea. It doesn't however want to open my test quest, even though it works with the current version of Citizens fine and the online YAML parser says it's valid.

    Quest text:
    Code:
    Concrete : {
     texts : {
      description : "I've had this splendid idea of mixing gravel and sand to create ... stone!<br>Don't ask me for details, that's a trade secret. Anyway, sand I have enough, now I need full stacks of gravel to continue.<br>You'll get some of the stone and a bit of money in return. What about it?",
      acceptance : "Great. Get to it.",
      completion : "Wonderful! Here's your reward - 20 gold coins and 10 stone blocks."
     },
     repeats : -1,
     objectives : {
      '0' : { '0' : { type : delivery, amount : 64, materialid: 13, npcdestination : 2 } }
     },
     rewards : {
      '0' : { type : item, amount : 10, id : 1, take : false },
      '1' : { type : money, money : 20, take : false }
     }
    }
    
    Error:

    "Invalid YML: Error loading the yml file. 'NoneType' object has no attribute 'iteritems'"
     
  12. Offline

    Darkvoltage3

    thanks i found that out b4 you said this but thank anyway ;)
     
  13. Offline

    Cryptite

    It seems like your quest formatting, while valid and works with Citizens, is quite dissimilar than normal quest setups. The Yaml parser QW uses can't even load that setup. If you format it the more standard way, without {}'s, commas, and having all the values of rewards and objectives on the same line, does it work?
     
  14. Offline

    Akjosch

    I tried it out a bit. The parser you're using doesn't like extra spaces it seems. This works:

    Code:
    Concrete:
     texts:
      description: "I've had this splendid idea of mixing gravel and sand to create ... stone!<br>Don't ask me for details, that's a trade secret. Anyway, sand I have enough, now I need full stacks of gravel to continue.<br>You'll get some of the stone and a bit of money in return. What about it?"
      acceptance: "Great. Get to it."
      completion: "Wonderful! Here's your reward - 20 gold coins and 10 stone blocks."
     repeats: -1
     objectives:
      '0':
       '0':
        type: delivery
        amount: 64
        materialid: 13
        npcdestination: 2
     rewards:
      '0':
       type: item
       amount: 10
       id: 1
       take: false
      '1':
       type: money
       money: 20
       take: false
    
    As does this:

    Code:
    Concrete: {
     texts: {
      description: "I've had this splendid idea of mixing gravel and sand to create ... stone!<br>Don't ask me for details, that's a trade secret. Anyway, sand I have enough, now I need full stacks of gravel to continue.<br>You'll get some of the stone and a bit of money in return. What about it?",
      acceptance: "Great. Get to it.",
      completion: "Wonderful! Here's your reward - 20 gold coins and 10 stone blocks."
     },
     repeats: -1,
     objectives: {
      '0': { '0': { type: delivery, amount: 64, materialid: 13, npcdestination: 2 } }
     },
     rewards : {
      '0': { type: item, amount: 10, id: 1, take: false },
      '1': { type: money, money: 20, take: false }
     }
    }
    
    This doesn't work:

    Code:
    Concrete :
     texts :
      description : "I've had this splendid idea of mixing gravel and sand to create ... stone!<br>Don't ask me for details, that's a trade secret. Anyway, sand I have enough, now I need full stacks of gravel to continue.<br>You'll get some of the stone and a bit of money in return. What about it?"
      acceptance : "Great. Get to it."
      completion : "Wonderful! Here's your reward - 20 gold coins and 10 stone blocks."
     repeats : -1
     objectives :
      '0' :
       '0' :
        type : delivery
        amount : 64
        materialid : 13
        npcdestination : 2
     rewards :
      '0' :
       type : item
       amount : 10
       id : 1
       take : false
      '1' :
       type : money
       money : 20
       take : false
    
    Mind you: All three are perfectly valid YAML with the exactly same content.
     
  15. Offline

    Cryptite

    Very strange. I'd consider parsing the quest file before actually feeding it to the yml reader in case there are extra spaces before the :'s but this issue would have to arise more often. Is that your only quest, or do you have several formatted as such?
     
  16. Offline

    Akjosch

    I tend to format them all like this (it saves vertical space and lets me ignore the whitespace rules; basically, I prefer to write them like a C programmer, not like a Python programmer :)), but that's the only "stable" quest ATM; others are just written, changed and deleted too often to have them available for testing.
     
  17. Offline

    Cryptite

    I suppose its worth a try, just hoping I don't rip out one too many spaces. Should have a result in the next hour or so

    @Akjosch: See if the update helps

    0.15.9
    -Bug fixes
    -QW will attempt to repair a yml with spacing issues, but only in very specific situations.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 20, 2016
  18. Offline

    mald

    I don't quite understand what it means under hunt by "string" I entered in skeleton but ingame it says hunt monster and hasn't said I've killed any skeletons.


    EDIT: Nevermind I got it. ::)
     
  19. Offline

    Akjosch

    It works with the version I posted above; it breaks if I alter the format slightly:

    Code:
    Concrete : {
     ? texts
     : {
      description : "I've had this splendid idea of mixing gravel and sand to create ... stone!<br>Don't ask me for details, that's a trade secret. Anyway, sand I have enough, now I need full stacks of gravel to continue.<br>You'll get some of the stone and a bit of money in return. What about it?",
      acceptance  : "Great. Get to it.",
      completion  : "Wonderful! Here's your reward - 20 gold coins and 10 stone blocks.",
     },
     repeats : -1,
     objectives : {
      '0' : { '0' : { type : delivery, amount : 64, materialid : 13, npcdestination : 2 } },
     },
     rewards : {
      '0' : { type : item, amount : 10, id : 1, take : false },
      '1' : { type : money, money : 20, take : false },
     },
    }
    
    Also, it breaks when I try to use the "Python"-formatted output of the online YAML parser.

    Which YAML parsing library are you using, anyway?
     
  20. Offline

    Cryptite

    You have a '?' in there, is that intentional?

    I'm using PyYAML

    @mald: I'm not sure about that one. Here's what the Citizens wiki says about that:
     
  21. Offline

    mald

    @Cryptite no need to worry, I figured it out.
     
  22. Offline

    Akjosch

    Yes, that's intentional. It's part of the YAML syntax definition for mappings; specifically 7.4.2 and rule 142 in there:

    Code:
    [142]     ns-flow-map-entry(n,c)     ::=       ( “?” s-separate(n,c)
                                        ns-flow-map-explicit-entry(n,c) )
                                       | ns-flow-map-implicit-entry(n,c)
    
     
  23. Offline

    Cryptite

    Interesting. Honestly I'm not too familiar with the greater complexities of YAML, and I'm only using PyYAML to read the yml files; I write them out with a more hard-coded approach, since I was following the generic schematic fullwall was providing. In this case I think most quest files are going to follow that, rather than yours. Unfortunately, this doesn't seem to be a huge, breaking issue unless more people indicate they have quests structured like yours. I'm not sure why the pythonic output from the online parser breaks it.
     
  24. Offline

    ritsukachaos

    One problem I seem to be having is I set up a long line of quests in the QuestWriter. And it seems that after I saved it the file only saved the first 2 quests and all the data input into the quests was from the last quest it was not even from the correct ones or have anything to do with it minus the titles.
     
  25. Offline

    Cryptite

    0.16
    -There was bug in which creating a new quest did not cause QW to properly store the data of the previous quest. This has been fixed.
    -Added "Monster Buttons" in the Hunt Objective area to assist with creating hunt quests.
    -Other random bug fixes.

    Here's a screencap of the Monster Buttons
    qw_monsters.jpg
     
  26. Offline

    Akjosch

    Yeah, it's more me playing around with YAML's possibilities than anything. The '? key : value' syntax is too verbose for me anyway, in general, to be of much use.

    BTW, your tool doesn't quite grasp the rewards per objective, and it doesn't save linked nodes properly either. This - valid and working - quests loads, but gets butchered on save:

    Code:
    "Guard Check": {
     texts: {
      description: "Can you check if Bob and Arnold are ok? They should be patroulling here somewhere. Give them a bread loaf each too. They'll sure give you a tip if you are nice to them.",
      acceptance: "Thanks, buddy.",
      completion: "So they are both alive still? More luck than brains, I call it. I
    n any case, have a coin for your trouble.",
     },
      repeats: -1,
      coin_reward: &COIN { type: money, money: 10, take: false },
      objectives: {
       '0': { # Delivery to the two NPCs
        '0': { type: delivery, amount: 1, materialid: 297, npcdestination: 0, rewards: { '0': *COIN }, message: "Delivered the bread loaf to Bob." },
        '1': { type: delivery, amount: 1, materialid: 297, npcdestination: 1, rewards: { '0': *COIN }, message: "Delivered the bread loaf to Arnold." },
       },
      },
      rewards: { '0': *COIN },
    }
    
    On save, the "coin_reward" node isn't saved, its contents are put into the quest's "rewards" node directly (instead of as a link), and the objectives' "rewards" nodes are missing completely.
     
  27. Offline

    JargonTheRed

    Huh. Not getting updated to 0.16.
     
  28. Offline

    Cryptite

    I may've forgotten to upload the update when I posted :) Should be available now.

    @Ak: Are you trying to use variables there? If so, QW does not support that. Also, I wasn't aware you could even do rewards-per-objective. That may require an entire rethinking of the UI.
     
  29. Offline

    Akjosch

    No, not variables. Node Anchors. After all, YAML is a description language for all types of graphs, not just trees. :)
     
  30. Offline

    Cryptite

    Haha you're killing me Ak. I don't expect the vast majority, or even the majority, or even more than coders like us to be having node anchors in their pre-existing quests file. I can't say I'll probably support those, but if rewards-per-objectives work, that may not be too terrible to implement.
     
Thread Status:
Not open for further replies.

Share This Page