Jump to content
Raymond7cn

Is there a way to install multiple train automata mods?

20 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 

Dear all,

I have a question when testing some railway stations which were modeled recently, Is there a way to install multiple train automata mods? For Instance, I have two or three favorite trains, Can they come up randomly at the same time without having the cars and engine's mixed, It looks unlikely by now, I tried to put two VDK trains into plugins, there was only one of them came out, I guessed they probably rewrite by each other.

Hiya @CorinaMarie , I'm very sorry to beep you suddenly, May I ask that according to this tutorial you wrote for me:

Is it possible to deal with my question by the same method or theory? Thank you for advance this.:}

Yours Sincerely,

-- Raymond


What is impossible with men is possible with God…!

5d9ffb6b62888_-1.jpg.d47b771d09c95f9e7590c44cf6711098.jpg

I've contributed some to Simtropolis

My Emotion

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

I've never come across a mod which allowed more than one Engine. However rail Automata are split between the main engine model and passenger/freight cars. Usually when we want to add Automata to the available pool, we must give it a unique ID and it's own Exemplar. It would be a reasonably easy test to do this for one such engine model and see if the game can show more than one. But to date I guess they all use the same ID, to override the train that comes with the game.

Of course that would bring you head on with the problem I suspect prevents multiple-trains from being viable. There exists no mechanism in the game's code to select the passenger/freight cars based on the main engine in use. For example, if you have unique ID'd passenger cars in both yellow and blue, the train would consist of a random engine and a selection of yellow and blue cars also chosen at random. Less of an issue for freight trains, but in most use cases this randomisation will work against you.

You can re-purpose the freight train as a second passenger train, but of course it would be triggered by freight rail usage, not passengers. The upside is that because the rear car is always a caboose (brake van), you can have trains with engines at both ends with this workaround.

  • Like 1
  • Thanks 3

Head over to my Lot and Mod Shack to keep abreast of my latest developments.

Do you like custom textures, but don't like all the work involved creating them?, take a look at the Texture Automation options here. Change the look and feel of your transit networks, with the minimum of effort, for example customised versions of my Sidewalk NAM (SWN) and Terrain Grass NAM (TGN) mods, and much more besides.

New to the NAM? Check out my tutorials on YouTube. Latest upload: How to: RHW - MHO Roundabout Interchanges. (Nov 25).

p.s. - I'm MGB over on SC4D and a member of the NAM team.

Share this post


