Discuss Scratch

pertea_arloso
New Scratcher
1 post

How do i create quests?

so i am working on a game for my characters and its a quest game like if i needed one of my characters to go out and retrieve something and bring it back how would i do that? thanks for any of y'alls responses !
_nix
Scratcher
1000+ posts

How do i create quests?

I can't give you the exact scripts since they wouldn't fit right into whatever setup you have for your project already, but I can give you the general idea for (side)quests.

Quests have goals. When you're going on a quest, you have some objective – find the missing golden egg, defeat seven of these monsters, create a special shield for me, and so on.

Quests have rewards (usually). When you, as the creator of a game, are designing a quest, make sure that it's worth doing, otherwise people either won't do it or won't find it rewarding. Don't make the rewards too crazy, though – if someone gets you a special flower from a nearby field, you wouldn't give them the same reward as if they had just slain the dragon haunting the village!

Quests should be fun (usually). Obviously, nobody will enjoy going along a quest where you need to kill 50 bush monsters. You might be able to get away with something like that if the reward is good enough, but that leads us to the next point..

Quests should make sense. Why would someone be asking you to kill 50 bush monsters for them? Maybe the bush monsters are attacking their farm and you need to beat a bunch so that the rest might be scared away, which will make farming easier. Always try to have your quests make sense. (You can get away with a crazy nonsensical request sometimes, but that'll be easier if the person requesting your help is already a kind of humorous/joke character. You'll still want the requester to have a reason for asking for your help, but things like “my grandmother really likes scarves, can you please get me 30 of them for her?” can work.)

All of these matter even more if the quest is super important, for example because it gets you a key item you'll need before you can progress with the story of your game.


Now that we have an idea of what to keep in mind when we're designing our quests, maybe you've already come up with an idea for one! Make sure you write about it (on your computer or a piece of paper) so that it'll be easier to remember it. Then you can get to coding it.

Here's some scripts to inspire and help you..

