RPG Skills Framework (Work In Progress)

One of my current projects on roblox is of course an RPG Skills Framework. The idea is to create as many skills as possible within this framework so new comers don’t have to worry about doing it. The current skill that’s completed is Athletics however I am looking to expand upon this in the coming months. It is open source so you can view it here: GitHub - flatline115/RPG-Framework

Any comments or suggestions would be appreciated, thanks!

1 Like

I’m excited to see this when it’s completed. Glad to see someone helping out newcomers in the RPG Genre!

Thanks! I think this will help them a lot given the fact that many games simply lack in this aspect. I hope to be apart of fixing this thus improving the genre as a whole.

If you really want to dive into making this user friendly… Try making it a plugin.
I’m sure a lot of users with less scripting knowledge would enjoy that. :stuck_out_tongue:

[quote] If you really want to dive into making this user friendly… Try making it a plugin.
I’m sure a lot of users with less scripting knowledge would enjoy that. :stuck_out_tongue: [/quote]
User accessibility will come last on my list; once it is in a near releasable state I’ll decide whether or not to make it a plugin.

That RemoteEvent’s exploitable. You shouldn’t set values from the client like this.

e.g. client decides to exploit their Athletics level to 1337.

local replicatedStorage = game:GetService("ReplicatedStorage");
local master = replicatedStorage.Master;
local player = game.Players.LocalPlayer;
master:FireServer({"change"}, {{player.Levels.Athletics, "Value", 1337}}); 

You shouldn’t trust the client like this.

Oh, another point I think I should make.

If an exploiter client changes something like [tt]plyr.Levels.Athletics.Experience[/tt] directly, even though FilteringEnabled - it wouldn’t replicate directly - they could abuse your remote system to pass their exploited value to the server.

[tt]plyr.Levels.Athletics.Experience.Value = 9999999[/tt]
[tt]Moves forward[/tt]
[tt]- insta-levelling -[/tt]

I know it is exploitable but I don’t see many fixes to this; doing it on the server is far from ideal.

There is an easy fix you can do - which applies to many other things. You can create an interface to your RPG stats, which you can then define to use RemoteFunctions or Events.

For example, you can create a Module which incorporates the following functions. Notice, that this small “documentation” allows you to incorporate a LOT of versions on how this actually should PERFORM this function! The cool part of this is that the “user” (the developers who use your API) can rely on this documentation, while you provide the actual code that performs the operations. I include function names, arguments and possible implementations.

Also, notice that, due to you (should) tunnel all operations through several functions, you can easily add features as logging, GUI notifications, etc. This is a very powerful way to code things, and also a very scaleable way, due to the fact you can change ONE function to change the complete operation of your script.

Skills:GetSkillLevel(string Name)
This function returns the level of a Skill with identifier Name. Returns the value if exists, else returns nil.

Skills:GetSkillXP(string Name)
This funtion returns the XP of a Skill with identifier Name. Returns the value if exists, else returns nil.

Notice that, in general, above functions should use the same “way” to get a value of either XP or level. I can imagine two implementations of this. You can either use the current .Value system, but this allows non-filtered games to easily change these values. The .Value version would lookup the value of the Name skill into some container.

The other implementation would be to use RemoteFunctions, where you store the ACTUAL skill values inside a table on the server. Notice that now, it is not (directly) possible on non-filtered games to change the value of the skills, as it does not physically exist on both server and client. To change the value, you need to ask the server to change this. This adds one layer to complexity. However, still if players really want to, they can easily crack this system. To fix this, you can add a layer of security where updates can only be called like - maximal - 60 times per minute, where the maximal XP upgrade is a certain value. This can still be cracked, but “hackers” cannot IMMEDIATELY get extremely high amounts of XP.

So,

Skill:GetSkill(string Name, string Type)

Gets the value of the skill with identifier Name, of type Type. Currently, the only valid Type values are “Level” and “XP”. Implementations are as described above; either using a Value system (not secure on non-filtered games) or using Remotes, where the values are stored ONLY on the server.

Skill:IncreaseSkill(string Name, double Value)

Increase the skill XP with a value Value, identified by Name.

On the server side, you need to define above functions too, returning the actual values. IncreaseSkill could use a RemoteEvent, as it is not necessary to return a value. However, you can also use a RemoteFunction, where you could return a boolean which indicates a succes or not, and the new value of the skill. If this value is false, it could mean that your security does not allow the change of such (huge?) increases.

That should create a baseline with a very handy interface to skills. Later versions could also add - for example - events, which you can connect to if a Level is updated, or a Skill is updated.

Hope this helped you. Feel free to ask any questions.

A thank you for the time and effort you put into your post (and apologize for my lack of a response; I don’t come here much anymore) so I must address a few things:
A maximum experience “grant” doesn’t seem ideal as it ignores if somebody has traveled a long time through the open world traversing its landscapes. Sure this is one situation where this isn’t great and maybe this problem wouldn’t even occur a lot but the point stands.

Furthermore, the reason I did not put it (level, experience, etc) on the server is so that others could easily create their own GUI notifications; which could be far superior to what I could ever produce given my expertise lies in script logic and not GUI making. I do like the idea of an overall interface however to get skill information and I will implement it within the next 10-20 minutes as it is a brilliant idea!

Thanks for the input and ideas, I appreciate it.

Acrobatics has been added (as well as multiple bugs fixed). Going to work on swordfighting next.

This will be very exciting to check out!
I’d hope that you maybe keep us updated? :slight_smile:

[quote] This will be very exciting to check out!
I’d hope that you maybe keep us updated? :slight_smile: [/quote]
Of course! Basically whenever I work on this project (going rate every couple days) I usually get a lot done and thus after a session I will probably post here important changes to keep you’ll informed on the project :slight_smile: .

Sword fighting is added.

Finished the Light Armor Skill.

Does that imply you have an armor system, or at least an interface to one? :DDD those are so much fun

Does that imply you have an armor system, or at least an interface to one? :DDD those are so much fun[/quote]
Yes, it does mean that. I am splitting it up between light and heavy armor (Shoutout to bethesda). The user assigns the armor and my system takes care of the rest in terms of damage modifiers and all that jazz.

Heavy Armor Done.

Did work and did the core of leveling up on the server. Just have to add in the effect for all skills.

Armor interface is almost done. When that’s finished a beta release will be made.