Beiträge von Enzojz

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


    @Grisu118


    For the first problem, surely that because you introduced some mods with property tracks, and they ordered before the property tracks in my mod, (maybe tom's new station? I know there are two tracks in the mods)
    The solution is to rebuild all elevated stations, that's a bug from UG, none of us can help on it.

    It's terrainAlignmentList who deforms the terrain.


    Take attention of the vertex you declared in each list, its CW or CCW sensitive, depending where it starts, if you did it in wrong direction(seems be x > 0 or x < 0), your terrain will be very sharp.


    A tip


    In Lua you can readout a function from a file then hack into it (by hijacking its return and modify it), in this way you don't need to copy-paste all the codes.


    Look at what I have done to my sloped station.


    It's the advantage of a script language.


    Edit by Merk: Merged double post.

    @eis_os
    Nothing changes if you have different type of edges.


    However putting many groups of edges of same type with same property may lead to crash more frequently, so merge as much as possible.


    I hope UG is working on the UI thing.


    Modedit, MineTiger: Vollzitat entfernt/full quote remove

    Hmm, das war wohl etwas schlecht ausgedrückt, der Index in einem Array aus allen edges. Ist schon klar das der Index errechnet bzw. vom Script bestimmt wird.


    Bei zwei Gleistypen hab ich ja zwei theoretisch unabhängige edgeLists (bzw. mit Strassen sogar noch mehr), jeweils mit Ihren eigene Nodes. Die NodeID ist dann der Index über alle edge listen hinweg, wollte mich da nur nochmals versichern.


    You can suppose all nodes are stored in a linked list so the index is determinate by the order you have written them in the script.


    Here are some useful info:


    First, mixing cargo platforms and passenger platforms seems leads to crash. As I have just test tonight. My test with pure cargo station or passenger station is find, but once I try to change the type of one platform, it crashes.


    Then about terminals:


    in mdl files you will see this:


    terminals = {
    { personNodes = { 6 }, personEdges = { 1, 3} },
    { personNodes = { 5 }, personEdges = { 0, 2} }
    }


    so in debug mode you can see, if the platforms have two tracks, two red lines.
    don't know very clearly the function of personNodes, but it's the hightlight dot in debug mode, and always surrended by affected personEdges(red), where the passengers wait for the train. In any cases, node = {point, vector}, edge is forms by two nearest nodes, you can count these index by fingers. (two nodes a line and one edge a line in data before lanesutils in raw models, for raw data, each {point, vector} is a node)


    in the result.terminals, you will have


    {
    terminals = { listofterminals },
    vehicleNodeOverride = track * 4 - 2
    }


    the listofterminals is a table like this


    {platformid, terminaId}


    where platformId is the model index of the platform mdl file in result.models, and terminalId is the index of the terminals section in platform model file
    vehicleNodeOverride is the id of the track edge node index in result.edgeList, always where the train (center) stops


    The vector of the track edges controls the side where train doors open


    You can define internal terminals directly in a model, in this case, you need to define vehicule edges aside of person edges, then


    terminals = {
    { vehicleNode = {x}, personNodes = { 6 }, personEdges = { 1, 3} },
    { personNodes = { 5 }, personEdges = { 0, 2} }
    }


    in result.terminals you just erase vehicleNodeOverride, and put this model id as the first, can be followed by the others models.


    You can look at into the stationlib.lua in my underground station and also the complexstation.lua of complex station. I use generated data to map into these results.


    All indices are from 0.


    for example in my complex station I defined this by hand for tram platforms



    As you can see and guess I have rotated one of the platforms model by 180° in the terminal of index 1 (the 3rd in the second one)


    and in this case:


    It take last train platform and uses it's empty side of one tram track, and use a new tram platform for another.


    However, for roads with two or more lanes, you can only affect terminals to the right side by edge indices, the left side is impossible. So you can see in my complex station, the two tram tracks are independent and the tram platform give extra edges to connect them and raw roads.

    Ganz miserabel und schlechtester Stil! Ausnahmebehandlung sollte man nie als Ersatz für Flusskontrolle und Logik nehmen.Ein einfaches "If" ist laufzeittechnisch tausendmal billiger.


    Es wird schon einen Grund haben, warum UG da eine Assertion für den Fall hat. Da muss schon noch ein wenig mehr überlegt werden...

    That depends on language..on cpp most of time should avoid exception.

    For the compatibility issue, this game holds the principle that first come first load, so if in your mod there are paths may be used by other mods, rename them to avoid version conflicts.


    Then check the legality of data from params and give them default value in case of nil, some mods may cause some of your params invalide, I don't know reason but this problem exists.


    You need to pay attention that the game save stores paths of mdl in it, so once published, you can't delete them in future versions.(you can change, but never delete or do breaking changes)


    This is my lib for track generation
    https://github.com/Enzojz/unde…es/scripts/stationlib.lua


    So far it handles generation of tracks by group and assign terminals, the output are lists of matrices for edges and platforms and terminals corresponds, you have option to have middle platforms or middle tracks layout.


    With this I have refactorized underground station:


    https://github.com/Enzojz/unde…s/scripts/mlugstation.lua


    It's still in evolution, I do script in very FP way, so perhaps you may take some time if you haven't yet experience in this paradigm(I think more or less you had some, if you did C# or JS, Python ever), but it's very easy to understand, and you will like it.

    I don't think UG compares two floats with ==
    In C++ there's DBL_EPSILON and FLT_EPSILON which is the standard way to compare two floats.


    Don't know if I have catched the topic...

    Now we have both underground station and elevated station, I think have archived my short term goal :D


    In the following weeks, I have following plans:


    A light task for this week: The complex stations:
    The first release will be surface station with underground level
    Features:
    - 2 ~ 12 tracks for each level
    - Rotation, X, Y displacement for underground level.
    - Option for tram station for ground level (like Brussels-South)
    - Terminals and pass-through type


    Later version for elevated / ground cross station


    This station will need underground station to run, and it leads to the refactoring the code of underground station and elevated station, this have almost done, since I don't want to do the same thing for many times.
    With this station, I will do a small upgrade to the underground station too, very small upgrade. I am still waiting for the voice from UG about the crash issue, so far no news.


    After this project, I may do curved station first or upgrade the flying junction


    for the the flying junction
    - Curved tracks
    - Sunk version


    The curved flying junction will almost be a redo of the mod, so this may take longer time.


    For curved station, I have already got an idea what to do for this missing thing in the game, in fact, if I want to have station between 80m and 480m in length, 1 to 12 tracks, and an angle choice of 5°, 10°, 15°, 20°, 30°, 45°, I need to have more than 1000 models to archive this goal, since each track are different. Sadly in this game, we have only affine transform, so projecting a rectangular into a trapezoid is just impossible.
    So hand modeling is just too much work. I am a lazy guy, I won't do it this way.


    Between the times, I may finish the sunk station, in fact the station is finished already, but I need to make a model for the main entry over the platform, so when I feel tired, I may do this.
    The sunk station includes also an asset of ramp protector.

    I really have no idea what tpf's problem is. The troubles started mid-dezember at an old save, when I introduced Enzojz' sloped stations - and decided to create a new map, and it worked. There was no more trouble for about 6-7 years, I even built a whole subway system with two lines, containing multi-leves stations, depth from 10 to 20m, x-shaped-stations and so on - also eis_os' stations were placed with no problems.


    And then, all of the sudden, with no mod changed from my side - the metioned problems appeared;
    For me this doesn't make any sense, and as I don't have a plan of scripting or modding, I'll be waiting a few weeks or months, and hope there will be any upgrades, weather from ug or other sides. But as it is now, that I can only play about 2-16 ingame months without a crash, the game's not playable for me.


    (but no offense to anyone - your mods are awesome, and as they seem to work on so many other pcs - so I'll just have to wait.)

    There's known crash issue with 2 layer or 3 layer station, I have send some dump files to UG it seems it's a bug from game.

    If the game engine crashes from C++ code, there won't be any error message.


    Sometimes, it's caused by mod but sometimes not.


    I have just found an interesting thing yesterday: the total length of paths of textures in a material can not overpass around 184 letters, if it passes, it will crash. :) It's a good reason not to put the folder of files too deep