As the title implies it is basic RPG Framework. At current stage it is really basic, and can serve more as an code sample to see my thought process when I have created it, rather than fully fledged starting point for creating RPG game.
My main goal with this project is to make framework for RPG building game, where you don’t have to code, but where you simply assemble all needed functionality in Blueprints. Out of nessesity more core game mechanics are implemented in C++. These could be done in Blueprint, it would make them far to complex, and the goal is to make blueprints as simple as possible. Some of these are already in. They work at basic level, but I haven’t yet tested it by creation (or recreation ;p), more complex spells/abilities, like you can encounter for example in Guild Wars.
Also please note that all my decision were dictated by RPG mechanic design I have create far earlier, and all further addition will also be dictated by this design.
DISCLAIMER:
The code might work, or it might not work. It might blow up your PC or your city. I don’t know and I do not take responsibility for it.
It is provided as is. Updates are not to be expected. When there will be update in repository expect it will break all compatibility with previous code.
I might accept pull requests if someone is crazy enough to commit something here. But don’t expect that. If you want to commit, put your name in file in code, and describe here why you changed thing that you changed (or why you added new one).
Adhere to Epic coding standard. If you will not, you will burn by the flames of thousand suns for eternity.
I’m not working regularly on it. Most often on weekends. I’m not programmer, so expect bad practices.
If you have any feedback feel free to post it here. Or on GitHub. I might consider it or I might not. Depends on my mood, and how it fits to my plan.
Feel free to do anything with the code.
What is in:
-
Some Blueprint helper functions that will help you create Powers. Powers are active abilities that player can use to harm, help, or perform other interactions with world.
-
Effects - persistent objects that can affect any actor that have EffectManagerComponent. Also comes with some Blueprint Helper functions. Effects do not exist in the world beyond on actor that they are affecting.
-
Some more or less basic attribute system, along with struct data structures. They do not serve any particular purpose now beyond storing simple data, you can treat more as an example on how I decided to solve pretty common RPG games problems, like:
a) Where do I store character attributes ?
b) How do I know how many debuffs character currently have ?
c) Where do I get my data for calculations (resistances, value per attribute etc). -
Basic implementation of damage system. I utilized AActor::TakeDamage and UDamgeType class. I decided to use it solely because it is quite deep integrated into base code of provided engine already, and there are lots of events and blueprint function that make use of those systems. Instead of reinventing everything again I decided I will bend UDamgeType to do my bidding. Even though it looks like there might be potentially dozens of DamageType classes to fully support system.
-
Basic inventory management. It is implemented as separate component. It handles equipping and unequipping items from character. Also handles things like stats subtraction/adding from/to character.
Default implementation assumes that there is no stat stacking. Highest stat will be preserved and everything lower than it will not be added to final stat pool (just like in DnD).
What is missing:
- XP Gathering. I have no intention of adding any sort of levelling system. As I never plannned to have levels in the first place. Though There will be probably some sort of XP gathering, for small progression.
- Save system.
- AI.
- Quest creation helpers.
- Replication. Honestly I don’t even know how hard it would be to make this code good for replication as I never considered multi player.
- Melle combat system. Frankly I don’t even know how to best handle it. Trough powers, weapons, or as entirely as separate system.
- UI - well there is some basic UI. But there is nothing like Action Bars or inventory.
- Weapons. There is basic class, but beyond holding skeletal mesh it does nothing.
My plan is to create an ordinary shooter weapon system with some RPG twists (like spread/recoild handled by attributes and by player)
There is some sample content with code. I’m not 100% I uploaded everything (;. Easiest way to start working with it, is to create TPP template, name it RPG and the delete source code folder.
Copy my source code instead. Remember to do not use provided solution file. Delete it and generate your own.