yamp-project / v-issues

0 stars 0 forks source link

Bulletproof toggling of INDIVIDUAL tires. #16

Open TrashaPanda opened 4 months ago

TrashaPanda commented 4 months ago

What is the scope of the API?

Propose an API design A clear and concise description of what you want to happen.

Currently the native exists to say all tires are bulletproof, or non-are. This resulted in me having to do all sorts of work arounds to get a feature I want working as intended. All of which, can be avoided by being able to set the individual tires as bulletproof or not.

Why would I want to set a single tire as bullet proof?

In the real world exists "run-flats". These are designed to allow a vehicle with a punctured tire to still be drivable while flat as it acts as a barrier between the rim and the ground, protecting the wheel. In GTA, if a tire is blown, after a moment or two the tire will blow off and you will be riding on the rim. HOWEVER, if you set the wheel to bulletproof after it has already been popped, the rubber will never blow off the wheel and you wont ride on the rim until the bulletproofing is disabled again.

The issue then stems from, if a wheel pops, and the bulletproofing is enabled to prevent the rubber from blowing off the rim, the rest of the tires cannot be pops or blown off what so ever since the native makes them ALL bulletproof of not. So being able to say that SPECIFIC wheel is bulletproof or not would be amazing to have.

spacevx commented 4 months ago

Indeed would be cool, for now we can only use SET_VEHICLE_TYRES_CAN_BURST (who can't be used on a specific tire)

yannbcf commented 4 months ago

It seems like the tyres doesn't burst at all when shooting at them as of now in yamp, most likely due to the fact we disable every game scripts. I need to investigate it further

yannbcf commented 4 months ago

Nvm the issue was related to something we hooked. After some researches I can tell you that your wish will become true @ahcenezdh

https://youtu.be/YNcF2XYC1iU

yannbcf commented 4 months ago

And I also just added a way to disable the tyre rim popping. So instead of hacking it by setting the tyre bullet proof level you could just say that it can burst but not pop

spacevx commented 4 months ago

Damn! Looking nice good job @yannbcf

TrashaPanda commented 4 months ago

And I also just added a way to disable the tyre rim popping. So instead of hacking it by setting the tyre bullet proof level you could just say that it can burst but not pop

If you dont mind my asking, how were you able to achieve this?

yannbcf commented 4 months ago

The game has a function to trigger the wheel pop (tire explosion), I check if the wheel has this behavior disabled and block the mechanism or not when the call occur.

This is an acceptable patch but a better one would be to just block the wheel to enter in this state, because the game tries to pop the wheel every few seconds

TrashaPanda commented 4 months ago

The game has a function to trigger the wheel pop (tire explosion), I check if the wheel has this behavior disabled and block the mechanism or not when the call occur.

This is an acceptable patch but a better one would be to just block the wheel to enter in this state, because the game tries to pop the wheel every few seconds

Interesting. And thats modifying core gta logic? Or a native you are messing with.

yannbcf commented 4 months ago

No, the wheel check just occurs before the general "can tires burst". So if you say that x wheel cannot burst / pop it will have the priority over the global flag set by the native

Yiin commented 4 months ago

so yes, game logic xd