Jump to content

25 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 

Im working on new Busstops but im stuck how to get the right information where and how to change the Stops that getting plopped if you create new Bus Lines.

Anyone can giv me a hand with that because the meshs / plops really needs a update.

 

Currently i only get them work prop based .. not getting used by Busses.

thumbnail.thumb.png.f8b2f4e77dbcaa4fa016

 

 

Share this post


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

I'm not really sure how the bus stop is working. I think that it is a prop, like all other street decoration (traffic lights, street lights, road arrows, manholes).

To replace it, you have to write a simple mod that works similar to American Roads.

Share this post


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

If you install the More Beautification mod you get extra menu items in the Parks menu to place props directly in your city, the last one (with the question mark icon) containing CO's vanilla props. I'm not 100% sure, but I think the bus stops are included in that list, meaning it's indeed a prop.

btw: number of asset creators have uploaded bus stop assets (typically parks) to the Workshop: just plop it, create a bus stop next to it, and it looks pretty nice. It's a different approach though, one that which works slightly different (the only people the asset attracts are visitors, not travelers - but visually it looks pretty much the same) and it's a bit more work to create custom bus stops (having to place the asset each and every time you create a bus stop), but it's a mod-free approach (meaning no compatibility or game update-related issues).


  Edited by Judazzz  

Share this post


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

Ok, here is a quick guide how you can replace the prop. You need the mod ModTools by Bloodypenguin.

First, you need the "internal name" of your custom bus stop. It usually contains the file name of the asset.

Load a city and place a few bus stops.

Now open the ModTools console with F7.

In the bottom you will see a textbox. Enter this code and press enter:

for(uint i = 0; i < PrefabCollection<PropInfo>.LoadedCount(); i++) Debug.Log(PrefabCollection<PropInfo>.GetLoaded(i).name);

It will output a list of all props. Find your prop in the list and write down the exact name. In this example I will replace all bus stops with the "sandbox" asset.

lw9fsld.jpg

 

The next step is the replacement of the bus stop props. To do it, enter this code in the textbox and run it. It replaces a certain prop on all roads. You have to modify the first line with the name of your custom bus stop. You can also edit the second line to replace a different prop, or switch the two names to revert the replacement:

var replacement = "sandbox";
var original = "Bus Stop Large";
var p = PrefabCollection<PropInfo>.FindLoaded(replacement);
if(p == null)
Debug.Log("The replacement name you entered does not belong to a loaded prop!");
else
for(uint i = 0; i < PrefabCollection<NetInfo>.LoadedCount(); i++) {
    var n = PrefabCollection<NetInfo>.GetLoaded(i);
    if(n != null && n.m_lanes != null)
    foreach(var l in n.m_lanes)
    if(l != null && l.m_laneProps != null && l.m_laneProps.m_props != null)
    foreach(var lp in l.m_laneProps.m_props)
    if(lp != null && lp.m_prop != null && lp.m_prop.name == original) {
        lp.m_prop = p;
        lp.m_finalProp = p;
        Debug.Log("Replaced prop in " + n.name);
    }
}


  Edited by boformer  
  • Like 2

