Jump to content

20 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 

UPDATE: This thread is no longer being maintained.

Information within may be incomplete or obsolete, and is kept here for legacy purposes.

 

Spoiler

List of Modding Properties Info

This is a work in progress list of editable properties within ploppable assets. This info intends to show what each one does and how it can be used.

It intends to be a record so fellow modders can keep expanding as more variables are understood.

For now we only know of properties within the ToolController's editPrefabInfo section / module.

As we're not necessarily programmers, this is a project based on tests & experiments.
 

Please consider contributing your own discoveries to this list! *:read:

This will help this resource grow in detail and usefulness. *;)

(Original template format created by TPB).

_______________________________________________________________________________________________________

FAQ

What is ToolController and m_editPrefabInfo?

It's clear this is where most of these variables that we can manipulate are located, related to items you can plop in the game.

 

How do I examine m_editPrefabInfo?

The best way I know of is through a Mod called Mod Tools by nlight. Get it here.

Once you have the mod, enable it in "Content Manager", then open an asset that you wish to examine in the "Asset Editor".

Click anywhere in the editor scene, then press CTRL+E to open the Mod Tools Explorer.

On your left is a huge list of exemplars. Find "ToolController. Click on it.

Then just down the list is another instance of ToolController, Click on it.


Welcome to the Tool Controller! *:8)

As you can see there are a bunch of lines of code and variables that we can apparently edit, but for now we've only learned what the stuff inside the PrefabInfo m_editPrefabInfo section does.

So find the line that reads PrefabInfo m_editPrefabInfo and collapse it. This is where we will be fiddling with stuff.

 

Why should I examine ToolController and m_EditPrefabInfo?

If you want to modify your assets in certain ways, to make them more appealing or for any other practical reason, you'll want to learn your way around this interface.

_______________________________________________________________________________________________________

 

Note: Different types of assets have different properties. For instance, only props and tress have the m_createRuining property, which causes the dirt-patch to appear when plopped.


For the sake of clarity, we won't include include properties who's effects are too obvious, or uninteresting.

We'll also include properties that look interesting, even if it's not fully clear how to use them.

 

Key:

Green = Information complete / more or less complete. New details however are still welcomed.

Orange = Partial or lack of information clarity.

Red = Unknown / very little information.

 

Again, if you have any knowledge on these properties, your input will be greatly appreciated! *;)

 

_______________________________________________________________________________________________________

 

