Vice City: Multiplayer

Server Development => Custom Content Releases => Vehicle Showroom => Topic started by: Sebastian on Jun 09, 2019, 03:52 PM

Title: [.xml] Tricks, Discoveries and Joy
Post by: Sebastian on Jun 09, 2019, 03:52 PM
I've made this post so I can share what I've found, with you.
Don't know how many of you know, but you can play with the engine more than R* did when about special features of vehicles.
Didn't test too much, but will update when I have news.
Also, if you have your own discoveries, feel free to share. Will put it in the list.

Handling.cfg explained: https://projectcerbera.com/gta/vc/tutorials/handling

Flags calculator: https://vc-flags.netlify.com/
Original Author: @maxorator
Modified by: @MEGAMIND



1. Emergency Lights/Taxi Light can be used even if the vehicle is not properly categorized

Take the Flying Delly (https://forum.vc-mp.org/?topic=6742.0) as example.
All you need to do, is adding this <specials></specials> category and play with the settings inside, like colors, position, if the lights should be turned on all the time or not, etc
[spoiler=Taxi Light]
<specials>
<taxilight>
<alwayson>false</alwayson>
<colour>128,128,0</colour>

<position>
<x>0.0</x>
<y>0.0</y>
<z>0.95</z>
</position>
</taxilight>
</specials>
[/spoiler]
[spoiler=Police style]
<specials>
<emlights>
<alwayson>true</alwayson>
<colourone>50,255,50</colourone>
<colourtwo>50,50,255</colourtwo>

<posleft>
<x>-0.750687</x>
<y>-2.64971</y>
<z>-0.147924</z>
</posleft>

<posright>
<x>0.750687</x>
<y>-2.64971</y>
<z>-0.147924</z>
</posright>
</emlights>
</specials>
[/spoiler]
[spoiler=FBI style]
<specials>
<emlightsingle>
<alwayson>false</alwayson>
<colour>70,70,255</colour>

<position>
<x>0.4</x>
<y>0.6</y>
<z>0.3</z>
</position>
</emlightsingle>
</specials>
[/spoiler]



2. Heli weapons will work only with heli flags, in .xml

Simple: Even with the weapons code inserted, weapons won't be active, if you use different flags than heli's.
So, in order to use Hunter's weapons, you gonna add heli's flags + specials + helidata.
Then, via script, you can play how much you want with the flags, because when you gonna reset the flags to heli's, weapons will be still working.

Heli's flags:
<flags>08028000</flags>[spoiler=Hunter's settings]
<helidata>
<helitype>hunter</helitype>
<weapons>hunter</weapons>
<rotorradius>6.150000</rotorradius>
<rotordammult>0.500000</rotordammult>
</helidata>

<specials>
<heliweps>
<missilepos>
<x>2.5</x>
<y>1.0</y>
<z>-0.5</z>
</missilepos>

<machinegunpos>
<x>0.0</x>
<y>4.8</y>
<z>-1.3</z>
</machinegunpos>
</heliweps>
</specials>
[/spoiler]
[spoiler=Sea Sparrow's settings]
<helidata>
<helitype>water</helitype>
<weapons>sparrow</weapons>
<rotorradius>5.150000</rotorradius>
<rotordammult>0.800000</rotordammult>
</helidata>

<specials>
<heliweps>
<machinegunpos>
<x>0.0</x>
<y>4.8</y>
<z>-1.3</z>
</machinegunpos>
</heliweps>
</specials>
[/spoiler]



3. RC Vehicles and Boats ALL vehicles are looping their animations!

So ? Well, try setting animation 0 of group 0, while being inside a vehicle. Your player will start walking without stopping :P

https://www.youtube.com/watch?v=1mFEJ3OAjms

Maybe developers can follow this method of looping animations, for some proper function ?!



4. SA vehicles imported to VC:MP won't lose their wheels :c (like this (https://imgur.com/yNbncsg.png))

If your custom vehicle follows SA's .dff example, then you won't be able to remove the wheel. (https://i.imgur.com/L7oIi8K.png) 
with vehicle.SetTyre( tyre, status ) (http://wiki.adtec.ovh/wiki/Scripting/Squirrel/Functions/Vehicle.SetTyre) e.g. vehicle.SetTyre( 0, 2 )
SA's .dff way ?? Yeah. SA engine needs just one wheel for a vehicle, in the .dff.
Then, in game, it just duplicates it to all the needed spots.

SanAndreas (https://i.ytimg.com/vi/uq-RVxZRiwM/maxresdefault.jpg) vs ViceCity (https://1.bp.blogspot.com/-J9qgd6NhTIA/WtrwB8Yp-wI/AAAAAAAARn4/8jkpQZUwMRo36Lq7Hf6FYq-rSaxCeszOQCK4BGAYYCw/s1600/zmodeler-baixar.jpg)



5. Custom vehicles return no handling data (when GetHandlingRule or vehicle.GetHandlingData)

Unfortunately, server is not taking the info out of our .7z archives;
here is a work-around: https://forum.vc-mp.org/?topic=8378

Note: Don't play with handling rule 8, because no matter value you will set, vehicle will go directly to Vector(0,0,0) when touching the water/sea.



6. EXTRA FLAGS can go in mix with other features!

YES! A day ago I've found out that a vehicle with Hunter properties can also get the TANK's rocket in the same time !
And you can also go for hermes' flames too, mixed with firetruk's water splashing, and anything else you want!

My luck ? The vehicle I was testing, was having this in the XML
Seems like, without this, the extra flags won't be activated.
<comprules>12272</comprules>
EXTRA FLAGS:
- 00000001h - SIREN
- 00000002h - HYDRAULICS
- 00000004h - BARON
- 00000008h - BFROTATION
- 00000010h - EXHAUST
- 00000020h - ENGINEFLAP
- 00000040h - TANK
- 00000080h - FIRETRUCK
- 00000100h - AI_POLICE
- 00000200h - AI_SWAT
- 00000400h - AI_PREDATOR
- 00000800h - AI_TANK
- 00001000h - AI_BARRACKS
- 00002000h - AI_FBI
- 00004000h - AI_VICE
- 00008000h - AI_FIRETRUCK
- 00010000h - AI_AMBULANCE
- 00020000h - AI_TAXI
- 00040000h - RCAUDIO
- 00080000h - REVBEEP
- 00100000h - GEARTHUD
- 00200000h - NOMAXALTITUDE

[spoiler=Hunter weps + tank explosion]
(https://i.imgur.com/0cfyHYT.png)
[/spoiler]

[spoiler=Jetpack with real flames]
(https://i.imgur.com/3UIg4uZ.png)
[/spoiler]



7. We can add more working blades than we are used to

Thanks the trick number 6 we can add even the "skimmer" blade and make it work, just by activating extra flag:
00000008h - BFROTATIONUnfortunately, VC's engine is forcing some of the blades to stick to the middle of the model

https://www.youtube.com/watch?v=mBEHYpLUVu8&t=9s



Notes:

[spoiler=Gallery]
https://i.imgur.com/c7JhcDf.png - helicannon + lights
[/spoiler]



PS:
<author></author> setting acutally does something,
so when using downloaded vehicles in your server, don't forget to add the setting and the name.
(https://i.imgur.com/hZpEloj.png)
Title: Re: [.xml] Tricks, Discoveries and Joy
Post by: MEGAMIND on Jun 09, 2019, 04:21 PM
Always impressed from this guy...
Title: Re: [.xml] Tricks, Discoveries and Joy
Post by: Sebastian on Nov 28, 2019, 04:51 PM
Discovery number 3, posted.
Title: Re: [.xml] Tricks, Discoveries and Joy
Post by: Sebastian on Nov 19, 2020, 09:39 PM
(sad) Discovery posted. No4
Title: Re: [.xml] Tricks, Discoveries and Joy
Post by: Sebastian on Mar 08, 2021, 01:11 PM
just reminded 5.this (https://forum.vc-mp.org/?topic=8378) here too, because is the right place too.
Title: Re: [.xml] Tricks, Discoveries and Joy
Post by: Sebastian on Nov 04, 2021, 10:32 AM
Trick 5 was updated. Apparently, all vehicles are looping their animations, not just RCs or Boats.

Tricks 6 and 7 added! Check it out!