Open RP - Typescript RP Framework

What is Open RP

Open RP is a framework written in Typescript that allow you to create new mod for fiveM using fivemJS basic functionnality extended by decorators, and an App factory .

Thinked on the design pattern of big framework like NestJS, it use Inversify to handle dependency injection so you could retrieve you service across your app easily .

OPENSOURCE ! : SoxZz5 / OpenRP · GitLab

EDIT: Removed old roadmap will add more info about Decorators and way to do a module with ORP in few days/weeks sorry for the time i’m also involved in a big Blockchain product right now so i don’t have a lot of time with my main work and my place of CTO.

5 Likes

hey is there a disocrd link ?

That’s a fake one by the way sry ^^ for replacement purpose could be lorem ipsum, maybe will create one, in few day

Is Open RP open source? I’m really sketch about such post since we had some of them in the past without a github repo and they all didn’t get released

It will but for now repo is private i just want to take time to make some documentation like database and other client and server function

the base framework will be openSource, but other script i will create maybe will be keep for my use only.

Hey, i put it public right now but as Edited in the post don’t ask for issues or something, also i will work on it but i will took my time so don’t burry me, i just want to give exemple for the community.

I will not invent everything so yee maybe there will be some Lua translation to TS but with my own object, own function using fivemJS core

Have some news char creator is near to be finished and i’m glad to present u my first non gender char

  • Orbital camera on right click with zoom on mouse wheel and scaleForm with instructional_button
  • Near to all possible option for pedVariation (with some blocking on color like pink or green for hair)
  • 2 Camera possibility (auto-switch with menu) but you could click on face or complete cam

i still need to do identity creation, that will update the police_board with firstname and lastname maybe will add more or change scale to another to put more text need to play more with scaleform

(PS i’m not a fucking sjw just answer to a friend that wanted to a do a goth emo boy feminised)
PS 2 : sry for bad english

This weekend i worked a lot on stabilisation :

  • SpawnPlayer is managed with conf (joinAnimation could be deactivated)
  • SkinCreator / Identity finished (some fix needed on UI)
  • Fixed teleport after skin creation use joinAnimation forced to load map
  • Add Sync with server of player postion and also at creation full player (will need to do the same after each player data change but don’t want to save all player data each second)
  • Add a World script used to player a thread each frame to set ped and veh density
  • Add a Right/Role service to prevent use of command with a call to server
  • Add a noclip functionnality with a free fly cam at stop put ped on floor and ease cam to player cam

What will come in the next days :

  • Better handling of no clip with speed change (maybe a smoothing also will see if it’s usefull)
  • Show key when in no clip
  • Prepare ADMIN UI (work in progress 5% just started need to think at UX more)
  • Prepare Player basic UI (health,hunger,thirst)
  • Prepare Player Money (money,illegal,bankAccount,cryptoAccount)

I will took time to make some documentation on how to build module, play with it, module required …
I make a lot of work on removing most of the common fivem mod like spawnmanager
for now ORP only required basic-gamemode (you could create one), mapmanager, session and hardcap
By the way a little ask about UX feel free to answer bro :slight_smile:

How admin UI should be displayed on screen ?
  • Middle & Large
  • Left & 1/3 of screen
  • Right & 1/3 of screen
  • Middle & Minimal

0 voters

Maybe i could do a minimal display and an expand icon to get it fullscreen (this is ez to do in scss)

Hello readers !

Dev diary at 18/03/2021

For now i ended the skin creator added some admin commands to help,
Make a lot on server side to get clothes / items / inventory

this is a preview about inventory, i made some function to get data for special object that need data like id card, here id card have name of player owner in label :slight_smile:


As u can see inventory as place, in the futur you could move item by drag and drop, made action with item, like split them, use if usable, give, drop …

There is also a part at the bottom of your pocket where you can find your bag place, every bag will not have same place and possible weight.

At the end you have your clothes you want to bring with u on ur day i limited it to 12 in order to have fun but RP too, could be change by config

will keep working hard on this base.

