Qbox-project / qbx_vehiclekeys

GNU General Public License v3.0
4 stars 30 forks source link

Game Design Improvements for vehicle keys #46

Open alberttheprince opened 2 months ago

alberttheprince commented 2 months ago

The problem

Suggesting these features be added or reworked:

qb-vehiclekeys feature set is antiquated/needs to be added to and improved.

Ideal solution

Alternative solutions

N/A

Additional context

These changes would make qbx_vehiclekeys a much better resource. As it stands, qb-vehiclekeys has a pretty antiquated design and should have features added to make it more modern and useable.

I have some of these changes in the version of qb-vehiclekeys that popcorn rp uses, although it's not the greatest implementation and most of it is janky.

TonybynMp4 commented 2 months ago
  • Proper car starting animation (depending on vehicle, motorcycle, cars, etc)
  • engine start sound (most key resources don't play the full engine start up sound on restart)

Those two just sounds like bugs / the awful way vehiclekeys.. works

  • give key command

Fuck commands we're not NP, target option maybe?

  • % chance world spawn cars are locked in world (config option)

Yes please

  • List in config of vehicles that require lockpicks to unlock (ox lib minigame)

So a big ol' list of 95% of vehicles? 🀨

  • shared keys list for jobs

Vehicle DB refactor + vehiclekeys rework could allow job owned vehicles πŸ‘€

  • Lock PD/EMS/Job vehicles automatically on leaving cars

I feel like that kinda sucks, if you forget to Lock it's on you, get good bro? πŸ€”

  • Config option to allow people to get into cars that are turned on and drive off

Should be a config only if we're trying to please NP fanbois, if a car is on it's on duh

  • Remote car start config option (turn off remote start as an option)

Wouldn't be a vehiclekeys thing IMO

alberttheprince commented 2 months ago

Those two just sounds like bugs / the awful way vehiclekeys.. works

They're not really bugs, I think, they just need to be added in as they're not there. I'd have to check with @Manason, but we added these a long time ago and it just has to do with forcing the player to do the animations. Not sure.

I think there's a specific native for this?

Fuck commands we're not NP, target option maybe?

Commands are good depending on the server style, not necessarily NP specific. A lot of servers use commands or are used to them. Qbox uses them for /transfervehicle for example in the vehicleshop. Would be good to have these as available options in the config. Or if you're in a vehicle.

So a big ol' list of 95% of vehicles? 🀨

Let me clarify, it would be a list of vehicles that always start locked. So for example, police motorcycle would always spawn locked and requiring a lockpick or the rhino tank when spawned would require advanced lockpick. Vehicles not on this list would default to the % chance world lock.

Vehicle DB refactor + vehiclekeys rework could allow job owned vehicles πŸ‘€

it already works like this, but it's only for police/ambulance job. Better to make it something like job = police in the config, for users anyways.

I feel like that kinda sucks, if you forget to Lock it's on you, get good bro?

Depends. For example on our server, we use the vehicle glovebox as our weapon storage for cops. So this would be useful depending on the type of server/rp level.

Wouldn't be a vehiclekeys thing IMO (remote start)

This is already how qb-vehiclekeys work, it's always on. Would be nice to turn it off so people need to turn their car on/off when sitting in there.

ArturMichalak commented 1 week ago

Proper car starting animation (depending on vehicle, motorcycle, cars, etc) πŸ‘Ž

I have not found a native solution to this problem (sadly). Preparing animations for each vehicle can be too time-consuming.

engine start sound (most key resources don't play the full engine start up sound on restart πŸ‘

give key commandπŸ‘

% chance world spawn cars are locked in world (config option) πŸ‘

List in config of vehicles that require lockpicks to unlock (ox lib minigame) πŸ‘

vehicles that require an advanced lockpick to unlock (harder minigame than the lockpick)

need to make a difficult mini-game

List of Cars that can't be unlocked at allπŸ‘

Cars with no locks/accessible to everyone (for vehicles like wheelchairs, bicycles, etc)

to do

List of weapons that can and can't steal keys from drivers, with a setting for chance that some weapons are more likelyπŸ‘

set change that peds will drive off: for example, 25% chance a ped tries to drive off, 10% they get and fight, 65% they give you their keys, or they try to escape

need for analysis

Police alert settings: i.e. chance to alert police when lockpicking or hotwiring

Can you describe it in more detail?

shared keys list for jobsπŸ‘

Lock PD/EMS/Job vehicles automatically on leaving cars

to do

Config option to allow people to get into cars that are turned on and drive off

When getting into the vehicle, should you get the keys to it?

Remote car start config option (turn off remote start as an option)πŸ‘

if the car is running after leaving the garage, it is set in the garages script.

Whitelist or "whitelist" of vehicles with no doorlocks, but need to be ox_lib circle game/lock picked to to unlock. Useful for things like motorcycles, which don't have doors but should require lockpicking.πŸ‘

I marked what should be done. Most of the features should already be available, feel free to test and make comments.

alberttheprince commented 1 week ago

Hi Artur, Thanks for your work on this!

I have not found a native solution to this problem (sadly). Preparing animations for each vehicle can be too time-consuming.

I posted a bandaid solution some time ago in Qbox DIscord snippets, it may give you an idea. Basically I set up 3 different animations for different vehicle categories, although the way I did it was really amateur/not clean.

need to make a difficult mini-game

For the sake of Qbox, probably just a more difficult circle game. We use a native data track mini game to hack to both lock pick the car and the keys of high value vehicles. https://github.com/utkuali/datacrack

need for analysis (weapon list)

What do you need? As in you need the list? Basically just forcing players to use gun, not melee weapons to steal cars.

Can you describe it in more detail? (police alerts)

At the moment vehicle keys will trigger when a person is hot wiring a car, not breaking into it. Change this so if someone breaks into or gets into a world vehicle they don't own there is a % chance police can be alerted.

When getting into the vehicle, should you get the keys to it?

Yes but only if the car has been left on. For example: a player leaves their engine running and doors unlocked, I sit in the seat and I would get keys and be able to drive off.

if the car is running after leaving the garage, it is set in the garages script. (remote start)

More specifically at the moment players can turn their engine off from a distance (they press engine off and the car will turn off or on from a distance, not sure but I think it's something like 5 meters? This should be something you can disable.

Will test what has been done when I have time and let you know.

ArturMichalak commented 1 week ago

More specifically at the moment players can turn their engine off from a distance (they press engine off and the car will turn off or on from a distance, not sure but I think it's something like 5 meters? This should be something you can disable.

I see, qb-vehiclekeys works like this. It looks like a bug, so in qbx_vehiclekeys it is possible to start the engine only while in the vehicle. Should it be possible to start the car remotely?

What do you need? As in you need the list? Basically just forcing players to use gun, not melee weapons to steal cars.

What I meant to say was that the chance of a ped escaping requires analysis

List of weapons that can and can't steal keys from drivers, with a setting for chance that some weapons are more likely

Works fine

ArturMichalak commented 2 days ago

this branch has most of these features https://github.com/Qbox-project/qbx_vehiclekeys/tree/renew Let me know if you catch any problems

alberttheprince commented 1 day ago

I see, qb-vehiclekeys works like this. It looks like a bug, so in qbx_vehiclekeys it is possible to start the engine only while in the vehicle. Should it be possible to start the car remotely?

I think remote on/off was unintended in qb-vehiclekeys, but I think some people do prefer this system. I don't, but always assumed it was functionality that people wanted/used.

What I meant to say was that the chance of a ped escaping requires analysis

I think a simple break down like:

75% chance to give up, 15% chance to drive off, 10% chance to get out and fight would be dynamic enough. By giving players a chance they get injured or have to kill the driver it drives RP for other interactions like EMS, LSPD, etc.