Download

RPG Template

Hello UE4 users and fellow creators!

I am Thokash, the creator of the RTS Toolkit!
I’m currently working on a template for my absolute favorite game genre, the RPG. Earlier this week I started working on an RPG template, looking to include everything essential to an RPG game!

This includes:

Inventory system
Equippables (armor/weapons)
Usables (potions)
Loot (rarity tiers and random drops)
Quests and leveling up/exp
Dialogue
Merchants
Combat (fighting, skills/spells, attributes, traditional RPG style damage/defense calculations while retaining an aspect of action in dynamic combat)
Map/Minimap
Save/Load game

So far I’ve laid the basics for many of these. Below is a video showing briefly the combat mode and enemy indicators. Each enemy was placed into the level and assigned a level. The difference between the enemy’s level and the player’s level is indicated by the skull in the health bar. White is a few levels below, green is similar level, red is a few levels ahead, and black is way ahead in level, too difficult to fight. I see a lot of RPG’s use this style of content delay, keeping you from fighting harder enemies too early in the game.
You’ll also notice the combat mode indicator at the top-center. When combat mode is activated, you can’t loot objects or interact with friendly NPC’s. Also keeps you from saving. Stamina, mana, and HP also regen at a slower rate during combat.
The camera FoV and distance increase is also pretty common during combat in many RPG’s. It’s not as smooth as I’d like it and that’ll be fixed with a simple timeline curve. That will be changed during the polish stage.

https://youtube.com/watch?v=7nXCs2l8cG8

The next video will be posted tomorrow morning. It’s a brief clip of the loot/inventory system.
I hope to have this finished by the end of July but I am a one man team so it might take just a bit longer than that! As always, feel free to leave and comments, questions, criticisms!

Thanks,

Thokash

A little update (although it was finished yesterday).
This is the loot system.

https://youtube.com/watch?v=YTZ7V5s5cLo

Each lootable object has a ton of customizable parameters in the editor. It has a rarity/drop table. So you manually set the chances of common, uncommon, rare, and legendary items dropping by percentage range. Each lootable also has a name array input that will take each name, match it to an item, then randomly select items at beginPlay based on drop rates for rarity. There are amount of possible loot ranges, stackable ranges, gold ranges, and also input for items you want in the lootable every time.
There are also, of course, customizable parameters for static mesh and object name. Lots of other editable features on the BP but those are the main ones.

Every item in the game is based off of a huge struct that holds all item info. Each of these items is defined in a data table that can be added to for new items. Different types of items include usables (potions, food), equippables (weapons and armor), materials, quest items, misc, and junk. Pretty standard stuff for most RPG games. Right now the item library is small for demo purposes. A few of each. Then one piece of armor, helm, and weapon for each rarity tier.
There are different weapon types. This includes 2 handed, 1 handed, shield, ranged 2 handed, ranged 1 handed, and unarmed. This won’t be implemented until the meshes for the weapons are made. 4.8 allows mesh defaults to be set in structs. Earlier versions of the engine don’t allow many types of variables to be set in structs by default (which is why item thumbnails aren’t appearing on the loot screen and inventory menu). I’m gonna switch over here after the inventory is entirely finished. Kinda need the mesh default for equipping weapons! I do have test items that use test meshes for helm, armor, and weapon. Equipping them works splendidly.
Each item also has a weight. Once the player reaches his max carry weight he becomes encumbered and is slowed significantly. There’s a gold little indicator by the character info panel at the top. Not all games do this but I kinda like it rather than limiting the inventory. Removing it is a simple matter of disconnecting one node in two functions.

The pause menu will consist of the basics. Armory for equipping armor, weapons, and potions (quickslots). Attributes for leveling up, seeing character stats, and assigning skills to skillslots. Inventory, quest, map, and options are pretty self explanatory. The inventory you see here is almost fully functional, just gotta link the drop button with the drop functions in the player character. Each item is stored in the inventory and its description can be seen on the right. This screen displays some essential stats as well as your inventory list. Stackables are all stored together unless stackable limit (99 for most items) is reached. The inventory can also be filtered based on item type. From the inventory screen you can use usable items, equip armor/weapons, and drop items which aren’t quest items.

Hoping to have equippables done sometime this coming week, probably by the weekend. I’m just a little scared to move over to 4.8, though. My last experience, switching over to 4.7, was a nightmare. Everything I had (RTS toolkit) was completely destroyed by the system. I had to manually recreate every single blueprint, function, and variable. The only thing that didn’t get screwed was my UI/widgets. So hopefully my transition to 4.8 will be a bit more smooth!

(Edit: Take comfort in knowing you’re an awesome person if you get the “Plasteel Cylinder” reference)

Well this is cool! I am assuming it will be available on the marketplace? :wink:

I especially like your inventory system management, nice work there!

Man this is really impressive. I plan to do some inventory style stuff with a mod for UT4 soon.

One thing I really feel the market place needs is more complete example games and this looks really good for that. Are you planning to sell this on the market place?

Bjorn - Thank you! And yes, I plan to submit it on the marketplace when it’s all finished. Same as my RTS Toolkit, I’ll also be releasing a rather lengthy guide. This one probably a lot longer than the 27 page one for the RTS Toolkit. This template so far is already bigger than the RTS one. The dialogue and quest systems alone are more massive than the entirety of my previous project :slight_smile:

