[MOD] Custom Stations (a.k.a. Path Hell)

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


  • For the past few days I've been working on a new train station type; I thought it might be a nice idea to have a station to go with my Dutch trains, and after a weekend of work I think I've got the graphics side of things pretty much done. I've always liked the idea of having a bridge over the tracks instead of the weirdly two-dimensional underpass. Luckily, graphically this was fairly easy to accomplish.


    [Blockierte Grafik: http://i.imgur.com/39Wdznv.png]


    What I didn't count on however was that the creation of paths for people to walk on is a whole different story. I've managed to create one for the entry ramp, but every small change keeps breaking the design and I'm debating whether or not I should wait for a tool to draw them; it's just that frustrating.


    To illustrate, every part of the station (which has many different little parts for platform pieces) has data like this:


    Code
    -- eingang
                            { { -20.0, 3.0, 1.5 },  { -20, 1.0, 1.5 },     { .0, -1, .0 },{ .0, -1, .0 },        1.5 },
    
    
                            -- links
                            {  { -14.0, 0.0, .744 }, { -20.0, 0.0, .744 },    { -1.0, .0, .0 }, { -1.0, .0, .0 },        3.0 },
                            { { -14.0, -1.0, .744 }, { -14.0, 0.0, .744 },     { 0.0, -1.0, .0 }, { 0.0, -1.0, .0 },    1.5 },
                            { { -14.0, -1.0, .744 }, { -9.0, -1.0, .744 },     { 20.0, .0, .0 }, { 20.0, .0, .0 },        1.5 },


    Every line defines one segment of path, where the beginning of one segment has to be the same as the end of another, which will then create a path for people to take. However, since every path is relative to its own mdl file, it gets very complicated trying to figure out what belongs where. Also, does anyone have an idea of how the following lines should be interpreted?


    Code
    terminals = {
                    { personNodes = { 5 }, personEdges = { 3, 7 } }
                }
  • Looking great! Very familiar sight ;-)


    About the piece of code. Would it have to do anything with how many people can stand at a certain place? Just came to mind as the first thing when I read the code....don't know, just guessing :-p

  • Nice station Oppie. The one to ask would probably be DasMatze. He seems to be the one who knows a lot about the game and might know. If you do find out how to figure the numbers, please write back here to let others, including me, know how it's done. I know how to figure the paths but what those numbers mean, I have no idea.


    Thanks


    btw, are you the same Oppie that was/is in the Lomo forums?


    EDIT: I looked at a station and I do know what the { personNodes = { 5 } means. I don't know what the personEdges = { 3, 7 } mean tho.
    The personNodes are how many start and/or end points are in the path. In each set of numbers that describe the paths, there are 4 set sets of numbers in parentices, plus the last number. In each line, like you prolly already know, defines the path. So you would count how many sections there are. You have 5, so there should be 4 lines of numbers. space, and 4 more, right. One for each side. So that's how you figure the Nodes but you have to add 1 more for the end point, which is in the last line, second set of numbers in { }. That makes it 5. In Max, if you were to create a line, each line has 2 vertices, if you drew 4 sections in the line, you'd have 5 vertices. Same with the Nodes here.


    I hope I explained that well enough for you to understand.

    Einmal editiert, zuletzt von Tattoo ()

  • I sent an email to Basil Weber as Xanos suggested and he explained it perfectly to me; the personNodes number 5 means that the 6th (it's a zero-based index) node in the path list is the node where passengers 'enter' the station. Secondly, the edges is another zero-based index that indicates which path segments passengers can stand along. You could think of it as the following example explains:


    (edge 0) { { 0, 3.0, 1.5 } (node 0), { -20, 1.0, 1.5 } (node 1), { .0, -1, .0 }, { .0, -1, .0 }, 1.5 }
    (edge 1) { { -20.0, 1.0, 1.5 } (node 2), { -20, 3.0, 1.5 }(node 3), { .0, -1, .0 }, { .0, -1, .0 }, 1.5 }


    Also, another thing that I discovered is that it does matter which order the nodes are in; all path segments are effectively one-way; meaning that they have to be built in the direction that people will walk when they enter the station. Keeping all of this in mind, I'm making progress slowly, but at least my passengers are already taking the walk bridge to the second platform.


    Zitat

    btw, are you the same Oppie that was/is in the Lomo forums?


    I am! I've been modding for SimCity 4, LoMo, SimCity and now Train Fever... strangely I always end up with a lot of Dutch trains. :P

  • strangely I always end up with a lot of Dutch trains.

    Would it be safe to say that you are Dutch then?


    I understand the Node part but the Edges have me confused now because in the Cargo station I've been working on has this;



    So where do they get the { 44 } and { 52 } for personNodes from and where do they get the { 22,23,24 } for the personEdges? I don't get it. There is only 7 segments in the path on each side so how can it be 44 and the edges 22,23,24 and so on. By what he wrote to you, can you explain this? I don't know if cargo is different or not but this is what is in the cargo_medium_old.mdl. This is something I need to know because I want to make some new stations.


    Did he tell you what the last number in the lines meant?


    Good to see you here modding for TF. I hope you have a better experience here than you did in the Locomotion forums. I got fed up and left myself but I do visit from time to time still.


    EDIT: After studying all of this further, I understand the personEdges now but the personNodes is still confusing for this cargo station. I just don't see where the 44 and 52 are derived from. I also don't understand what - (it's a zero-based index) - means.

    4 Mal editiert, zuletzt von Tattoo ()


  • As far as I know, some people have started to translate the entire German Section of our LEXICON to be provided as well in the English Section.

BlueBrixx