Jump to content

Search the Community

Showing results for tags 'modding'.

More search options

  • Search By Tags

    Type tags separated by commas. These are keywords which should describe the item of content.
  • Search By Author

Content Type


  • Cities: Skylines
    • Cities: Skylines General Discussion
    • Cities: Skylines Modding - Open Discussion
    • Cities: Skylines Showcase
    • Cities: Skylines City Journals
    • Cities: Skylines Technical Help Q&A
  • SimCity (2013)
    • SimCity (2013) General Discussion
    • SimCity (2013) Modding - Open Discussion
    • SimCity (2013) Region Games
    • SimCity (2013) Showcase
    • SimCity (2013) Technical Help Q&A
  • SimCity 4 Players Forum
    • SimCity 4 General Discussion
    • SC4 Showcase
    • SC4 City Journals
    • SC4 Mac Users
    • SC4 Bugs & Technical Issues
  • SimCity 4 Builders Forum
    • SC4 - Custom Content
    • SC4 BAT - Open Discussion
    • SC4 Modding - Open Discussion
  • Simtropolis Social Forum
    • New Members Information
    • Simtropolis Related
    • General Off-Topic
    • Current Events
    • Architecture & Urban Planning
  • Gamer Topics
    • SimCity 3000
    • City-Building Games
    • Gaming Talk
    • Indie Projects
  • Trixies Forum
    • Trixie Awards - Community Discussion
  • Simtropolis Challenges
    • ST Challenges - Info and Discussion
  • Club-owners Club's Club Discussion
  • Simtropolis en Español's Plaza Mayor
  • Simtropolis en Español's Soporte Técnico
  • Simtropolis en Español's Parque Industrial
  • SimCampus Students's Topics
  • The Transit and Aviation Geeks Club's Topics
  • Arden County City Council's Topics
  • Alliance of Independent Nations on Simtropolis's Discussion
  • The Major Club's Topics
  • Project Rich Water's Topics
  • Guardians of the Galaxy's Topics
  • New Washington's Topics
  • Everything about details's Topics


  • SimCity 4
    • SC4 Reference
    • SC4 Tutorials
    • BAT & Lot Editor Tutorials
    • Modding Information
    • Mapping & Terraforming
  • Other Games
  • Simtropolis Articles
    • Interviews


  • News
  • News
  • News


  • Challenge Uploads
  • SimCity 4 Buildings
    • Lots
    • Mods & Tools
    • Maps
    • Props
    • Textures
    • 3ds Models
  • PLEX (Main Files)
    • Custom Lots & Mods
    • CDK - Coastal Development Kit
    • MTP - Mountain Theme Pack
    • SPAM - SimPeg Agricultural Mods
    • PEG Utopian Series
  • Cities: Skylines Buildings
    • Maps
    • Roads & Traffic
    • Vehicle Assets
    • Game Mods
    • Props
    • Programs & Tools
  • SimCity (2013) Buildings
    • Game Mods
    • Roads & Traffic
    • Vehicles
    • Programs & Tools
    • User Interface
  • SimCity 3000 Files
    • SC3K Maxis Files
    • Cities & Maps
  • CitiesXL Buildings
    • Mods & Tools
    • Maps
    • Textures & Props
    • Lots
    • 3d Models
  • Simtropolis en Español's Descargas
  • Club-owners Club's Dirk's Files
  • The Major Club's Files
  • Project Rich Water's Files
  • Guardians of the Galaxy's Files
  • New Washington's Files
  • Everything about details's Files

City Journals

There are no results to display.

There are no results to display.


  • Weekly Challenge
  • Extended Challenge
  • Monthly Challenge
  • Content Challenge
  • Voting Period
  • Alliance of Independent Nations on Simtropolis's Alliance Calendar
  • Club-owners Club's Events
  • SimCampus Students's Events
  • SimCampus Students's Noggin Thinkers Dates
  • Arden County City Council's Events
  • The Major Club's Events
  • Project Rich Water's Events
  • Guardians of the Galaxy's Events
  • New Washington's Events
  • Everything about details's Events




City-building game(s)