Castle - Thank you! So far the inventory is one thing I knew I’d have to spend a lot of time perfecting. Took me a bit over a week to get it exactly the way I want it. I’m gonna upload a short video here in a bit with the rest of the inventory demo. Don’t know why I didn’t upload it before but the drop function is pretty important to the entire inventory system.
And yes, I agree! I haven’t had any experience with Unity but I hear a lot about the awesome templates they have on their marketplace. I agree, there’s a place for them on the market. Epic already has the basics but they could be expanded upon (RPG, fighter, RTS, TBS, etc.) I think templates would help a lot of users feel like they could get started a bit quicker.

Ok, this is what I left out of the last video for some odd reason. Easily one of the more important requirements for an inventory system.

https://youtube.com/watch?v=xJACacTYZXc

Here you can see dropped items physically being dropped onto the ground somewhere near the character. Dropped items have a built-in inheritance function for mesh and other variables. So when you drop an item you can set its mesh to match that of the dropped item whether that be armor, weapons, or something like a potion. Right now the mesh is just a basic sphere but I plan on making a burlap sack looking bag for the dropped items. I’ll work on the weapon/armor/scenery/misc art for everything after the actual code is finished. Anyway, each dropped item can be picked back up just like any other loot.

In addition, when stackable items are dropped, the player is prompted to select how much of the stack he’d like to drop. From 1 to the specific item’s stack amount. This item will be dropped (or the button with an ‘X’ can be clicked to cancel the drop) and the selected amount of the stack will be transferred from the inventory to the dropped item.

And yes, the ‘X’ and the ‘√’ will be changed to actual images. Those are just placeholders.

I have your RTS toolkit and will have to get this one as well how much are you going to sale this for?

Wow Thokash, that looks great!

Amievil - Thanks for the support!

ioFlow Studios - Thank you!

Unfortunately I haven’t been able to touch this since my last post. School and work and all that. But I’m getting some time next week to start working on it so I hope to have this out a month and a half later than originally planned (Aug some time)

This is some good stuff man.

I’m really looking forward to this!

Could you share any sneak peeks? :smiley:

Ryzon - Thank you!

nexuz6 - Absolutely! I had stopped working on this project for about a month and a half because of school and work but I started the project back up the last couple of days. I should have a video detailing usables (potions, consumables, etc.) by the weekend!

So after finally getting back to this, I have finished (most of) the usables functions. All that’s left is UI for quickslots but that will be completed when skills/abilities are finished. For right now, the usables are activated through the inventory. I think the quickslot(s) will be for health potions only. Not sure yet.

https://www.youtube.com/watch?v=mIhz5K-wYaE

First off, you’ll see that I updated the drop slider. It now works along the entirety of the slider. Also, the ‘X’ and the check mark are images instead of characters.

Each usable will create its own effect on the character who used it. Starting at about 1:15 you can see some of the usables. These are very modular functions. The health, mana, and stamina use the same code with variation based on the actual effect. Note that these are effects over time, not instant effects. Each effect’s visual particle will also be colored to differentiate it from other usable effects. Health, for example, is red. Mana is blue, stamina is greenish yellow, and experience (not shown for a later mentioned reason) is cyan. Hybrid consumables (water = health & stamina, hybrid potion = health & mana) will have a color for each effect. This is shown in the video. One thing I made sure to do was to check if a usable is activated before spawning the particle. This would prevent any knucklehead from trying to spawn millions of particle systems by using infinite health potions at once. Only one particle system for each effect can be active however many of the same effect can be active at once. Basically, if 10 health potions are used, 500 (10 x amount healed) hp will be healed back but only one red particle system is spawned.
Also, the experience usable will be done later. It works right now on the usable side but the experience/leveling code will be done later with the quests and combat.

Not featured in this video is the cooldown for usables. This is only active in combat. When in combat, a cooldown is applied to usables to prevent a player from spamming health potions over and over. A small dialogue pops up when the player attempts to use an item when usables are on cooldown. Super exciting stuff.

Fantastic! You’ve really got something here. I’m curious about the combat system you have in mind? Otherwise you seem to have everything covered for template.

Cinebeast - Thank you! It may have been because I was playing the Witcher when I started this but it’s action RPG oriented. You swing in a direction, you do damage to the enemy based on his defenses. That being said, it’s a bit like Kotor or a similar type of game in that the enemy you’re targeting is the one you’ll attack. Some of the abilities (which I haven’t made yet) may be AoE but the basic attacks are targeted.

You know I can’t wait for this!!

Just a quick update. Moving to 4.8 I’ve started working on thumbnails and meshes for all the items (4.7 did not allow textures/meshes/most variables types to be set in structs). Kind of a shame the thumbnails turned out so small. They don’t look as good when they’re so tiny.

https://youtube.com/watch?v=OSM4spHUfTY

Looking good man.

So… The RPG Template still exists. At this point, though, it’s progress is incredibly slow for what I’d like. My next good chunk of free time will be between semesters this winter. Until then, I present the RPG Inventory System… Which is pretty much all I’ve been showing off so far, anyway.
Here is the equip/unequip system. It’s pretty straightforward. What you’d expect from equip functions. You’ll see the meshes for the swords, helms, and the dropped item. Items like the “Helm of the Lion” have modifiers like some high tier items in RPGs. Those are added/removed from players’ stats upon equip/unequip.

https://youtube.com/watch?v=ALjyVsuspEw

Also, I just realized I never put the materials in a video. I’ll upload a quick one but it’s basically the ability to scrap items for materials that could be used for some kind of crafting. Each item has specific materials into which it can be broken down.

Here is the scrap/materials feature. It’s small but kind of necessary for most RPGs.

https://youtube.com/watch?v=yKBk4OMMZlk