Beiträge von melectro

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


    Ist mir ja schon fast unangenehm

    Fühle es überhaupt nicht so. Ich bin Dir sehr dankbar, dass Du die festgestellten Mängel melden.
    Ich habe gesehen, dass es richtig war, die Richtung umzukehren. Der Fehler wurde gefunden und behoben, kann nun in einer neuen Version 1.1 heruntergeladen werden

    I'm now trying to trigger some animations. Based on the vanilla steel mill, which has two animation event types "productionHalf" and "productionFull", my idea is to make something happen when production start in what I am working on now.
    Unfortunately, the animation does not start. What I see is a difference in the .mdl file, for the steel mill from UG type = "KEYFRAME", and I use type = "FILE_REF",


    According to Wiki, it should not matter. However, the animation works very well in the model editor and if I change the trigger to "forever", it also works in the game. It really interests me to understand why the animation does not start with eg. "productionHalf".
    Is there anything else I need to think about?


    @Katzer

    Danke für die Logdatei.
    Ich habe jetzt verstanden, dass es die Schiffe Ingolf & Rudolf als "Assets" sind, die das Problem verursachen. Ich habe die Ursache gefunden und jetzt befinden sich die fehlenden Asset-Dateien in der ZIP-Datei. Die neue Version 1.1 steht zum Download bereit.


    Das Fischerboot hatte das gleiche Problem (nur wenn es ohne den Fischerhafen aktiviert wurde), daher hat es auch ein Update erhalten.

    @Emiliocat


    Here is what I discovered from the log file:


    melectro_fish_industry/1 (0) (Fisch Industrie)

    melectro_fish_boat/1 (0) (Fischerboot)

    melectro_fish_harbour/1 (0) (Fischerhafen)

    melectro_Ingolf_Rudolf/1 (0) (Ingolf und Rudolf)

    melectro_fishing_ground/1 (0) (ff_name)



    If you compare the coloured marked lines above with the red big marked text I wrote for the mod on the webdesk, then you will solve your problem

    nur eine Landstrasse anschliesst

    Diesen Wunsch zu erfüllen erfordert sehr viel zusätzliche Arbeit. Die Kreuzung wird grundsätzlich nur auf einer Hälfte ab der Autobahnmitte gebaut. Dann wird die Hälfte um 180° gedreht, um die gegenüberliegende Seite zu bilden, somit ist der Ausfahrt symmetrisch aufgebaut. Zu beachten ist, dass die Kreuzung an verschiedenen Stellen endet, an denen Du markierst haben. Diese wird am Standort berechnet, je nachdem, wie viele Fahrspuren die Autobahn haben soll. Leider kann diese Änderung nicht umgesetzt werden.

    Ich hoffe du verstehst besser wie viel Arbeit Rob (x4) und ich hatten um dieses Modell zu machen. Das Projekt startete am 12. September 2020 (länger als 1 Jahr).


    gleichzeitig wünsche ich Dir Frohe Weihnachten.


    i cant add my game into new account on GOG

    since I have my game via Steam and unfortunately no games from GOG, I have difficulty contributing to a possible solution. Maybe you can ask your friend if he can do something.
    I find one thing a little strange, if you have been able to download the game once, you should still have access to the updates.

    Hi Marek


    Good that you sent a log file from the beginning of a new game with only the affected mod !


    My first observations in the log file:

    • The build version of the game is: Build: Build 29596 Windows 64-bit
    • This line can tell me that the game was purchased on GOG : c:\build\tpf2_gog\src\lib\renderer\tex_load.cpp:808


    The first idea I have is the following:

    • The crash may be caused by using an older version of TpF2 . Please check out GOG for an update on the game. The current version of the game is 34983
    • here is info from Urban Games about downloading/ updating the game Release Notes [Transport Fever 2 Wiki]


    If anyone can see anything else that is causing this problem is warmly received

    Zitat von @Katzer

    Würde ich sicherlich finden, wenn ich wüsste wo ich suchen müsste - auf Anhieb aber gerade nicht.

    Allerdings ist in der con (...local\mods\melectro_fishing_ground_1\res\construction\station\harbor) der Name mit "ff-name" angegeben:


    Zitat von @Katzer

    Muss ich dort ändern oder noch woanders?

    Nein, keine datein muss geändert werden


    Zitat von @Katzer

    Wobei es am Ende ja keine Rolle spielt - es funktioniert im Spiel ja ohne Probleme - und ich finde es großartig, auch mit der Animation vom Fischfang! :)

    Es kann für andere Leser nützlich sein und wenn es nach all meinen Tests Probleme gibt, ist es gut, wenn diese gelöst werden können.


    Katzer Ich wünsche Dir viel glück beim Fischen.

    Deutsch

    Hier starte ich ein neues Thema, in dem die Möglichkeit besteht, bei aufgetretenen Problemen Fragen zu stellen und Bilder oder Logfiles anzuhängen.

    it could just be saved

    In my SweDen mod for TpF1: I divided the search into several parts because it is not in a hurry to find a new industry. It is actually so that a newly placed industry does not have to start its production in the first few seconds. I have thought of this to just distribute the job so that it does not become too high a momentary load. Now that the starting point is to use SIM_BUILDING, the final result with a distributed job will be even better. As you wrote bulldozing is the only situation where something is changing fast. This has to be handled in the script.


    The player (sandbox mode) or game start can place warehouses all over the map, so there may be more than one "warehouse industry".



    use print(toString(mytable))

    I have also initiated an area in the GUI, so I can see the values in game.


    This is the problem that I often get. Printing the variable in the console or directly in the code givs me only an info that it is a table, but how to get into the table, what names are hiding inside it besides "_sum"? I have tested to index the table [1] ... ,but that results only in a nil value.


    The code I found in the UG campaign was:

    game.interface.getEntity(game.interface.getEntity(params.glasgow_steelmill).simBuildings[1]).itemsConsumed

    I changed the params.glasgow_steelmill into the Entity id for the industry I have and the result (table) is seen in the screendump.


    A table that includes something, but what?


    After I installed your Adv. Stat mod I found that you are using the same type of code, but you have "._sum" at the end .... So I placed the ._sum behind "itemsConsumed" in my code and it resulted in this:

    local Consumed= game.interface.getEntity(game.interface.getEntity(ConId).simBuildings[1]).itemsConsumed._sum


    The Consumed value (258) is not the same as the consumed value for the industry = 165, but it show at least something!

    (The ConId 27553 is the entity id for the Industry from which I have to get the data)


    In this industry there are two input items and each have a consumption value, I think the ._sum is the sum of both. How to get consumption value separately for each item ( in the example above it should result in 0 and 165)?

    the final goal is produce tracks and every item of track delivered to the warehouse will make tracks available to be used for track build.

    I have an example from TpF1 but it is done as a campaign. I wish to get this to work in a game script in TpF2, but I struggle to read the data.


    • read number of cargo items (Standard or High speed track) delivered to the warehouse industry
    • for each delivered standard track, add numbers of items to the stock (separate variable) of available standard track
    • same for high speed track
    • when tracks in stock is emptied -> disable the track build function
    • when tracks are delivered to warehouse-> enable track build function

    Renaming should be only done once,

    I fixed that after my previous post, and I will remove it when finished. The first try was actually by selecting GUI thread, but the result of the variables where nil, so that's why I placed the rename to get a confirm on the thread name.

    On the 13th Nov 2020 I got an PN answer from eis_os, writing


    I have in my game script code placed the rename function inside guiUpdate = function()

    Now I can see which lua thread runs my code. Next step I was trying is to dump some variables, but I'm not successful, it results always in "nil".


    Please don't laugh I'm still learning. What is wrong?


    Finding the industry is at the moment solved, now it's getting interesting. Reading stored items in stock works almost 100%, but when an unknown vehicle delivers items to the factory it should be read in the game script. My thought was at the first moment "easy", but no. The stored value is reduced by the production while vehicles are unloading. That means it is tricky not to miss any items as these values are increasing and decreasing at the same time. Looking on Consumption though seems to be better as this value is ending on the same value as the cargo amount was on the vehicle, but how to get it?

    I have also tested to read production by using produced = game.interface.getIndustryProduction(EntityId)

    For industries that are producing something the code works, but I get only "zero" in production on industry that doesn't produce anything, like an export industry.

    Reading Production from this Industry (that doesn't produce anything) I only get = 0, it should have been 25 like it will be if read production on a producing industry.


    Now I opened the TransportFever2.exe in Notepad++ to see if there could be something else to read and I searched for "getIndustry" This is what I found:

    Code
    getIndustryProduction   getIndustryProductionLimit      getIndustryShipping     getIndustryTransportRating

    Looking around this place in the code of TransportFever2, gave nothing.


    For me it looks like the game doesn't do right when there is an only consuming industry. None of these four values are usable.


    I have spent some time to try to find how to read the Consumptions values. I used eis_os API inspector and I can't find any useful data. Is there a way to read these Consumption data?


    edit:

    In one of the vanilla campaign (03) I found a code to get itemsConsumed

    local c = game.interface.getEntity(game.interface.getEntity(params.glasgow_steelmill).simBuildings[1]).itemsConsumed

    changing the steelmill entityiD to my factory is giving me an address to a table. I wish to learn how to look into a table to get the names of the data to be read. I guess that the API will have some function in the console.