I’ve created an RPG kit that anyone can now use! In this post, I will be explaining what it can do and how to use it. My main reasons for making this kit are: provide new developers and people who don’t code a system to work with easily, speed up the process for making RPGs, and provide my take on the way an RPG kit should be made.
THIS KIT REQUIRES THE PLACE IN USE TO BE PUBLISHED AND HAVE API ACCESS IN ORDER TO FUNCTION DUE TO THE SAVE SYSTEM BEING A REQUIREMENT TO BE COUNTED AS "LOADED IN"
Fundamentals
Most importantly, it comes with the base systems that all RPGs must have: a save/load system, an enemy system, and a level system (although I call them ranks in the kit, not levels). The enemy system in this kit uses an EnemyType system, which just means that there are enemy AI archetypes that can be applied to any enemy, for example: Regular, Brute, etc... The entire AI for all enemies is controlled by the main server script, RPGSystem; including follow mechanics, attack functions, and animation.Attack System
Each NEW EnemyType requires its own code in the RPGSystem under the Attack function, along with a dedicated folder with its settings. This is the only part of the system that requires code to make an addition. I have built-in utility functions for finding players in a few ways, but you have total control over what happens when they try to attack. I have a few template enemies set up by default.Follow System
Everything code-related to this system is automated. Control how each EnemyType follows players using the corresponding folder in ReplicatedStorage.EnemyTypesAnimation System
This was made specifically for this kit due to the lack of support for animation sharing on Roblox. With that being said, the way that animations are played in this kit are by reading KeyframeSequences. It's not perfect, but it's a much better alternative. All animations are played on the client, so any animation on an enemy will need to fire the client event for animating. To add an animation, simply save an animation in the animation editor plugin and copy it from the "AnimSaves" model inside of your rig. Put it inside of the ReplicatedStorage.Animations and you're all set! Control the animations that weapons and enemies use with their respective values.Due to the fact that the Roblox animation system and this animation system don’t work together very well, I made separate player movement animations. In retrospect, I may have stylized these a bit more than I should have, but you can change them as you wish if you feel the same.
Item System
All saving, loading, and equipping are handled automatically. There are four item types by default: swords, staves, bows, and potions. Each of these have a variety of values that determine the functionality and visuals of the item. For potions, however, the behavior needs to be added in the event that handles potions. I won't assume that users will only want to add health potions, so I left that open. What happens when you use an item can be further customized in the RPGClient script.Armor
I decided to go the HumanoidDescription route for this. Because of that, adding armor is limited to catalog items as of now (unless they allow for custom mesh ids, then please correct me). Adding armor only takes some ids.Shops
Automated of course, I wouldn't torture myself or others. The "ShopItems" folder is where the system looks for things to put in the menu. For each item, you can specify a description, text color, and ItemType. If the ItemType is "Weapon," then it will search in ReplicatedStorage.Items, but if the ItemType is "Armor," then it will search in ReplicatedStorage.Armor instead. There is one exception to shops, and that is the pawn shop. This shop should not be changed; any item that has a price value in ReplicatedStorage.Items will be sellable in this menu. To make a new menu trigger, simply add a bubble to Workspace.MenuTriggers with the same name as the desired menu. Touching this bubble will trigger the menu to open.Areas
Areas are folders of maps and enemies that are loaded and unloaded when entering portals. These areas also have the power to have specific lighting settings and music.Portals
When making portals to an area, keep in mind that there should also be a portal going back; in this kit, your respawn location is saved to the area that you are positioned in, so resetting won't get you unstuck from a portal-less area. To add a portal, use an existing portal or customize it and set the intended area and rank values. No extra work is needed.Spawn Regions
Spawn regions are how the enemy system determines where and how to spawn the enemies. You can have it spawn one type of enemy, or a bunch of different ones. You could also sprinkle small spawn regions throughout an area to take more of a random approach. When creating spawn regions, keep the orientation of each at (0, 0, 0) - this system works on flat planes on the x and z axis. To add a spawn region, create a part and make sure it's anchored with collision off. Keep the Y-axis of its size as small as possible. Feel free to make them any transparency, they will become invisible once the game starts running. Inside of a spawn region's "EnemiesToSpawnHere" folder, add models (or any class) with the name of an enemy in ReplicatedStorage.Enemies.Enemy drops
If an enemy has a "Drops" folder, the system will run through its contents and look for a corresponding item in ReplicatedStorage.Items - but only if the drop chance of the item happens to be in your favor (this is customizable by percentage).Installation
Simply follow the instructions on the installer (PLEASE READ THE DESCRIPTION FOR IT FIRST).Here’s the installer: https://www.roblox.com/catalog/4608319999/Chrythms-RPG-Kit-Installer
Here’s my video tutorial on adding to the kit (annoying voice warning):https://youtu.be/uJj4q7QWYO8
In conclusion, I hope this works out as a simple and easy starting point for anyone getting into making games and/or RPGs. There are probably minor details I missed in this post, but hey, it was fun putting something out there.
Version 2.0
For the sake of avoiding inconsistencies in my explanation, refer to this video for details.https://www.youtube.com/watch?v=SAR5lotH3mw&feature=youtu.be