Jump to content

268 posts in this topic Last Reply

Highlighted Posts

  • Original Poster
  • Posted:
    Last Online:  
     

    More implementation details:

    There are 2 basic methods which are called when you draw a new road or delete an existing one:

    • NetManager.CreateSegment(startNode, endNode) which returns the segmentId on success
    • NetManager.ReleaseSegment(segmentId)

    It is easy to hook these 2 methods and tell the mod that street lights and trees should be replaced, or that the segment was deleted.

    This works as long as you draw new roads from existing nodes (snapping points or corners).

    But you can also draw roads from the middle of a segment.

    The network tool calls the NetTool.CreateNode method and passes the click position and the road type that you want to create. Here is what this method does:

    • If there is no existing node and no road segment near the click position (isolated piece of road), the method creates a new node and calls NetManager.CreateSegment. Simple.
    • If there is a node of an existing road close to the click position, the method will use that node and call NetManager.CreateSegment. Also Simple.
    • If you click in the middle of the road segment (no node close to click position), the method calls the NetTool.SplitSegment method.
      That method deletes the existing road segment (NetManager.ReleaseSegment), then creates a new node at click position and then 2 new segments (2x NetManager.CreateSegment). Sometimes it only creates a single segment and cuts of the other side if there is no road connected to it.
      After that, the new node is used to create the segment that was actually requested, again with NetManager.CreateSegment.

    The problem is that in the third case, the segmentId of the existing segment (that is split up) changes. That means that the prop information has to be transferred to the 2 new segments.

    So the problem is that there are many reasons for the creation and deletion of segments, and I have to identify them correctly. Two simple hooks will not be sufficient for productive use.

    Another problem is that the FineRoadHeights mod completely replaces the NetTool, that means I will have to modify two versions of it.

    • Like 1

    Share this post


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

    I know it's very early to start talking about this, but I'm wondering if you can shed some light on how one would implement bridge meshes, specifically ones with arches. I started working on a mesh a while back but I kinda halted not knowing how this could be made to work...

    Screen%20Shot%2012-12-15%20at%2012.47%20

    Screen%20Shot%2012-12-15%20at%2012.46%20

    I imagine this will not work as a pillar.

    • Like 5

    Share this post


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

    This is absolutly amazing! :thumb:

    Also I might just got an Idea. Is it possible to deactivate the "windwaving" animation for particulary trees (or replace the trees with props)? If so, we could replace trees with Pillars and in combination with an roadbed without pillars, directly placed over the street, we should get a very dense amount of pillars, without hitting the segmentcount too much. (If I´m right, that there are more than 2 trees per segment)

    Share this post


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

    This is absolutly amazing! :thumb:

    Also I might just got an Idea. Is it possible to deactivate the "windwaving" animation for particulary trees (or replace the trees with props)? If so, we could replace trees with Pillars and in combination with an roadbed without pillars, directly placed over the street, we should get a very dense amount of pillars, without hitting the segmentcount too much. (If I´m right, that there are more than 2 trees per segment)

    It is easily possible to place props on roads in regular distances. Only drawback is that these props do not have a hitbox, like pillars.

    That also means that any custom object can be added to roads: Flowerpots, signs, hydrants, benches, decals with broken concrete.

    • Like 1

    Share this post


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

    Brilliant work. Would it be possible to also change the certain aspects of the road. say with the road with grass/trees, would it be able to replace the grass with concrete and through the of props put the trees in planters as you see in many city centres? They don't have that verge since it takes up pavement space but it provides some greenery. If that would be the case then it'd also be possible to change road textures for different surface types. Bricks instead of asphalt/tarmac.

    I'm guessing it's also capable to add furniture.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    Yes, that's possible. I will concentrate on road textures first.
    • Like 2

    Share this post


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

    I need feedback on the user interface design. I just implemented the prop repeat distance feature, but I'm not sure what would be the best GUI for it:

    Maybe just a few textboxes in a single row to enter the distance in m? A dropdown? Or sliders? Something else?

    I don't want to waste too much space.

    q3Kl3TZ.jpg

    Kj4qmLE.jpg

    • Like 8

    Share this post


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

    I think the sliders look good, although I'm wondering if it will be hard to get tree distances to match exactly on the left and the right. Maybe a text box would be better in that respect.

    • Like 1

    Share this post


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

    When new elevated road skins are added, do they have to be as crazy thick as the default?  That cement beast is nearly 4m thick.

    You don't notice at first, but most real world bridges or overpasses are 1-1.7m thick at the roadbed.  They appear thicker because they have 1m concrete sidewalls or very heavy metal railings.  But the roadbed thickness is never more than 2m and usually less.  CS elevated roads, by contrast, have very low guardrails (and a curb!) but have 2m thick roadbeds on top of a 2m metal (?) support structure.  

    The vehicle clearance requirement of 8m elevation is also too high because lots of standard highway bridges are in the 5-6m range, but even 8m bridges result in clipping of trains and trucks because the bridges are so darn thick.

    Share this post


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

    I'd prefer textboxes. They're more precise and I find them easier to use. Plus they would take up less space. Looks great btw! :D Can't wait to control the spacing of trees and bushes :D 

    • Like 1

    My workshop items

    Catch my latest project and future plans on my Patreon page

    Share this post


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

    Initially I was going with sliders for the quick visual adjustment, but I agree that more precision would have more benefit. If it's not possible to do both, I'd go with a text box.

    • Like 1

    Share this post


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

    One of the main things I miss is an option to apply a selection to both sides with one click: if I want to customize a tree-lined road, and the tree I want to use is all the way down the dropdown, it's a very tedious process (especially since is has to be repeated for both sides as well as any other types of roads you want to apply the same 'theme' to). Nameable presets would be even better ('Poplar-lined roads', 'Oak-lined roads with warm street lights', things like that).
    As far as sliders: I think a slider-textbox combo would be the most prudent move from a UI perspective - especially with very sensitive sliders (ie. ones with a huge range and tiny step-sizes) it can be very tricky to get the same value on multiple sliders: a textbox resolves that issues and makes it much more user-friendly imo.

    Lastly, I understand you want to keep the panel small, so maybe you can make the most basic/commonly used features (tree/light selection) accessible in the main panel, and have the more advanced/less commonly used options (like distances, road side props) hidden in a secondary panel (which can be toggled with a small button in the primary panel). This way you can keep the panels small and avoid overloading the users with too many options to choose from. It also limits the necessity of a scrollbar, which in itself is a perfectly fine UI solution, but not necessarily so in combination with small panels (you don't want a mod that requires too much 'Fingerspitzengefühl' when people use it on a very frequent basis - there's a fine line between a good and a frustrating user experience ;) )

    • Like 3

    Share this post


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

    Side note: Is it possible to have the tree and streetlight selection done via pictures? Maybe instead of a drop-down, it opens a window like the content browser or something with all options listed with their pictures? Some of us have quite a lot of trees installed at this point, and it's hard to remember what's what - especially for those of us who don't really know tree species very well. :)

    • Like 1

    Share this post


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

    Side note: Is it possible to have the tree and streetlight selection done via pictures? Maybe instead of a drop-down, it opens a window like the content browser or something with all options listed with their pictures? Some of us have quite a lot of trees installed at this point, and it's hard to remember what's what - especially for those of us who don't really know tree species very well. :)

    Yes, but that's a lot of work. I wish a front-end developer would help me.

    I think I will just go for text boxes.

    • Like 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    9 minutes ago, boformer said:

    Yes, but that's a lot of work. I wish a front-end developer would help me.

    I think I will just go for text boxes.

    If you need some input from a front-end developer's perspective, just get in touch (Steam, pm) - maybe I can offer some useful insights.

    Share this post


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

    Seeing how many people want text boxes for ultimate precision (:P) I think the slider supoorters are outnumbered.  But I'm not all against sliders, having to manipulate a text box every time I want to change the tree distance sounds kind of tedious to me. However sliders that don't provide any information about which value they're set to aren't very useful in this case either, so I suppose text boxes should be included in the UI this way or the other.

    The issue about keeping the tree distances the same on both sliders could be solved by having a slider sync unlock key or check box. As long as you don't press that key or the checkbox isn't checked, both sliders will change simultaneously according to how the other slider is manipulated by the player. (I think having the other way round wouldn't make a lot of sense because you usually want both sides to have the same distances.) Of course the same principle could be applied to text boxes as well.

    Another option would be to only have text boxes that could be manipulated by scrolling the mouse wheel - this way you'd save the space the sliders take up in the menu and still be able to change the values without having to type on the keyboard. This would be my favoured solution if you decide to only have text boxes.

    Share this post


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

    Getting more and more into asset production I have an idea to create american telephone/wire poles (maybe with streetlights attached but without wires) as a prop. Do you think there is a way to include those into Network Skins so that they transport power automatically? This would help to automatize the power supply of areas wherever you build those roads? That would be cool.

    Thanks for developping this great mod!

    • Like 1

    Share this post


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

    Network Skins only changes visual stuff.

    In the future skins for power lines are planned ;)

    • Like 4

    Share this post


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

    Could this potentially be a step in the direction of making it possible to have RCI and parks underneath road or rail? Like these images i found on google: 

    Shops under motorway (Lyngby)
    Shops under road/rail?

    I know it is possible to place road over buildings using some of the mods out there. But i was more thinking of shops that utilize the available space (height and width) under a given road/rail. Making it possible to chose what kind og RCI or park you would like before placing the road/rail. Oh and make it follow the curvature og the road. 

    Just a thought.

    Anyway great mod!! 

    • Like 1

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    6 hours ago, Buddaklovn said:

    Could this potentially be a step in the direction of making it possible to have RCI and parks underneath road or rail?

    No, that's not in the scope of this mod.

    --

    The mod was just updated with the repeat distance feature:

    MufoaYD.jpg

    • Like 8

    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