addModifier to set Emission to -1, not working?

Willkommen in der Transport Fever Community

Wir begrüßen euch in der Fan-Community zu den Spielen Transport Fever und Train Fever, den Wirtschaftssimulatoren von Urban Games. Die Community steht euch kostenlos zur Verfügung damit ihr euch über das Spiel austauschen und informieren könnt. Wir pflegen hier einen freundlichen und sachlichen Umgang untereinander und unser Team steht euch in allen Fragen gerne beiseite.

 

Die Registrierung und Nutzung ist selbstverständlich kostenlos.

 

Wir wünschen euch viel Spaß und hoffen auf rege Beteiligung.

Das Team der Transport-Fever Community


  • Hallo,


    it seems that the Emission values cannot be changed to -1 by using a script solution such as :


    Code
    addModifier("loadModel", function (fileName, data)
    if string.find (fileName, "res/models/model/vehicle/train/type") ~=nil then -- find models which filename starts by type, in that folder
    data.metadata.emission.idleEmission = -1

    In game the emission is set to -1 instead of being calculated automatically.
    I can't find a mod that already changed that and I spent hours testing it to death :S


    Do you guys know a solution?

  • In game the emission is set to -1 instead of being calculated automatically.

    Think you understand something wrong, the value -1 means emission, price etc = "automatically calculated " If you set it to 0 or any other (positive) value it will be not automatically calculated. Not sure about <-1

  • Necro:


    I think this is somehow related - with latest beta batch starting with build 33172 a lot of menu entries, fake vehicles and assets produce this kind of log messages in stdout.txt:

    Code
    ...
    File vehicle/waggon/fad_167_ak_fake1.mdl: invalid idleEmission value -0.61, allowed range [0.0, 100.0]
    ...
    File vehicle/waggon/drehgestelle_kaleut/dg_ba_y25_uni_2.mdl: invalid idleEmission value -1.0, allowed range [0.0, 100.0]
    ...
    File vehicle/asset/PZL44-Deko.mdl: invalid idleEmission value -1.0, allowed range [0.0, 100.0]
    ...
BlueBrixx