List of Editable Properties and what they do...

 

  • m_createRuining

    When enabled, causes props and trees to spawn a dirt patch at the base.

    That dirt patch can sometimes be an eyesore, so thank you CO for exposing this.

    Default is on.

     

  • m_autoRemove

    When enabled, asset will be automatically bulldozed when you try to place something over it.

    Like when you plop a school over some residential buildings. A small bulldoze icon appears over them, and they get highlighted. But you can still plop it.

    Useful.

    Default is off.

     

  • m_circular

    Tick this box to make your asset circular. Unsure exactly how size is translated. This effect is not seen in the Asset Editor. You can see it only in-game. Assets will still load as quads in the editor.

    Useful.

    Default is off.

     

  • m_clipTerrain

    We suspect this affects the way the base of the model interacts with the terrain. There is a post about it in the Paradox forums, although without that many answers (more info needed).

     

  • m_flattenTerrain

    Same as above, but a bit more obvious. Still have not tested extensively so more information is needed.

     

  • m_fullGravel, m_fullPavement

    It does what it says in the box. Tick either of these to have the entire ground surface of the asset rendered as gravel or pavement.

     

  • m_placementMode

    Roadside   (00 in Hex editor) - Asset must be plopped alongside a road(how annoying). Most assets have this as default, but not all obviously.

    ShoreLine  (01) - Asset must be plopped along the shore, like water and sewage pumps.

    OnWater    (02) - Asset must be plopped inside water, like the advanced wind turbine.

    OnGround  (03) - Asset can be plopped anywhere on the ground(excluding steep slopes) With this mode, any road, highway and rail stubs (maybe ped too, haven't tested) that you place inside your asset in a way that they overhang, will snap to the ends of existing roads, rail or highway. Like TBP's Modular Avenue pieces do. The exception is they won't snap to ends that are themselves part of another non-intersection asset.

    OnSurface (04) - Asset can be placed on any surface as long as it doesn't collide with other assets and the terrain is not too steep. This is the default for intersection assets. Allows you to plop on ground AND/OR on water. Needs more testing.

     

  • m_useColorVariations

    This allows for colour variations on the main asset model. It's automatically on for stuff that has a large model like the train station template, and other stuff (haven't been tested extensively)

    But it's off for parks. So in theory we can turn this on and have the model change colours on parks too.

    UPDATE: It seems this feature is currently not working for most asset templates.

    Confirmed to work: LC Lvl1, HC Lvl1

     

  • m_expandFrontYard

    This doesn't seem to have an effect, unless the asset is circular. TPB used this on a circular Modular Avenue piece to allow the zoning to reach a road curve that's not near the edge of the asset. It doesn't go all the way, but it did add a few zonable spaces.

    Needs more testing, effect might be dynamic, ie. perhaps the zones expand once stuff grows on them.

     

  • m_placementStyle

    Options are Manual, Automatic, Procedural.

    Most assets (or all?) have this set to Manual.

    Have not tested.

     

  • m_material

    This property is only available with assets that have imported models. It's included because it seems you can change the base colour of the model here. It's grey as default. It seems if you change the shade of grey here you can control the lighting on your model.

    More info needed.

     

  • m_MaxBrightness, m_MinBrightness

    Unsure what the effects are or how exactly to manipulate it.

    Need more info.

     

  • m_MaxScale, m_MinScale

    These are properties exclusive to Tree assets.

    They control the range of sizes that trees appear at when placed.

    Set both values to the same number to have no variation in size.

    Testing this confirms it works.

    NneRQSH.png

    4kYa3lk.png

     

  • m_UICategory, m_UIEditorCategory

    The properties seem obvious but we've not succeeded in changing an item's menu location yet. Need more info, what do these do? How to manipulate properly? Seems its not fully exposed at the moment.

    More info needed.

     

  • m_UIPriority

    This is a very nice property that allows you to group your assets together in their menu. 

    Most stuff has this set to 0 by default. Hence the mess in the menus.

    Can be a negative number.

    More information on how to handle a very large amount of menu items is needed. Perhaps an index to toggle the UI's layer priority. Or even better, let users organize the order themselves?

     

  • m_variations

    This is an extremely interesting property of trees, and possibly props too.

    Not clear how it works, but there are fields for prefab IDs or something similar. 

    It may be possible to have actual model variations of your tree, so that when you plop them they not only change size but also shape and structure. NICE!

    Need more info please CO!

     

  • m_noBase

    This one may have great potential.

    What it might do is remove the "foundation" part of models, so that there will not be a ugly grey block showing if the ground is uneven under, say, rock models.

 

CITIES : SKYLINES ASSEMBLIES REFERENCE

What is an assembly? In C#, the language Cities : Skylines is written in,

" An assembly is a file that is automatically generated by the compiler upon successful compilation of every .NET application. It can be either a Dynamic Link Library or an executable file. " - From CodeGuru.com

In this case, I'm talking about Dynamic Link Libraries, also known as DLL files. More specifically, I'm talking about the libraries of code the game uses.

They can be found inside the game installation directory, usually in "C:\Program Files (x86)\Steam\steamapps\common\Cities_Skylines\Cities_Data\Managed".

If you look in this folder, you'll find 18 files, only three (for now) of which we will be dealing with in this thread. They are:

  • Assembly-CSharp.dll
  • ColossalManaged.dll
  • ICities.dll


NOTICE:

Publishing decompiled code is illegal and would get me in serious trouble, so I will be limited in what I can show you on here. In order to better understand this topic, you will need to examine these assemblies yourself. There is plenty of information on how to do this online. One good way is to get ILSpy.

This topic will just be about what the classes, fields and methods are and do, and an attempt to bring light into the way the game works internally.

I won't actually be showing you any of the actually code.

Also, at some point this topic will get too large, so I will probably just move the entire thing to the official documentation site, if possible, and link to it from here.

 


  Edited by Cyclone Boom  

Thread marked as obsolete on author's request.
  • Like 1

A team account for documenting CSL modding / game info
Interested in joining us? Please see here for more details!

Share this post


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

  • m_clipTerrain

    We suspect this affects the way the base of the model interacts with the terrain. There is a post about it in the Paradox forums, although without that many answers (more info needed).

     
  • m_flattenTerrain

    Same as above, but a bit more obvious. Still have not tested extensively so more information is needed.

[/indent]

 

