-
Notifications
You must be signed in to change notification settings - Fork 6
[EN] Characteristics
Before proceeding, be sure to read the Introduction.
There are cases in which the modeler wants certain characteristics to the vehicle, such as some custom driver, control the dirt level etc. Using this function in conjunction with the new extras system, everything becomes more interesting:
Let's say you created a truck, and want an extra variation of it for gas truck, but you also want that, if this gas extra is selected, also apply a paintjob and a custom driver.
So, besides the extra, will also be applied a driver (ID 50, originally a mechanic) and a paintjob (1) to have a gas truck painting.
You can see this complete example on Recursive Extras.
Just apply a function name in any node inside vehicle's .dff. There's no mystery, but, remember that the game only supports nodes with up to only 23 characters.
It's necessary to use underline (_
) to separate, so avoiding unexpected things.
For example chassis_drv=50
, VehFuncs will search for _drv=
, will find, and change the driver ID by the model ID 50
. Note: Don't use chassis
because the node is used by some game features.
You can put it in any place, but avoid putting inside bumpers, doors etc.
Usually this is done by creating a new dummy to put the name of the characteristics, but it isn't a rule. In fact, the node doesn't even need to have a name remainder, it works anyway. Feel free.
If you also use f_class
from the recursive extras, read that page for the hint of using the name !
to define characteristics, you may prefer to use it in that way.
VehFuncs work processing all vehicle nodes searching for functions. Apply the characteristics direct on the part name is great for mod performance, plus the power to use this along with the extras system, as stated above, making the mod much more dynamic.
Using scripts or configuration files for vehicles is bad in many ways, both for mod performance and for modeler work. It is much more interesting for the modeler to apply the characteristics of the vehicle soon during the creation of it and to launch the vehicle without any additional file.
Description: Choose occupants (driver and passengers).
Parameters: ID of the model. It can be only one or more separated by commas, so it will be randomly selected. Then you can put a .
followed by a value between 0
and 9
to indicate the chances of a passenger being created if it doesn't exist. The default is 0 (don't create).
Example: _oc=50
— It will only appear with driver and passengers with model ID 50. No new passengers will be created, only changed.
_oc=61,62
— Idem, with IDs 61 and 62.
_oc=190,50,100.3
— Idem, with models 190, 50 and 100. There are 3/9 chances of a passenger being created if it doesn't exist. In cases of cars with more than 1 passenger (ie 4 doors) there is twice the chances of being created if it is the front seat.
Description: Change driver model.
Parameters: Model ID. Can be just one or various separated with comma, so it will select randomly.
Example: _drv=50
, _drv=61,62
, _drv=190,50,100,101
.
Description: Paintjob / Remap.
Parameters: Paintjob /remap ID (from "1"). Use a c
after the ID to make it not change the vehicle color to white.
Example: Use _pj=1
in an Elegy will apply the remap of the file "elegy1.txd". Originally the game supports 5 paintjobs. If in the future there are mods that increase this limit, you can apply up to 9 (if this happens, I can increase it to 99). _pj=0-2c
will apply paintjob 0, 1 or 2, and will preserve vehicle color.
Description: Dirt (dirt level).
Parameters: Use numbers between 0
and 9
, where0
is without dirt, and 9
is maximum dirt. Generally is configurated with a hyphen, as MINIMUM-MAXIMUM
to randomly apply, but, you can also use _drt=NUMBER
.
Example: _drt=0-3
apply some value between 0 and 3 of dirt, so, the vehicle will be clean or a bit dirty; _drt=6-9
applies between 6 and 9, so, very dirty; _drt=5
apply half of the dirt.
Description: Double exhaust (for double smoke, same as handling.cfg flag).
Parameters: Use 1
to enable and 0
to disable the double exhaust smoke. If not set, will be used the default handling flag.
Example: _dexh=1
on double exhaust extra.
Description: Swinging body (originally seen in Greenwood, Premier etc). Bearing in mind that this can be disabled in handling, this function is useful to activate only in certain extras/classes or SAMP (which does not accept custom handling). You can disable it completely in "NoSwingingChassis" in "VehFuncs.ini".
Parameters: Use 1
to enable or 0
to disable the swinging chassis. If not configured, the default handling flag will be used.
Example: _swc=0
to disable.
Description: Force the vehicle colors.
Parameters: You can use up to 4 comma-separated numbers, the first one being the primary color, and so on (you don't need to tell all). You can use some character like -
in place of the number, or the number -1
to not change that color. You have the color ID numbers in the data\carcols.dat
file.
Example: _cl=1
(the primary color of the car will be white), _cl=1,0
(the first color will be white, secondary black), _cl=3,0,1,0
(it will change all possible colors), _cl=1,-,-,3
(it will change the primary color by the white and the quaternary by the red, it will not change the secondary and tertiary colors).
Description: Forcing the bus driver to be visible.
Additional infos: It was possible to be visible by removing the bus flag from the handling line, but it was not a good practice because it makes the game and other mods don't identify the vehicle as a bus. VehFuncs solution is much better. It is not necessary in the Bus (ID 431
), but even so it is recommended to use as it will give the player the freedom to replace it by Coach or add the bus without replacing it, and they will still being able to see the driver.
Description: NPC vehicles configuration for the mod MDPM.
Additional infos: These settings will override the settings in the MDPM - NPCs.ini
file of the mod, but will only work if AllowCustom = 1
is set. It's also important to remember that the effect is cumulative with global chances settings also present in MDPM - NPCs.ini
.
Parameters: Chances, min volume - max volume.
Examples: _mdpmnpc=70,0.5-0.9
(70% of chances, and will use a volume between 0.5 e 0.9), _mdpmnpc=0,0.0-0.0
(0% of chances, will never appear playing music).
Tips: Make the speakers appear randomly using recursive extras, and together put these settings to make the car have a high chance of appearing playing music. There is no problem for example putting _mdpmnpc=0,0.0-0.0
to turn off, and when the speakers appears, use the command again. The mod will use the last read configuration.
Description: Change engine sounds.
Parameters: ID of acceleration, and deceleration sound. Usually (but not always) the second number has a value of 1 less than the first. Follow the list below (thanks to _F_
) or another source, such as fastman92 limit adjuster audio configuration file.
Example: _se=81,80
(Trashmaster, Enforcer etc sound), _se=37,37
(Infernus, Buffalo etc sound).
Click to view list
ID1 ID2 List of cars
-1 -1 artict1 artict2 shamal hydra at400 petrotr artict3 androm rccam utiltr1
8 7 bravura previon solair zr350 mesa nebula cadrona primo merit uranus elegy euros
11 10 baggage tug
12 -1 leviathn hunter cargobob raindanc
17 16 glendale oceanic bullet tornado glensh*t
19 18 bmx bike mtbike
22 21 predator squalo speeder reefer tropic coastg dinghy marquis jetmax launch
26 25 cabbie fortune willard vincent intruder sunrise yosemite picador
33 32 bus coach dft30
35 34 hermes remingtn broadway
36 118 rcbandit
38 37 buffalo infernus hotring hotrina alpha
41 40 copbike wayfarer
46 45 voodoo stallion sabre buccanee blade clover savanna
48 47 sanchez quad
53 54 rustler stunt
58 57 forklift
62 61 kart mower
64 63 caddy
69 68 combine
71 70 monster bloodra monstera monsterb
76 75 bfinject hotknife slamvan hustler
78 77 vortex
79 141 mrwhoop
81 80 trash enforcer barracks flatbed fbitruck duneride swatvan
84 83 linerun dumper firetruk rhino packer benson petro rdtrain cement firela
85 -1 maverick vcnmav polmav
87 86 sentinel stretch taxi premier admiral elegant sultan stratum stafford emperor copcarla copcarsf copcarvg
89 88 walton dozer tractor
93 92 esperant blistac majestic feltzer jester flash tahoma club
95 94 peren manana moonbeam washing bobcat romero regina virgo greenwoo sadler tampa sadlsh*t
99 98 landstal patriot rancher fbiranch sandking rnchlure huntley copcarru
101 100 hotrinb windsor phoenix
103 102 cheetah banshee turismo comet supergt
104 -1 seaspar sparrow
107 106 rcbaron
109 108 rcraider rcgoblin
113 112 rctiger
115 114 fcr900 bandito
119 118 pizzaboy faggio
120 54 skimmer cropdust dodo
125 124 pcj600 nrg500 bf400
127 126 sweeper
130 129 bagboxa bagboxb tugstair farmtr1
132 131 freight streak freiflat streakc freibox
132 133 tram
134 135 beagle nevada
137 136 pony mule ambulan securica topfun burrito journey towtruck utility newsvan boxburg
140 139 freeway
142 141 rumpo yankee camper boxville hotdog