Jump to content

1 post in this topic Last Reply

Highlighted Posts

Hello. I think Cities Sky Lines needs add new lights effects to adapt to modern times. currently there are led lights that are respectful with the environment, less light polluting. These are the "Dark-Sky friendly Lights". I have test the Custom Light Effects Mod, but it isn't the solutiion. I think you need something similar to Network Extensions Mod but with Light Effects. Because when you create a new asset  that need light, it isn't saved with a complete cities light effect, only with a pointer to it. Then you need new complete light effects or , at least one or two customizables light effects.

There are people capable of creating that mod. Please ... it would be good for the game.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an Account  

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

Register a New Account

Sign In  

Already have an account? Sign in here.

Sign In Now


  • Similar Content

    • By Framit
      Hello.
      I would like to create a new quay, but I don't know where to start. What I need? Once the mesh is created in sketchup, what do I have to do? How many files do I need? What type?
      I would also like to rebuild my Wall  https://steamcommunity.com/sharedfiles/filedetails/?id=1266458566 with network techniques but I don't know how to do it. If someone can help me I would be so thankful.
       
      Regards
       
    • By eufl
      Hi there!
      I am using the mod Catenary Replacer by Tim The Terrible, a wonderful mod but one, that wasn´t able to satisfy my needs completely. You can have mostly all tracks catenary-free but not all. Not the two way single track, that comes with the Single Train Track AI mod by CoarzFlow.
      And here my problem started:
      I looked for an asset, that would give me a catenary-free two way single track, found one by brunna, and well - it´s fine but I am using vanilla tracks. So I started the Editor to make a version with vanilla tracks. I needed some time, had to learn that I cannot simply delete props from networks- but well - after some hours and lots of error messages in CSL my new asset works fine.
      So far so good but one small problem with the Catenary Replacer mod still bugs me: At the start and the end of a station there is a short part of the overhead wiring. As long as I use ANY double track everything is fine, no cables, but as soon as I am using ANY single track to connect the station to the network, this small wiring hangs above the tracks.

      Here you should be able to see this little odd problem. On the left side I used a short segment of double tracks to avoid the wiring - everything looks fine -, on the right side I connected the station directly to the single track, and the result looks strange.
      My question now is: What can I do to get rid of these wire parts? I would love to see Tim´s mod updated but maybe I can make some fix by myself. For now I see only the chance to make a station without wiring, but I would prefer a more "global" solution...
      Any hints? Thanks in advance!
       
    • By matias93
      In what could become a landmark case, the US Federal Supreme Court ruled that patent-holders have no rights to regulate the use of their patented products, and that remanufacturers can manipulate and resell those patented products legally, opening the door to the so-called right to tinker. Consumer groups consider that this case is relevant in times when increasingly more products are offered as licenced services, defending the consumer rights to resell, manipulate, operate, modify or even destroy their property without copyright constraints by the patent-holders.
      Chief Justice John G. Roberts Jr. extends on the implicancies of the judicial resolution by exposing an analogy with an used-car shop:
      The Electronic Frontier Foundation, which presented an amicus curiae brief to the FSC, arguments that this ruling enables consumers to demand a series of radical changes on the market of complementary supplies --the so-called 'razor and blades' business model, which they extend to other technologies, as IoT devices that currently need a subscription to work, or cheap game consoles that only are useable with expensive games.
      On a further extension, this proposed right to tinker would be appliable to the compiled code of copyrighted software, as the sold copies of software applications are the legal private property of their buyers, a condition that would expire the intellectual propietary monopolic rights given to them by the copyright, in the same way the private property of a toner cartrigde expires the patentee monopolic rights given to them by the patent. This eventual consequence would be crucial for the modding communities of diverse proprietary softwares, as they would be legally entitled to modify and even redistribute the modified compiled code without the express authorisation of the original creators. 
      In any case, the current ruling doesn't extends so far, just giving some vague jusrisprudencial basis for further cases to be held in behalf of modding rights, for which this new interpretation shouldn't be taken as a legal one.
    • By boformer
      In this tutorial, we will create a simple mod that globally replaces vanilla road trees with custom trees made by MrMaison. Like in Tutorial 1, we will use a loading hook, prefab collections and the ModTools scene explorer. You will also learn how to add settings to your mod.
       
      Step 1: Exploring and modifying network and tree prefabs with the ModTools scene explorer
      Before writing the actual mod, we will apply the replacement with the ModTools scene explorer.
      Just like buildings, networks and trees are defined as prefabs (NetInfo and TreeInfo, see Tutorial 1 Step 3). There are various way to find these prefabs in the ModTools scene explorer. The easiest way that works for vanilla and workshop assets is the ToolsController. "Tools" in Cities: Skylines allow you to interact with the game world. The most obvious tool is the bulldozer, but there are also tools for the placement of objects, zoning, transport line creation and camera control. For this tutorial, we will access the TreeTool and the NetTool, which hold a reference to the tree/network prefab you are placing.
      Select a tree you in the Landscaping panel. I chose the Royal Palm made by MrMaison. While the placement mode is enabled, open the ModTools scene explorer (CTRL + E). On the left, select Tool Controller > TreeTool. You will see the properties of the TreeTool on the right. The currently selected tree prefab is stored in the m_prefab property. Press the "Copy" button to copy the reference of the tree prefab to the ModTools clipboard (it does not copy the actual data, just the memory address of the prefab).

      Tip: For every prefab (prop, building, network, ...) there is also a "Preview" button that displays a model viewer, and more importantly, a "Plop" button that allows you to plop the asset. With this button, you can place assets which are not available in the panels of the game, like props or sub-buildings.
      Now, select a road with trees in the Roads panel. I chose the "Large Avenue with Grass" that was added by the MT update. Open the scene explorer and select Tool Controller > NetTool. On the right, expand the m_prefab property (the currently selected network prefab).

      You can now see the properties of the network prefab. The structure of a network prefab looks like this:
      NetInfo: Network Prefab ├ m_nodes[]: Array of objects defining meshes/textures for intersections ├ m_segments[]: Array of objects defining meshes/textures for segments ├ m_lanes[]: Array of NetInfo.Lane objects │ └ NetInfo.Lane: Defines a lane used by vehicles or pedestrians + prop/tree decoration │ ├ m_laneProps │ │ └ m_props[]: Array of prop items │ │ └ NetLaneProps.Prop: Like BuildingInfo.Prop, defines the position a prop/tree │ │ ├ m_prop/m_finalProp: The prop prefab │ │ ├ m_tree/m_finalTree: The tree prefab │ │ ├ m_probability: Probability that the prop/tree spawns │ │ ├ m_repeatDistance: Distance between two props/trees │ │ └ ... │ └ ... └ ... Expand the m_lanes array and search for the lane that contains the tree prop items you want to replace. In case of the "Large Avenue with Grass", navigate to m_lanes > m_lanes.[0] > m_laneProps > m_props > m_props.[4]:

      Click the "Paste" button on the right for the properties m_finalTree and m_tree. This will assign the custom tree prefab we copied earlier to the prop item:

      You will instantly see the result: The trees of all avenues in the city have been replaced.

      In the next steps, we will create a mod that automates the replacement.
      Step 2: Project Setup
      Create a new project named "RoadTreeReplacer" in VS2017, following Method 2 in Tutorial 0 (working with a text editor is still possible in this tutorial, but not recommended)
      Your IUserMod implementation should look like this:
      using ICities; namespace RoadTreeReplacer { public class RoadTreeReplacerMod : IUserMod { public string Name => "Road Tree Replacer"; public string Description => "Replaces the boring Oak roadside trees with MrMaison's creations"; } }  
      Step 3: Loading Hook & Tree Replacement Logic
      Create a new file called RoadTreeReplacerLoading.cs in the Solution Explorer. This file will contain our ILoadingExtension implementation that is invoked by the game when a save is loaded (See Tutorial 1 Step 2). Like in the last tutorial, we will use the static PrefabCollection class to find our network and tree prefab.
      Add the following contents to the file:
      using UnityEngine; using ICities; namespace RoadTreeReplacer { public class RoadTreeReplacerLoading : LoadingExtensionBase { public override void OnLevelLoaded(LoadMode mode) { // Find the network NetInfo netPrefab = PrefabCollection<NetInfo>.FindLoaded("Avenue Large With Grass"); // Find the tree we want to use as a replacement TreeInfo treePrefab = PrefabCollection<TreeInfo>.FindLoaded("909448182.Royal Palm_Data"); // Check if both prefabs are loaded, cancel if not if (netPrefab == null) { Debug.LogError("RTR: The network could not be found"); return; } if (treePrefab == null) { Debug.LogError("RTR: The replacement tree could not be found"); return; } // cancel if lanes array is null (networks without lanes) if (netPrefab.m_lanes == null) return; // iterate through all lanes foreach (NetInfo.Lane lane in netPrefab.m_lanes) { // cancel if lane props array is null (networks without lanes) if (lane?.m_laneProps?.m_props == null) continue; // iterate through all lane props of that lane foreach (NetLaneProps.Prop laneProp in lane.m_laneProps.m_props) { if (laneProp == null) continue; // if the tree/finalTree field is set, replace it with our tree prefab if (laneProp.m_tree != null) { laneProp.m_tree = treePrefab; } if (laneProp.m_finalTree != null) { laneProp.m_finalTree = treePrefab; } } } Debug.Log("RTR: Replacement successful!"); } } } Tip: You can use the Debug.Log(...) method to add log entries to the output_log.txt. The log entries are also displayed in the ModTools console, which can be used for debugging your mod.

      Now compile the mod (F6). If there are any compilation errors, use the error list in VS2017 to locate and fix the error (View > Error List)
      When the compilation was successful, run the game. Enable the mod in content manager (if your mod does not show up, you probably forgot to setup the post build script).
      Now create or load a city. The tree replacement is now automated. You will also see the success message in the ModTools console:

       
      Before we proceed with the next step, we will move our replacement code to a separate ReplaceNetTrees method. We can call this method multiple times with a single line of code:
      using UnityEngine; using ICities; namespace RoadTreeReplacer { public class RoadTreeReplacerLoading : LoadingExtensionBase { public override void OnLevelLoaded(LoadMode mode) { ReplaceNetTrees("Avenue Large With Grass", "909448182.Royal Palm_Data"); ReplaceNetTrees("Medium Road Decoration Trees", "909448182.Royal Palm_Data"); } private void ReplaceNetTrees(string netName, string treeName) { NetInfo netPrefab = PrefabCollection<NetInfo>.FindLoaded(netName); TreeInfo treePrefab = PrefabCollection<TreeInfo>.FindLoaded(treeName); if (netPrefab == null) { Debug.LogError($"RTR: The network {netName} could not be found"); return; } if (treePrefab == null) { Debug.LogError($"RTR: The replacement tree {treeName} could not be found"); return; } if (netPrefab.m_lanes == null) return; foreach (NetInfo.Lane lane in netPrefab.m_lanes) { if (lane?.m_laneProps?.m_props == null) continue; foreach (NetLaneProps.Prop laneProp in lane.m_laneProps.m_props) { if (laneProp == null) continue; if (laneProp.m_tree != null) laneProp.m_tree = treePrefab; if (laneProp.m_finalTree != null) laneProp.m_finalTree = treePrefab; } } Debug.Log($"RTR: Replacement of tree in network {netName} successful!"); } } }  
      Step 4: Adding Mod Settings
      Right now the functionality of the mod is fixed, there is no way to configure which trees are replaced. Adding settings to a mod is a difficult task. It will require 3 components:
      User interface with checkboxes or dropdown menus (using the settings API provided by CO, or a custom window) Data structure for the settings data (usually a C# class, or a set of key-value pairs) Serialization System (to .xml file, or save game) To keep it simple, we will only add a simple settings page with 3 dropdown options (Small Road Tree, Medium Road Tree, Large Road Tree), with a fixed number of trees to choose from (Default, Royal Palm, Weeping Silver Birch, River Red Gum Small). The settings will saved in a .xml file in the Cities: Skylines installation directory. The settings are global, that means the mod applies the same settings to all cities (in one of the next tutorials, I will show you how to save additional data in the save game).
      Serialization System
      Add a new file called Configuration.cs and paste this code.
      It is a very minimalistic serialization library that I've written some time ago. It does all the heavy lifting for you (loading and saving of .xml files, transformation from/to C# objects). It is not important to understand what happens internally, you just have to understand how to use it.
      The library provides a method to load your configuration data:
      YourConfiguration config = Configuration<YourConfiguration>.Load(); And to save it:
      Configuration<YourConfiguration>.Save(); You only have to provide the data class that defines the structure of the .xml file.
      Note: If you are using a Mac, you may have to add the System.Xml dependency to your project
      Data Structure
      Add a new class named RoadTreeReplacerConfiguration. This data class contains the string options we want to save:
      namespace RoadTreeReplacer { [ConfigurationPath("RoadTreeReplacer.xml")] public class RoadTreeReplacerConfiguration { public string SmallRoadTree { get; set; } = "909448182.Royal Palm_Data"; public string MediumRoadTree { get; set; } = "909448182.Royal Palm_Data"; public string LargeRoadTree { get; set; } = "909448182.Royal Palm_Data"; } } The [ConfigurationPath] attribute is read by the serialization library. The strings on the right are the default values used when a new configuration is created.
      User Interface
      Some time ago, CO added a simple settings API that allows you to create simple setting menus with a few lines of code. To use it, add a new method called OnSettingsUI to your IUserMod implementation:
      using System; using System.Collections.Generic; using ICities; namespace RoadTreeReplacer { public class RoadTreeReplacerMod : IUserMod { public string Name => "Road Tree Replacer"; public string Description => "Replaces the boring Oak roadside trees with MrMaison's creations"; // The strings displayed in the dropdown private static readonly string[] OptionLabels = { "Default", "Royal Palm", "Weeping Silver Birch", "River Red Gum" }; // The corresponding prefab names private static readonly string[] OptionValues = { "Tree2Variant", "909448182.Royal Palm_Data", "765126845.Weeping Silver Birch_Data", "742114726.River Red Gum small_Data" }; // Sets up a settings user interface public void OnSettingsUI(UIHelperBase helper) { // Load the configuration RoadTreeReplacerConfiguration config = Configuration<RoadTreeReplacerConfiguration>.Load(); // Small Roads int smallSelectedIndex = GetSelectedOptionIndex(config.SmallRoadTree); helper.AddDropdown("Small Road Tree", OptionLabels, smallSelectedIndex, sel => { // Change config value and save config config.SmallRoadTree = OptionValues[sel]; Configuration<RoadTreeReplacerConfiguration>.Save(); }); // Medium Roads int mediumSelectedIndex = GetSelectedOptionIndex(config.MediumRoadTree); helper.AddDropdown("Medium Road Tree", OptionLabels, mediumSelectedIndex, sel => { // Change config value and save config config.MediumRoadTree = OptionValues[sel]; Configuration<RoadTreeReplacerConfiguration>.Save(); }); // Large Roads int largeSelectedIndex = GetSelectedOptionIndex(config.LargeRoadTree); helper.AddDropdown("Large Road Tree", OptionLabels, largeSelectedIndex, sel => { // Change config value and save config config.LargeRoadTree = OptionValues[sel]; Configuration<RoadTreeReplacerConfiguration>.Save(); }); } // Returns the index number of the option that is currently selected private int GetSelectedOptionIndex(string value) { int index = Array.IndexOf(OptionValues, value); if (index < 0) index = 0; return index; } } } What happens here?
      Load the config data with the Load method provided by the library Get the index of the dropdown option that should be selected at first Add a dropdown option with label, options, selected index and a callback (called when selection is changed) (Repeat 2. and 3. for medium and large roads) The OptionLabels array contains the strings displayed in the dropdown menus. The other array, OptionValues, contains the internal names of the prefabs.
      The callback is a lamda function that takes the selected index (0-3). It saves the value that corresponds to the selected index in the configuration file.
      The game automatically creates a settings page for mods which are implementing the OnSettingsUI method. No further steps are needed.
      Tip: Other methods for UI element generation: AddButton(), AddCheckbox(), AddGroup(), AddSlider(), AddSpace(), AddTextfield()
      Step 5: Using the configuration values in our loading hook
      In the RoadTreeReplacerLoading class, replace the OnLevelLoaded method:
      public override void OnLevelLoaded(LoadMode mode) { // Load the configuration RoadTreeReplacerConfiguration config = Configuration<RoadTreeReplacerConfiguration>.Load(); ReplaceNetTrees("Basic Road Decoration Trees", config.SmallRoadTree); ReplaceNetTrees("Oneway Road Decoration Trees", config.SmallRoadTree); ReplaceNetTrees("Medium Road Decoration Trees", config.MediumRoadTree); ReplaceNetTrees("Avenue Large With Grass", config.MediumRoadTree); ReplaceNetTrees("Avenue Large With Buslanes Grass", config.MediumRoadTree); ReplaceNetTrees("Large Road Decoration Trees", config.LargeRoadTree); ReplaceNetTrees("Large Oneway Decoration Trees", config.LargeRoadTree); } This will replace the trees of all vanilla roads with the trees selected in the settings. And we are done!

      After changing the options for the first time, the settings are saved to .xml:

      Note: To apply the changed settings, you have to reload your city.
      Happy Coding!
      Download Source
       
      Next part:
       
    • By Bad Peanut
      Hey guys! so with the hint of a road modding tool in the next DLC arriving, and presuming it's something like Network Extensions let's discuss what roads would be cool to add!
       
      I've looked at the source code of Network Extensions and I've looked at their textures etc so I want to make a start at creating textures for roads. for that i need suggestions! 
      Rules: 
      Use https://streetmix.net/new to visualise your road. I won't even consider ones that are just some random description For roads you want to zone on: use either 16m wide roads or 32m wide roads as those are the two widths that work with zoning. For highways you can use any width lanes for cars, trams, buses etc should be 3m in width. parking should be 2m wide sidewalks should be at least 2m wide (maybe 1.5m at the smallest) and this is for either side of the road, so at least 4m of sidewalk altogether! try and keep in mind that it's not about creating new types of prefabs like MOM, it's for reskinning like we do with Network Skins! Here's some examples of Vanilla Roads visualised in StreetMix
      a 16m Wide Basic Road:

      And a 32m Wide Medium Road

       
      You can click on the above links to be taken to a template in streetmix.
      Give me inspiration!
  • Recently Browsing   0 members

    No registered users viewing this page.

×

Thank You for the Continued Support!

Simtropolis relies mainly on member donations to continue operating. Without your support, we just would not be able to be entering our 15th year online!  You've really help make this a great community.

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, so that we can help keep bringing SimCity players together to share our creations.

Make a Donation, Get a Gift!

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

stexcollection-header.png

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