Garry's Mod

Garry's Mod

Quest and dialogue system (with in-game editor!)
Denneisk 28. okt. 2022 kl. 19:25
Making a shop
So you want to let the player buy things, huh? Well, there's one way you can do it: using the fancy thing called reputation:

quest_list version
  1. Make a Talker that you will not use to give quests. It would look weird for your shop to do both.
  2. Create a dialogue to access quest_list on your merchant.
    https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2881271216
  3. Create quests on the merchant that have a reputation requirement. The reputation will be your currency.
    Make sure the quests are repeatable and that you have set up the rewards properly.
  4. Set the quest to give whatever you want to sell (either as a task or a reward).
  5. Add a timer task in the quest that is 0 seconds long and completes the quest when it ends.
    https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2882544313
  6. Set the quest reward to remove reputation equal to the price you want to sell for. Note: you can only remove up to 999 reputation, so make multiple removes if you need more.
    https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2882544736
  7. That's it! Your shop should now work. Test him out and see how it goes. Make sure to reset the blacklist.
    https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2881271227
    https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2881271235

quest_by_id version
This is similar to quest_list version but allows you to categorize your shop items.
  1. Make a Talker that you will not use to give quests. If your talker is going to give quests, then you will have to use the same quest_by_id tactic to emulate quest_list.
  2. Create quests on the merchant that have a reputation requirement. The reputation will be your currency.
    Make sure the quests are repeatable and that you have set up the rewards properly.
  3. Set the quest to give whatever you want to sell (either as a task or a reward).
  4. Add a timer task in the quest that is 0 seconds long and completes the quest when it ends.
    https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2882544313
  5. Set the quest reward to remove reputation equal to the price you want to sell for. Note: you can only remove up to 999 reputation, so make multiple removes if you need more.
    https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2882544736
  6. Create a dialogue tree with the categories and purchases you want, with quest_by_id pointing to your purchases.
    https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2882566479
  7. That's it! Your shop should now work. Test him out and see how it goes. Make sure to reset the blacklist.
Sidst redigeret af Denneisk; 31. okt. 2022 kl. 8:14
< >
Viser 1-15 af 18 kommentarer
Thanks! i was wondering how to do the shop like they did in the video.
Denneisk 28. okt. 2022 kl. 19:55 
Oprindeligt skrevet af Coalition Fortress The 2nd:
Thanks! i was wondering how to do the shop like they did in the video.
I believe the shop in that one is based on quest items. I should see if there's a way to track quest items like money, but I don't think it'd work.
hoobsug  [udvikler] 28. okt. 2022 kl. 20:16 
the "shop" in the video enables certain dialogue lines after you collect items
T639493 29. okt. 2022 kl. 7:37 
How do i exactly make him a merchant?
Denneisk 29. okt. 2022 kl. 16:32 
Oprindeligt skrevet af MONOLITH:
How do i exactly make him a merchant?
By not making him a quest-giver.
T639493 30. okt. 2022 kl. 6:24 
Oprindeligt skrevet af Denneisk:
Oprindeligt skrevet af MONOLITH:
How do i exactly make him a merchant?
By not making him a quest-giver.
Alright, got it.
p1mple 31. okt. 2022 kl. 1:58 
how do i make a merchant though
Mertt 31. okt. 2022 kl. 4:58 
how to see my reputation?
Denneisk 31. okt. 2022 kl. 6:24 
Oprindeligt skrevet af Irvin:
how do i make a merchant though
Oprindeligt skrevet af Denneisk:
By not making him a quest-giver.



Oprindeligt skrevet af Mertt:
how to see my reputation?
You can't currently, but any quests that you don't have enough reputation for will show up greyed out.
TW0_B1TZ__B0YFR13ND 4. nov. 2022 kl. 17:46 
E
Terolinx 27. nov. 2022 kl. 16:56 
how do you exactly make quests repeatable?
Terolinx 27. nov. 2022 kl. 17:39 
nevermind
ArlieBBoy 9. dec. 2022 kl. 19:29 
Your a LEGEND!
anewpickaxe 12. juli 2023 kl. 23:46 
I just found this but for me its not grayed out its whited out,that's not the part im worried about, if theirs one that is wiped than next time i enter i have to reset as it wont let me leave the text as other options are gone and even if i have the requirements.
Lekr0 31. juli 2023 kl. 20:49 
how to pay darkrp money ?
< >
Viser 1-15 af 18 kommentarer
Per side: 1530 50