Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notice: Limited feature/enhancement updates (v3 info) #1699

Open
thelindat opened this issue May 12, 2024 · 21 comments
Open

Notice: Limited feature/enhancement updates (v3 info) #1699

thelindat opened this issue May 12, 2024 · 21 comments

Comments

@thelindat
Copy link
Member

No major enhancements or features will be implemented or merged from requests.

Ideally any bugs or minor nuisances can be patched, or other small changes can be implemented infrequently - the idea is to be able to provide long-term support and ensuring a stable release is always available.

I want to be able to work on ox_inventory v3 at some point which will guarantee many breaking changes and will require a great deal of effort to help users transition towards it.


Some expected changes for v3

  • Improved third-party support, with externally registered items, crafting recipes, etc.
  • Improved separation of data and code (no functions in data files); using json and the database
  • Improved database structure
    • register at least some generic item, stash, and shop data in the database
    • store inventory slots per-row to improve indexing and saving, especially reducing the amount of needless data being sent to the database
@thelindat thelindat pinned this issue May 12, 2024
@thelindat thelindat changed the title Notice: Limited feature/enhancements updates Notice: Limited feature/enhancements updates (v3 info) May 19, 2024
@CeebDev
Copy link
Contributor

CeebDev commented May 19, 2024

Some suggestions for the v3

  • Be able to use / interact with items directly in containers
    Ex:
    • Cigarette pack = container with 20 cigarettes, be able to use one of them instead of swipe it to the main inv)
    • Wallet = container with money, be able to pay in shops etc with the money inside wallet
    • Steal someone = be able to search inside containers of robbed player and take items
  • Select payment methods in shops
  • Check degrade for ingredients in craft benchs
  • Add containers with predefined items in shop (Ex: Cigarette pack)

@thelindat thelindat changed the title Notice: Limited feature/enhancements updates (v3 info) Notice: Limited feature/enhancement updates (v3 info) May 19, 2024
@thelindat
Copy link
Member Author

Be able to use / interact with items directly in containers

This would definitely need to be a case-by-case basis.

Wallet = container with money, be able to pay in shops etc with the money inside wallet

Containers definitely need a rework and I need an improve "search" function that takes some different options, including going through containers. Would get a bit shitty if we have nested containers, however.

Steal someone = be able to search inside containers of robbed player and take items

Pretty much comes down to needing to return to the previous inventory, or otherwise making containers open a new inventory window.

Select payment methods in shops

Already something I've wanted to do for a long time.

Check degrade for ingredients in craft benchs

Crafting system needs a complete overhaul.

Add containers with predefined items in shop (Ex: Cigarette pack)

I feel like hooks are good enough for this; also need to consider - does this need a full inventory or just some metadata (x cigarettes remaining). On the matter of hooks, the new inventory will be built around them to allow far more actions; a lot of hardcoded behaviour will moved to hooks.

@TonybynMp4
Copy link

Be able to use / interact with items directly in containers

This would definitely need to be a case-by-case basis.

Could be done by adding something similar to stack & close in data/items.lua (or whatever it becomes) 🤔

Also would it be possible to have tabs for the inventories?
Would make for a better experience when dealing with containers / other player's inventories

