I’m curious about how one would go about making an RPG event system, much like the one used in the game engine “RPG Maker”.
You can make different events on each tile in the game, that can do so many different things. You can move your event around, make it start a conversation ones interacted with, have it give items to the player and so on… all of which is fairly straight forward on it’s own, but when you start adding them together it gets unclear to me how you would avoid the need to make a new class for each and every event (which would end in a massive amount of classes).
I’ll give an example:
You have an NPC that ones talked to will check if you have met a certain criteria, checking your inventory for an item for example, if you have said item it will say one thing, if not another… further more it will teleport the player to a location if said criteria is met, granted the player answer yes on a popup window.
Sounds fairly simple to program, and as a standalone class it is no problem, but how do you make a system for this, so that the next npc that will do something similar can use the same class setup?
Or better yet, what if another NPC is only going to say some random word, but not give any items?
In a game like this, there is so many things you want your events to do, and you will have thousands of events, so making one class for each event seems like the wrong way to go.
I was thinking maybe some sort of editor that allows you to add a conversation line, a movement route, a teleport, a item, etc, so you can set up a list of “actions” to perform.
Anyone know how I could start doing something like this?