Giter VIP home page Giter VIP logo

Comments (5)

matt-jordan avatar matt-jordan commented on July 28, 2024

Note: Now that we have conversations, we'll need to wire up the magic key word {{quests}} to list what quests this particular character gives. In the presence of a quest giver, we should streamline it a bit:

$ say tell me about quests

Pia Kung say, "I have the following quests available:"

[rat extermination]: Collect 4 rat pelts from the Sewers
[assasination]: Kill a giant rat in the Sewers

You would then accept a quest by doing something like:

$ quests accept rat extermination

<stuff happens>

Where that command doesn't work if you're not in the same room as the quest giver.

from mud-backend.

matt-jordan avatar matt-jordan commented on July 28, 2024

Going a bit more requirementy here:

Receiving Quests

  1. You should be able to receive quests from characters.
    As such, there should be some way to associate the giving of quests with an instance of a character
  2. Some quests can be given out as many times as possible; others can only be given out once until it is completed or failed.
  3. I should see who is doing a quest if it is already given out. (Then I can go and kill them if I want to.)
  4. Faction status should determine if a quest can be given to a player
  5. Level should determine if a quest can be given to a player
  6. Player class should determine if a quest can be given

Completing quests

  1. Completing quests can be done by returning an instance of an item
$ give rat pelt to Pia Kung

Pia Kung says, "Thanks for that! You have N more rat pelts to give me to complete Rat Extermination.

$ give rat pelt to Pia Kung

You have completed Rat Extermination! (50 exp)...
  1. Completing quests can be done by killing something
$ attack orc
The orc is dead!
You have completed 'slay the orc' (50 exp)
  1. You should be notified when a quest is completed

Rewards

  1. You should be able to get experience from a quest that is level adjusted
  2. You should be able to get items from a quest
  3. You should be able to have your faction improved

Failing Quests

  1. If a character who was a quest giver dies, the quest is failed.
$ 

Pia Kung has died! Your quest Rat Extermination has failed.

  1. If a character dies, the quest is failed.
  2. If a character abandons a quest, the quest is failed
    There may be a penalty for doing this, e.g., faction hit
  3. You can fail a quest if someone else does it. In particular, if someone else removes the ability for you to do it. (Go and kill a thing, and someone else kills the thing)

Quest commands

  1. I should be able to list my quests at any time
$ quest list

You are on the following quests:
[Rat extermination] - Kill some rats
  1. I should be able to look at details of a quest at any time
$ quest details rat extermination

[Rat extermination] - you need to kill 4 rats in the sewers
  1. I should be able to abandon a quest at any time
$ quest abandon rat extermination

You have abandoned rat extermination
Your faction standing with Adventurer's Guild has dropped!
  1. I should be able to accept a quest in the presence of a quest giver
$ quest accept rat extermination

You have accepted Rat Extermination!
Pia Kung says, "Thanks character, and good luck!"

from mud-backend.

matt-jordan avatar matt-jordan commented on July 28, 2024

Note: I'm going to start off with this being based around something simple, like going somewhere and killing one thing. Items are more complicated; I'll do that later.

from mud-backend.

matt-jordan avatar matt-jordan commented on July 28, 2024

Our first quest is going to be Rat Extermination, which is kill N rats in The Sewers. We'll make it 10 just because that will take a bit more to go through than the usual 4 or 6.

from mud-backend.

matt-jordan avatar matt-jordan commented on July 28, 2024

The problem with the way this is currently constructed is that you can get rewards (gold, etc.) without going back to the quest giver. In reality, that wouldn't happen: you'd have to go back to the questGiver to complete the quest.

There's a few ways I could see fixing this:

  1. When you walk back into the presence of the quest giver, they complete the quest for you (if you've finished the criteria). This would require some events or something telling a Character when another character has entered the room. I like that, but I'm not sure I'm ready to make Room an EventEmitter. There's a lot we'd have to do to manage those subscriptions... and while we already do that on the MessageBus (which we could also leverage here...)... it's a lot. I don't want to make Character more complicated than it already is until I've had some serious time refactoring it more.
  2. Trigger quest completion off of conversation. That makes Conversation more complicated, but does fit the model of how you would think about getting a quest. Except, of course, that's not how it works... so maybe we don't.
  3. Complete quests explicitly. You have to go back to the quest giver and type 'quest complete' and it will complete the quest stage that you're on. I could see this not being necessary for a multi-stage quest that auto-progresses, but that's a micro-optimization we can make at some point.

I'm going to go with #3.

from mud-backend.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.