Cities: Skylines

Cities: Skylines

View Stats:
Crizz P. Jul 22, 2015 @ 11:58am
My attempt at making TRAMS
So, as I review the decompiled libraries within C:S, I have come across the methods for making road, rail, and metro networks. I've decided to investigate further through my own testing, how to extend the metro network into an above ground network that can be laid upon roads. Here's my TO DO list.

  1. Copy the behaviors and model used for passenger and freight rail for use with the OFF-ROAD above ground tram.

  2. Connect the behaviors and models (mentioned above) to the behaviors and models used by the METRO network. ((this will require the default models for metro trains to be replaced, as they are purely base textures and simple models)

  3. For the sections of metro under roads that will transition to the street/road above it as tram lines, create transitional objects (tunnels to in-street) connecting the above to the below. OFF-ROAD trams that wish to connect to metros below, the regular tunneling method and behaviors for regular rail networks will be used to connect the above with the below.

  4. For regular rail crossovers with metro/tram lines above ground, disallow connections if in preliminary testing it causes odd behaviors to occur in game. Intersections SHOULD be allowed, but cars should remain on the according network. IE, no passenger or freight trains on tram networks. Additional code editing will be needed for making certain crossovers and intersections between heavy-rail and light-rail.

  5. IF AT ALL POSSIBLE (which I see it is) use a custom UI upgrade button for placing the tram lines on roads, which would only be accessible within the metro line placement tool, inside the transportation panel. (What I mean by this is simple. Imagine you're downgrading an avenue or highway to a two lane road or street. The way the upgrade tool looks when performing these associated actions is also a synonymous with how it should look when placing tram lines directly onto the roads and avenues)

As I've continued to analyze how these tools behave in-game, I've realized that I can do this. It will take me some time, and unfortunately I am only a coder, so I'll leave the tram cars/metro car designs up to other players/modders. The transitional objects from underground to roads is another thing I'll leave up to other players/modders to design when the time is right.

Wish me luck. I will post updates on my progress each week, if progress is made that is substantial.

-Morglion
Last edited by Crizz P.; Jul 22, 2015 @ 12:03pm
< >
Showing 1-15 of 18 comments
grapplehoeker (Banned) Jul 22, 2015 @ 1:17pm 
Sojiro has already made very good headway towards making trams a reality, I suggest you contact him and co-ordinate your efforts.
http://steamcommunity.com/sharedfiles/filedetails/?id=484718651
Asshat Jul 22, 2015 @ 1:24pm 
Your work does sound fantastic, and as @grapple_ said please try and link up with @SoJiro who has done some good preliminary work with road trams, and the asset models etc. It would be fantastic to see how you can progress forward with this. Best wishes, and thank you in advance for your work.
SoJiro Jul 22, 2015 @ 1:31pm 
@darynalsup you're always welcome to join the team with your ideas - as it looks atm jfarias (traffic++ author) is also in, he will help to bring the tram (or even overground metro like you mentioned) stuff forward...
Termite Jul 22, 2015 @ 2:13pm 
It would be greaat to get subways above ground. Most city subways go above ground at times in their networks.
Crizz P. Jul 23, 2015 @ 4:26pm 
@SoJiro - Then let's work together. I subscribed to your content and it looks great. I've found in my work so far that there are two kinds of tools that utilize the road/train tools. One is called the "Net Manager" and the other is basically the same tool, but copied for the "Transport" tool. The only difference is that the Net tool is specifically for roads, and the Transport tool is applied to the train, freight and metro tools (along with boats and airplane lanes in map making)

Unlike the net tool, the transport tool assigns both road behaviors (in how they are drawn and act) and an integer to differentiate between metro, rail and etc...

Using both the API editor, the vehicle editor and by extending the max elevation for the metro tool, we can bring trams to life. The only issue is, we'll have to have multiple behaviors for how trams are drawn. There has to be an off-raod form an on-road form, a below-ground form and a below-ground-in-street form.

The better question here is, will I have to convert a Net tool or make a all-new transport tool OR extend the metro tool. Time will tell. There are arrays for train cars, positioning based on road placement and then transitional objects that need to be made for in-street to metro lines. For off-road tram lines, tunnels can be used to connect them.

WE NEED SOMEONE WHO HAS MODDED WITH A TOOL CALLED
ILSPY


Without it and understanding as much as we can, making a major advancement in the world of C:S and Modding is going to be much harder, and I don't know everything about it. Keep your eyes and ears open.
Last edited by Crizz P.; Jul 23, 2015 @ 4:36pm
MouttonNoir Jul 24, 2015 @ 4:17am 
Thanks to you and all other modders who have produced over 50,000 assets/mods for the game. These have, in the main, improved the game experience immesurably in just 4 short months. Look forward to the tram system in its final polished form. Also we need STEPS! The option to add steps to inclines rather that just ramps when laying pathways.
Crizz P. Jul 24, 2015 @ 1:39pm 
OK. So I have an update. I've gone through miles and miles of code in the last couple of days and decided to implement my first attempt. This attempt consisted primarily of replacing the default model used for metro tracks and the associated behaviors by the engine with the same used for trains. But it seems as though no matter how hard I try, I can't get the mod to replace the metro tracks.

There are several definitions used for transportation.

  1. TrainTrackBaseAI
    is based on rules provided from the net tool, which is used to define how roads are drawn. Aspects of this, along with train car properties and vehicle types make up this resource, called for trains.

  2. TrainTrackAI, TrainTrackBridgeAI and TrainTrackTunnelAI
    are the definitions of behaviors and drawing for on-ground, below-ground and above-ground railroad tracks.

  3. I've made resources that call the same
    TrainTrack...
    resources but for a new class based off of a pre-existing one for the metro lines. Essentially it applies the
    MetroAI
    class with a
    MetroBridgeAI
    and
    MetroTunnelAI
    and removes the elevation limits. The trouble is, it wont work and I can't detrmine why.

If I can figure out what I'm doing wrong then we'll have a working above ground metro. Again, and to reiterate, I am purely replacing the metro line (which actually has no track model) with a new (and copy of) the track used for trains by calling the resources used for trains, assigning new instances of the models used to metros and removing the elevation limits for it. I will eventually get it but if anyone comes across this and can colaborate, please email me. My email is my user name on steam at gmail.com (darynalsup)
SoJiro Jul 25, 2015 @ 10:28am 
:D I'm really curious about results :secrectorder:
Crizz P. Jul 25, 2015 @ 6:25pm 
This is very difficult... whew. I'll keep everyone posted, but as of now I have nothing yet to add other than realizing that the code is extensive. I may just scratch the whole metro extension idea and make a whole new network from scratch. We'll leave the metro as a more wide spread network and use a similar tool as inner city transit. I can't piece things together without undferstanding what I need to change in order to make it work. In theory, it should be working now. no idea why it's not.
SoJiro Aug 10, 2015 @ 3:17am 
Nothing new here? =(
Crizz P. Sep 1, 2015 @ 9:23pm 
Sorry for the long delay. I've been away in RL, I lost a loved one and have had my attention away for a while. Finally back on for some play time and mod time too. Here's my little update

First and formost, I've gotten the metro above ground. issue here: there is no transition to above ground. IT'S NOT THAT I CAN PLACE ONE ABOVE AND ONE BELOW - the issue is in fact that the metro layer (white like the underground view) is still applied, even when it reports that I am above or on ground) So I have yet to get a copy of the rail network to be used above ground as a psuedo-above-ground tram network. I've set the strip of code aside, now I need to decipher it all and piece a complete network tool together for your tram vehicles and apply the rules for it to be used on the new network tool. I also have to figure out how to change the ui still to support the new buttons - which I haven't made. In addition to all of the above, I am certain I will have to apply some new rules for above ground stops.

Unofficially I am looking to the way CIM2 uses metros and stations and carbon copying that. But for now, my main focus is to get metros to display correctly above ground - at which point I will post a video or pictures. For now, just bare with me.

-Daryn :steamhappy:
BakaRanger Sep 4, 2015 @ 2:29pm 
well ... i want to get trams as well as you do ... i tried something out, but i still have a bitt problems with the instances in the code ... how to instantiate correctly and which object do i need to access for this ... but it would be nice being able to help you ... so would it be possible to share the code you have for now ? That would be a great help for me and maybe i can help you then ^^
Last edited by BakaRanger; Sep 4, 2015 @ 2:30pm
Jotte Sep 11, 2015 @ 8:01am 
Sounds awesome, I hope you can get it to work! Good luck with that! :)
boformer Sep 17, 2015 @ 1:35pm 
Can you publish your code on GitHub? I think I may be able to help you.
SoJiro Sep 17, 2015 @ 4:46pm 
Thats a bid :) Gogo give us real tram tracks :steamhappy::steamhappy::steamhappy:
< >
Showing 1-15 of 18 comments
Per page: 1530 50

Date Posted: Jul 22, 2015 @ 11:58am
Posts: 18