when I am talked to :: events hat
if <not <player has quest [Hocus Revivus] ? :: custom>> then
display dialog text [My poor daughter has caught a terrible cold, but the special medicine she needs can only be gotten from Clericville!] :: looks
display dialog text [Please, adventurer, might you fetch me the medicine for her?] :: looks
prompt yes/no :: sensing
if <prompt answer was yes? :: sensing> then
display dialog text [Oh, thank you! The medicine is a herb called the "Hocus Revivus".] :: looks
display dialog text [I've heard it can be bought from the herb store at Clericville.] :: looks
display dialog text [It's a small village a little ways north of here, but it's across a terrible river I'm not capable of passing.] :: looks
display dialog text [You're really helping my sweet daughter. The poor thing won't last much longer, I fear..] :: looks
display dialog text [Please try not to take too long.. thank you so much!] :: looks
add a quest [Hocus Revivus] :: custom
else
display dialog text [R-really? I.. I don't know what I can do to help her...] :: looks
end
else
if <player has item [Hocus Revivus] ? :: custom> then
display dialog text [Oh, is that the herb my daughter needs you're giving me..?] :: looks
take player item [Hocus Revivus] :: custom
display dialog text [Why, it is! It's just as the town priest described!] :: looks
display dialog text [Thank you so much. I'll give it to her right away – oh, I suppose I should give you something..] :: looks
display dialog text [Here, I have little of convenience, but perhaps this might be useful to you..] :: looks
give player item [Old Cooking Knife] :: custom
give player gold (30) :: custom
mark quest [Hocus Revivus] as done :: custom
display dialog text [It's not much, but really, I'm so thankful.. I must give this to her right away..] :: looks
display dialog text [(The person walks away.)] :: looks
else
display dialog text [Please hurry, adventurer! I fear my daughter has little time left..] :: looks
end
end


If you aren't so heart-broken that you have to stop reading, another thing to keep in mind is how to do quests like “kill five slimes”. Take note of this particular part of the example I just showed you:

if <player has item [Hocus Revivus] ? :: custom> then
end quest scene :: grey
else
remind player of the quest :: grey
end

So here's how you might think to do the “kill five slimes” quest-completion-check:

if <player has killed (5) * [Slime] ? :: custom> then
end quest scene :: grey
else
remind player of the quest :: grey
end

But your “player has killed” block probably checks how many times they've ever killed those slimes. So maybe it would be better to have a variable that tells you the number of slimes you've killed for this quest:

when I am talked to :: events hat
if <not <player has quest [Slime Killing Time] ? :: custom>> then
display dialog text [For the purpose of this example, please defeat five slimes for me!] :: looks
set [Slimes killed for Slime Killing Time quest v] to [0]
add a quest [Slime Killing Time] :: custom
else
if <(Slimes killed for Slime Killing Time quest) < (5)> then
display dialog text [Hey, have you forgotten to kill those slimes? Or are you just too scared!?] :: looks
else
display dialog text [Wow! You really went through this task for me! Thanks!] :: looks
give player gold (5) :: custom
mark quest [Slime Killing Time] as done :: custom
end
end

when the player defeats a slime :: events hat
if <player has quest [Slime Killing Time] ? :: custom> then
change [Slimes killed for Slime Killing Time quest v] by (1)
end

Hopefully that makes sense.


So that's really all I have to say about making quests in your game. Hopefully the examples are helpful in getting you started with making the code for your sidequesting fun! Clearly there's a lot of blocks there that I just pretended existed, but hopefully they're all descriptive enough for you to make on your own. After all, that's the part you need to do to help you get better at programming.
Charizard746
Scratcher
100+ posts

How do i create quests?

Create a variable called “Quest” and once your character retrieves it set the variable to something.
EmbertailTheSheCat
Scratcher
2 posts

How do i create quests?

I was reading the thing to inspire for quests. It gave me an idea for my hunting quest in my Warrior Cat game. If you want to check it out, here's the link. Hopefully, I will add the quest today!

scratch.mit.edu/projects/200459948

cs984927
Scratcher
7 posts

How do i create quests?

move  steps
if <> then

end
EmbertailTheSheCat
Scratcher
2 posts

How do i create quests?

My idea did not work out.
--_Nova_--
Scratcher
1000+ posts

How do i create quests?

EmbertailTheSheCat wrote:

I was reading the thing to inspire for quests. It gave me an idea for my hunting quest in my Warrior Cat game. If you want to check it out, here's the link. Hopefully, I will add the quest today!

scratch.mit.edu/projects/200459948

Please do not necropost, the OP would have bumped if they were still interested. Also, try not to advertise unless you want to create a topic in the Show and Tell forum, and always try to be constructive.
MrFluffyPenguins
Scratcher
1000+ posts

How do i create quests?

when green flag clicked
say [Bring me a cookie!] for (2) secs
set [quest v] to [cookie]

when I receive [get cookie v]
set [cookieGotten? v] to [true]

when this sprite clicked
if <<(cookieGotten?) = [true]> and <(quest) = [cookie]>> then


say [Thank you for the yummy cookie!] for (2) secs
set [quest v] to []
set [cookieGotten? v] to [false]

else
say [You don't have the cookie...] for (2) secs
end

Just an example.

Last edited by MrFluffyPenguins (June 24, 2018 21:03:55)

AngelicNecko13
Scratcher
1 post

How do i create quests?

how do I make a quest game with the new(ish) version of scratch? All of this is helpful but most of the blocks here don't exist. If someone could reply ASAP, that would be amazing. Thanks!
PrincessFlowerTV
Scratcher
1000+ posts

How do i create quests?

AngelicNecko13 wrote:

how do I make a quest game with the new(ish) version of scratch? All of this is helpful but most of the blocks here don't exist. If someone could reply ASAP, that would be amazing. Thanks!
Please create your own topic to answer your question. You will be able to get a more direct response.
Also, this topic is from 2018. So I doubt the original poster need this topic anymore; reporting to be closed.

Powered by DjangoBB