Editing con file while game is running

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


  • Some time ago, during an ongoing development, I was able to make some changes to the con file while TpF2 was running. All I had to do was rebuild the construction or update an existing one by changing a setting parameter. Now I have to reload the game for the slightest change. I am running a new clean game with only the necessary mods required for the mod that I am developing.


    Is there something that has changed in the game engine (last game updates) or is it a setting that I managed to change without knowing?

  • :/

    LUA Con files do get a reload call according my debug code for disabling the reload functionality.

    So a simple con updateScript should work, I did test a asset con file and can see a reload happen if fastdebug mode is off. (Simple changing a print statement and it worked).


    If you use *.script files accessed by new modules/constructions via postRunFn, these won't get any reload.

    Neither my debug code got a call, nor changing something has an effect on reload behavior. Even if you remove game.res.script[<entryname>], TPF2 won't reload but will create an assert.



    Technical there is a thing I would call Script Repository . (Different to Game Script Repository) These will load all *.script files, then this will get passed to ConstructionRep and has their own lua State.


    Actually there a two copies for the script repo. The other one is used for soundsets...