#[WIP!] WXS Framework - A new framework for FiveM

18 messages · Page 1 of 1 (latest)

unborn seal
#

Hello, I'm coming in with another post to introduce the WXS Framework.
Currently it's not much, other than a foundation that I'll be putting work in to in the coming time.

It's got the following features down so far:

  • User data handling
  • Multi-character system
  • Mutex on everything important
  • Automatic saving of characters
  • Currencies system with support for unlimited currencies
  • Basic inventory setup (Very barebones rn, but the idea is to provide generel, very extendable inventory logic later)
  • Character selection & creation with this module

My goals with this framework

  • Since I won't have the time to create new scripts for every aspect of a server, I'm going to make "bridges" for ESX & QBCore - these will allow you to run scripts from those frameworks and then they'll translate it to mine.
  • A few vital first party resources to show off the framework and Foact UI lib
  • Fully make all the functionality other frameworks currently provide

The reason I'm posting such an early project here, is that I'd love for it to be a community project, that everyone with the skills and motivation can help out with! I've laid somewhat of a foundation, but loads of stuff are still missing.

Here's the link:
https://github.com/Walter-Xean-Scripts/wxs_framework

unborn seal
#

veeeerrry WIP, UI will become a lot nicer when we get to the polishing phase. This is just a showcase of character creation, loading & saving data (can be seen by position saving, ig)

gloomy rain
#

Nice

grave glade
#

👍

unborn seal
#

After (nearly) completing the ESX integration, I've encountered somewhat of an issue that I somehow didn't fully consider.. what'd I'd do with different database layouts.

Now I've come up with a few ideas on how this could be tackled, but I'd love some feedback on what you would prefer. So here's the options:

A) You select either a QB, ESX or WXS formatted database layout on setup, depending on what you choose, select scripts (without modifications), will be broken in the framework. I will do my best to fork said resources and provide these modifications, but there will be escrowed stuff where we'll need the original developer to do some work.

B) I fork oxmysql, create some form of middleware that'll auto translate queries to old database layouts to WXS. This does come with it's own set of complications, like having to use our version of oxmysql instead of the original one, and a lot of work in catching all the different things

C) We just roll with our own database layout, and modify scripts that make database interactions themselves. And for future proofing, we create functionality in the framework that'll allow you to do what you need without touching the db yourself for tables managed by the framework. Again, I will do my best to fork said resources and fix the issues.

I'm the most fan of C, as it'll be the best (in my opinion) way to do it. But I want to hear y'alls opinions!

grave glade
#

C

deft rock
#

None of the above. Creators adjust their scripts for compatibility, not the other way around. Framework should not change just because someone don't know how to edit something.

Remember to get rid of exports, and use straight MySQL queries

unborn seal
#

I'd love to just do a framework with all the functionality I'd love to be in a framework, but I'm just not sure people would make scripts for it - and at the end of the day, one of the greatest joys for me when creating open source stuff, is to see people use it.

#

Honestly I'd love to drop the ESX and QB bridges completely tbh, I don't like a lot of how they do their things, and there's a lot I'd like to do differently.. but I also would hate not seeing people use it for anything.

I could ofc start creating a lot of scripts for it, but that would take a lot of time..

unborn seal
unborn seal
#

Alright, if anyone is following the progress or is interested, I've decided to go in a bit of a different direction with this framework.

In it's first release there won't be any QB or ESX bridges, I want the framework to have it's own identity, and frankly, most of the open source ESX & QBCore scripts have some fundamental security flaws, that I'd love to do differently with this framework.

The past couple of days I've started from scratch, reusing some of the code I had already written that was fine and thought a lot about what this framework should be.

I'm going for something really modular - that means that the framework is split up into "modules", that via a file, can be enabled or disabled. I'm not going to split it into a thousand resources, I want to keep the essentials in one resource (such as commands, notifications, characters, currencies, jobs, permissions, inventory, vehicles, status and licenses), that list might grow depending on what I feel like making.

Either way each module can be turned off, and if it isn't enabled, the framework won't even load the file, so you're not going to be loosing out on your performance if you choose to disabled modules. (Except for a very tiny amount of resource size, ig.)

The idea is to create a framework for any type of purpose, not just roleplay (though a lot of the resources I'm going to be making for it will be about roleplay).

If all you wanted was the ability to run QB & ESX scripts together; then I'm sorry. That's not going to be my immediate goal for now. In the future, maybe, depends on how well the process of creating scripts for it goes.

That's all for now, thanks for reading ❤️

graceful orbit
#

good job man catyes

torn mirage
#

Its nice to see someone making some major changes for FiveM 5932pepe12

unborn seal
#

The from scratch version of the framework is now nearing where the old one was at, but waaaay more modular.

When the resource is starting, it'll go over the modules list, and see which are enabled, check each module's dependencies and then include them on the specified context (server, client or both).

A successful load looks like this:

#

Now if a module fails (in this case I've enabled something that doesn't exist yet), it'll tell you with an error

#

This approach will allow me to build a framework for more than just Roleplay, since the user will be able to use the modules they want. This will also mean it'll be easier for other resource developers to disable logic that they have themselves.

sour zephyr
#

can you send your framework discord