Major Update for 0.4 Released (10 July)

maxorator

  • VC:MP Developer
  • Posts: 153
Major Update for 0.4 Released (10 July)
« on July 10th, 2015, 11:15 PM »Last edited on July 13th, 2015, 11:36 PM
This version brings a new feature that requires both server and client to be updated for it to work, so the version is bumped to 04rel003.



Server and Client Update Released
  • Custom vehicles can be added by putting them in the store/vehicles folder.
  • Improved accuracy of sphere and checkpoint events (server).

Windows Server (x86)
Windows Server (x64)
Linux Server (x86)
Linux Server (x64)

The client update will automatically download and install upon joining an up-to-date 0.4 server.



Quick guide to custom vehicles

Each custom vehicle is one .7z archive (similar to .zip, but created with 7-Zip) in store/vehicles folder, where the file name format is v<modelid>_t<vehicletype>_p<maxpassengers>_<vehiclename>.7z. Model ID is the ID you will use to create vehicles that use this custom vehicle model. They have to be in the range 6400-6499. Vehicle type is a number, where 0 means a car (or a helicopter), 1 means a bike and 2 means a boat.

Archives can contain the following files (only the file extension matters):
  • .xml (required). The file containing all the IDE and handling information for your vehicle plus some extra options.
  • .dff (required). The main model file of your vehicle - this can also be a model file in SA format (may include collision).
  • .txd (required). The texture file for your vehicle - this can also be a texture file in SA format.
  • .col (required if .dff doesn't contain collision model). The collision model to be used with your vehicle.
  • .ifp (optional). Custom animations for your vehicle.

This is what the .xml file looks like (this one is for PCJ 600):
(click to show/hide)
Code: [Select]
<?xml version="1.0" encoding="ASCII"?>
<vehicle>
    <basic>
        <type>bike</type>
        <name>PCJ 600</name>
        <anims>bikes</anims>
        <comprules>0</comprules>
        <extraflags>0000</extraflags>
        <wheelrotangle>16</wheelrotangle>
        <wheelscale>0.670000</wheelscale>
        <immunity>0</immunity>
    </basic>

    <aidata>
        <class>motorbike</class>
        <freq>10</freq>
        <level>7</level>
    </aidata>

    <colors>
        <carcol>13,13</carcol>
        <carcol>22,22</carcol>
        <carcol>35,35</carcol>
        <carcol>38,38</carcol>
        <carcol>2,2</carcol>
        <carcol>3,3</carcol>
        <carcol>48,48</carcol>
        <carcol>51,51</carcol>
    </colors>

    <audio>
        <enginefarsample>287</enginefarsample>
        <enginenearsample>23</enginenearsample>
        <hornsample>0</hornsample>
        <hornfreq>27000</hornfreq>
        <sirensample>0</sirensample>
        <sirenfreq>9600</sirenfreq>
        <doorsounds>1</doorsounds>
    </audio>

    <handling>
        <mass>500.000000</mass>
        <percentsubmerged>103</percentsubmerged>
        <steeringlock>35.000000</steeringlock>
        <seatoffset>0.300000</seatoffset>
        <damagemultiplier>0.150000</damagemultiplier>
        <value>10000</value>
        <flags>00010102</flags>

        <dimensions>
            <x>0.800000</x>
            <y>1.800000</y>
            <z>1.200000</z>
        </dimensions>

        <centreofmass>
            <x>0.000000</x>
            <y>0.050000</y>
            <z>-0.090000</z>
        </centreofmass>

        <traction>
            <multiplier>1.600000</multiplier>
            <loss>0.900000</loss>
            <bias>0.480000</bias>
        </traction>

        <transmission>
            <numofgears>5</numofgears>
            <maxspeed>190.000000</maxspeed>
            <acceleration>50.000000</acceleration>
            <drivetype>R</drivetype>
            <enginetype>P</enginetype>
        </transmission>

        <brakes>
            <deceleration>15.000000</deceleration>
            <bias>0.500000</bias>
            <abs>0</abs>
        </brakes>

        <suspension>
            <forcelevel>0.850000</forcelevel>
            <dampening>0.150000</dampening>
            <upperlimit>0.150000</upperlimit>
            <lowerlimit>-0.160000</lowerlimit>
            <bias>0.500000</bias>
            <antidive>0.000000</antidive>
        </suspension>

        <lights>
            <front>1</front>
            <rear>1</rear>
        </lights>
    </handling>

    <bikehandling>
        <leanfwdcom>0.330000</leanfwdcom>
        <leanfwdforce>0.150000</leanfwdforce>
        <leanbackcom>0.280000</leanbackcom>
        <leanbackforce>0.150000</leanbackforce>
        <maxlean>44.999996</maxlean>
        <fullanimlean>38.000004</fullanimlean>
        <deslean>0.930000</deslean>
        <speedsteer>0.700000</speedsteer>
        <slipsteer>0.500000</slipsteer>
        <noplayercomz>0.100000</noplayercomz>
        <wheelieang>35.000008</wheelieang>
        <stoppieang>-40.000000</stoppieang>
        <wheeliesteer>-0.009000</wheeliesteer>
        <wheeliestabmult>0.700000</wheeliestabmult>
        <stoppiestabmult>0.600000</stoppiestabmult>
    </bikehandling>

</vehicle>

This feature is ported from the singleplayer modification Maxo's Vehicle Loader, so I won't be creating a separate thorough documentation for it right now. Here is the original modification: http://gtaforums.com/topic/477801-maxos-vehicle-loader/ . It contains .xml files for all the default VC vehicles and some documentation. In that thread you can find more specific explanation for various settings from the changelog (vehicle weapons are disabled in multiplayer though, and tuning parts cannot be controlled by the server). If you can't find an answer to your question about some xml field in there, feel free to ask here.

It also contains also links to applications and websites which help in creating the .xml files, for example by automatically converting handling file lines to .xml file handling format. One of these helping sites can be found here: http://almost610.ucoz.com/blog/welcome/2012-12-23-4 .

You can find existing vehicles already in the right format from GTAGarage and GTAInside sites (search with MVL as keyword). If you decide to use any of those for your server, make sure to ask the authors for permission if possible. You should also add a <author> line to the .xml file (in the <basic> section) which contains the original author of the vehicle - it will be shown to players when they enter that vehicle.

Doom_Kill3R

  • VC:MP Beta Tester
  • Infinite loops defy infinity by overflowing memory
  • Posts: 1,099

Sebastian

  • VC:MP Beta Tester
  • Something like this: hga hga hga
  • Posts: 906

ℛḝξ☂

  • Jr. Member
  • Posts: 93
I may be a slow walker but I am always walking.

kokia

  • Jr. Member
  • Posts: 86

MacTavish

  • Hero Member
  • Nicks( Kusanagi, Beztone, RATHORE )
  • Posts: 809

Grand Hunting Project
Join #SLC, #KAKAN, #Doom, #GHP @LUnet

Retired VC:MP Player/Scripter :P

Xmair

  • Wiki Contributor
  • Posts: 871
Re: Major Update for 0.4 Released (10 July)
« Reply #6, on July 11th, 2015, 06:27 AM »Last edited on July 11th, 2015, 06:50 AM
ITS AWESOME JUST AWESOME!
But there's one problem for me.
I added custom vehicles, But whenever I want to sit in it. The player goes near it but don't sit.
This is the name of my file "v6401_t1_p4_voodoopol"
And I've the following files:
voodoo.cof
voodoopol.dff
voodoopol.txd
voodoopol.xml
VU Full Member | VCCNR Developer | KTB Developer | EAD Ex-Scripter

KAKAN

  • Wiki Contributor
  • Posts: 3,347
You can contact me using Discord, at Developers.CPP( check off-board to find the invite link )
Github: https://github.com/theKAKAN

maxorator

  • VC:MP Developer
  • Posts: 153
Re: Major Update for 0.4 Released (10 July)
« Reply #8, on July 11th, 2015, 08:55 AM »
Quote from XuXu on July 11th, 2015, 06:27 AM
ITS AWESOME JUST AWESOME!
But there's one problem for me.
I added custom vehicles, But whenever I want to sit in it. The player goes near it but don't sit.
This is the name of my file "v6401_t1_p4_voodoopol"
And I've the following files:
voodoo.cof
voodoopol.dff
voodoopol.txd
voodoopol.xml
The name of your file should be v6401_t0_p4_voodoopol, because it's a car, not a bike.

Xmair

  • Wiki Contributor
  • Posts: 871
Re: Major Update for 0.4 Released (10 July)
« Reply #9, on July 11th, 2015, 09:25 AM »
Quote from maxorator on July 11th, 2015, 08:55 AM
Quote from XuXu on July 11th, 2015, 06:27 AM
ITS AWESOME JUST AWESOME!
But there's one problem for me.
I added custom vehicles, But whenever I want to sit in it. The player goes near it but don't sit.
This is the name of my file "v6401_t1_p4_voodoopol"
And I've the following files:
voodoo.cof
voodoopol.dff
voodoopol.txd
voodoopol.xml
The name of your file should be v6401_t0_p4_voodoopol, because it's a car, not a bike.
Thanks I forgot that thing.
And another thing whenever I enter that vehicle it says you've entered vehicle name : (null 0x0000000).
VU Full Member | VCCNR Developer | KTB Developer | EAD Ex-Scripter

[VSS]Shawn

  • Full Member
  • Posts: 210

EK.IceFlake

  • Hero Member
  • "We are the champions my fellahs" - Sufyan/VK.SuFy
  • Posts: 1,761
Re: Major Update for 0.4 Released (10 July)
« Reply #11, on July 11th, 2015, 09:28 AM »
Quote from XuXu on July 11th, 2015, 09:25 AM
Quote from maxorator on July 11th, 2015, 08:55 AM
Quote from XuXu on July 11th, 2015, 06:27 AM
ITS AWESOME JUST AWESOME!
But there's one problem for me.
I added custom vehicles, But whenever I want to sit in it. The player goes near it but don't sit.
This is the name of my file "v6401_t1_p4_voodoopol"
And I've the following files:
voodoo.cof
voodoopol.dff
voodoopol.txd
voodoopol.xml
The name of your file should be v6401_t0_p4_voodoopol, because it's a car, not a bike.
Thanks I forgot that thing.
And another thing whenever I enter that vehicle it says you've entered vehicle name : (null 0x0000000).
You need to make a wrapper because custom vehicle names aren't included in GetVehicleName(FromModel?)

Sebastian

  • VC:MP Beta Tester
  • Something like this: hga hga hga
  • Posts: 906

EK.IceFlake

  • Hero Member
  • "We are the champions my fellahs" - Sufyan/VK.SuFy
  • Posts: 1,761