(could have all the player's containers as tabs* on the left side & the ground/drop/ [insert other opened inventory (trunk etc)] on the right side)
*+ (ideally configurable) extra inventory tabs (allows having a whole inventory reserved for x or y item type i.e clothes, keys, food etc)

@CeebDev
Copy link
Contributor

CeebDev commented May 20, 2024

  • does this need a full inventory or just some metadata (x cigarettes remaining).

There is ton of ideas to implement if container was ez to use

  • buy a menu at a fastfood -> bag with all item inside
  • buy a fishing kit -> box with fishing rod / bait etc...
  • cigarette box
  • shopping bag with all your clothes items purchaseds

Hooks are good, but container need to be registered once before to be able to add item inside, this is a little tricky

Metadata can do the trick for cigarettes but you miss the concept of container, ex : i smoke 1 cigarette then i have a free slot inside and can hide my weed inside

I like the @TonybynMp4 idea of tabs
This way, you can have many inventories opened at the same time and just switch between them

@thelindat
Copy link
Member Author

thelindat commented May 20, 2024

There is ton of ideas to implement if container was ez to use

I'm specifically talking about your example of cigarettes in a container which seems overkill.

Hooks are good, but container need to be registered once before to be able to add item inside, this is a little tricky

https://overextended.dev/ox_inventory/Functions/Server#getcontainerfromslot


Sidenote, containers need to be properly linked to items in the database so that I can remove "dead" containers that have been deleted. Having thousands of containers like cigarette boxes and fast food bags isn't ideal.

@TonybynMp4
Copy link

Hooks are good, but container need to be registered once before to be able to add item inside, this is a little tricky

It's easy enough 🤔
https://github.com/TonybynMp4/y_burgershot/blob/main/server%2Fmain.lua#L33-L44

@LukeWasTakenn
Copy link
Member

I like the @TonybynMp4 idea of tabs
This way, you can have many inventories opened at the same time and just switch between them

Keep in mind we need to keep track of the opened inventories and the players they were opened by so that we we can update all clients that have these inventories opened when the state changes, which sounds like it could be a bit tricky/annoying.

Though I also like the idea having tabs for stuff like containers.

@thelindat
Copy link
Member Author

Keep in mind we need to keep track of the opened inventories and the players they were opened by so that we we can update all clients that have these inventories opened when the state changes, which sounds like it could be a bit tricky/annoying.

This is actually something I'm already doing ever since the "inventory sync" update and wouldn't be difficult to adapt for multiple open inventories.

@LukeWasTakenn
Copy link
Member

This is actually something I'm already doing ever since the "inventory sync" update and wouldn't be difficult to adapt for multiple open inventories.

Noice, UI would definitely need a whole lot of adjustments for something like that since it's currently hardcoded for left and right inventory only. Something to keep in mind for the rewrite.

@HardstylesDev
Copy link

bag support would be neat.

@TonybynMp4
Copy link

bag support would be neat.

wdym by bag?

@jxnnyo
Copy link

jxnnyo commented May 26, 2024

think he means backpack

@TonybynMp4
Copy link

think he means backpack

Yeah i'm wondering cauz that's already a thing you can do lol

@MauroNr1
Copy link

statebag i guess

@DerWashbr
Copy link

solidjs

dont punch me, but ox_inventory in Sveltekit would be so incredibly cool

@HardstylesDev
Copy link

HardstylesDev commented Jun 2, 2024

bag support would be neat.

wdym by bag?

Backpacks, so we can potentially have a second (or third, depends on how you look at it) inventory. So when i open my inventory and I have a backpack on, it'll show another inventory below my main inventory with stuff in it from the bag.

Not sure how to word that better, but it's probably pretty obvious what I'm talking about.

@MauroNr1
Copy link

MauroNr1 commented Jun 2, 2024

bag support would be neat.

wdym by bag?

Backpacks, so we can potentially have a second (or third, depends on how you look at it) inventory. So when i open my inventory and I have a backpack on, it'll show another inventory below my main inventory with stuff in it from the bag.

Not sure how to word that better, but it's probably pretty obvious what I'm talking about.

This has already been implemented for quite a while. https://overextended.dev/ox_inventory/Guides/creatingItems#creating-container-items

@TonybynMp4
Copy link

May i suggest adding a "multi stash", some kind of UI to show and allow interaction with multiple stashes at once, with optional pins for each stash, kind of like a locker, potentially making it "customizable", if you have the right permissions you could change the name of the stashes, the pin.. 🤔

I think it would be better to integrate such a thing directly in the inventory's UI instead of using a ox_lib menu (like the inventory's evidence does) or an external UI.

@Mesrine67
Copy link

would a system grid be an option? https://forum.cfx.re/t/opinion-grid-inventory-ui-dayz-style-spatial-tetris/4823453

@jxnnyo
Copy link

jxnnyo commented Sep 20, 2024

i was thinking of some way to classify items as illegal or drugs this could be stored in a statebag and identified as a config variable. a use of this would be for a things like drug dogs etc to quickly see if a player had an illegal/drug item on them. i have a custom adaptation that incorporates this already but it would be a cool feature for v3.

@TonybynMp4
Copy link

TonybynMp4 commented Sep 20, 2024

i was thinking of some way to classify items as illegal or drugs this could be stored in a statebag and identified as a config variable. a use of this would be for a things like drug dogs etc to quickly see if a player had an illegal/drug item on them. i have a custom adaptation that incorporates this already but it would be a cool feature for v3.

You can do that 100% without touching the inventory nor statebags with a simple item check, it would be pointless to add it to the inventory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants