Comments (5)
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.
Going a bit more requirementy here:
Receiving Quests
- 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 - Some quests can be given out as many times as possible; others can only be given out once until it is completed or failed.
- 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.)
- Faction status should determine if a quest can be given to a player
- Level should determine if a quest can be given to a player
- Player class should determine if a quest can be given
Completing quests
- 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)...
- Completing quests can be done by killing something
$ attack orc
The orc is dead!
You have completed 'slay the orc' (50 exp)
- You should be notified when a quest is completed
Rewards
- You should be able to get experience from a quest that is level adjusted
- You should be able to get items from a quest
- You should be able to have your faction improved
Failing Quests
- If a character who was a quest giver dies, the quest is failed.
$
Pia Kung has died! Your quest Rat Extermination has failed.
- If a character dies, the quest is failed.
- If a character abandons a quest, the quest is failed
There may be a penalty for doing this, e.g., faction hit - 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
- I should be able to list my quests at any time
$ quest list
You are on the following quests:
[Rat extermination] - Kill some rats
- 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
- 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!
- 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.
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.
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.
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:
- 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
anEventEmitter
. 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 makeCharacter
more complicated than it already is until I've had some serious time refactoring it more. - 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. - 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)
- Support monetary rewards
- Quests: Spawning a boss
- [Fighter]: Double attack command HOT 1
- [Fighter] Shield Bash
- [Fighter] Parry HOT 1
- [Fighter] Implement Cleave
- [Fighter]: Dual wield/ambidexterity
- [Adventurer's Guild Quest]: Add a quest that teaches a user how to play the game HOT 1
- [Priest] Add the ability to chant HOT 1
- [Priest] Add the healing prayer (water) HOT 2
- [Priest] Energize prayer (fire)
- [Priest]: "Wind" or "speed" prayer
- [Priest]: Earth or defensive prayer
- [Priest]: Darkness prayer (evasion)
- [Priest]: Light prayer HOT 5
- [Priest]: Spirit prayer
- [Priest] Prayer of wrath (beast)
- [Party]: Add the basic command/interface
- [Party]: Add follow the leader option
- [Party]: Add auto-attack
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mud-backend.