EDIT AT NIGHT :
worked hard for my main work and orp too today this is for now the inventory UI (no rage it’s on weapon_wheel key i deactivated it RIP) that’s not so RP to have 50 weapons <3

Thanks for making it public during development. It is a bit annoying as people often don’t read or understand something is WIP and will still expect support/open issues. I know i personally am hesitant about making WIP stuff open source, but it helps to a degree I guess with fostering relationships with a community so they don’t just take your word on it being open source later on.

You can always make a gitkraken so people can follow development some and is useful for tracking issues post prod/during development.

As far as displaying UI, you should probably make it a config option since people seem to have their chat/menus 12 different ways to Sunday kek.

Yeah, i’m on paid gitkraken version could do it, that’s a WIP but you could test it right now it work pretty well even if some part are still not ended you cloud create your character.

Concerning menu i know that many people want to use their NUI hopefully i made onNet(event) :wink: just have to make a final common to make callable net event exported by ORP base :slight_smile:

For now i was focusing on my own functionnality and the best UX that i can do after playing on many server, i seen a lot different UI.
The ui at this time is just a big Vue APP with a router that monitore NUI msg with two important func :

  • showMenu(routeName) // those just check the current route name and do is sauce to redirect you to the good route
  • initPlayer(player) // those init the player in the vue APP store in order to persist state over app

so if people juste respect what i did on my entities it should be ok to extend NUI :wink:

(btw not native english speaker so sorry if it’s not really clear and well written)

if u want to test it you need :

  • node
  • npm
  • basic serv with (mapmanager,session,hardcap)
  • take a look at orpconfig/ormconfig(BDD conf) before cry
  • go to orpbase run npm i it will also install UI node_modules
  • npm run watch (it should migrate all table to your before created DB put in ormconfig)
  • if u want the loading screen npm i and npm run build it
  • be sure to start orp-base

for now i’ve a little spawn bug just write restart orp-base in fiveM console all we be reloaded (hate those fucking texture not loading :frowning: ) :wink:
feel free to send me your think about all this stack

DEV DIARY : 20/03/2021

Today will make clothes working on inventory also will update UI on hover on item have more description, add a drag’n’drop to change item places
Will need to create item for clothes in order to have good images in inventory for now it look like that IG

DEV DIARY: 30/03/2021

Hey dude just to say i’m not dead, i just started a new job IRL so i didn’t had time in the last days it should be better after 1-2 weeks.

I’m still alone developing this (ahah again i had seen so big but i will do it !)

I was focusing last time on inventory handling for now there is not a lot of new i just added information card on hover of item for item like identity card to display the owner name …

I will impliment dragNdrop in the next pushes there is not a lot to do because i already handled database to use place number.

After this i will add also on click action overlay to :

  • use
  • give
  • drop
  • show (card etc)
  • view (card etc)
  • fill (empty bottle ? why not)
  • reload (weapon only)
  • put (dress and accessories)
    for other interaction i’ve no more idea and many interaction will use an Action HUD as a wheel or something like that (already seen i know) maybe som action should be disabled if u’ve no item, maybe job action will pass through the same system.

It still in construction in my head.

Sorry for my bad english.

I hope u will enjoy in the futur this framework.
<3

Edit: 11/04/2021 → Still not dead bro no worry it will be back in dev tomorrow :wink:

1 Like

DEV DIARY: 15/04/2021

Hey i’m back, i just pushed the item info that are showned on hover of item, i’m still thinking about actions menu (right click ? , hover ? menu placement ? …)

I will end it as soon as i can, before i will had the drag and drop to move item in inventory this is a screen example (in chrome so no data for item) of iteminfo card

By the way the ID card not showed on chrome because of need of a call to server to bring back ID card info but you can see the hover info :slight_smile:

Dev Diary: 16/04/2021

  • Added a readme for people that whant to try it

