I’m trying to get a Quest system implemented. I have an extremely basic one setup, as this has been mentioned on the forum several times in the past, but it isn’t as robust as I’d like.
Here’s what I have so far:
A quest is a kind of thing. A quest can be undiscovered, discovered, or completed.
Pay For your Sword is a quest. The description is "Find 15 silver to pay for your sword and give it to Groveth Strongcloak."
Listing quests is an action applying to nothing.
Carry out Listing quests:
say "You currently know about:[line break][list of discovered quests]".
Understand "quest" as Listing quests.
That’s all fine and the quest command shows the name of any discovered quests. I was hoping it’d show the description, but it does not. I’ve tried various things that sound like they should work (ie, [description of discovered quests] or [discovered quest description]) but they do not.
Is using a description in this case feasible? Ideally, I’d like the output to look like this:
> quest
You currently know about:
Pay For your Sword - Find 15 silver to pay for your sword and give it to Groveth Strongcloak.
Also, the other thing I’d like to do is maybe have the option to make the description dynamic, so it might show something like: (You currently need 11 more silver) as well.
Silver currently exists as a discrete object, as such:
A silver coin is a kind of thing. There are 4 silver coins in the old leather coin purse.
The old leather coinpurse is always on the player, I put in a rule to prevent them from dropping/removing it.
I’d assume there’s a way to count all those items. Any coins the player gets automatically get put in their coin purse, so I imagine we could just look in there. (Though maybe just using “enclosed silver coins” or something would make it not matter where the silver coins are, because nothing is stopping the player from taking the coins out of the purse currently.)
Also, since this already coming up with me trying to work with money (specifically buying drinks at a bar, but it’s going to be an issue in paying for the sword), I’m trying to remove silver from the player’s possession and keep getting an error saying:
Problem. You wrote 'now a silver coin carried by the player is nowhere' : but this is not explicit enough, and should set out definite relationships between specific things, like 'now the cat is in the bag', not something more elusive like 'now the cat is carried by a woman.' (Which woman? That's the trouble.)
With the following segment of code:
if choice matches "ale":
now a silver coin carried by the player is nowhere;
now the player carries a tankard of ale;
And, honestly, I can’t think of any way to be more specific than what I have there. I thought maybe changing “carried” to “enclosed” might work (since it might be in the coinpurse and not carried per se) but I get a similar error.
I know I’ve been asking a lot of questions the past few days, and I thank everyone for being patient with me.
Thanks for any help!