altmp / altv-issues

Issues and roadmap for alt:V project
93 stars 16 forks source link

Open source data files #2294

Open mrgharabaghi opened 3 months ago

mrgharabaghi commented 3 months ago

Description of the problem

At this time, we have no control over bin files in data folder. Let us to control loading GTA V assets in data folder. pedmodels.bin vehmodels.bin vehmods.bin weaponmodels.bin

Desired solution for the problem

No response

Alternatives you considered

Another option for that is convert bin files to json.

Additional context

2295

xxshady commented 3 months ago

why do you need it?

mrgharabaghi commented 3 months ago

I want to control over the assets that are loaded to my server from the GTA V official assets.

xxshady commented 3 months ago

what is the use case?

xxshady commented 3 months ago

are bin files even related to what is being loaded in the game? isnt it info for the server so it can validate your code without game

mrgharabaghi commented 3 months ago

what is the use case?

One of them is related to GTA V latest update (version 3258). If I able to modify data files, I able to load the new vehicles that are added to version 3258.

are bin files even related to what is being loaded in the game? isnt it info for the server so it can validate your code without game

Yes. For example, if you remove vehmodels.bin, you can't spawn GTA V's vanilla vehicles.

/car adder
[Error] Failed to create vehicle: 3078201489 is not a proper model hash
xxshady commented 3 months ago

One of them is related to GTA V latest update (version 3258). If I able to modify data files, I able to load the new vehicles that are added to version 3258

if alt:V would support new gta version then you could spawn these vehicles even without .bin using createVehicle native or LocalVehicle class

xxshady commented 3 months ago

.bin is data for server to validate what you are doing, it doesnt mean these vehicles are not available in the game

mrgharabaghi commented 3 months ago

if alt:V would support new gta version then you could spawn these vehicles even without .bin using createVehicle native

  1. If I spawn a vehicle with client side native, what happend to sync with other players?
  2. What if alt:V doesn't support new update for 1, 3 or 6 months?
xxshady commented 3 months ago
  1. it won't be synced
  2. well new vehicles won'be available and changing .bin files won't help you with it
xxshady commented 3 months ago

and you can add any vehicle yourself via modding https://docs.altv.mp/gta/articles/tutorials/stream_vehicles.html

mrgharabaghi commented 3 months ago
  1. well new vehicles won'be available and changing .bin files won't help you with it

Are you sure about that? 100%?

xxshady commented 3 months ago

yes

xxshady commented 3 months ago

.bin files do not contain vehicle models, textures, etc.

mrgharabaghi commented 3 months ago

Why aren't the bin files open sourced yet? Is there something security related about it that shouldn't be made public?

xxshady commented 3 months ago

no idea

mrgharabaghi commented 3 months ago

And another issue with bin files is that if you use dlcWhitelist in server.toml like this:

dlcWhitelist = [
    'mpbeach'
]

You are still able to spawn caracara2 on server side without any error. After creating this model, car object will added to server objects, but it doesn't appeared on client side. caracara2 added in vinewood DLC.

xxshady commented 3 months ago

you can create new bug issue for that if it doesnt exists already

a-zzura commented 3 months ago
  • it won't be synced
  • well new vehicles won'be available and changing .bin files won't help you with it

2021-2022 some community/mod members provided .bin files for new gta updates and then you could spawn the new vehicles if you used the new files (if they were not updated on the cdn), so it has something to do with spawning new vehicles except it has changed since then.

Example 1 - c00kie provides files Example 2 (actual question on spawning vehicle)

Example 2 is German, so you would need to use a translator.

xxshady commented 3 months ago

yes vehmodels.bin allows you to create vehicle on server if model presents in vehmodels.bin

xxshady commented 3 months ago

but if vehicle model does not exists in the game it will only be created on server but not in game, thats what happens here: https://github.com/altmp/altv-issues/issues/2294#issuecomment-2198412388

xxshady commented 3 months ago

and same will happen if you will add new vehicle model to vehmodels.bin but dont add it to the game

a-zzura commented 3 months ago

Yea, I think that is what he meant, or I miss understood it (with spawning new vehicles after update was pushed by alt:V)

xxshady commented 3 months ago

so this feature request doesnt make sense to me

xxshady commented 3 months ago

why would you modify vehmodels.bin if you dont have model in game?

xxshady commented 3 months ago

it should be handled by alt:V for you

a-zzura commented 3 months ago

The only reason could be so he can update it himself instead of waiting for the official files, but yeah, it is not 'public' for a reason, I guess.

xxshady commented 3 months ago

The only reason could be so he can update it himself

what do you mean by that? how he would adapt alt:V to new game version himself?

a-zzura commented 3 months ago

The only reason could be so he can update it himself

what do you mean by that? how he would adapt alt:V to new game version himself?

No, if alt:V has been updated to the new GTA version and the date files have not been updated

xxshady commented 3 months ago

they are always updated after gta update

xxshady commented 3 months ago

you don't need to do it yourself

xxshady commented 3 months ago

changing format to something more open like json can also cause false bug reports, questions, misunderstandings as it is happening now xd

mrgharabaghi commented 3 months ago

This is not a question. https://github.com/altmp/altv-issues/issues/2294#event-13342554131 Like other docs, we can provide essential information about data files, and convert them to json for people.

xxshady commented 3 months ago

i agree about docs, but still don't see any usecase for human readable format, that's why i marked it as "question"