How to add a vehicle to a set of vehicles

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


  • I am writing a mod that selects some vehicles and add them to a set of vehicles. This is better explained by example.

    Let's say I download a mod containing a shiny, beautiful locomotive for the "europe" set. I am playing a game with the "usa" set of vehicles.

    How do I add the "europe" vehicle to the "usa" set?

    There is a code in base_mod.lua that adds vehicles from one set to another set but those are the vehicles already inside the models.zip file. Cool and easy.

    I am talking about adding a vehicle from a mod to my set of vehicles I am playing with.


    So far I got to this point trying to add the loco from 1964986639_hr_jones_goods_4_6_0:


    runFn = function (settings)


    if settings.vehicles == "usa" then

    addFileFilter ("model / vehicle", function (fileName, data)

    local extraVehicles = {

    ["res / models / model / vehicle / train / HR_Jones_Goods.mdl"] = true,

    ["res / models / model / vehicle / train / HR_Jones_Goods_menu.mdl"] = true,

    ["res / models / model / vehicle / train / HR_Jones_Goods2.mdl"] = true,

    }


    print (string.format ("Checking vehicles for filename: '% s'", fileName))


    NEVER GOT TO SEE THE NAME OF HR_Jones_Goods coming inside this method.

    My mod is the last one in the list of mods.

    I saw all names coming from the models.zip file


    I AM STUCK HERE

    ANY IDEA?



    end)

    end

    end

BlueBrixx