Jump to content

What is your preferred format for an introduction into C:SL mod development?  

36 members have voted

  1. 1. What is your preferred format for an introduction into C:SL mod development?

    • Written Tutorials (e.g. "How to make a Bus Stop Replacer Mod")
    • Video Tutorials
    • Mod Example Project with comments in code (for download)
    • Documentation of the different simulation systems and classes of the game


31 posts in this topic Last Reply

Highlighted Posts

Is this a coincidence? I tweeted this a couple hours ago. :D

Although my video won't be about modding specifically, just about running scripts and changing some values for testing probably, for complete beginners. So it still could be useful since browsing mod tools and making temporary scripts is how I get mod ideas.

My vote was for the written one, since then you could explain the process of making a mod from scratch, depends how inexperienced your target audience is.

The problem I see with some tutorials in any field is that some things are not explained and it's "just do this because I said so". I guess there are people who want that but I'm not betting on those actually getting anywhere with modding. If people understand why the code is what it is, it's more likely they can apply this knowledge to their own modding ideas.

Share this post


Link to post
Share on other sites

As a noob in asset editing, I would be really interested in a tutorial about the basics of ModTools scripts.

About the format, I usually prefer text tutorials rather than videos, as you can get a better overview, e.g. skip the parts you already know about, easily find parts which you didn't understand at the first read, etc.
Of course there are exceptions where videos are more effective.

Share this post


Link to post
Share on other sites

I think a start-up one would be super helpful, taking us right from the beginning to end on "how to create x mod". That would ideally include *everything*, like literally every step of the way from writing a script to running it in ModTools, etc.

Share this post


