Jump to content

31 posts in this topic Last Reply

Highlighted Posts

  • Original Poster
  • A very nice tutorial, thanks for sharing. :thumb:

     

    (Maybe it would be worth being pinned in the SC4 Modding - Open Discussion forum).

     

    Thanks!

     

    I would be happy to see it pinned somewhere.  There isn't a guide like this on the site anymore, I felt this could be very useful.

    Share this post


    Link to post
    Share on other sites

    Very nice tutorial.

     

    If the Reader doesn't accept a value change, it sometimes helps to just remove the old value (the whole line) first and add a new one afterwards.

     

    Also, you hinted at it, but I would stress the point much more: Modding civics can evoke the phantom slider bug. In the words of Paeng:

     

     

    Just a friendly reminder:

    As with all civic buildings, their wrong use can result in the Phantom Slider Bug!

    This bug will be triggered by

    * uninstalling a civic building and/or
    * modding the capacity or monthly costs of a civic building
    without demolishing all instances of it first!

     

     

    So, if you make any funding or capacity change that is supposed to alter civics buildings you already use (like all Maxis originals), you will probably cause this bug to rear its ugly head. if you don't demolish every instance of that building in your game first. This is true for all buildings where you can adjust funding with sliders in the building query. Your experience that the building reset to max funding is the harmless variant. They may also get stuck at zero funding.

    Share this post


    Link to post
    Share on other sites

    Interesting tutorial.

     

    Thanks to this I realized there is a newer version of iLive Reader than the one available on STEX. The older one doesn't have the "Display as" option, and I don't understand all the hex number, that what deterred me from trying (I don't have much determination anyway :P). Now I have v1.4 and managed to change the jobs distribution in SPAM.

     

    +1 for you, sir.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Very nice tutorial.

     

    If the Reader doesn't accept a value change, it sometimes helps to just remove the old value (the whole line) first and add a new one afterwards.

     

    Also, you hinted at it, but I would stress the point much more: Modding civics can evoke the phantom slider bug.

     

    Thanks for helping me understand that bug.  I knew adjusting those values caused a bug, I didn't know (or remember) I could avoid it by bulldozing all hospital first.  I mentioned it more as an example of a problem someone could run into, rather then exploring its cause/solution.

     

    Interesting tutorial.

    Thanks to this I realized there is a newer version of iLive Reader than the one available on STEX. The older one doesn't have the "Display as" option, and I don't understand all the hex number, that what deterred me from trying (I don't have much determination anyway :P). Now I have v1.4 and managed to change the jobs distribution in SPAM.

    +1 for you, sir.

     

    I'm glad this helped you!

     

    My original link to the reader was for 'v0.9.3' because that is the only one on the STEX (as of this posting).  I also know about some issues found in 'v1.4' that have many people still using the old version.  So I had pointed readers of this guide towards the old version originally.  

     

    I am using 'v1.4' as you noted.  As such I have gone back into the guide and redirected the link to 'v1.4', noting which version I used.  The process is the same in both readers, just that you have to do manual hexadecimal conversion yourself in .0.9.3; the 'display as' option doesn't exist in the old version as you say.

     

    Thanks for the feedback!

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Just a friendly reminder:

    As with all civic buildings, their wrong use can result in the Phantom Slider Bug!

    This bug will be triggered by

    * uninstalling a civic building and/or

    * modding the capacity or monthly costs of a civic building

    without demolishing all instances of it first!

     

     

    So, if you make any funding or capacity change that is supposed to alter civics buildings you already use (like all Maxis originals), you will probably cause this bug to rear its ugly head. if you don't demolish every instance of that building in your game first. This is true for all buildings where you can adjust funding with sliders in the building query. Your experience that the building reset to max funding is the harmless variant. They may also get stuck at zero funding.

     

    When I first read this I thought maybe I had just been lucky for the example in my guide.  I thought maybe 6000 just wasn't a number that triggered the bug.  However, I don't think capacity change 'can' cause this bug,  not with the hospitals anyway. 

     

    Based on your info I just spent a while trying to make the bug appear by changing capacity.  With each test I tried different capacity numbers and allowed the game to simulate a year or so on cheetah.  The hospitals had already been there before each test, and most had custom sliders settings in place.  The sliders stayed in place in all cases, also the budget panel remained correct.

     

    I tried many different variables, choosing numbers to cover different bases:  sequential, odd, even, smaller then default, larger then default, and way over default :

     

    -adjusted 'catalog capacity' by itself to: 1234, 3456, 7219, 8000, 50000

     

    -adusted 'hospital patient capacity' by itself to:1234, 3456, 7219, 8000, 50000

     

    -adjusted both capacities simultaneously to: 1234, 3456, 7219, 8000, 50000

     

    In all cases the game didn't have a problem with the funding.  I was checking on about 8 hospitals in my city.

    Share this post


    Link to post
    Share on other sites

    Ok, so you think it's cost-based only? Did you make tests with that? Also, as with many bugs, you may be lucky and just not experience it, for whatever reason. I guess the recommendation that is generally given for civics plugins involving existing buildings is that, as long as they are not an ingame reward,  it's safer to make a new exemplar from the changed building.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Ok, so you think it's cost-based only? Did you make tests with that? Also, as with many bugs, you may be lucky and just not experience it, for whatever reason. I guess the recommendation that is generally given for civics plugins involving existing buildings is that, as long as they are not an ingame reward,  it's safer to make a new exemplar from the changed building.

    My post directly above yours addressed exactly those tests for capacity.  Previously on my own i had tried many variations of budget changes.. they all make the bug appear.  I tried way more tests with budget cost then capacity, and couldn't prevent it from occurring with budget. 

     

    I'm glad i know i can change the budget costs by bulldozing all of em first.  I guess i should have thought of trying that.

     

    Covering the existence of the 'phantom slider bug' and how to avoid it is good information for a beginners guide.  I'm glad you brought it up, thanks!

    Share this post


    Link to post
    Share on other sites

     

    my post directly above yours addressed exactly those tests for capacity.  previously on my own i had tried many variations of budget changes.. they all make the bug appear.  i tried way more tests with budget cost then capacity, and couldn't prevent it from occurring with budget. 

     

    oh, and i'm glad i know i can change the budget costs by bulldozing all of em first.  i guess i should have thought of trying that.

     

    Good tests. Makes everything clear :).

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • I right-clicked and added my changes to the patch, and according to the guide, a window was supposed to come up at that point, but it didn't, and I couldn't create a new .dat based on my changes.

    In step 10:  you right-click the hospital, then click 'add to patch', then you must click the 'patch manager' button that was previously greyed out.  When you click 'add to patch' the 'patch manager' doesn't open automatically because it assumes you might want to add more items to it.  You can close the navigator window after clicking 'add to patch' if you want; the item has already been added to 'patch manager'.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • This is said elsewhere, but relevant here:  With the Extra Cheats Plugin DLL, you can use it as a debug tool for mods you have created.  I call it advanced query.  You can check on a building's power and water consumption even when it isn't normally reported.  Or you can check on the number of jobs being supplied by a building: broken down by wealth type.  Among other things.  You do this by holding down ctrl+shift+alt while hovering on a building with the query tool selected (assuming the .dll is installed).

    BXYhIFg.jpg

    Share this post


    Link to post
    Share on other sites

    You do this by holding down ctrl+shift+alt while clicking on a building with the query tool selected (assuming the .dll is installed).

     

    Minor correction:  This works only if you have the query tool selected and hover over the building, but do not click on it.  If you click on the building and then try this, nothing happens.  Also, if you have this display on and then click on the building, the display goes away.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  •  

    You do this by holding down ctrl+shift+alt while clicking on a building with the query tool selected (assuming the .dll is installed).

     

    Minor correction:  This works only if you have the query tool selected and hover over the building, but do not click on it.  If you click on the building and then try this, nothing happens.  Also, if you have this display on and then click on the building, the display goes away.

     

    lol, you are right.  hover is what I meant to say.  people would have realized that on their way to click anyway.

    Share this post


    Link to post
    Share on other sites

    Fantastic guide, I'm going to try this! Thank you.

    Unfortunately ilives reader doesn't work for me, each time I click "navigation" it stops responding and closes the program.

    Scrap that, finally I have it working, does anybody know of a good converter for the binary code? I found this http://www.binaryconvert.com but not 100% sure if it's what I need.

    Sorry I write so much rubbish :)

    Anna

    Share this post


    Link to post
    Share on other sites

    Welcome to Simtropolis!

     

    For the Reader, I think you want a hexadecimal converter.  Assuming you're using a recent version of Windows, the Windows calculator is fine for this job.  Just go into Programmer Mode (View->Programmer or Alt-3).  Then you can type in numbers and convert between hex and decimal either with the radio buttons on the left or with the F5 and F6 keys.

     

    Sorry I write so much rubbish :)

     

    You have two short posts here, with no rubbish to be found anywhere!  You are simply using these forums for the purpose for which they are intended. :golly:

    Share this post


    Link to post
    Share on other sites

    I'm using Windows 8. Is there a limit to the values which are edited? Like a maximum or can it be any amount? I'll check out the calculator, thanks.

    I not sure I make sense as I rely on machine translation.

    Anna.

    Share this post


    Link to post
    Share on other sites

    Being a newbie, I found a newbie stumbling block to beware of:

     

    After navigating to a building and double-clicking on a property, the controls on the property dialog box (e.g. the "Set" button) may be frustratingly gray and stay that way. If so, then the building's "parent cohort" (immediately under the building's name in the navigator) may offer editable versions of the same properties.

     

    After editing one of those (a water pollution radius), I see the parent's new value reflected in the building's properties (I smell O-O inheritance). I am about to find out if editing such a parent is a "bad idea". If you never see me in the forums again, it's because my computer blew up  ;)

    Share this post


    Link to post
    Share on other sites

    It can't be THAT bad. :lol:

     

    As the name suggests and as you already guessed, a parent cohort is used to store some values that all its "children" (=objects assigned to this parent cohort) will share. So if you had value X of a particular building in mind, value X for this building is derived from a parent cohort, and you modify value X in the parent cohort, then there may be other buildings for whom value X has also changed because they hook into the same parent cohort. Unless you set totally extreme values, this shouldn't blow up anything.

    Share this post


    Link to post
    Share on other sites

    Well, I'm still here, but I don't think my change took hold. Either I got the wrong exemplar or else something hiding at the end of my plugins folder is overriding my work (or SPAM somehow misspelled a critical ID in its Jez Knight Acres mod... or CAM changed something in a way that defeats the later SPAM mod).

     

    One of the perils of modding is that one may do the right edit with the tool, but that edit might do nothing because another file hides its value(s). If I ever figure out why exactly one farm is polluting my water, then I'll have learned a thing or two about how this game works.

     

    Is there a tool that can analyze an entire plugin folder to tell what defs are going to be used (and what dat file each comes from)? Maybe I can datpack the whole folder and then edit that...

    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

    Sign in to follow this  

    • Similar Content

      • By boformer
        In this tutorial, we will create a simple mod that globally replaces vanilla road trees with custom trees made by MrMaison. Like in Tutorial 1, we will use a loading hook, prefab collections and the ModTools scene explorer. You will also learn how to add settings to your mod.
         
        Step 1: Exploring and modifying network and tree prefabs with the ModTools scene explorer
        Before writing the actual mod, we will apply the replacement with the ModTools scene explorer.
        Just like buildings, networks and trees are defined as prefabs (NetInfo and TreeInfo, see Tutorial 1 Step 3). There are various way to find these prefabs in the ModTools scene explorer. The easiest way that works for vanilla and workshop assets is the ToolsController. "Tools" in Cities: Skylines allow you to interact with the game world. The most obvious tool is the bulldozer, but there are also tools for the placement of objects, zoning, transport line creation and camera control. For this tutorial, we will access the TreeTool and the NetTool, which hold a reference to the tree/network prefab you are placing.
        Select a tree you in the Landscaping panel. I chose the Royal Palm made by MrMaison. While the placement mode is enabled, open the ModTools scene explorer (CTRL + E). On the left, select Tool Controller > TreeTool. You will see the properties of the TreeTool on the right. The currently selected tree prefab is stored in the m_prefab property. Press the "Copy" button to copy the reference of the tree prefab to the ModTools clipboard (it does not copy the actual data, just the memory address of the prefab).

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

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

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

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

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

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

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

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

        Note: To apply the changed settings, you have to reload your city.
        Happy Coding!
        Download Source
         
        Next part:
         
      • By robdragon
        Hey all
         
        I was wondering the region map that is built into SC4 as the default tutorial is that map available to download and play?
        I messed around with it but it's proprietary to the tutorial so it's not really playable only as a tutorial.
        Thanks!
        Robdragon 
      • By Cyclone Boom
        A Neat Little Tool to use with the "Raise the UI Mod"
        Here is a tutorial explaining how to automatically raise SimCity 4's user interface (UI) when switching to windowed mode. This may specifically be useful for those who wish to alternate between running SC4 windowed and in full screen.
         
        Please Note
        To achieve this, it requires copying and saving simple command line scripts (.cmd), and adjusting relevant paths.
        The problem being, when running the game windowed and with a custom resolution, you may notice the taskbar inconveniently overlays the UI like so:


        To workaround this limitation, in Windows it's possible to use the "Auto-hide the taskbar" option from Taskbar Properties. This does what it says, and makes the taskbar hidden from view when not hovered over. However, this requires toggling back the setting once exiting the game. So while that works it's not the most ideal solution since to run the game windowed, it may be desired to have quick access to the taskbar at all times.
        A means of fixing this is by raising up the UI slightly. Then the taskbar can still be seen in full view while not obscuring the lower-positioned menu options in the game. A useful mod which does exactly this is the appropriately named Raise the UI Mod.

        Which upon installation in Plugins, will solve the problem like so:

         
        However...
        What if you'd then wish to play the game full screen, or often swap between both modes? Perhaps doing so would be useful if needing convenient access to other programs while playing. But later would like to change over based on your monitor configuration, or to benefit from the reduced memory usage in full screen. At least from testing, I found there was around 18% less system RAM used in a fully loaded large tile.
        This can be done manually by moving the mod in and out of Plugins when needed. But in terms of automating the process, that's where my little command line scripts may come in handy. Should that sound of interest, keep on reading on...

        Note: This is really intended for those comfortable working with batch files, and so this may not be the ideal solution for everyone.
         
        Prerequisites
        SimCity 4 Deluxe / RH installed and patched at least to the EP1 update. Digital versions other than Origin should come fully pre-patched. Although Notepad or a plain text editor will do the job, I recommend using Notepad++ to benefit from syntax highlighting. A Windows operating system (this has been tested on Win 7). Download the Raise the UI Mod created by @warrior. A local folder created outside of Plugins.  
        Setting Up
        First of all, the initial step is to decide where you'd like to store the mod when not needed. This will be a holding folder and can be anywhere outside from your Plugins folder. Then when running the game windowed, it'll be moved into your Plugins so then the UI is raised accordingly.
        So either create a new folder, or copy the path of an existing folder where Raise the UI Mod.dat can be stored.

        A simple way of copying the path is by right clicking the location bar in Windows Explorer:

        Then click the "Copy address as text" option as highlighted.
         
        At the top of both scripts (which we'll get to in a moment), there are 4 adjustable options:
         
        File=<File Name> Description: This is the file name name of the mod, so needn't be changed unless renaming the actual file. E.g.
        File=Raise the UI Mod.dat
          PluginPath=<Path> Description: The location inside your Plugins folder to contain the mod. This can be in the root or inside a subfolder structure of your choice. Unless modified it should be the one in Documents. Leave out quotes since those are added in the main body of the code. E.g.
        PluginPath=C:\Users\<Account>\Documents\SimCity 4\Plugins
          HoldPath=<Path> Description: Here is the location of the holding folder where the mod will be stored. Use the "Copy address as text" method described earlier to make sure this is correctly specified. It can be set anywhere of your choice, providing the folder is fully accessible. E.g.
        HoldPath=C:\Users\<Account>\Documents\SimCity 4\Hold UI Mod
          TheGame="" "<Game Location>" <Shortcut Parameters> Description: It wouldn't be any use without starting the game itself, and that's what this option does. Here there are 2 variables which can be tailored specifically. The location of the game's executable file, and also the parameters (switches) used to set a custom resolution, toggle windowed or full screen, force SC4 to run on a single core, skip the intro, or any other such options.
          E.g. Disc based game:
        TheGame="" "C:\Program Files (x86)\Maxis\SimCity 4 Deluxe\Apps\SimCity 4.exe" -CustomResolution:enabled -r1600x900x32 -w
          E.g. Digital game from GOG:
        TheGame="" "C:\GOG Games\SimCity 4 Deluxe Edition\Apps\SimCity 4.exe" -CustomResolution:enabled -r1600x900x32 -w

          For a custom resolution, this must be specified to the desired screen width and height. The above examples represent my own monitor's size of 1600x900 pixels. The x32 at the end is the bit colour depth, which in normal circumstances can be safely left as is.
          Those using Steam or other launchers may need to experiment with workarounds to start the game directly for this to work.
          The empty quotes ("") at the beginning are required since they pass a null title in the command. However the rest of the command can simply be copied over from an existing desktop shortcut Target line, with the format being identical.  
        Note: Where applicable for it to be valid, the <Account> path must be changed to the name of your user account.
         
        Windowed Script
        Here is the script for running the game windowed.
        It does the following:
        First checks whether Raise the UI Mod.dat is located in your Plugins folder. If found, the game is started using any parameters specified.
          If not present, it moves Raise the UI Mod.dat from the holding folder to your Plugins, before starting the game. Should the file not be found in the holding folder, a message pops up in a command window making that known.  
        For Example   (Modify custom paths as needed)
        @Echo Off Set File=Raise the UI Mod.dat Set PluginPath=C:\Users\<Account>\Documents\SimCity 4\Plugins Set HoldPath=C:\Users\<Account>\Documents\SimCity 4\Hold UI Mod Set TheGame="" "C:\Program Files (x86)\Maxis\SimCity 4 Deluxe\Apps\SimCity 4.exe" -CustomResolution:enabled -r1600x900x32 -w If Not Exist "%PluginPath%\%File%" ( If Not Exist "%HoldPath%\%File%" ( Start "" cmd /C "Echo %File% not found in: &Echo( %HoldPath% &Echo( &Pause" Goto :End ) Else Move "%HoldPath%\%File%" "%PluginPath%" ) Else ( Goto :StartSC4 ) :StartSC4 Start %TheGame% :End Exit
        Important: For the game's parameters, it's essential the -w switch is used, or else the game won't be told to run windowed.
         
        Full Screen Script
        Here is the script for running the game in full screen.
        It does the following:
        Checks whether Raise the UI Mod.dat is located in your Plugins folder. If found, it moves the file back to your holding folder, then starts the game. If not found, it just starts the game, also using any parameters specified.  
        For Example   (Modify custom paths as needed)
        @Echo Off Set File=Raise the UI Mod.dat Set PluginPath=C:\Users\<Account>\Documents\SimCity 4\Plugins Set HoldPath=C:\Users\<Account>\Documents\SimCity 4\Hold UI Mod Set TheGame="" "C:\Program Files (x86)\Maxis\SimCity 4 Deluxe\Apps\SimCity 4.exe" -CustomResolution:enabled -r1600x900x32 -f If Exist "%PluginPath%\%File%" ( Move "%PluginPath%\%File%" "%HoldPath%\%File%" ) Else ( Goto :StartSC4 ) :StartSC4 Start %TheGame%
        Important: For the game's parameters, it's essential the -f switch is used here, or else the game won't be told to run in full screen.
         
        Saving the Scripts
        Both work by saving them as command line scripts with the .cmd file extension. This can be done using any plain text editor, including Windows Notepad.
        Personally as hinted above, I would recommend Notepad++ for the benefit of the code syntax highlighting. It also handily comes with many other features for manipulating text, featuring a powerful find & replace tool with regex ability (advanced search mode). But in terms of what's required here as a simple copy, paste and save to file, these are just little extras which you may find useful for other projects in future.

        The end goal is to have both scripts saved, ideally for convenience to the same folder.
        For instance:

         
        The actual task of saving is very simple. I'll describe the steps for both Notepad++ and Windows Notepad using the windowed mode code. However as this part may well be self-explanatory, feel free to skip the following instructions and continue onto setting up the desktop shortcuts.
         
        Using Notepad++
        OR
        Using Windows Notepad
         
        Creating Desktop Shortcuts
        To run either of the scripts, it's possible by navigating to their folder and double clicking on them. This will do the job just fine. However for accessibility and since it's probably what you're already familiar with, I recommend linking each via a shortcut placed on your desktop (or wherever is convenient).
        Then there will be two shortcuts – One referencing the windowed script, the other for full screen.
         
        Step 1 of 3
        First make a copy of your existing SC4 shortcut.
        Or if you don't have one already, go to your game's installation path and open the Apps subfolder. Then right click the executable file ( SimCity 4.exe ), and in the context menu choose: Send to > Desktop (create shortcut). Then make a duplicate copy so you've got two exactly the same.

        Rename accordingly to whatever you'd like them called.
        For example:


        For the next steps I'll explain the process with the windowed shortcut. Repeat the same for your full screen one...
         
        Step 2 of 3
        The next task involves editing the Target path in the shortcut.
        Right click and open the Properties. Then remove the current path pointing to the game's executable. This is no longer needed because the script does this part, along with passing the parameters to set a custom resolution and toggle between windowed or full screen modes.
        Then paste in the path to the script like so:



        Note: This can be easily obtained by navigating to the script, holding the Shift key, then right clicking and choosing the Copy as path option.
        If you copied in a path which didn't contain spaces, the quotation marks will automatically be removed from the Target line upon saving and opening the shortcut Properties. Those are only needed to preserve a path should there be any spaces included.
         
        Step 3 of 3
        Click Apply, then OK and close the shortcut.
        Repeat for the full screen shortcut or vice versa.

        At this point it's good to go, but there is an additional adjustment possible should you wish...
         
        Addendum
        A big thanks to @CorinaMarie for inspiration behind this idea, helping me with technical aspects, and also sharing many valuable suggestions along the way.

        There could be other uses with this or similar techniques.
        For example, to potentially expand and tailor scripts specifically to:
        Move another mod file in and out, such as the Diagonal Bridge Enabler. Control sets of custom content by moving multiple files in and out of your Plugins folder as needed. Have a multiple choice option in the command line for using certain shortcut parameters. Log the time when starting SC4 to keep track of how long you're in the mayor's office. Create incremental backups of your Regions before starting the game.
        So that brings this tutorial to a conclusion. Once you've saved both scripts and created the shortcuts, the game can then be fully enjoyed in either full screen or windowed mode with a simple double click. Hopefully this may come in useful and even inspire other possibilities. Be creative!
        Any feedback, comments or questions welcome.
      • By velos66
        Where can i find a most basic how to tutorial in using NAM RHW? Whats the proper set up for connecting neighbors using NAM for example 8C? 
        Currently overwhelmed. 
      • By Gn_leugim
        Hello everyone
        Are you new to BATing? great, this is for you! are you not? also great, it's for you too, you may learn and give to learn on the process!
        So, first of all, this tutotial or shall I say, set of topics, are not design to teach you how to model, how to apply texture on models, set UWV maps or any kind of modeling done in Gmax/MAX!
        For that matter, you can find excellent tutorials
        or you can find more information on the BAT essentials too.
        Other useful tips on modelling and applying texture on models can be found
        So, what is exactly the point of this topics? To introduce you to Photoshop/GIMP techniques to create good textures for your models. Why create? why not use textures found on texture databases such CGtextures? Because only in very rare circumstances already made textures fits good the game grand scheme! most of them are taken from real places, and they fit those places nicely, but they are not your BAT. also, the game has it own criteria regarding saturation, hue and luminosity, on which most textures need to be worked upon. And on my usual work, I rarely use them, and only as patterns overlay and other stuff, not as base textures!
        But, lets say that you have a particular texture you want to use and it does not look ok, maybe you may want to take a look at these steps in how to fix textures.
        Nevertheless , that is why it is commonly said that good textures are not found, are made! And also remember! This are just simple stepped basic demonstrations, Further experimentation and personalization are not recommended, are mandatory!
        So, what you need?
        º Photoshop/GIMP to start with. this will be the main tool on usage.
        º Some tools like brushes and patterns found here. you can however find more and use more!
        º Some texture/image databases such as http://www.cgtextures.com/, http://www.imageafter.com/ and http://grungetextures.com/
        Contents:
        1-Wall Basics
        1.1- Noise Effect
        1.2- Gradient
        1.3- Texture
        1.4- Overall Variance
        1.5- Weathering
        1.6 -Colour correction
        2-Tile Roof Basics
        3-Asphalt/Concrete Roofing
        4-Using a Texture as base texture
        5-Wealth Basic Specs
        6-Grungy and Decaying Paradise
        7-High Wealth Details
        1- Wall Basics
        Some of the most important items on your bat are walls! they, together with roofs compose much part of your bat, and the larger and most visible items on a BAT. Therefore, more than other items, textures play a huge role in how a BAT looks, good or bad. In my opinion Walls and roofs are where you are more likely to spend more time making and tuning textures right.
        So, let's say we want to make a plaster wall texture. First step, is to get a base colour/tone for the texture. We should find one that meets the overall game's colour pallet (will upload mine as soon as I can).
        So, make a new file and size it so, for each meter on bat, it has 20 pixels (i.e. if the wall is 10m long, the file shall be 200 pixels wide). This is the ratio mts/pxl I use, and it works fine, but you can use others, try it out. it is important, though, you use a consistent ratio there after.
        Fill it with the colour you have choose.

        if you apply this texture and look in game, it does not look good does it?

        no, it looks rather bare, cartoonish and stands out to much!
        1.1- Noise Effect
        Lets get rid of the bare look. we gonna make that colour looking better by adding some variation on the colour. one simple way to archive this is to go to Filter, Noise, Add Noise. Set it to monochromatic, Gaussian and 10%. Then, go again to Filter, Noise, Dust & Scratches, set both paramethers to 10 and OK.

        Save it, and apply it to gmax and see on game.

        subtle, but is improves the texture largely.
        1.2- Gradient
        One of the most dramatic effect you must include in any texture is a gradient! It came back to the time of simple sprites for early games and it a major improvement on any texture!
        So, the easiest way to archive this is to create a new layer (Ctr+$%&^!+N), Select the gradient tool, select the white to black gradient, apply it on the layer. Change the layer setting to Multiply and change the opacity to about 20%

        And in game looks something like this:

        again, a large improvement!
        1.3- Texture
        Now, the texture is still detailess, and we want a plaster looking texture. For that matter we are going to use some filters and layers.
        First, create a new layer, Go to Edit, Fill, select grey 50%. Select the Layer and make it Clipping Mask (alt+crtl+G)

        Then, go to Filter, Texture, Texturize. Select Sandstone and fill in the following parameters. Set the layer to Overlay.

        In game shall look like so.

        Why make this on a separated layer? and not apply it already on the base layer? well, because this way you have more liberty to change the texture/base colour, without having to remake all over again
        1.4- Overall Variance
        The noise effect is good for having some variation on the colour tone, but you may also want some variation on the luminosity, and on all building sometimes. To do so, do as follow:
        start by resetting the colours to white and black. Create a new layer set it to Overlay, 25% opacity, go to Filter, Render, Clouds. repeat this (or just press ctrl+F) as many times you wish to archive the result you want.

        1.5- Weathering
        The whole mighty weather takes its toll on any exposed surface. And so it shall not be forgotten when making a texture for a BAT.
        there are two major events on weathering we should consider:
        1- when it rains, ground particles are pick up by falling rain drops and as these splash and scatter, they scatter the particles with them. If the water hits a wall, most likely the ground particles will be attached to the wall. Also, as the bottom part of walls are more likely to be moisten, moss and other stuff may grow on that area. like the following example:

        2- water leaking from the top of surfaces. a bit like the above, but this time due to water poring down the walls, from the top. like the following picture shows:

        In the end usually both take part of any wall. in any wealth set, there should be some weathering visible. more on low wealth, less in the high wealth though. In both pictures you can see that time, and careless have taken it's toll and have changed the appearance of the walls. remember this!
        So, how to mimic these?
        Create a new layer. with white color on, load the brushes SS_Driping, that you can find in the site mentioned on the top. now, choose a brush, and apply on the top, once or twice, try not to be repetitive. change brushes a lot, size of them too. then load the SS_Scratchout and apply on the same way, on the bottom.

        you shall end with something like you find bellow. Select the smudge tool and smooth and personalize out the top drippings

        Now lets give it some colour and texture. Double click on the layer, to open the layer style window. select overlay pattern, with a grunge overlay (you can find many on the net and on the sites said above) and set texture too, as seen on the pic bellow.

        in game preview:

        doesn't it look better?
        1.6 -Colour correction
        Here is where more people fail, IMHO, they just forget to correct their colour settings to match up with the game. It is very common to find oversaturate textures, bright colors, standing out textures, that gives the look of cartoonist BATs.
        Luckily, there are several tools to help us out. From them, we will use: Curves layer, Brightness/Contrast Layer and Hue/Saturation/Luminosity Layer.
        First of all, you need to calibrate your Photoshop for gmax, i.e, create a .acv file for your textures. More details can be found on the link, READ IT, DO IT
        Now, you can apply those curves at the end of the line, when the texture is done, but I find it easier to add it as a Layer on the texture .psd file. For this, and before you create the layer, you have to load the .acv so open the curves map window (crtl+M) and load the file you created. then press cancel. now the file is on the memory and can be loaded at the layer. Click on the circle under the layers, and from the list select Curves...

        Now double click on it, and you will find a drop menu on the top, open it and select your file from the drop list.
        REMEMBER, this layer shall be on top of everything, most of the times.
        To create the other two layer, go back (select layer) and in the adjustment layers (the circle) select the other 2 I talked about.
        With this two, you can tune (usually) down or up the saturation levels, brightness etc etc, without having to change a thing on the bitmaps.
        At this point, you should test and test. not just go with the first result you get! This is probably the step I spend more time on, when texturing.
        open both, PS/GIMP and Gmax/MAX, and keep tuning the texture, saving it, testing it on the gmax and in some screenshots you have from the game. over and over until you are pleased with the result.

        Here is a picture how the final texture looks like. Notice the 4 top layer, the three adjustment layers I spoke about and a colour one. Some say, the game is pinkish/pearish in colour. truth is, some textures do look better when I: Create a new layer, select a pinksh colour, fill the layer and set it's opacity to 10%. This is not imperative, but it may help, and is easy to test.
        and, to see the end result, facing the first texture I started with, let me scale up the boxes and put them side to side.

        2-Tile Roof Basics
        In this part of the tutorial we will look opon the tiled ceramic and slated roofs, usualy tilted. for that we will use a simple model, like this one.
        (base)
        What most people do is to get a tiling texture and apply it to the roof, ending up like something like this
        (textb)
        although it does not look very bad, it is bland, it stands out and could use some colour and luminosity life.
        2.1- From the scratch
        so, lets start by viewing the model from the top, with all the details it has, and take a screenshot of it. open your image software, create a new file, and paste the shot in it. go to Filters>Stylize>Find Edges (this is for Photoshop, other softwares may have different menu configurations).
        Then crop the image to fit just the roof and relevant details of the roof and resize it according to your ratio (As stated, I use 20px per meter). Also, select the white and erase it, leaving just the outlines of the model.
        (ps1)
        Select from a game's color pallet a roof color of your like. apply it to the background layer. Then apply the same method described in 1.1
        (ps2)
        lets see in game
        (game1)
        Not big thing yet, off course,  but again, this adds some variety to the texture and make it a bit less monotonous. and gives us a starting point.
        On the next step, we are making more for that purpose. First, if you look at some maxis buildings, and even to some real life textures, you see that not all tiles look the same.  In fact, most of the times, Maxis didn't define well the outlines of the individual tiles, leaving to the differences in hue and albedo to make the job. That's what we are making here today.
         
        (Still on the making!)
    • 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