Found 128 results

  1. 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!
  2. Welcome! Seeing as we now have a brand new Cities: Skylines section on the STEX, it's time to get the ball rolling. Whether you'd like to see a specific building or change in the game, here is the official place to request anything custom content related! Thread Guidelines When making a request, it helps to be as specific and descriptive as possible (e.g. what you'd like to see & why you think it'd be useful in the game).Pictures & links to resources are welcome, as long as they're directly relevant to the request (e.g. about a building / structure).Please don't request items from another exchange to be uploaded here (e.g. from Steam Workshop).As described in the STEX Code of Conduct, this requires permission from the original author. Such posts may be removed without notice. This thread is intended to be an ideas base for prospective creators. Please remember, this isn't a place to demand content to be made!
  3. Hello everyone. As a side project, (one of the Many) Some of you may know that I am working on a catenary mod for the Real Railway or RRW. This mod will be a substantial upgrade to the existing catenary mods out there and I plan to unify all the various sets into one Mod. Now what I am wondering and asking from the community is to post or lend me co-ordinates on google maps the various types of catenary pole styles out in Particular Europe and Japan. Here are some of the workings I have done so far... So as you can see there are a variety of poles that I have worked on with Uki Sim providing some of the pole textures. I have however had to make the poles from scratch. You will also note that there is actual wire above the track. This is still very much a work in progress and I will try to make the poles but as a community this is what I need from you to provide examples of. STR and DTR ortho Poles. End of track poles. Turnout poles for various turnouts like... DTR to STR DTR with STR branch off DTR with DTR Branch off Complex Turnouts The wire is basically a 3D flat plane with the wire texture attached. I was keeping this project private but alas I need some examples of poles to get the project moving forward. That is even if the project has too be put in the public domain. -eggman121 (NAM Team Member).
  4. Hey guys, if you missed it, or don't regularly look on the sub reddit, this is a repost of the same info: So I occasionally get people complaining that such and such station is broken and they want a fix - for instance the most recent being Sotunder Sunken Station (which I've hidden for the moment). Now it's usually a very very small percentage of subscribers who say that it's broken - which doesn't make sense because if it is broken then it shouldn't work for anyone and if I can have it work in a 100% vanilla game then it's certainly not my assets fault but something connected to an additional/combination of mods. In saying that, the majority of you already know this because hey - logic! BUT there is something i've recently realised/noticed that could create at least in part the problems people describe. I've noticed that since the release of Moveit! mod there's been a gradual incline of people using it for precision placement of buildings, which is great because it's such a good mod that really opens the game's placement styles. I have it and a lot of people have it. It's fine for normal unique buildings and the like but not so great for some train station assets (some, not all). Not many people will know, but the hidden pedestrian paths used to connect a cim to the platform of a station can be quite finicky, so if you adjust them in the slightest, you're likely to break the connections (hence the problems in the past when modularity was new and you needed to flatten the land before placing - thankfully i found a better solution that removes the need for the end user to think about it properly). The problem with the ped paths is that when people initially place them alongside a road, all the ped paths are exactly where they should be, but with the new adjusting habits of the Moveit! mod users, as soon as you move the building even the slightest bit you'll end up compromising the hidden pedestrian paths. thus breaking the ability for cims to get onto the platform. This isn't a rule of thumb, there can certainly be other issues with stations that may cause them to stop working, and not all stations will respond to being adjusted by MoveIt! will break. I think that it will depend on the complexity of the placement of the hidden pedestrian paths. For instance: Boformer's Sunken station doesn't break with MoveIt! mod adjustments (AFAIK) because the hidden pedestrian paths between platform and street are simple, 1 segment paths. My Sotunder Station (and usually all my stations) will have more complex hidden paths because I try to if it's possible, to create a more visually realistic path the cims walk along, so they usually comprise of more than 1 segment, and when you use MoveIt! the additional nodes between segments can rocket around - which you can't see happen because they're hidden. It's why when people find it's broken for them, then load it in the editor to check the hidden paths, they find them all as they should be - because in the editor is exactly as they should be and as they will be if you just place the station alongside a road without a MoveIt! adjustment. As a side note: I also have a theory that when people place the stations with anarchy on it can sometimes cause the connections to be broken because some anarchy mods remove the fixed height values of the nodes, thus they change heights, and lose their connections. TL;DR? You're right it is long, but I was trying to answer all the possible future questions looking for clarity - suffice to say if you use MoveIt! mod or an anarchy mode while placing one of my stations you MAY have a problem with cims getting on the platform. Read the above for details on why and how to avoid it.
  5. This thread will focus on improving and revamping the Transport Lines Manager mod, as well as potentially adding features from IPT and/or unique new features if possible. Transport Lines Manager Reborn 6.0.2 now in the workshop. Bugs as of 6.0.2: Renamed depots are not working in the TLM listing and in depot details windows. Not show cable car stations on linear map as near transport. Ticket price changes not being implemented. Sort lines by colour not working. TLM Unknown Error on Evac Routes trace OP is below: The creator of IPT hasn't been online in over 5 months, and the creator of TLM hasn't been online in nearly 1 month. Mass Transit DLC is coming out in a few weeks, and I don't know how either of these mods will fare with changes being brought to the transit system. Is anyone in touch with either of these authors? I would especially hate to see TLM go to the dustbin of modding history considering how many options and useful configurations it provides (plus the aesthetics!) such as changing frequency depending on time of day (such a no-brainer), and IPT has excellent debunching. Now that these two mods are nearly incompatible, and with the DLC coming out soon potentially rendering both useless, something must be done. They're far too valuable to go to waste. If we can't get the authors to update their mods or publish their code for others to carry it forward, can we all maybe pitch in and create an entirely new mod from scratch? Is someone working on this already? Even with the improvements being brought with the free upgrade/DLC, I feel TLM/IPT features will still be vital to many player's C:S experience. What do y'all think?
  6. Hello all, I have decided to try my hand at modding assets. I have great gratitude to all the modders who have put their own time in to creating the game it is today. As I now have plenty time after finishing university I thought it was the perfect opportunity to challenge myself and add to the great content this game has. I will firstly be attempting at asset creating, I am not adverse to programming either. My full-time job is a web developer and in university I used #C with ASP.NET for websites so I enjoy programming. However, I first want to take a stab at asset creation. Here is my first asset it's Churchill Place in London. My aim is to create assets from California and Australia as they are places that I love. But I first chose London as I like this skyscraper. Please see the photo below: Questions: I understand there is LOD needed which has to have low level of tri's. Do I copy the first version and try to reduce the level of tri's? Here is my diffuse mapping: How would I go about making a map for night lights? Lastly, how do I export this to file for cities skylines? It might sound stupid...but I have no clue! All feedback is appreciated!
  7. Hey everyone, After SC4Fix, I went on a hiatus for college and decided to turn my attention to loading DLLs into the game using native methods. SC4Fix works but uses a really hackish method where it overwrites bits of code that would unload DLLs the game doesn't recognize. This is something that I've wanted to do for six years since Paul Pedriana (very graciously) sent me some incomplete but critical code for making proper SC4 DLLs. I recently threw out all of the code I wrote and started from scratch with Paul's code as a starting point. Using the Aspyr port of the game for cross-checking (since it holds a lot of debug information that the Windows version doesn't have), I finally managed to create a DLL that the game can load, recognize, and communicate with. This also essentially gives us the foundation of the SimCity 4 SDK that would be needed for accomplishing more advanced tasks. Source Code Test DLL What I have right now is pretty basic: SC4 can load the DLL, recognize it as a real framework DLL, and our code can subscribe to game events like PostAppInit, PostFrameWorkInit, PreAppShutdown, and others. I feel that the next step would be to expand the code to replicate the functionality of the Extra Cheats DLL. Buggi has partial source code that includes the most crucial components aside from the rest of the SDK, and I've managed to assemble a basic SDK to work with, so this should be done pretty soon. The best part about having this kind of DLL is that it works with every Windows version of SC4 at least, and probably works with the Mac version (but I haven't tested this) — v610, v638, v640, and v641 should all be able to use this with no problem because the API never changes. --- As an aside, while investigating how DLLs are loaded by the game, I also learned that you can create INI files that tell the game whether or not to load certain DLLs. You can create a file in the Plugins folder called DLLName.ini (where DLLName corresponds to the filename of the DLL minus the file extension) with the following content: Changing "true" to "false" stops the game from loading the DLL, and changing it back to true allows it to load again. Pretty neat in my opinion, and I hadn't seen this documented anywhere else, so I figured I'd share it here. --- Final aside, I'm planning on making this a general development thread for myself so I don't have to make a new thread for everything I find. Once I have more to report on I'll probably change the title of this thread.
  8. Thought we can use a list of the most accessible 3D software and resources for our modding and custom content needs. If anyone knows any more resources feel free to share here. I will start with this short list. 3D Software: Blender 3D- for everyone. http://www.blender.org/ Blender training course http://gryllus.net/Blender/3D.html Sketchup Make- for everyone http://www.sketchup.com/download/all Sculptris- for everyone http://pixologic.com/sculptris/ If you are a student, teacher or mentor, this is an opportunity to use Maya free of charge for 3 years. Who knows what will happen in that time the way CG software is being "freed" nowadays. http://www.autodesk.com/education/free-software/maya I believe there's more but can't think of them right now. Texture Resources: I chose the texture sites that have more architecture content as we will be using these types of textures for buildings. http://www.cgtextures.com/ http://www.swtexture.com/ http://blender-archi.tuxfamily.org/Textures http://architextur.es/ http://www.lughertexture.com/ maxTextures Texturelib Nobiax on deviantart (textures including normal and specular maps, some 3d models) AGF81 on deviantart (textures, some normal and specular maps) Thanks Avanya. Decided to add your list in the first post for better exposure. Tools: Autodesk FBX Converter. This can convert various 3D formats to ASCII and Binary FBX. Also convert from either type of FBX file to the other. http://www.autodesk.com/products/fbx/overview Cities Skylines Tools. This is a Sketchup plugin that exports your model straight to the import folder from Sketchup. No more needing to export to another 3D program. It also comes with customizable grid options for both ground and height. http://extensions.sketchup.com/en/content/cities-skylines-tools OBJ Exporter for those using Sketchup Make http://sketchucation.com/forums/viewtopic.php?t=33448 Cleanup, another good Sketchup tool https://extensions.sketchup.com/en/content/cleanup%C2%B3 Thanks Darf! GIMP is a free alternative to Photoshop http://www.gimp.org/ Krita is a cool digital paint program also https://krita.org/ NVidia Texture Tools for Photo Shop for normal maps, texture compression, mip map generation and cube map formatting. https://developer.nvidia.com/nvidia-texture-tools-adobe-photoshop Thanks Darf! Thought I would also include Unity since it's the engine of this game. I don't know how it would be useful or if it would give any advantage as I never got into it yet. But I imagine it would shed some light into why some things in the game are the way they are. http://unity3d.com/get-unity Unity Tutorials http://unity3d.com/learn/tutorials Thanks OwiHH! Hope some of you find these useful
  9. Hi ladies and gents. I am a reasonably experienced asset maker with around 100 models built for Cities XXL. Sadly the game is no longer supported , the player base has dwindled and what is achievable by modding in that game appears to have reached its limits. I bought Skylines upon release but neglected to note the system requirements ( 64bit only) so could not play it for nearly a year until upgrading to a decent modern PC which I now have. I suppose I am looking for a new home. I have several hundred hours experience in 3dsmax and have recently gravitated towards Substance Painter and Substance Designer for texturing as the system is faster and more intuitive for me and enables the creation of all the required maps in one go rather than making them individually in PS which I used to do. I have some limited programming experience but am not up to speed with C# . I am however motivated to learn enough to be productive on the modding side as I can see great potential for Skylines in the years ahead. About 6 weeks ago I revisited Skylines and also reviewed what has been achieved by the modding community since release. Simply amazing. Also the quality of the user made assets appears to be rising continually. This has inspired me to seriously re- engage with the game. I have out around 90 hours play so far and have grown cities to 100K so I have reasonable grasp of the game dynamics but am not an expert. I got fed up with vanilla after about 30K and started introducing mods, mainly the gameplay ones such Move It, Road anarchy , Find it, RICO etc . I am now at the stage where I want to move more towards realism as my instincts are more in the City painter camp hence my interest in making assets. I have studied most of the tutorials on asset creation and have learned a lot, I have also read through a number of prominent modders threads on here noting their progression from their first attempts to the amazing stuff more recently created. I recognize a few names on here from Xlnation . I wonder if I could start by importing some of my CitiesXXL assets into Skylines?. Anyone else done this and can pass on any knowledge/tips before I start would be appreciated. Is it worth the effort or is it better to start from scratch? I obviously already have all the 3DSmax files and textures , it would seem that the Cities XXL lod 4 can be re -used as it carries the same target spec ( ie less than 100 triangles). Then a case of choosing which of the 3 other Lods to use for the main model. Then striping out the bases of the XXL models as not required in C:S . Then redoing the nightlighting to comply with the C:S standard. Will mostly need to be RICO stuff i think, most of my existing models do not have a multiple of 8M footprint, some are at the CXL standard of 40m x 40m (5 x 5 in skylines language). You can review my back catalogue here http://xlnation.city/resources/authors/pauljchris.19/ to see if there are any models in there that people would like to see in Cities Skylines and I will attempt some conversion work before I move on to making fresh stuff. Please bear in mind that some of my earliest work is of lesser quality, I like to think I improved a bit with practice over time. Thanks for reading . I hope to be able to get up to speed with C:S and to be in a position to contribute something decent for the community fairly soon. Regards PJC
  10. Hello developers, when CS came out I created an external wiki. I quit the modding community for a while and now I'm back so I decided to move the wiki to the official wiki. I've added a new section on the wiki for developer guides and already created a lot of content.http://www.skylineswiki.com/Developer_Guides I've also added a page with open source mods, because looking at the source of other mods is a great way to learn how to make mods. Which is why I would like to ask all creators of open source mods to put their mod on the wiki. http://www.skylineswiki.com/Open_Source_Mods If you've made any guides it would also be great if you can put them on the wiki so we have a centralized place for all modding information. Right now the information is scattered everywhere and if we have better resources and information available we are probably gonna get more people interested in making mods.
  11. In this tutorial, we will create a simple mod that removes some of the ugly vanilla billboard props. You will learn how to work with loading hooks, prefab collections and the ModTools scene explorer. Step 1: Project Setup Create a new project named "CityBeautifier" 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 CityBeautifier { public class CityBeautifierMod : IUserMod { public string Name => "City Beautifier"; public string Description => "Removes some ugly props"; } } Tip: The arrow syntax (=>) is a shorthand for the property syntax (get { return ...; }) used in the 0. tutorial. Both are equivalent. Step 2: Loading Hook The Mod API of Cities: Skylines contains various extension interfaces. You can create classes implementing these interfaces to hook into the game. The most important interface is ILoadingExtension. A class implementing this interface will get notified when the loading process begins and when it completes, and when a save is unloaded. Create a new file called CityBeautifierLoading.cs in the Solution Explorer. Add the following content to the file: using ColossalFramework.UI; using ICities; namespace CityBeautifier { public class CityBeautifierLoading : ILoadingExtension { // called when level loading begins public void OnCreated(ILoading loading) { } // called when level is loaded public void OnLevelLoaded(LoadMode mode) { // create dialog panel ExceptionPanel panel = UIView.library.ShowModal<ExceptionPanel>("ExceptionPanel"); // display a message for the user in the panel panel.SetMessage("City Beautifier", "The level is loaded!", false); } // called when unloading begins public void OnLevelUnloading() { } // called when unloading finished public void OnReleased() { } } } Tip: You can also extend the class LoadingExtensionBase. It allows you to override a single loading method instead of implementing all methods 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. You will see the dialog panel as soon as the loading screen disappears: Close the game (UI development requires a complete restart after every change) Step 3: Working with the Prefab Collection Our goal is the removal of various props which are attached to buildings. To do that, we have to access the collection of loaded buildings, more specifically building prefabs. Prefabs vs. Instances: Building prefabs are templates for building instances. That means when a building instance is spawned, it uses the properties, textures and models defined in the building prefab. Modifying the building prefab usually causes all building instances to change. There are also prefabs for trees, props, vehicles and networks. Prefab classes of the game always end with Info (e.g. BuildingInfo, PropInfo, ...). All building prefabs can be found in the PrefabCollection<BuildingInfo>. We will now learn how to cycle through all buildings in this collection. Replace the OnLevelLoadedMethod with this code, then compile the mod and run the game: public void OnLevelLoaded(LoadMode mode) { // total number of loaded building assets int buildingPrefabCount = PrefabCollection<BuildingInfo>.LoadedCount(); // create a message string for the user string message = "Number of building assets: " + buildingPrefabCount; // create dialog panel ExceptionPanel panel = UIView.library.ShowModal<ExceptionPanel>("ExceptionPanel"); // display the message in the panel panel.SetMessage("City Beautifier", message, false); } This will output the total number of loaded building prefabs: Now we will create a list of all building names, using a simple for loop. The LoadedCount() method returns the total number of prefabs. We can use the GetLoaded(uint) method to get the prefab objects, using a number in range 0 <= index < buildingPrefabCount: public void OnLevelLoaded(LoadMode mode) { int buildingPrefabCount = PrefabCollection<BuildingInfo>.LoadedCount(); string message = "Number of building assets: " + buildingPrefabCount; // append a list of building names to the message for(uint index = 0; index < buildingPrefabCount; index++) { // get the building asset with the given index from the collection BuildingInfo prefab = PrefabCollection<BuildingInfo>.GetLoaded(index); // append a separator and the name of the asset to the message message += ", "; message += prefab.name; } ExceptionPanel panel = UIView.library.ShowModal<ExceptionPanel>("ExceptionPanel"); panel.SetMessage("City Beautifier", message, false); } The output looks like this: We learned how to access the building prefabs. In the next step, we will use ModTools to dive deeper into the structure of BuildingInfo objects. Step 4: Exploring and modifying building prefabs with the ModTools scene explorer Subscribe to ModTools and enable the mod in content manager. Create or load a city and click on a building you want to inspect. Then use the "Find in Scene Explorer" button. I picked one of the commercial buildings that is decorated with ugly billboards: The properties displayed in the scene explorer belong to the building instance. Props are defined in the building prefab. Luckily the prefab can be found right at the top (expand the "Info" property). Scroll down and expand the "m_props" property. You will see a list of prop items: Expand the items of the list to find out more about the props. Here you can change properties like position, probability and angle. Find the prop you want to remove and set the probability to 0: The prop will disappear instantly. Repeat the step for all props you want remove. Create a list of all prop names, like this: Billboard_big_variation_02 Billboard_big_variation_04 neon-yakisoba-noodles neon-burned-bean-coffee neon-morellos Billboard_big_variation Billboard_big_variation_01 Problem: The changes you applied to the prefabs are not permanent because prefabs are loaded from game/.crp files when you load your city. In the next step, we will change the probability values programmatically, in the loading class of our mod. Step 5: Modify building props programmatically We will remove the panel/message used in Step 3. Instead, we will add another nested for loop to cycle through all prop items of every building prefab: public void OnLevelLoaded(LoadMode mode) { for(uint index = 0; index < PrefabCollection<BuildingInfo>.LoadedCount(); index++) { // get the building prefab with the given index from the collection BuildingInfo prefab = PrefabCollection<BuildingInfo>.GetLoaded(index); // skip prefabs without props if(prefab == null || prefab.m_props == null) continue; for (int propIndex = 0; propIndex < prefab.m_props.Length; propIndex++) { // get the prop item BuildingInfo.Prop propItem = prefab.m_props[propIndex]; // skip trees/undefined props etc. if (propItem.m_prop == null) continue; string propName = propItem.m_prop.name; // check if the prop name equals one of the banned props if (propName == "Billboard_big_variation" || propName == "Billboard_big_variation_01" || propName == "Billboard_big_variation_02" || propName == "Billboard_big_variation_04" || propName == "neon-yakisoba-noodles" || propName == "neon-burned-bean-coffee" || propName == "neon-morellos") { // set the probability to zero to hide the props propItem.m_probability = 0; } } } } The continue keyword is a control statement of the for loop. It skips the execution of the current iteration and moves along to the next iteration of the loop. Tip: Instead of using the equals operator (==), you can use the Contains method to detect all prop names containing a certain string: if (propName.Contains("Billboard_big") || propName.Contains("neon-")) { propItem.m_probability = 0; } The result (before-after): You can see that the mod removes the billboards from all buildings. We reached our goal! Happy Coding! Tip: You can also remove trees with the same technique: if (propItem.m_tree == null) continue; string treeName = propItem.m_tree.name; Tip: You can limit the replacement to buildings with a certain name, or buildings of certain zone type: for(uint index = 0; index < PrefabCollection<BuildingInfo>.LoadedCount(); index++) { BuildingInfo prefab = PrefabCollection<BuildingInfo>.GetLoaded(index); if(prefab == null || prefab.m_props == null) continue; // filter by name if(!prefab.name.Contains("Blockhouse")) continue; // filter by building/service type if (prefab.m_class.m_service != ItemClass.Service.Industrial) continue; // ... } Next part:
  12. In this tutorial, we will replicate the functionality of the "Make Historical" checkbox in SimCity 4 (stop building from leveling up). The mod will utilize the same interfaces as the Control Building Level Up mod. You will learn how to inspect and modify user interfaces with ModTools, how the info panels of the game work, how to add a checkbox to the UI, how to control building level up with the official API, how to get notified when a building is added/removed and how to serialize custom data in the savegame. Once again, we will use the loading and threading hooks provided by the API. Step 1: Project Setup Create a new project named "MakeHistorical" 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 MakeHistorical { public class MakeHistoricalMod : IUserMod { public string Name => "Make Historical"; public string Description => "Prevents the level up of buildings"; } } Step 2: Data Storage with Serialization Hook Data Structure We will store the ids (ushort) of the historical building instances in the savegame. Like in Tutorial 2 Step 4, we will create a data class that holds our data: using System.Collections.Generic; namespace MakeHistorical { public class MakeHistoricalData { public List<ushort> HistoricalBuildingIds { get; set; } = new List<ushort>(); } } The game requires additional savegame data to be in byte[] (byte array) format (basically zeros and ones, very low level). Luckily, Colossal Order provides a few useful tools to convert data classes to byte arrays (package ColossalFramework.IO). To use these tools, our data class must implement the IDataContainer interface. Extend the class like this: using System.Collections.Generic; using System.Linq; using ColossalFramework.IO; namespace MakeHistorical { public class MakeHistoricalData : IDataContainer { // The key for our data in the savegame public const string DataId = "MakeHistorical"; // Version of data save format // This is important when you add new fields to MakeHistoricalData public const int DataVersion = 0; public List<ushort> HistoricalBuildingIds { get; set; } = new List<ushort>(); // This serializes the object (to bytes) public void Serialize(DataSerializer s) { // convert ushort list to int array int[] ids = HistoricalBuildingIds.Select(id => (int)id).ToArray(); s.WriteInt32Array(ids); } // This reads the object (from bytes) public void Deserialize(DataSerializer s) { int[] ids = s.ReadInt32Array(); // convert int array to ushort list HistoricalBuildingIds = ids.Select(id => (ushort)id).ToList(); } // Validates that all building ids are active public void AfterDeserialize(DataSerializer s) { if (!BuildingManager.exists) return; List<ushort> validatedBuildingIds = new List<ushort>(); Building[] buildingInstances = BuildingManager.instance.m_buildings.m_buffer; // itertate through all building ids, filter active ids foreach (ushort buildingId in HistoricalBuildingIds) { if (buildingInstances[buildingId].m_flags != Building.Flags.None) { validatedBuildingIds.Add(buildingId); } } HistoricalBuildingIds = validatedBuildingIds; } } } What happened? We added the constants DataId and DataVersion. We will use these in the next step We implemented the Serialize method: In this method, we convert our list of ushort numbers to an integer array (the serializer does not support ushort) and pass it to a DataSerializer, which converts our array to bytes. We implemented the Deserialize method, which does the opposite of Serialize We implemented AfterDeserialize, which validates that all deserialized building ids belong to buildings (important when the mod was disabled for some time, to keep the data clean) Serialization System Colossal Order provides a serialization hook for mods (ISerializableDataExtension/SerializableDataExtensionBase). This hook is invoked when the savegame data is loaded, and when the user presses the save button. The game also provides a storage interface (ISerializableData) that allows us to write byte arrays to savegame and read byte arrays from savegame. Combined with the data class and the byte array conversion tools provided by Colossal Order, we will use this hook to save our data. Add a new MakeHistoricalDataManager class: using ColossalFramework.IO; using ICities; using System.IO; using UnityEngine; namespace MakeHistorical { public class MakeHistoricalDataManager : SerializableDataExtensionBase { // The data object of our mod private MakeHistoricalData _data; public override void OnLoadData() { // Get bytes from savegame byte[] bytes = serializableDataManager.LoadData(MakeHistoricalData.DataId); if (bytes != null) { // Convert the bytes to MakeHistoricalData object using (var stream = new MemoryStream(bytes)) { _data = DataSerializer.Deserialize<MakeHistoricalData>(stream, DataSerializer.Mode.Memory); } Debug.LogFormat("Data loaded (Size in bytes: {0})", bytes.Length); } else { _data = new MakeHistoricalData(); Debug.Log("Data created"); } } public override void OnSaveData() { byte[] bytes; // Convert the MakeHistoricalData object to bytes using (var stream = new MemoryStream()) { DataSerializer.Serialize(stream, DataSerializer.Mode.Memory, MakeHistoricalData.DataVersion, _data); bytes = stream.ToArray(); } // Save bytes in savegame serializableDataManager.SaveData(MakeHistoricalData.DataId, bytes); Debug.LogFormat("Data saved (Size in bytes: {0})", bytes.Length); } } } What happens here? The _data property stores our mod data The OnLoadData method attempts to read the saved byte array from the savegame. If the array was found, it converts the bytes to a MakeHistoricalData object (our data structure). If no array was found, it creates a new MakeHistoricalData object (new city or mod enabled for the first time). The OnSaveData method converts the MakeHistoricalData object to bytes, then saves the bytes in the savegame. Tip: To understand how data versioning works, look at this example data manager. Singleton To make the data readable from other classes, we will make MakeHistoricalDataManager implement a simple singleton pattern. We willl also add a few methods to lookup, add and remove building ids: // Singleton getter public static MakeHistoricalDataManager Instance { get; private set; } public bool IsHistorical(ushort buildingId) { return _data.HistoricalBuildingIds.Contains(buildingId); } public void AddBuildingId(ushort buildingId) { if (_data.HistoricalBuildingIds.Contains(buildingId)) return; _data.HistoricalBuildingIds.Add(buildingId); Debug.Log($"Historical Building {buildingId} added"); } public void RemoveBuildingId(ushort buildingId) { if (!_data.HistoricalBuildingIds.Contains(buildingId)) return; _data.HistoricalBuildingIds.Remove(buildingId); Debug.Log($"Historical Building {buildingId} removed"); } public override void OnCreated(ISerializableData serializedData) { base.OnCreated(serializedData); Instance = this; // initialize singleton } public override void OnReleased() { Instance = null; // reset singleton } Now we can use a simple statement to check if a building is historical: bool h = MakeHistoricalDataManager.Instance.IsHistorical(1234); Final code of the MakeHistoricalDataManager class. Step 3: Removing destroyed buildings from the list We have to remove buildings from the list when they are buldozed. Luckily CO added a hook just for that (not documented in the wiki): using ICities; using UnityEngine; namespace MakeHistorical { public class MakeHistoricalBuildingMonitor : BuildingExtensionBase { public override void OnBuildingReleased(ushort id) { if (MakeHistoricalDataManager.Instance.IsHistorical(id)) { // Remove demolished/destroyed buildings from the list of historical buildings MakeHistoricalDataManager.Instance.RemoveBuildingId(id); } } } } Tip: With the IBuildingExtension/BuildingExtensionBase hook, you can also manipulate which buildings are spawned, and there are hooks for building creation and relocation. Step 4: Inspecting And Manipulating User Interfaces with ModTools and ILSpy Like in SimCity 4, we will add a "Make Historical" checkbox to the building info window: To do that, we have to find out how to access the info window programmatically. ModTools supports us with its "debug view". You can toggle it with CTRL + R. Then move your mouse over the info panel (so that the tint of the panel changes to green) and press CTRL + F: The UI window component is now displayed in the ModTools scene explorer. The class name of the element is ZonedBuildingWorldInfoPanel. In the scene explorer, we can change properties like the colour, size and position of the window. We can also look at the child UI elements (buttons, text labels). The position of the child elements is determined by the relativeLayout property. Noted values: Height: 321 Left Padding: 14 (based on the child element positions) Bottom Padding: 27 (based on the child element positions) Now that we know the class name, we can locate the class in ILSpy to find out how to access it programmatically: ZonedBuildingWorldInfoPanel is a subclass of WorldInfoPanel, which contains a static Show<>() method: // WorldInfoPanel (taken from ILSpy) public static void Show<TPanel>(Vector3 worldMousePosition, InstanceID instanceID) where TPanel : WorldInfoPanel { TPanel tPanel = UIView.library.Show<TPanel>(typeof(TPanel).Name, false); tPanel.SetTarget(worldMousePosition, instanceID); tPanel.component.opacity = 1f; } After further investigation (use ILSpy's "Analyze" feature), you will find a Get<>() method in UIView.library which returns the ZonedBuildingWorldInfoPanel instance: var panel = UIView.library.Get<ZonedBuildingWorldInfoPanel>(typeof(ZonedBuildingWorldInfoPanel).Name); Note: There is only one panel instance, which is just filled with the data of the currently selected building. The panel even exists when no building is selected, it's just hidden. Step 5: Adding a Checkbox to the Info Panel Finding the right property values for user interfaces is a finicky task, especially when you have to restart the game after every little change. Using the ModTools console, we can add and modify our checkbox while the game is running. Run this script in the ModTools console (F7): var panel = UIView.library.Get<ZonedBuildingWorldInfoPanel>(typeof(ZonedBuildingWorldInfoPanel).Name); var checkBox = panel.component.AddUIComponent<UICheckBox>(); checkBox.width = panel.component.width; checkBox.height = 20f; checkBox.clipChildren = true; UISprite sprite = checkBox.AddUIComponent<UISprite>(); sprite.spriteName = "ToggleBase"; sprite.size = new Vector2(16f, 16f); sprite.relativePosition = Vector3.zero; checkBox.checkedBoxObject = sprite.AddUIComponent<UISprite>(); ((UISprite)checkBox.checkedBoxObject).spriteName = "ToggleBaseFocused"; checkBox.checkedBoxObject.size = new Vector2(16f, 16f); checkBox.checkedBoxObject.relativePosition = Vector3.zero; checkBox.label = checkBox.AddUIComponent<UILabel>(); checkBox.label.text = " "; checkBox.label.textScale = 0.9f; checkBox.label.relativePosition = new Vector3(22f, 2f); checkBox.name = "MakeHistorical"; checkBox.text = "Make Historical"; This will add everything that is required for a checkbox, giving it the name "MakeHistorical". It is still in the wrong position: Tip: SamsamTS created a very useful utility class that allows you to create various UI elements. The code above was copied from that class. With ModTools, we can experiment with the position without restarting the game. Execute this code in the ModTools console: var panel = UIView.library.Get<ZonedBuildingWorldInfoPanel>(typeof(ZonedBuildingWorldInfoPanel).Name); var checkBox = panel.component.Find<UICheckBox>("MakeHistorical"); checkBox.relativePosition = new Vector3(14f, 164f + 130f + 5f); Result: Now we just have to increase the height of the window a little bit. Execute this code in the ModTools console: var panel = UIView.library.Get<ZonedBuildingWorldInfoPanel>(typeof(ZonedBuildingWorldInfoPanel).Name); panel.component.height = 321f + 5f + 20f; Result: Now, we will put the code we just executed with the console into the loading hook of our mod: using ColossalFramework.UI; using ICities; using UnityEngine; namespace MakeHistorical { public class MakeHistoricalLoading : LoadingExtensionBase { private UICheckBox _makeHistoricalCheckBox; public override void OnLevelLoaded(LoadMode mode) { if (_makeHistoricalCheckBox != null) return; ZonedBuildingWorldInfoPanel panel = UIView.library.Get<ZonedBuildingWorldInfoPanel>(typeof(ZonedBuildingWorldInfoPanel).Name); UICheckBox checkBox = panel.component.AddUIComponent<UICheckBox>(); checkBox.width = panel.component.width; checkBox.height = 20f; checkBox.clipChildren = true; UISprite sprite = checkBox.AddUIComponent<UISprite>(); sprite.spriteName = "ToggleBase"; sprite.size = new Vector2(16f, 16f); sprite.relativePosition = Vector3.zero; checkBox.checkedBoxObject = sprite.AddUIComponent<UISprite>(); ((UISprite)checkBox.checkedBoxObject).spriteName = "ToggleBaseFocused"; checkBox.checkedBoxObject.size = new Vector2(16f, 16f); checkBox.checkedBoxObject.relativePosition = Vector3.zero; checkBox.label = checkBox.AddUIComponent<UILabel>(); checkBox.label.text = " "; checkBox.label.textScale = 0.9f; checkBox.label.relativePosition = new Vector3(22f, 2f); checkBox.name = "MakeHistorical"; checkBox.text = "Make Historical"; checkBox.relativePosition = new Vector3(14f, 164f + 130f + 5f); panel.component.height = 321f + 5f + 16f; _makeHistoricalCheckBox = checkBox; } } } 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, open the building info window for a growable building. Et voila: Step 6: Processing Checkbox Events To process checkbox events, we will add a delegate to the CheckedChange event: public override void OnLevelLoaded(LoadMode mode) { ... checkBox.eventCheckChanged += (component, check) => { ushort buildingId = WorldInfoPanel.GetCurrentInstanceID().Building; if (check) { MakeHistoricalDataManager.Instance.AddBuildingId(buildingId); } else { MakeHistoricalDataManager.Instance.RemoveBuildingId(buildingId); } }; } Clicking the checkbox now triggers the data manager: Step 7: Monitoring the ZonedBuildingWorldInfoPanel with a Threading Hook There is another problem: The checkbox is not updated when you select a building. We will use a threading hook to update the checkbox: using ColossalFramework.UI; using ICities; namespace MakeHistorical { public class MakeHistoricalPanelMonitor : ThreadingExtensionBase { private ZonedBuildingWorldInfoPanel _panel; private UICheckBox _makeHistoricalCheckBox; private ushort _lastBuildingId = 0; // called every frame public override void OnUpdate(float realTimeDelta, float simulationTimeDelta) { if (!FindComponents()) return; if (_panel.component.isVisible) { ushort buildingId = WorldInfoPanel.GetCurrentInstanceID().Building; if (_lastBuildingId != buildingId) { // display the right checkbox state _makeHistoricalCheckBox.isChecked = MakeHistoricalDataManager.Instance.IsHistorical(buildingId); _lastBuildingId = buildingId; } } else { _lastBuildingId = 0; } } private bool FindComponents() { if (_panel != null && _makeHistoricalCheckBox != null) return true; _panel = UIView.library.Get<ZonedBuildingWorldInfoPanel>(typeof(ZonedBuildingWorldInfoPanel).Name); if (_panel == null) return false; _makeHistoricalCheckBox = _panel.component.Find<UICheckBox>("MakeHistorical"); return _makeHistoricalCheckBox != null; } } } Step 8: Controlling Building Level Up It took quite some time to get to this point (UI and serialization are always very time consuming). The last missing piece is the ILevelUpExtension/LevelUpExtensionBase hook, which monitors and manipulates the level up behaviour of buildings. Probably the least complicated part of the mod: using ICities; namespace MakeHistorical { public class MakeHistoricalLevelUpMonitor : LevelUpExtensionBase { public override ResidentialLevelUp OnCalculateResidentialLevelUp(ResidentialLevelUp levelUp, int averageEducation, int landValue, ushort buildingID, Service service, SubService subService, Level currentLevel) { if (MakeHistoricalDataManager.Instance.IsHistorical(buildingID)) { levelUp.targetLevel = currentLevel; } return levelUp; } public override CommercialLevelUp OnCalculateCommercialLevelUp(CommercialLevelUp levelUp, int averageWealth, int landValue, ushort buildingID, Service service, SubService subService, Level currentLevel) { if (MakeHistoricalDataManager.Instance.IsHistorical(buildingID)) { levelUp.targetLevel = currentLevel; } return levelUp; } public override IndustrialLevelUp OnCalculateIndustrialLevelUp(IndustrialLevelUp levelUp, int averageEducation, int serviceScore, ushort buildingID, Service service, SubService subService, Level currentLevel) { if (MakeHistoricalDataManager.Instance.IsHistorical(buildingID)) { levelUp.targetLevel = currentLevel; } return levelUp; } public override OfficeLevelUp OnCalculateOfficeLevelUp(OfficeLevelUp levelUp, int averageEducation, int serviceScore, ushort buildingID, Service service, SubService subService, Level currentLevel) { if (MakeHistoricalDataManager.Instance.IsHistorical(buildingID)) { levelUp.targetLevel = currentLevel; } return levelUp; } } } The logic is very simple: When the building is historical, the target level is set to the current building level. And we are done! Buildings with the "Make Historical" checkbox enabled will no longer level up. The list of historical buildings is stored in the savegame. Happy Coding! Download Source
  13. Say you had a folder that has whatever mods you need to do a certain style of city as a side project with, But once you're done and want to work on your major cities you take it out of your plugins folder then place it back in once you decide to work on it again, Would this cause any problems in the game?
  14. In this tutorial, we will create a basic mod in two different ways: With a simple text editor, and with the Visual Studio IDE. Cities: Skylines uses the Unity Engine, which is based on Mono, an open source implementation of the .NET framework that runs on Windows, Mac and Linux. That means the same code can be used on all of these platforms. The .NET framework is comparable to Java. It's basically a set of libraries and a virtual machine that runs your .NET applications. C# is the most common programming language that can be used to create .NET applications and libraries. It's very similar to Java (just better!). After writing your mod in C#, you have to compile it to create machine readable code. Cities: Skylines comes with an integrated compiler. It works like this: [.cs files containing raw C# code] → [COMPILER] → [compiled .dll file] The .dll file is your compiled mod (what you usually download from the Workshop). Alternatively, your can use an external compiler like the one provided by Visual Studio (see Method 2). Method 1: Using Notepad, let the game compile First we will create a mod with the tools provided by the game. The game searches for mod source folders in the directory C:\Users\<YourName>\AppData\Local\Colossal Order\Cities_Skylines\Addons\Mods. In this folder, create a new directory named "FirstMod". Inside of the new directory, create another folder named "Source". That's the directory for the .cs files Open Notepad (or your favourite text editor) and enter this code: // Makes UnityEngine and Cities: Skylines API classes available for use using ICities; using UnityEngine; // the namespace makes the names of your classes unique. // Naming: You can just use the name of your mod, it doesn't really matter. Spaces are not allowed. namespace Tutorial { // This defines a class that implements IUserMod. // The class defines the name and description displayed in the content manager. // The game searches for these classes. Every working mod must contain one class implementing IUserMod. // Naming: Just append "Mod" to the name of your mod, like "NetworkSkins" -> "NetworkSkinsMod". Spaces are not allowed. public class MyFirstMod : IUserMod { // this defines the title of your mod displayed in content manager public string Name { get { return "My First Mod"; } } // this defines the description of your mod displayed in content manager public string Description { get { return "Hello World, this is my first mod!"; } } } } (Lines starting with "//" are comments. You can add your own or remove them without affecting anything.) Save the file in the "Source" directory. Name it FirstMod.cs (in the file type dropdown, select "All Files"). Now just start your game. The game compiles your mod on start up. You will find it in the content manager: You will also notice a new .dll file in your mod directory. That's your compiled mod: So far we didn't add functionality to the mod. It only spawns the item in content manager. The big problem of Notepad and the game compiler is that it is hard to find errors in your code. You will have to restart your game many times. That's where Visual Studio comes into play... Method 2: Using Visual Studio (recommended) Visual Studio is a specialized IDE for C#/.NET development. It helps you to find errors in your code, and it autocompletes code statements for you, and it compiles your mod much faster than the game. It is also a requirement for advanced modding techniques like detours. The following tutorials will be based on Visual Studio. First of all, download and install Visual Studio Community 2017 for free. Make sure that the .NET desktop development feature is checked. Also enable the individual component .NET Framework 3.5 development tools. Step 1: Project Setup Create a new project in VS2017: Select File > New > Project On the left, select Templates > Visual C# > Windows Classic Desktop Select "Class Library (.NET Framework)" In the top, select ".NET Framework 3.5" in the dropdown menu (Important!) In the bottom, enter "SecondMod" as the name and solution name. and choose a location for your project files (e.g. your desktop) Press OK Visual Studio will create a project that looks like this: On the right, you can see the Solution Explorer with a list of .cs files. Visual Studio created a file named Class1.cs to get us started. If you want, you can rename the .cs file to match your mod name (Right click in solution explorer > Rename). Step 2: Dependencies Before we continue, we have to set up two things in the project. You always have to do it when you create a new mod project: First, we will add the modding API (ICities), UnityEngine, ColossalFramework and the game assembly (Assembly-CSharp) as dependencies. In the solution explorer, right click the "References" item and select "Add reference..."). Now use the "Browse..." button in the bottom to select the following .dll files. The files are located in the folder: Steam\steamapps\common\Cities_Skylines\Cities_Data\Managed Step 3: Post Build Script Secondly, we will add a so-called post build script: It automatically puts the compiled dll file into the C:SL mod directory when you compile with Visual Studio: Right-click your project in the Solution Explorer and choose Properties Select Build Events on the left hand side of the property sheet Paste the following in the Post-build event command line: mkdir "%LOCALAPPDATA%\Colossal Order\Cities_Skylines\Addons\Mods\$(SolutionName)" del "%LOCALAPPDATA%\Colossal Order\Cities_Skylines\Addons\Mods\$(SolutionName)\$(TargetFileName)" xcopy /y "$(TargetPath)" "%LOCALAPPDATA%\Colossal Order\Cities_Skylines\Addons\Mods\$(SolutionName)" Step 4: Writing the Mod Now we are finally ready for the creation of the actual mod. Replace the contents of Class1.cs with this code: using ICities; using UnityEngine; namespace Tutorial { public class MySecondMod : IUserMod { public string Name { get { return "My Second Mod"; } } public string Description { get { return "I made this with VS2017"; } } } } Step 5: Compilation Press F6 (or Build > Build Solution) to compile the mod. The mod should appear in your mod directory. Now start the game and enjoy the listing of your useless mod in content manager Happy Coding! Next part:
  15. Hi, I'm trying to find the ORIGINAL package of roads parameters and proprieties, and the package of the houses (civs). I've tried the Game package, DLC, EP1, APP, Graphic, etc, but most of the parameters such as models, proprieties are no there. I don't know if I would be able to reach CapTon, Oppie or any other original SimCity 2013 "veterans" of modding, but if someone can point me in the right direction, I appreciate very much. Scaletho
  16. Welcome to the SimCity (2013) Official Modd Request Thread. Please post all modding requests here. Separate request threads created will be merged here. Thanks!
  17. Modding Fun with SYS.PAK

    The SYS.PAK file, located under SimCity 3000 Unlimited/Apps/Sys/, is an archive that contains a myriad of uncompressed game configuration files. While some files contain mostly hexadecimal mappings and generally undecipherable information, quite a few of them include readable and interesting game parameters that are fairly easy to view and modify. Some of the things you can do include: Alter area-of-effect stats from buildings, including crime, pollution, and land value generation Change the plop costs, capacities, and general life expectancy rates of utility buildings For my example here, I've modified the effective lifespan of the fusion power plant. Always thought it was a little odd that the most expensive and futuristic plant (by far) is hampered by the shortest overall lifespan. Also, comic sans? Really? OPENING THE ARCHIVE Please ensure that you create a backup of SYS.PAK, in the event that you repack the files and the game no longer functions. To extract SYS.PAK, you will need to download SC3KPAK (windows only). Place the SC3KPAK.exe and Sc3kpak.lng (thanks @CorinaMarie) in the Apps/Sys/ folder and run command prompt. cd to the working directory of SC3KPAK and run the following command: sc3kpak e sys.pak This will extract the contents of the archive to the current working directory. Now you're ready to begin the editing process! Open any of the .ini files in your favorite text editor and begin tweaking some values! CONTENTS I'll try to update this post periodically once I've perused the files a bit more. SC3ComLayer, SC3IndLayer, SC3ResLayer: These files seem to define certain constraints for the RCI model. The ResLayer is significantly more comprehensive. InitialConnectionSupply - This looks to be the initial maximum commercial and industrial capacities, without any cap relievers. Default is 25,000 and 70,000 respectively. ExternalFunSupply - seems to be the same thing for residential, sitting at a default value of 25,000. SC3Tune: Controls parameters for several different portions of the simulation. Also contains stat values for a lot of the civic buildings, garbage disposal and the water treatment plant. MaxDistFromTransport - Indicates the maximum tile gap from a transportation network tile (road, subway, rail, etc.) a zone will develop. Defaults are 2 for commercial, 3 for residential and 4 for industrial. I'd imagine setting this value to something like 255 would result in some super clownly development. [Higher/Lower][LandValue/Density]RedevelopmentPct - Sets bias for the simulation's redevelopment of areas. Default is a even split for residential and commerical and a 30/10/30 split for industry. Modifying the percents here would help skew development to favor a certain type over others I'd imagine. SC3LandValue: This SC3000 knowledge tree article does a very good job outlining practically everything found in this file. You have control over the city center, elevation, water, building and ordinance effects on citywide land value. [Res/Com/Ind]CityCenterEffect - This is the city center effect bonus described in the plots from the above link. The initial values in each section is displayed as 45+80 for residential, 45+60 for commerical and 10+100 for industrial. The value left of the plus sign is the base land value, while the right value denotes the percentage of the map from the center where you'll get the bonus land value. As you develop your city you may find your geographical city center constantly shifting. If you've ever experienced having your commercial zones fade out in land value as your city grows, the shifting city center combined with the limited 60% bonus radius is the culprit. The AgentIDModifiers section describes the individual building effects on land value. Yes, by changing that -90:R to 100:R, you can make it so that your rich sims won't mind if their nice mansions are right next to that disgusting coal power plant. You can go even further by changing the AirPolluteFactor and GarbagePolluteFactors to positive numbers for a positively silly result. Similar files to this one include SC3Pollution, SC3Aura, SC3Crime. You can also control how frequently these data layers update in-game by changing the UpdatePeriod parameters SC3DisasterLayer: Controls parameters associated with disasters and the parade. Looks like a fun way to cause some extra chaos! SC3BudgetLayer: Controls budget items, which includes plop costs, tax income and loans. LVTo[Res/Com/Ind]TaxTransmogrifier - From my understanding, this is a multiplier applied to the land value of the particular RCI tile. The product of that formula is the tax revenue you earn. Naturally, the higher this value, the higher the amount of money you earn from taxes. Default values are 35 for residential, 45 for commercial and 50 for industrial. A city of 465,000 people that was earning approximately 62,000 simoleans a year was now slated to earn 216,000 after doubling each respective value. SC3PowerLayer: Controls most power utility statistics, including lifespan and capacity. [Min/Max]OverworkMonths - Range in which an overburdened power plant can prematurely explode. MaxLifeSpan - 12x the maximum number of years a power plant can operate before it explodes. (ex: value of 1200 = 100 years) DeclineAge - 12x the year when the power plant starts operating at less than 100% capacity. (ex: value of 768 = plant starts aging at 64 years) PercentageVariationInLongevity - randomizes the maximum lifespan of the building within this percentage of its MaxLifeSpan. In essence, it turns MaxLifeSpan into an average (15% longevity at 1200 = 85 - 115 years) SC3WaterLayer: Controls most water utility statistics, including lifespan, capacity and consumption (no treatment plant). Interesting properties: WaterFromPipe - The maximum amount of tiles from a pipe that water will reach. Default is 7. DefaultLeak - Seems unused. My theory is that the aging water pumps were supposed to 'leak' and cause something bad to happen. Rather, aging functions much like power and garbage utilities with gradual capacity decrease over time. Another interesting tidbit I noticed is that several files contain a reference to a 'Launch Arcology' building. I'm guessing this was supposed to be a reward building in a similar vein to the arcologies of SC2K but was ultimately cut from the game. PUTTING IT BACK TOGETHER Once you're done editing, open the command prompt back up. In your current working directory, type: sc3kpak a This will automatically package the configuration files into a new SYS.PAK. If you're working with the archive in a separate folder from the Apps/Sys/ folder, simply copy your new SYS.PAK back into there. Otherwise, start the game and see the fruits of your labor!
  18. OpenSC4

    There's some minor chatter on reddit about pursuing a potential OpenSC4 to open up a whole slew of modding possibilities that have thus far been impossible. It's currently mostly a faint dream, but the more people who know about it and are talking about it, the higher the chances of it becoming reality. I personally know the square root of nil about coding, so I'd be about as useful as a mobility scooter in a Formula one race, but I can be on the grand stand to cheer everybody on! https://www.reddit.com/r/OpenSC4/ https://www.reddit.com/r/simcity4/
  19. Door Markers are useful for pedestrians/residents of a building. But for commercial deliveries, and service vehicles, they all seem to use one single entrance of the building. Is there any way to add different entrances of a building, like trucks going to one entrance for deliveries and service vehicles to another? Or adding multiple entrances for trucks and service vehicles, since Door Markers won't work? Also, I'm hoping to make some buildings with multi-level functionality, so that it can be placed somewhere with steep slopes (e.g. informal communities (slums) on the hillside). This way, someone 3 stories above can enter the building as well as someone on the ground floor, they can access the same building through different entry points. Or, let's say a building has an office as its main building, and the cafeteria as a sub-building. I want someone from a road 3 stories above the ground floor to be able to enter the main office, and someone from the ground floor to enter the cafeteria (which occupies the ground floor), and both cims can go to both parts of the building without having to exit the building (since that would render the point of multiple entrances useless). Is this possible by setting indoor paths between the sub-buildings? tl;dr: How can I add multiple entrances to a building for service vehicles to use? Is it possible to have functional multi-level, multi-purpose buildings with entrances on different levels? Can they be made so cims don't have to leave the building and use another external entrance, they can just stay in that building?
  20. EDIT: Turns out the below issue is caused by RICO and WP Realistic Population mods not playing nicely with each other; whenever local settings are added to any type of commercial and Realistic Pop is disabled for that particular building, that building will always be "not operating" despite having workers. Only way for it to operate is to have Realistic Pop enabled for it, which would render your local settings for it useless. The workaround solution so far seems to be enabling Realistic Pop for that asset, plopping it in-game to find out its generated worker amount, and then going into WG_RealisticCity.xml to add something along these lines: <meshName bonus="-311">651651763.Alliance_Data</meshName> to add/subtract however much is needed to get it to be the amount of workers you want. Hopefully this will be fixed in the upcoming RICO version @AJ3D? OP below: ----------------------- I tried making a bunch of buildings into mixed-use by loading this underground parking lot asset into Asset Editor, resize it into the building size, save it under a new name, and then load the building into Asset Editor and add this resized parking lot as a sub-building. Saving the building under a new name, I now go into RICO to assign properties to its new sub-building. Results? Residential, Industrial, Office, Park, even School = works great, as intended, and "operating normally". Commercial (low, high, tourist, leisure)? Not Operating. Always. They get plenty of workers, and always have a "happy face", but always not operating. I even have the Resilient Owners mod to make sure it's not just a UI bug, but it also says "Clients served: 0" aka the business hasn't made any money or sold any goods, so it really isn't operating and it's not just a UI bug. I have no idea why! The main building functions no matter what it is (commercial or otherwise), but sub-buildings only function properly if they're not commercial. The odd thing is, I have the new Imperia Tower building which is mixed use and comes with RICO settings for its sub-building, and its commercial sub-building works great -- Operating Normally and no problems. How does this asset have functioning commercial sub-buildings and mine don't? How do I get my commercial sub-buildings to function properly, since all my other sub-buildings are fine?
  21. so I've been waiting for sub buildings to become native so I could finally finish off Flinders Street Station (from Melbourne) here's a quick WIP look - probably will release sometime soonish - maybe next week. Let me know what you guys think!
  22. As I gazed at the peeks of MrMiyagi's Paradise Reef green mountains, I said to myself, it would be nice if we could have clouds that brushed against the mountains like we see in the Caribbean and many tropical locations where some clouds hang low. Or even look down through clouds at our cities and regions. Or how about taking a first person flight through them in a plane or helicopter. Then @RonyX69 provides us with a script for the rotor shader so we can have semi-transparency and eventually it hit me to try and make 3D cloud billboards just to see what would happen. I also took inspiration from the cloud billboards in Flight Simulator X. I have mixed feelings about the results so far and I'm not sure if this will go all the way to a workshop item. But I think it's worth a try. Starting the billboard method: First thing is to make a plane and map it with the desired cloud texture. Then it's important to duplicate the plane, flip it so the normals are facing opposite directions, offset it a bit so no z-fighting, and then mirror the UV in both X and Y (in Blender). At this point there is a lot more experimenting to do in order to get an good billboard orientation to see a seamless cloud when rotating the best we can so we don't see too many edges from the sides. I will be studying cloud billboard methods and share any interesting info I find. There are many possibilities with all kinds of cloud formations. How the game renders them...so far: The clouds do not have a smooth transition between the closeup intended look and the LODs. At LOD distance, they develop hard edges and lose the fluffiness.They also disappear off and on I think when in LOD transition. I don't know if this is a permanent limitation with the rotor shader or if we can overcome it. If not, the best this kind of asset can be is screenshot candy. Also it would be a good idea to make some kind of anchor like a rock so when you want to bulldoze the clouds, you know where the base is since it's high above. Current challenge: To make better cloud billboards and see if the LOD transition can be improved. Below are some screenshots of my experiment so far. I did the mesh as a quick test model so please excuse the shape. The rest are shots I took forcing good angles with the camera Next I will make better billboard formations. Maybe some can be simple flat meshes for shots right under or over them. All thoughts and suggestions are welcome.
  23. I'm attempting to import an airport model into Cities: Skylines but all I have tried has failed. I have used 3ds Max but every single time I try, the textures are messed up in-game. I haven't tried Blender because I just don't know how. Has anyone got any tips? I've been trying to do this for at least 8 hours now. Please help me out.
  24. I see this reddit post today where someone is showing off a movie file on a billboard. I'm extremely interested in learning how to do it if it's a thing that can be done for this game. Would love to hear thoughts, possibilities and how the heck to do this. Not only am I thinking billboards but Drive-In movies, gas station pump screens, etc. Here's a link to the Reddit post for those who didn't see it https://www.reddit.com/r/CitiesSkylines/comments/5g1f6c/a_billboard_animator_that_actually_animates/
  25. 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. 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:

Help Keep Simtropolis Online, Open & Free!


Would you be able to help us catch up after a bit of a shortfall?

We had a small shortfall last month. Your donation today would help us catch up for this month.

Make a Donation, Get a Gift!

We need to continue to raise enough money each month to pay for expenses which includes hardware, bandwidth, software licenses, support licenses and other necessary 3rd party costs.

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