Yeah now you could install it, build it and run it just by reading readme, also added a coffee tips shit if you want to give me money for my work (if more people come to project all fund will be dispatched between members, don’t care about money, i’ve Bitcoin ^^)

  • Say hello to Loempia he just join the project yesterday to help me implement a slick framework
  • Created a discord for better communication between us and you (will past link in few days)
  • Trad will be implemetend with i18n on Ui in few days too
  • Talk a lot with player about interactions menu for item so all could be started this weekend
  • Husky/CommitLint will be added for some good practice about commit/push

Hope you still follow it and enjoy it, feel free to message me if you want to be involved in this adventure

my dude, the code design makes this unusable.
it’s waaaay to tightly coupled with other dependencies.
the DB connection is looped which is just awful.
all the scripts seem to execute most logic on module load through imports or requires. this is terrible.
there’s pretty much no modularity. what if I wanted to use a NoSQL db instead?
the RBAC system is over complicated by clutter.
there’s a lot of missing null/undefined checks.
no identity logs.
identity seems to be defined by a single primary identifier, which we already know is pretty easy to get around.
no regards to vertical or horizontal scalability or memory management.
I’m not saying purely functional is bad, but why not use OOP to structure the code better?
This is basically lua style coding ported to TS.
Everything seems to be an entity. why is that exactly? The DB should only store meaningful data.
Why does export function addItem(name: string, amount: number, data?: any) even exist if you just emitNet instead?
and Jesus Christ, why is the RBAC system queried for some actions client side and not server side? There are major security holes.

Thanks for your feedback.

The project is still a WIP so yeah there is a lot of mistake and bad things i was still learning fiveM bro.
Yeah we want to get rid of export function and use emitNet it’s in the pipe no worry
Yeah we are focusing on rewrite many part of the base, if u take a look at all my previous post i was focusing on UI/UX not a lot on base but we are working on it
For DB, i will take a look at make it better and add better env handling, and possibility to change.
It’s a lie that you can’t use NoSQL please before cry take a look at wtf is TypeORM → link here with mongo

RBAC if u have a solution for a better handling of role right message me, i want to learn more, i’m not the best dev bro, but i will do my best to give you the best framework WE can do, and i say WE because i want all of you involved in from far to near.

Jesus christ blalbal → because WIP , just whip me lmao

Oh and identity is in rework to be use with fiveM licences no more steam.
I didn’t wanted to create a signin/signup with account for player, i think that this step is too much as we can identify user with licences/steam and other.

How DB connect could be looped wtf :

 if (!IsConnecting && !connected) {
    IsConnecting = true; --> This shit go only time (maybe put delay if you loop)
    try {
      if (await connect()) {
        IsConnecting = false;
        clearTick(connectToDbTick);
      }
    } catch (err) {
      IsConnecting = false;
    }
  }

The only case i see if it’s ur DB not UP, he would try again and again to connect in what it’s a problem ? you have log of what happen, i still can throws error and stop exec if needed just say me.

And too finish we are in pass to get rid of basic fiveM dependency.

and for npm/yarn there is only what we need there is not too much but maybe we could do less

    "@citizenfx/client": "^1.0.2312-1",
    "@citizenfx/server": "^1.0.2312-1",
    "@types/node-polyglot": "^2.4.1",
    "colors": "^1.4.0",
    "fivem-js": "^1.3.3",
    "moment": "^2.29.1",
    "mysql2": "^2.1.0",
    "node-polyglot": "^2.4.0",
    "pg": "^8.5.1",
    "reflect-metadata": "^0.1.13",
    "typeorm": "^0.2.25",
    "vue-loader": "^15.9.3",
    "webpack-filter-warnings-plugin": "^1.2.1",
    "webpack-shell-plugin": "^0.5.0"

Hope i answered all your question, and i was readable i’m not english native speaker sry.

DEV DIARY: 18/04/2021

Hey as you seen there was a lot of change will be quick :slight_smile: :

  • We are rewriting the base in a base V2 regarding a lot further to architecture
  • We are happy to say that the new base is way better than the first we haved try it yesterday with pretty good sync
  • We add some more logic for better extensibility at the end

More will come in few weeks/days also with a link to our official discord :wink:

Removed discord link, discord links are not allowed outside server-bazaar

damn that shit looking good and written well keep it up