Setting Up Shop: Crafting Stores, Using Currency (The Forge #2)

Acquiring wondrous items and services is a staple of the RPG.  With little difficulty, you can create a store in the Quest Creator, following the techniques laid out below. 

The very first thing you'll want to do is write a card/screen that awards the adventurers some amount of currency (gold/silver/etc). You set this amount (the context) with the command shown below in blue text: {{silver = 30}} . Players will not see this in the app, so you need to tell them what they've acquired or been given in normal narrative text (white). 

StoreContextSet.PNG

Now we create the "store".  We'll show you what this might look like first in the app...

StoreAppCap.PNG

You'll see that we've stocked the store with items of varying value, some of custom make (which we'll have to detail the effects of in later posts), and others that are Loot items from the Base set or "The Horror" expansion (Bandages). Importantly, we also have an option to advance ("Proceed...") to the story at the bottom, for those that may not wish to blow their stash of cash in one place. Now for the script that makes the store possible...

ShortStore.PNG

You'll notice that only the scripts in yellow after the }} and those in white show up to players in the app.  For every item listed, you need 3 lines of script players will never see. Luckily, those can be copied and pasted with slight modifications--they need not be written completely each time. So to begin:

* {{ silver >= 5}} Five silver obtains a "Potion of Immense Girth".

The * sets the following line as a choice for the players, while the (hidden from players) {{ silver >= 5}} tells that choice to only appear if the players have 5 or more silver. 

Two lines beneath the yellow decision text, we establish the new context if the adventurers choose that decision. The new context is to give the adventurers the potion {{ hasPotion = true }} and also to deduct the price from the pool of currency in the party's possession {{ silver = silver - 5}}. 

The white line of text tells the players what they got by choosing the decision, and the **goto Cost** takes us back to the title card (which we named #Cost, but you may name differently), in case they want to purchase additional items from the store.  

Eventually, through context elimination (no more currency) adventurers are left with only one choice, shown below. 

AutoProgress.PNG

Note that there are two possible issues you may encounter in the Quest Creator and App in relation to stores...

1) If you try to test the store in the Creator by clicking on "Play from cursor" at the store screen, it's going to show you only the option (pictured above) taking you out of the store and not the items available.  This is because the simulator thinks the adventurers don't have any currency to spend.  If, however, you go to the card where you set the context (i.e. gave them currency), but play through to the store, it will show your options (so long as you've scripted properly). 

2) It is sometimes possible to "trick" the app and spend more currency than the party has (effectively going negative), if you have some currency left, but less than the most expensive option.  After going negative once, all store options will then disappear. Of course, that's only a problem if the players are without a sense of honor! 

And that's all there is to it. Happy Quest Crafting!

Have an idea for the next Quest Crafter or feedback on how we can make it more useful to you? Email us at Authors@Fabricate.io or leave a comment below.