Skip to content

[EN] Characteristics

Valdir da Costa Júnior edited this page Jan 6, 2018 · 14 revisions

Apply features inside .dff

Utility

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.

How to use

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.
Even if it is not necessary, is highly recommended to you use underline (_) to separate, so avoiding Mesmo que não seja necessário, é altamente recomendado que você use underline (_) para separar, assim evitando unexpected things.
For example chassis_drv=50, VehFuncs will search for drv=, will find, and change the driver ID by the model ID 50.
You can put it in any place, except inside bumpers, doors etc. You can also create a new dummy to this if you prefer. In fact, the node doesn't even need to have a name remainder, it works anyway. Feel free.

Why in .dff? Why not separate file?

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, leaving the mod much more dynamic.
Using scripts or configuration files for vehicles is bad in many ways, both for mod performance and for modeller 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.

Functions

drv=ID

Descrição: Driver (motorista).
Parâmetros: ID do modelo.
Exemplo: drv=50, drv=190.
Em breve: Será possível definir mais de uma possibilidade de motorista, por exemplo drv=50,190 para selecionar ID 50 ou 190, ou então drv=50-55 para selecionar entre 50 e 55.

pj=ID

Descrição: Paintjob / Remap (pintura).
Parâmetros: ID da paintjob / remap (a partir de "1").
Exemplo: Usar pj=1 num Elegy aplicará o remap do arquivo "elegy1.txd". Originalmente o jogo suporta até 5 paintjobs. Se no futuro existir mods que aumentem este limite, você pode aplicar até 9 (caso isso acontecer, eu posso aumentar para 99).
Nota: Ao aplicar a paintjob, também será aplicado a cor primária branca (1).

drt=MIN-MAX

Descrição: Dirty (nível de sujeira).
Parâmetros: Use números entre 0 e 9, onde 0 é sem sujeira, e 9 é sujeira máxima. Geralmente é configurado separado com um traço, como MÍNIMO-MÁXIMO para assim aplicar de maneira aleatória, no entanto, você também pode usar drt=NÚMERO.
Exemplo: drt=0-3 aplica algum valor entre 0 e 3 de sujeira, ou seja, o veículo será limpo ou com pouca sujeira; drt=6-9 aplica entre 6 e 9, ou seja, bem sujo; drt=5 aplicará a metade de sujeira.

(WIP)

Clone this wiki locally