missionutil / TaskManager in Free Mode

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 would need a function in my mod to be called periodically, about every month, to do some bookkeeping, and also when the game is saved and loaded. The missionutil.lua script seems to be exactly what I need, but I can't get it to work in Free Mode. Is it possible?


    I'm calling game.interface.upgradeConstruction() when an industry upgrades, in the .con files data() function, but all my .params data gets overwritten once my function returns... quite annoying. So I was thinking I'd store this data somewhere else and update the industry.params once the game engine is done with it. Any other idea on how to do it would be welcome. I'm getting desperate and I'm looking for functions in game.config the game engine uses, like town buildings.con() and change the pointers to my own so I can call my update.


    I do not speak german and it's making it very hard to find any information, I would greatly appreciate any help I can get here. Thank you.

  • After lots and lots of trial and error, I'm now using the campaign mode. I basically tried everything I could think of, and while I had high hopes a couple times, I always ended up crashing the game.


    Generate a map in free mode with your mod activated, save game and copy .sav file to res\campaign\eu/usa\08. You can then have script.lua in that folder to deal with missionutil and it shares globals with mod.lua in the mods folder. Still compatible with other mods and you can even add mods when loading a saved campaign game. I fail to see why missionutil isn't available in free mode, it's an essential modding tool.


    Campaign mode has a few issues i'm still unfamiliar with, so I can't go in details, but sometimes I get a new map generated with the free mode settings when trying to load a saved campaign game. It seems to have to do with having all tasks done before saving the campaign game, but I'm not sure. When that bug kicks in, script.lua doesn't work.

BlueBrixx