Been playing with Airport runways today (released a 0.1 version in the workshop) and these 2 flags basically do as expected, without them on, my 16x6 Runway was sinking into hillsides or tearing the texture and creating odd overlay issues, switching both these to on, made the new model act in the same way as the ingame Runway and terraformed the land so that the item remains level:-

lkdPdzX.jpg

The only difference I got with the m_clipTerrain was that the dirt round the edge of the model wasnt visible when set to "off"
  • Like 1

Share this post


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

I been wondering about this behavior with the terrain when we create a road of any type. I made a railroad trench so my rails would be sunken. But every time I lay rail, the terrain would raise up under it. So I'm wondering if there's a way that the terrain would not change when laying roads or if we can control the intensity? My biggest issue is learning how to overcome floating highway segments over hills.

Share this post


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

Does anyone know if there is a reduce noise pollution flag? I want to add concrete barriers along my highway, as they do in RL to reduce noise.

Share this post


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

Where can I find the original thread? Please restore it because there were already a lot of discussions going on that thread...

 

It shouldn't have been removed. Unless all the discussions are transferred to this thread, it should still be there for us to know what has been talked about in the past.

Share this post


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

This is an incomplete understanding of the meanings of m_placementStyle.
 
m_placementStyle of a BuildingInfo instance is Automatic for growable buildings, Manual for ploppable buildings. Growable buildings cannot have a Manual placement style. Ploppable buildings cannot have an Automatic placement style. 
 
Below is an excerpt from the method BuildingInfo.InitializePrefab() in the assembly library:

if (this.m_class.m_service <= ItemClass.Service.Office) {
  if (this.m_placementStyle == ItemClass.Placement.Manual) {
    throw new PrefabException(this, "Private building cannot have manual placement style");
  }
  if (this.m_paths != null && this.m_paths.Length != 0) {
    throw new PrefabException(this, "Private building cannot include roads or other net types");
  }
}
else if (this.m_placementStyle == ItemClass.Placement.Automatic) {
  throw new PrefabException(this, "Player building cannot have automatic placement style");
}
  •  

A second excerpt from the method PlayerBuildingAI.InitializePrefab() should explain why ploppable buildings has to have a Manual placement style.

if ( [Some conditions] || this.m_info.m_placementStyle == ItemClass.Placement.Manual) {
  this.m_createPassMilestone.m_prefab = this.m_info;
}
  •  



 
The scope of this thread is limited to m_editPrefabInfo, which is a BuildingInfo instance, but m_placementStyle is also applicable in many other classes, such as a NetInfo:
  • m_placementStyle of a PropInfo instance is always Automatic. Props are always automatically placed whenever an object referencing the props is placed.
     
  • m_placementStyle of a NetInfo instance is Manual for the network components you can directly choose from the menu, including Basic Road and all other roads, Water Pipe, Power Line, and Dam. It is Procedural for all others. Note that Basic Road Elevated, Basic Road Bridge and so on have a Procedural placement style because you do not activate them directly from the menu.

    When you import a transport type asset, such as a passenger train station, the Procedural marked paths in the template, in the case of a passenger train station, the Pedestrian Connection Inside paths, will be imported as well; the Manual marked paths in the template will be neglected.

    This corresponds to the following code excerpt from the method AssetImporterAssetImport.ClearDecorations().
    for (int i = 0; i < instance.m_paths.Length; i++) {
      if ( [A long list of conditions] || instance.m_paths[i].m_netInfo.m_placementStyle != ItemClass.Placement.Manual)) {
        list.Add(instance.m_paths[i]);
      }
    }
    
    •  
  • m_placementStyle of a TransportInfo instance is Manual for Bus, Train, and Metro because you have to manually create and edit the transport lines (not tracks, which are NetInfo insances). Airplane and Ship have a Procedural placement style because you cannot edit the transport line for them.
     
  • m_placementStyle of a CitizenInfo or a VehicleInfo instance is always Automatic because they are generated, controlled, and destroyed by the simulation engine alone.
  • Like 1

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
Currently: Viewing Forums Index
 

Thanks everyone for the input so far, we'll get to work on adding it shortly. ;)

 

Where can I find the original thread? Please restore it because there were already a lot of discussions going on that thread...
 
It shouldn't have been removed. Unless all the discussions are transferred to this thread, it should still be there for us to know what has been talked about in the past.

 
No problem, they've now been restored:
 


 
Unfortunately it's not possible to move the replies to here, as they would be in the wrong order (i.e. before the initial post in this thread).


Quick Links

“SimCity 4 is not just a game, but a tool driven by our own imagination and creativity.”