Link to post
Share on other sites
  • Original Poster
  • 4 hours ago, pauliaxz said:

    I would also like to know how exactly Mod Loader works, specifically how to load files (textures, models) from mod's folder. 

    That's a quite advanced topic, but I will try to cover it.

    Share this post


    Link to post
    Share on other sites

    I've only barely started modding -  I found it easy enough to get started from looking at other mods, but documentation on the internal systems would be a massive help, so that gets my vote.

     

     

    Share this post


    Link to post
    Share on other sites

    I've only made assets so far but I would love to make a mod that changes how wealth works. Therefore, documentation would be greatly appreciated. With enough help and knowledge, I could tie wealth to jobs and possibly add a new wealth level (Elites, since we have working poor, middle class, and upper-middle class already) and a few new education levels (but that would require 2 new school buildings).

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Are there any specific topics that you are interested in?

    Below are some of the topics I would like to cover with tutorials (with embedded extra documentation):

    • Setting up a Mod project in Visual Studio, creating a very basic Hello World Mod using only the official modding API
    • A mod that modifies prefabs, for example building props or networks (the typical "Replacer" mod)
    • A mod that lets you adjust the colour of street lights
    • A mod that displays the number of buildings/vehicles/trees in your city in a floating window
    • No Seagulls mod (using detours)
    • A mod that adds a new (simple) network type, like a new type of power line

    These are things I would like to explain in my tutorials:

    • Debugging and Viewing the Scene Graph with Mod Tools
    • Hooks provided by the game and the UnityEngine (loading, threading, economy, demand, chirper)
    • Structure of the game: Managers, Collections, Prefabs, Instances and ties with the unity engine.
    • Overview of the prefab types and their properties (Buildings, Props, Vehicles...)
    • Reverse Engineering and Detours: How to replace algorithms and functions
    • C#: Difference between classes, objects, structs, singletons and static members and when to use what
    • C#: Arrays, Lists, Dictionaries explained
    • Adding mod settings, saving and loading .xml files
    • Advanced User Interfaces (like Building Themes or Network Skins)
    • Saving Custom Data in Savegames
    • Asset Editor Modding
    • Manually Loading textures and meshes
    • Adding custom networks
    • Advanced Loading hooks
    • Modifying AI behavior

     

    Share this post


    Link to post
    Share on other sites

    Awesome initiative!

    I don't care much for tutorial video's, but that's just me, and in any case any additional bit of info regarding modding is more than welcome (it often feels like stabbing in the dark to me).

    One thing I'd like to learn a bit more about is detouring: I'm familiar with the basic concepts and methods, but even after studying lots of code snippets I'm still have problems working out what bits to detour and how to implement them (my personal White Whale is finding out if in any way it is possible to access props/trees/assets on instance level, so individual items can be customized without the changes applying to every instance [think road sign props, for example], and if so, how to trace the relevant bits of code that need to be detoured).

    Other things would be debugging methods (I usually just output stuff to the output log to check things - tedious doesn't even begin to describe it), and whether there are tips and tricks to fix issues that I can't reproduce locally.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • 3 hours ago, Judazzz said:

    (my personal White Whale is finding out if in any way it is possible to access props/trees/assets on instance level, so individual items can be customized without the changes applying to every instance [think road sign props, for example], and if so, how to trace the relevant bits of code that need to be detoured).

    NetworkSkins does it. For props and trees, it all happens in this detour class. It just detours multiple methods of NetLane. The code you see is the slightly modified source code of the game (changes are marked with //mod begin/end). You can apply the same method to buildings.

    Share this post


    Link to post
    Share on other sites

    I think a series would be nice -- maybe having a video (or chapter, section, whatever works :p) on making something super basic, then adding one or two new features that you introduce/teach. For example, if the first "episode" is on bus stop replacement, the next "episode" can be on adding a UI to that mod, then the "episode" after that can be on using detours, etc. That way we build upon knowledge gained from previous "episodes" so we can eventually make our own super complex mods, :) instead of learning everything individually without examples showing us how to use them or combine them together.

    Share this post


    Link to post
    Share on other sites

    Lots of great ideas here :yes:

    Would definitely agree with @Judazzz that some guidance on effective debugging would be real useful; not covered at all so far I don't think; and could save novices such as myself many hours trying to get meaningful feedback blundering between error messages, modtools, output logs and just basic trial and error *:???: 

    Share this post


    Link to post
    Share on other sites

    I'd really love to know how to get Catenary Replacer to work on segment-level, including option to have wires or not.

    Anyway, from your list I'm really interested in Adding Custom Networks, and setting up 'Replacer mods'. Video preferred, or text with images (I need something visual) 

    Share this post


    Link to post
    Share on other sites
    On 5/26/2017 at 8:54 AM, boformer said:

    Manually Loading textures and meshes

    does this mean importing different meshes into the editor that will then be saved with the asset? (right now if you copy meshes from other assets into the editor using modtools and hit save the mesh doesn't actually save)

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • 7 hours ago, Scott.dft said:

    not covered at all so far I don't think; and could save novices such as myself many hours trying to get meaningful feedback blundering between error messages, modtools, output logs and just basic trial and error 

    That's basically how debugging works in C:SL :(

    3 hours ago, Bad Peanut said:

    does this mean importing different meshes into the editor that will then be saved with the asset? (right now if you copy meshes from other assets into the editor using modtools and hit save the mesh doesn't actually save)

    After the reverse engineering and asset editor mods tutorial, you might be able to find the reason why things are not saved (and how to fix it).

    Share this post


    Link to post
    Share on other sites
    10 hours ago, Tim The Terrible said:

    I'd really love to know how to get Catenary Replacer to work on segment-level, including option to have wires or not.

    Anyway, from your list I'm really interested in Adding Custom Networks, and setting up 'Replacer mods'. Video preferred, or text with images (I need something visual) 

    Sounds like what you'll need is a bit like a combination of American Roadsigns and Prop it Up.
    If catenaries are the same as road network/lane props, and if rail segments each have a unique identifier (InstanceID?), then (as far as I know) that's all you need: use a network segment selection tool, open a UI window after selecting a segment containing a drop-down/combo box/whatever that lists all available catenaries, and after clicking the Apply button save it as a replacement in the config file (segment id, original prop name/id, replacement prop name/id), and then run the method that replaces the present prop with the selected replacement one in real time (can be the same method that handles the replacements OnLevelLoad).

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • 1 hour ago, Judazzz said:

    and after clicking the Apply button save it as a replacement in the config file

    Please don't do that. Data like that belongs into the savegame. I will try to cover that as well.

    Share this post


    Link to post
    Share on other sites
    2 hours ago, Judazzz said:

    Sounds like what you'll need is a bit like a combination of American Roadsigns and Prop it Up.
    If catenaries are the same as road network/lane props, and if rail segments each have a unique identifier (InstanceID?), then (as far as I know) that's all you need: use a network segment selection tool, open a UI window after selecting a segment containing a drop-down/combo box/whatever that lists all available catenaries, and after clicking the Apply button save it as a replacement in the config file (segment id, original prop name/id, replacement prop name/id), and then run the method that replaces the present prop with the selected replacement one in real time (can be the same method that handles the replacements OnLevelLoad).

    They are lane props indeed and the wires are segments (next to rail and gravel). @boformer had an Alpha version of this functionality but that was before Mass Transit. If he doesn't have time, maybe another modder can have a look, with permission. Another thing was that removing the wires per segment didn't work. The final thing was that it was hard to remove the LOD of the wires (as is already the case in Catenary Replacer). 

    Share this post


    Link to post
    Share on other sites
    On 5/26/2017 at 2:43 PM, alborzka said:

    I think a series would be nice -- maybe having a video (or chapter, section, whatever works :p) on making something super basic, then adding one or two new features that you introduce/teach. For example, if the first "episode" is on bus stop replacement, the next "episode" can be on adding a UI to that mod, then the "episode" after that can be on using detours, etc. That way we build upon knowledge gained from previous "episodes" so we can eventually make our own super complex mods, :) instead of learning everything individually without examples showing us how to use them or combine them together.

    I really like the building on knowledge approach - when done right it establishes good patterns that allows you to move beyond the tutorials.

    On 5/25/2017 at 4:54 PM, boformer said:

     

    • C#: Difference between classes, objects, structs, singletons and static members and when to use what
    • C#: Arrays, Lists, Dictionaries explained

     

    Personally, I think the focus should be on learning how to build fun mods, not learning how to C# - there are already plenty of tutorials on that.  Let the community help with explaining programming concepts and questions.

     

    Something I see often requested is a mod that overrides the road name generation.  It could be a fun 'first' mod to make?

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • 3 hours ago, AnotherAdo said:

    Personally, I think the focus should be on learning how to build fun mods, not learning how to C# - there are already plenty of tutorials on that.  Let the community help with explaining programming concepts and questions.

    There is a difference between normal/enterprise development and game/mod development.

    CO provides provides a singleton implementation and a high-performance fixed arraylist. They also use structs and ref parameters to modify them. It is all done to improve performance.

    That's why I would like to cover these topics

    Share this post


    Link to post
    Share on other sites
    7 hours ago, boformer said:

    There is a difference between normal/enterprise development and game/mod development.

    CO provides provides a singleton implementation and a high-performance fixed arraylist. They also use structs and ref parameters to modify them. It is all done to improve performance.

    That's why I would like to cover these topics

    You are right - I've done my fair share of game dev to know that performance is king.   My apologies, the way it was worded made me think that it was more of an 'Intro to OO principles', rather than how to use those principles for CS.   Given the context, I should have realised that :)

    Also - thank you for taking the time to do this!

    Share this post


    Link to post
    Share on other sites
    On 2017-5-27 at 5:33 PM, boformer said:

    After the reverse engineering and asset editor mods tutorial, you might be able to find the reason why things are not saved (and how to fix it).

    I think it's just a limitation in the game (like how we couldn't have sub buildings for a while) There's no reason why it shouldn't work apart from that fact that the game isn't built to do so.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • 7 hours ago, Bad Peanut said:

    I think it's just a limitation in the game (like how we couldn't have sub buildings for a while) There's no reason why it shouldn't work apart from that fact that the game isn't built to do so.

    You have to find out where which mesh is saved by the game, and where it is taken from. Then you might be able to replace it.

    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 Michael RT
        For what I’m trying to accomplish, as far as I can tell, I should be using either SC4 Tool or the iLive Reader. I would like to be able to edit certain parameters of buildings in the game. For example, changing the radius for police, fire, education, etc. I would also like to change how much power is generated from power plants, how much water is generated by water pumps and towers, etc. Basically do everything (hopefully) that can be done in SimCity 3000 here.
         
        I’ve tried both SC4 Tool and iLive Reader but can’t seem to find the buildings I’m searching for. I’m truly starting from scratch and need some assistance on either of these programs. Any help is greatly appreciated!
      • By Dragonxander
        Greetings to all fellow mayors and Simtropolitan citizens!
         
        I want to present you a series of tutorials revolving around a very immersing part of the game: earthworks!
        Why? Because it's a very fundamental aspect of any construction in real life and can add aesthetic and functional depth to your cities.  I came up with a series of tutorials I'll be developing for this purpose, ranging from the most fundamental aspects to highly demanding applications of in-game earthmoving to shape the destiny of your city.
        Perhaps the biggest gain players can get from mastering earthworks is making rugged terrain regions all that much more enjoyable. It may be tempting to always go with a very flat region to make building easy, but that approach makes players miss the opportunity of a challenging terrain resulting in a thrilling and wonderful landscape. I'll be making these based on my main ongoing region, the Sinnoh Region, as the one fundamental geographic element that defines it are its mountains.
         
        One favor I ask followers of this series is to avoid posting on the tutorial threads until they have been constructed. Their completion will be announced here and in the meantime, the corresponding comments can be made here.
        Finally, before we start, I would like everyone's feedback on which category should I tackle next after completing the fundamentals tutorial.
         
        ESSENTIAL TOOLS:
        Network Addon Mod, latest version (currently the 36, versions 34 and 35 will still be adequate). In particular, make sure to have the NAM hole digging lots, these are super important to do a lot of the required steps I'll be showing.  
         
        Slope mode of your choice (in my case, the BRF Tunnel and Slope Mod). I recommend this one in particular because it's one of the most strict slope mods available for SimCity 4. I currently use an older version which still did not include a dedicated Real Highway (RHW) slope, but that isn't a problem for me as you'll all learn during the tutorials.  
        Region with hilly, rolling and/or mountainous terrain--anything that isn't a super flat expanse of nothingness will do.  
        God Terraforming in Mayor Mode (or if not your thing, use the cheat to activate God mode terraforming tools in Mayor Mode  
         
        T U T O R I A L   S E R I E S :
        A. EARTHWORKS FUNDAMENTALS: (in the making)
        Starting a town (Emeragrove): now available! Main local road (Emeragrove): screenshots available, pending writing Bridge across river (Emeragrove): upcoming Power lines (Emeragrove): upcoming  
        B. EARTHWORKS APPLIED TO MAJOR TRANSPORTATION PROJECTS AND URBAN RENEWAL (future)
        Rural Freeway Segment (Route 203) Rural Freeway Interchanges (Route 203) River Diversion (Jubilife) Urban Freeway Retrofit (Jubilife) Median Mass Transit (Jubilife) Suburban Freeway Retrofit (Route 204)  
        C. MOUNTAIN MADNESS (future)
         Difficult mountain crossing (Oreburgh-Pal Park) Mountain Railway (Oreburgh-Pal Park) Dam and reservoir (Pal Park) Mine expansion (Oreburgh) Tunnels across mountains (Route 216)  
        D. COASTAL CHALLENGE (future)
        Seaport (Jubilife Port) Power Plant (Jubilife Port) Beaches (Hotel Grand Lake) City straddling the sea (Sunyshore) Building a linear breakwater (Seabreak Path) Building an island (Flower Paradise) Underwater tunnels (Jubilife)
      • By Dragonxander
        The very first post of this tutorial series!!
         
        Earthwork Fundamentals 1: Starting a Town
         
        Welcome to Emeragrove!!
        Population: 0 Infrastructure: just a neighbor connection Trees: 0 Citizen complaints: 0 ...Huh....not a whole lot of action in here. Maybe we can change that!
         
        Our blank slate: a large city tile with a river running along the western side and rolling terrain on almost all of its land area. We will settle next to the head of navigation of the small river, highlighted by the saddle shape in red.

         
        We want to investigate the terrain characteristics in the area, we start by activating the “terrainquery” cheat (Ctrl+X, then write "terrainquery"). This allows us to obtain the tridimensional coordinates for any point within the city tile.

         
        We find that, towards the northwest of our view, the terrain’s elevation (y = 258.9 meters above SimCity level) is a meager 8.9 meters above the game’s sea level (250.0 meters).

         
         
        Moving towards the southeast, we find a slightly more elevated position, at 260.8 meters above SimCity level. We secure this elevation by plopping road tiles to form a flat surface we want to propagate via cut and fill. This matters because if the starting terrain is too low, the slope cannot be demonstrated effectively and Sims are at risk of losing everything to a river flood within the floodplain area.

         
        We then continue placing single road squares in a checkerboard pattern and emphasizing the boundaries of the terrain we intend to level off. One convenient way to do this is to plop a sufficiently long stretch of road squares along which we’ll be dragging the roads proper to level additional terrain along the stretch of squares.

         
        We keep dragging roads until covering an area sufficiently large to host our town’s historic center.

         
        Now, we zoom in towards an edge of the flattened terrain. As you can notice, the slope between the leveled terrain and the floodplain may be too steep for comfort or even safety (landslide risks, perhaps?).

         
        We can now fix that by dragging short stubs of road, starting at the flattened area’s edge. These stubs should be one square shorter than the distance needed to directly touch the floodplain.

         
        We continue this operation until we have the particular edge covered.

         
        Then we begin doing the same along the diagonal edge. Notice how the stub is dragged from the protruding corner of the tile.

      • By funforfree99
        The most up to date version of ilive reader is necesary, check the mods page of http://simtropolis.com for this program.

        How to back up simcity_1.dat

        1. Find it in your program files and then maxis then simcity 4.
        2. copy the file to your desktop and leave it there.
        3. If anything goes wrong simply replace this file.

        Lesson 1. Creating ordinances that bring in 5000 per resident.

        1. Open your ilive reader and load simcity_1.dat
        2. Open the analyser click tree then search
        3. Find the plus sign beside ordinances and open it
        4. search for the ordinance named smoke detectors
        5. click it and in the data that appears on the left choose cost per resident double click this info line and edit the value that can be edited. ( a negative number means you are losing money for purpose of this lesson change it to 50000)
        6. While we are here lets also change the flamability rating. Find the line named % effect on flamabillity and change it. (1 = normal flamability 0= no flamability 100000=super flamability)
        7. close analyser and save
        8. Test out the patch

        Coming soon how to increase fire radius.
      • 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