An intro to Common Events (A noob's first crafting system)
So, yeah, I made my first go at a crafting system. Let's introduce Common Events to see how I did it.
In this case I've made a "Potion Book" for my halfling potion crafter to use in order to select a recipe to make. I made the book as a standard key item - the sort that can't be consumed or sold or used on anyone... except I made it usable from the menu screen and gave it a Common Event effect.
You can pick Common Event as an effect on the last page of the effects menu for something like an item or skill. When it's used it triggers the common event you've put in the dropdown.
So what is a Common Event?
Common Events are events built in the Database instead of on a map. The contents of these events are made with the same event commands as any other event, and there's even a way to call a common event from a standard on-map event, as show below:
Calling a Common Event from a map can be used for things you use a lot, such as a shop inventory that remains the same across different locations, so you only have to make adjustments to the one event in order to update every shop.
But that's not how I'm using it today. Instead I'm using a Common Event in order to make an event that's activated by an item.
The rest of the crafting system is a simple series of Show Choice commands, Change Item commands, and the like.
I just made a handful of potions to craft using the book for now. Since the Show Choices menu only allows 6 options if I want to add more later I'll either have to make choice 5 a "show more choices" option or look into alternate ways to build a selection menu. For the sake of this example this will function just fine, though. I also set Cancel to Disallow so the player will actually have to pick a choice from the options, even if it is only to exit the menu.
So let's say the player wants to make a Potion. Well, we need to 1) check that enough of the ingredients are available, 2) remove those ingredients from the inventory, and 3) give the player a potion to replace them. That's really all there is to make a super simple crafting system.
For the first part, I'll use a Control Variable command to count the medicinal roots in the inventory and save that number as a variable.
Then I made a Conditional Branch to check that the variable storing the number of medicinal roots in the party's inventory is greater than or equal to the amount needed to make a potion.
If the condition is met, then the next step is to tell the player how many \V[22] they have and offer the choice to make the potion if they have enough. \V[22] is how you can call the number saved in a variable (in this case, variable 22) into a text command so the player can see what's in the variable. If V[22] is less than 2...
I decided to add a Jump to Label here (and the Label itself before the initial Show Choices) so the player will be returned to the original potions options if they can't make the item, rather than just ending the event and kicking them back to the field and having to open the potion book from the key items all over again to try another recipe.
If they do have enough they get a new Show Choices asking if they want to go ahead and make the potion. No will Jump back to the same label while yes...
changes the items (minus two medicinal roots and plus one potion) and plays a sound effect.
From there it's just rinsing and repeating for whatever other potions the book lets you brew!
Finally, I decide that when the player chooses to Exit the potion making menu they should be taken back to the menu screen instead of just left out on the map, so I add an Open Menu Screen command after a sound effect of the book being closed.
I'd rather make it so they go back to the Key Item menu specifically to end up right where they left off, but I'm not sure how to do that (yet). (If you know then let me know, otherwise it's off to do some more research.)
When I test the item in game all I have to do is select the Potion Book in the inventory and...
It's not pretty, but it's functional. Learning comes first, pretty comes later.