Buy me a coffee

Share this post


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

Where is m_createRuining? I cannot seem to find it in there.

Share this post


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

Where is m_createRuining? I cannot seem to find it in there.

 

It's under PrefabInfo m_editPrefabInfo

 

it will have a check circle next to it and usually is not far down after opening up the PrefabInfo m_editPrefabInfo dropdown.

Share this post


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

m_zoningMode should be added to the list. It allows you to choose between straight, cornerLeft and cornerRight (Setting for corner houses). After you change the property, the arrows which mark the front side of your asset will update.

is there a way to change the wealth level of an asset?

Share this post


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

You may want to include this Guide in the main post:

How to change the probability of props:

You need the mod "Mod Tools": http://steamcommunity.com/sharedfiles/filedetails/?id=450877484&searchtext=mod+tools
Subscribe to the mod and start the game.
Open a house in the asset editor.
Press CTRL + E to open the "Scene Explorer"
Find the "Tool Controller" group on the left, expand it.
Open the "ToolController" node.
Expand the propertry "PrefabInfo m_editPrefabInfo" (right side): https://i.imgur.com/5190RTE.jpg
Find the subpoperty "BuildingInfo+Prop[] m_props".
You see a numbered list of props (including trees).
Open the entries and change the m_propability propertry (0-100): https://i.imgur.com/vHR10Ma.jpg
That's it.

 

Btw, the link to Mod Tools in the main post needs to be updated.

Share this post


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

Just wanted to inform circular plots turn the maximum length or width into its radius, so a 3x1 plot becomes a 3x3 circle. However, the actual hitbox will retain its 3x1 size (so if the size isn't square the circular brush can overlap other cells).

Share this post


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

Does anyone know If you can change the amount of jobs? or is that automatically done in the game?

Share this post


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

Does anyone know If you can change the amount of jobs? or is that automatically done in the game?

You can change jobs for buildings within the asseteditor. Or if it aint what you meant - specific your question, please.

Share this post


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

Does anyone know the name and location of the properties which define the pollution generated by a growable building?

I see this thread has been inactive for a while, but if anyone can help me I'd be grateful.

I'm building a set of 19th C UK style Assets.

I have all the mod tools listed above.

I really want to be able to make some low-tech old industry which will not create a lot of ground pollution, so it can integrate a bit more with the residential. At least for the working-class districts.

Share this post


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

Correct me if I'm wrong but I don't think it's possible to set the amount of polution for individual growables.

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
2 hours ago, GC_Vos said:

Correct me if I'm wrong but I don't think it's possible to set the amount of polution for individual growables.

I'm quite sure that you are wrong.

Share this post


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

Hey @Boformer, if you know exactly how, could you run me through it?

On 23/02/2016 at 11:22 PM, boformer said:

I'm quite sure that you are wrong.

 

Well if you know how, do you fancy enlightening me?

(sorry for multiple posts... new to these forums and just learning how to use them.)

Share this post


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

Well, since there's new life being breathed in this thread, I have two questions as well:

1. Is it possible to toggle night lights without messing with Time of Day, which impacts the simulation (in other words, toggle lights for purely aesthetic reasons)?
2. The DeveloperUI enables you to toggle ForceRainMotionBlur, which (imo.) results in much prettier rain streaks. I've been trying to access it in a mod I'm fiddling with, but so far I haven't been able to get it right. Does anyone know whether toggling this property is possible at all? It can't be changed in the same way you would change other properties through the WeatherManager, like rain or fog intensity: ForceRainMotionBlur is a property of RainParticleProperties.

Share this post


Link to post
Share on other sites

Sign In or register to comment...

To comment in reply, you must be a community member

Sign In  

Already have an account? Sign in here.

Sign In Now

Create an Account  

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

Register a New Account


×

Thank You for the Continued Support!

Simtropolis depends on donations to fund site maintenance costs.
Without your support, we just would not be in our 24th year online!  You really help make this a great community. *:thumb:

But we still need your support to stay online. If you're able to, please consider a donation to help us stay up and running. This helps sustain a platform where we can share our community creations for years to come.

Make a Donation, Get a Gift!

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

STEX Collections

By way of a "Thank You" gift, we'd like to send you our STEX Collector's DVD. It's some of the best buildings, lots, maps and mods collected for you over the years. Check out the STEX Collections for more info.

Each donation helps keep Simtropolis online, open and free!

Thank you for reading and enjoy the site!

More About STEX Collections