Link to post
Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Dear Robin, Many thanks again for your professional and thorough explainment, however it's kind of ashame that i couldn't understand them entirely. but it's reasonable since i may couldn't understand that even with my native language.:}

    With my understanding, I guess you're telling me that it would be hard to achieve my goal, since:

    1 hour ago, rsc204 said:

    However rail Automata are split between the main engine model and passenger/freight cars

    they are not one unique ID, so we could have random engine and cars separately, but couldn't have random set of them, E.g. I have engine (A,B,C) and car(a,b,c), Then that is feasible to generate Ab, Bc,Ca, but couldn't let game generate fixed combination as Aa, Bb, Cc.

    If so, I just have a random thought, *:idea:You and CoriBoom™ used to help me to understand the CAN-AM mod, so I thought is it possible to make a transparent lot as a generator, then put it along with the railway and spawn trains upon it. Just as the theory of can-am.

    Furthermore, I think of another idea,*:idea: Is it possible to put the engine and cars's True3d model together as an engine, and then clear or make the cars model as transparency or null, Then Whatsoever the game generate randomly to, The cars won't be seen, All we could see is engine+cars model as a whole train. Is it possible?

    Anyway, Enough of these fairy tales that better to do some tests for a try. Thank you Robin with my respects.:}

    Yours,

    -- Raymond

    • Like 5

    What is impossible with men is possible with God…!

    5d9ffb6b62888_-1.jpg.d47b771d09c95f9e7590c44cf6711098.jpg

    I've contributed some to Simtropolis

    My Emotion

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Dear Robin, @rsc204 Please ignore the post above, I found that there were some misunderstanding, I do need to have a look at the train mod carefully before asking. Sorry to disturb you.

    Sincerely,

    -- Raymond


    What is impossible with men is possible with God…!

    5d9ffb6b62888_-1.jpg.d47b771d09c95f9e7590c44cf6711098.jpg

    I've contributed some to Simtropolis

    My Emotion

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    1 hour ago, Raymond7cn said:

    Is it possible to put the engine and cars's True3d model together as an engine, and then clear or make the cars model as transparency or null, Then Whatsoever the game generate randomly to, The cars won't be seen, All we could see is engine+cars model as a whole train. Is it possible?

    TSC TER Train Automata is using this idea, I think. You might want to download and study this file.

    • Like 2
    • Thanks 3

    "If you try to please everybody, you often times end up pleasing nobody, especially yourself. When somebody offers to do a favor for free, like making a mod for SimCity 4, you shouldn't be overly critical of something generously given to you. In other words, you shouldn't look a gift horse in the mouth." - Twilight Sparkle after playing SimCity

    "Being a mayor or a content creator for SimCity 4 is a heavy responsibility, Patrick. Each city and each custom content is like a child, and must be treated as such." - SpongeBob Squarepants after playing SimCity

    "Without deviation from the norm, progress is not possible." - Frank Zappa

    "The wisest men follow their own direction." - Euripides

    Welcome to Fairview, my new city journal *:D

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Dear Terring, @Terring Thanks a million! I'm so lucky to have you as friend. In China, You and Robin and other experts will be treasured as panda. All we wish is that you keep playing this game forever with your valuable experience.*:D

    I have some tests on TSC TER with a bit tweak, it works in a way, however also found out a drawback that hasn't thinked of, it's not natural when the train taking the curve as a whole and long automata.

    15 hours ago, Raymond7cn said:

    If so, I just have a random thought, *:idea:You and CoriBoom™ used to help me to understand the CAN-AM mod, so I thought is it possible to make a transparent lot as a generator, then put it along with the railway and spawn trains upon it. Just as the theory of can-am.

    regarding this thought, I found out the mod SW77 Freight Truck Generator (v1.0), I thought this is what i was saying, but haven't dug deep into it, Anyway, I will try it tomorrow since I have modeled nonstop for about 20 hours, Really need to sleep tight now.:}

    BTW, I modeled an old train in the meantime, haven't textured it to True3d model, Thanks to CoriBoom who let me to become so infatuated with Trains.*:D

    Sincerely,

    -- Raymond

    • Like 4

    What is impossible with men is possible with God…!

    5d9ffb6b62888_-1.jpg.d47b771d09c95f9e7590c44cf6711098.jpg

    I've contributed some to Simtropolis

    My Emotion

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    On 22/06/2020 at 5:49 PM, Raymond7cn said:

    they are not one unique ID, so we could have random engine and cars separately, but couldn't have random set of them, E.g. I have engine (A,B,C) and car(a,b,c), Then that is feasible to generate Ab, Bc,Ca, but couldn't let game generate fixed combination as Aa, Bb, Cc.

    Absolutely, you've explained it more clearly than I could.

    On 22/06/2020 at 5:49 PM, Raymond7cn said:

    If so, I just have a random thought, *:idea:You and CoriBoom™ used to help me to understand the CAN-AM mod, so I thought is it possible to make a transparent lot as a generator, then put it along with the railway and spawn trains upon it. Just as the theory of can-am.

    The way that works, is that the "generator" is set to work with a given network. But it's possibly an area worth exploration, perhaps we can have another set of automata or make rail automata work differently? But I have the feeling since Rail already has an Automata Controller, you might be limited to editing the existing settings.

    18 hours ago, Raymond7cn said:

    I have some tests on TSC TER with a bit tweak, it works in a way, however also found out a drawback that hasn't thinked of, it's not natural when the train taking the curve as a whole and long automata.

    Indeed, it's much less noticeable with these two-car DMU/EMU trains, but there are already issues for following paths if a model is too large, the train will appear to skid off the tracks and derail on some WRCs. But yeah, for any sort of long train I'd imagine it would look pretty bad cornering.

     

    • Thanks 3

    Head over to my Lot and Mod Shack to keep abreast of my latest developments.

    Do you like custom textures, but don't like all the work involved creating them?, take a look at the Texture Automation options here. Change the look and feel of your transit networks, with the minimum of effort, for example customised versions of my Sidewalk NAM (SWN) and Terrain Grass NAM (TGN) mods, and much more besides.

    New to the NAM? Check out my tutorials on YouTube. Latest upload: How to: RHW - MHO Roundabout Interchanges. (Nov 25).

    p.s. - I'm MGB over on SC4D and a member of the NAM team.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    On 6/22/2020 at 7:35 AM, Raymond7cn said:

    Is it possible to deal with my question by the same method or theory? Thank you for advance this.:}

    It turns out the answer is partially Yes.

    Similar to the TSC TER Train Automata which @Terring linked to, but with no need to have invisible wagons and also they can each be given their own unique IID rather than all of them overriding the same Maxis passenger train engine. Then with a Lua generator for each they can be tied to a ploppable lot for each individual one.

    While it cannot be a full train, it can be individual engine like the TSC TER Trains and have as many different ones as you want all generating separately.

    I've made a demo for how it can be done by making a copy of the Maxis passenger train engine, adjusting the hue so it looks different, and giving it all new IIDs for the important parts. The generator lot can be found in the Train menu and what it generates is in addition to whatever regular passenger train you have. One drawback is that it can spawn right in the middle of other trains. Prolly best to have a separate rail line that would be for these short, single automata.

    z-9718-20 - Passenger Single Automata Generator.zip

    • Like 4
    • Thanks 3

    Chance favors the prepared mind. ― Louis Pasteur  
    Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

    Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

    Are you new here? Check out the Introduction and Guide to Simtropolis.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Woww! I'm Speechless aaaagain, It completely yes to me.*:golly: @CorinaMarie, This is really a good news to train lovers, Thank you Cori, Please allow me to learn it a while and then consult you if there is some questions.*:thumb:

    Yours 

    -- Raymond

    • Like 1
    • Yes 1

    What is impossible with men is possible with God…!

    5d9ffb6b62888_-1.jpg.d47b771d09c95f9e7590c44cf6711098.jpg

    I've contributed some to Simtropolis

    My Emotion

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Little bitty bug in that file. *:blush:

    Just plop the lot with the base of the arrow (and not the point) touching the rail line. (I'm working on something else with this and it's fixed for the next version.)

    • Like 1
    • Thanks 1

    Chance favors the prepared mind. ― Louis Pasteur  
    Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

    Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

    Are you new here? Check out the Introduction and Guide to Simtropolis.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    I've been tinkering some more. *:D

    We can sort of have independent trains generated now. In these pics the long train is a standard freight train generated with Swamper77's Train Generators and the steam train with the timber cars and a caboose is generated from my Lua coding.

    7010b-0824.jpg

    7010b-0825.jpg

    7010b-0826.jpg

     

    What I've done is write a separate automata generator for the engine, each train car, and the caboose. Then I wrap that up with a single occupant group controller list with each individual generator placed in a table in the order I want them to appear. Since they all inherit basic properties from a parent automata train group, they all have the same speed. This means they will follow each other as close as the game will allow.

    However, while said following looks fairly decent when zoomed out, it gets a bit gappy closer in:

    7010b-0827.jpg

     

    Then there are a couple other problems too. >.<

    The generator lot needs to be plopped while the game is running in the slowest (turtle) speed and even then the cars can sometimes get out of sequence. (Like the caboose might wind up somewhere in the middle.) I suspect the longer one makes the new train, the more likely that would be to happen. So far I've never seen the cars before the engine so this might work ok for passenger trains since there can be an engine and any sequence of cars with no need to specifically have a last (caboose) car.

    Another really goofy thing is if they come up to a switch point in the track, some will go one way and some the other and then it's just a mess of independent cars every which where. o.O

    On my test track oval with no other choices for where to go, it does pretty good. I imagine if one had a straight rail line thru a city tile with nowhere else to go, that might work too. (And, ofc, generating a single automata (similar to those TER TSC ones) is no problem at all. You can have as many different ones of those as you like.)

    For what it's worth, here's the file: z-9718-08 - Timber Train Automata Generator.zip

    • Like 8
    • Thanks 1

    Chance favors the prepared mind. ― Louis Pasteur  
    Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

    Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

    Are you new here? Check out the Introduction and Guide to Simtropolis.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    7 hours ago, CorinaMarie said:

    Another really goofy thing is if they come up to a switch point in the track, some will go one way and some the other and then it's just a mess of independent cars every which where. o.O

    LOL That ought to give our transportation advisor something to think about...

    • Like 1
    • Yes 1
    • Haha 3

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    I woke up at 2 am, God seems to want me to see something big, opened Simtropolis… Then I couldn't sleep, @CorinaMarie My lady, Have you considered a dedicated thread for your marvelous work?*:thumb: I have seen many Peeps around desired for this.:}

    • Like 3

    What is impossible with men is possible with God…!

    5d9ffb6b62888_-1.jpg.d47b771d09c95f9e7590c44cf6711098.jpg

    I've contributed some to Simtropolis

    My Emotion

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    3 hours ago, Raymond7cn said:

    Have you considered a dedicated thread for your marvelous work?*:thumb:

    I have considered it, but the second effort needs a bit more perfection before a full tutorial is warranted. (I did come up with a much more logical way of re-assigning IIDs in that second version so it makes way more sense than the first one with the Purple Maxis passenger train engine.)

    I also have a new idea which might ensure the train cars are always generated in the desired order with the caboose forced to be the last one. Ofc, many things which seem like they might work from code level reading act differently than expected in the game. (For instance I spent a few hours earlier today testing ways to require all the cars and the caboose to follow the engine by writing an attractor with 100% magnet pull behavior and attached that to the engine, but the cars (and caboose) simply ignored it.)

     

    3 hours ago, Raymond7cn said:

    I have seen many Peeps around desired for this.:}

    Point them to this thread in the meantime. *;)

    • Like 2
    • Thanks 1

    Chance favors the prepared mind. ― Louis Pasteur  
    Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

    Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

    Are you new here? Check out the Introduction and Guide to Simtropolis.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    3 minutes ago, CorinaMarie said:

    I spent a few hours earlier today testing

    Thank you Cori for making our dreams come true, I know you are a precise and responsible programmer, Just take good care of your health.*:thumb:

    Yours,

    -- Raymond

    • Like 1
    • Yes 1

    What is impossible with men is possible with God…!

    5d9ffb6b62888_-1.jpg.d47b771d09c95f9e7590c44cf6711098.jpg

    I've contributed some to Simtropolis

    My Emotion

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    13 hours ago, CorinaMarie said:

    Another really goofy thing is if they come up to a switch point in the track, some will go one way and some the other and then it's just a mess of independent cars every which where.

    That sounds like the Business Train designed by Charles Bombardier, a train that its cars can operates independently and even hop on or off the tracks to skip gridlock :D

    randvu_03.jpg

    randvu_04.jpg

    • Like 4

    "If you try to please everybody, you often times end up pleasing nobody, especially yourself. When somebody offers to do a favor for free, like making a mod for SimCity 4, you shouldn't be overly critical of something generously given to you. In other words, you shouldn't look a gift horse in the mouth." - Twilight Sparkle after playing SimCity

    "Being a mayor or a content creator for SimCity 4 is a heavy responsibility, Patrick. Each city and each custom content is like a child, and must be treated as such." - SpongeBob Squarepants after playing SimCity

    "Without deviation from the norm, progress is not possible." - Frank Zappa

    "The wisest men follow their own direction." - Euripides

    Welcome to Fairview, my new city journal *:D

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    First of all, I would say sorry I wouldnt able to submit reply to your DM reply, @CorinaMarie. It always error idk why, pardon for this sudden mention 🙏🏻

    The previous subject was already solved by the way, good news isnt it 👍🏻

    Recently, Im curious about your LUA file that makes a freight train a full timber train. Since I'm not a programmer nor a person with a coding background, I really want to learn about that LUA file from the master itself. 🙏🏻

    Glad I found the og thread here lol


      Edited by Gemeentekaart  

    Forgot to mention

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    5 hours ago, Gemeentekaart said:

    Recently, Im curious about your LUA file that makes a freight train a full timber train.

    My LUA code will be inside the .zip file attached to this post above. I don't yet have any tools (Reader in this case) to open the .dat files to get inside, but it's possible I documented the code a bit to say what's what. Ofc, as an experiment into something which had never been done before (afaik) and also which failed its main objective in a comical fashion, it might just be raw code without any explanation.

    When CB wakes up and logs in, I'll ask him to extract the LUA to text files for me so I can see what I did.

    The important thing (as mentioned in that post) is that each train car (wagon) can and will go their own separate ways if there are switches. Even on a single oval of track with no choices they didn't quite look like a real train iirc. I believe Maxis might have tried to handle the full trains all via Lua, but quickly discovered that wasn't fast enough and so they had to do special coding exclusively in the C++ side of the program.

     

    5 hours ago, Gemeentekaart said:

    I really want to learn about that LUA file from the master itself. 🙏🏻

    My first LUA coding as I get back into game things will be a possible NAM project in which I'll make the traffic congestion messages more pertinent to real troubles rather than simply annoying when two cars stare at each other at an intersection. That'll be a good place to learn where it might become interactive with questions and answers about the coding.

    For now, you can dip your toes into the LUA editing and testing here. This way you can get familiar with the very basics of opening the file, editing, applying, saving, and testing. That's a prerequisite to any game coding.

     

    And, if you are worried about pronouns, I'm a herself and not an itself. *;)

    • Like 4

    Chance favors the prepared mind. ― Louis Pasteur  
    Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

    Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

    Are you new here? Check out the Introduction and Guide to Simtropolis.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Yeah I've downloaded it long ago, that was awesome LUA beside its bug 👍🏻

    Alright, I will dip my toes into LUA course, to learn about the full 1-type freight and pax cars. 

    My bad, I'm sorry my English is simply not that good 🙏🏻🙏🏻🙏🏻

    Thank you so much in advance, Corina 🙌

    • Like 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
    Currently: Viewing Topic: Submenus DLL
     
    53 minutes ago, CorinaMarie said:

    I believe Maxis might have tried to handle the full trains all via Lua, but quickly discovered that wasn't fast enough and so they had to do special coding exclusively in the C++ side of the program.

    I am not sure what Maxis did. I think all of the code code for advisors, automata, etc. was implemented on the C++ side, with some configuration or spawning functionality being exposed to the LUA side.

    • Like 1
    • Thanks 1

    Share this post


    Link to post
    Share on other sites

    Sign In or register to comment...

    To comment in reply, you must be a community member

    Sign In  

    Already have an account? Sign in here.

    Sign In Now

    Create an Account  

    Sign up to join our friendly community. It's easy!  

    Register a New Account


    ×

    Thank You for the Continued Support!

    Simtropolis depends on donations to fund site maintenance costs.
    Without your support, we just would not be in our 24th year online!  You really help make this a great community. *:thumb:

    But we still need your support to stay online. If you're able to, please consider a donation to help us stay up and running. This helps sustain a platform where we can share our community creations for years to come.

    Make a Donation, Get a Gift!

    Expand your city with the best from the Simtropolis Exchange.
    Make a Donation and get one or all three discs today!

    STEX Collections

    By way of a "Thank You" gift, we'd like to send you our STEX Collector's DVD. It's some of the best buildings, lots, maps and mods collected for you over the years. Check out the STEX Collections for more info.

    Each donation helps keep Simtropolis online, open and free!

    Thank you for reading and enjoy the site!

    More About STEX Collections