Share this post


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

    Thx BO ..  but how can i save all this into a modlike asset for steamworkshop?

    THis code will replace the stops for a city temporaly?

    Creating a asset aint the problem also i got modtools and few others..but i need a script i believe that needs to be loaded with the custom Bus Line building and save all togehter?

     

     


      Edited by OwiHH  

    Share this post


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

    Thx judas i allready got the prop working like that but i want a custom bustop that replaces the orginal ones off the streets  - who wants a bustop-park if i couldt create a really nice park !? ;-).

    Share this post


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

    Well i wouldt like to do so aswell ... =)

    Dont had time today to check that above but will do and may figure out myself how to .. let you know if i got further.

    Share this post


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

     

    In the bottom you will see a textbox. Enter this code and press enter:

    for(int i = 0; i < PrefabCollection<PropInfo>.LoadedCount(); i++) Debug.Log(PrefabCollection<PropInfo>.GetLoaded(i).name);

    stuck there.. compiling error.. :/

     

    Screenshot_2.thumb.png.7350058be3ccefb7d

    Share this post


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

    for(int i = 0; i ...

    ok this shouldt be

    for(uint i = 0; i ..

    Share this post


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

    ya im on it.. need to fix few meshs and textures.. getting into it! :D Credits will name you if i get this done.

    Share this post


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

     

    var replacement = "sandbox";

    var original = "Bus Stop Large";
    var p = PrefabCollection<PropInfo>.FindLoaded(replacement);
    if(p == null)
    Debug.Log("The replacement name you entered does not belong to a loaded prop!");
    else
    for(uint i = 0; i < PrefabCollection<NetInfo>.LoadedCount(); i++) {
        var n = PrefabCollection<NetInfo>.GetLoaded(i);
        if(n != null && n.m_lanes != null)
        foreach(var l in n.m_lanes)
        if(l != null && l.m_laneProps != null && l.m_laneProps.m_props != null)
        foreach(var lp in l.m_laneProps.m_props)
        if(lp != null && lp.m_prop != null && lp.m_prop.name == original) {
            lp.m_prop = p;
            lp.m_finalProp = p;
            Debug.Log("Replaced prop in " + n.name);
        }
    }

     

    Can you giv me a option to set a specific Road.. for example only have busstops replaced for "Small Road OneWay"?


      Edited by OwiHH  

    Share this post


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

    Your my men! ;-)

    I cant find it within my scene explorer.. i dont have a tab europe collection? Any idea?

    Screenshot_5.thumb.png.77b2577850ce0a8de


      Edited by OwiHH  

    Share this post


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

    ok found the roads..but still wonder why i have no tab european collection!?

    Share this post


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

    I just posted the image as a reference, so you can find the names of the roads.

     

    the link above links to the modified script.

    you probably don't have a European collection because you are playing on a different map. Just expand the search bar in the top and enter "Road".

    Share this post


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

    Îs it possible to add a random factor within the replacment? Lets say i have 4 different Stops and if replaced randomly 1 gets picked within the selected roadtype?

    I believe i need a kind loop later to check if new buslinestop are set to replace newly plopped stops?

    Im really thankfull for your help BO.

    if you are fine with it i add a credit sign within one of the Bustops with your logo :D


      Edited by OwiHH  

    Share this post


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

    Still on this, was researching alot within scene explorer.

    Problem i have actually is the direction the prob gets placed ..

    The default busstops are automaticly alight roadside but my custom ones dont face roadside.

    2015-09-22_00015.thumb.jpg.3571de65022e3

    Since almost a week i tried to figuere out different prob settings but cant find any solution to this problem.

    If someone have any ideas?

     

    Owi

    Share this post


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

    You can change the angle of the prop in the scene explorer:

    In the scene explorer search for "Road" to get to the NetCollection that contains all roads (see my last screenshot).

    Choose a road and expand the m_lanes array. Every lane has a m_laneProps array that contains all props which may spawn on the lane.

    Find the lane with your bus stop prop. There should be an m_angle property that can be modified to change the rotation of the prop.

    Share this post


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

    Heres some first screenshots.

    Made 12 different BusStops sofar.. there are around 45 different roads with extension.

    Hope you like the contibute sign BO for your help ;-)

     

    2015-10-01_00003.thumb.jpg.c795b8ef1cba1

    • Like 4

    Share this post


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

    Heres some first screenshots.

    Made 12 different BusStops sofar.. there are around 45 different roads with extension.

    Hope you like the contibute sign BO for your help ;-)

     

    2015-10-01_00003.thumb.jpg.c795b8ef1cba1

    Love It ! Hahaa

    Share this post


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

    Im still on it.. need more time .. i have the game since release but wasnt playing it much i currently enjoy doing it:D


      Edited by OwiHH  

    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