Ploppable Asphalt+ Renewed

If you liked this item, please rate it up on Steam Workshop page.

Author: Madisonian

Last revision: 13 Mar at 05:21 UTC

File size: 25.09 KB

On Steam Workshop

Description:

Ploppable Asphalt+ Renewed

Updated version of Ploppable Asphalt + and Ploppable Asphalt + [Loading time Fix] so the loading time fix is included.

Also separately re-uploaded the 6 legacy asphalt assets from the original Ploppable Asphalt + mod for easier maintainability.

You no longer need to subscribe to the original mod and disable it in Content Manager, and then subscribe to a fix. You only need to subscribe to this mod and whichever of the asset packs you want from below.

Settings from previous mod automatically detected and imported into the new settings file.

Recommended mods:

Prop Control (for prop anarchy to place on roads)

Asset packs:

Ploppable Asphalt
Ploppable Pavement
Ploppable Grass
Ploppable Gravel
Ploppable Cliff
Ploppable Asphalt (Legacy) from original mod. The other Asphalt pack above is the more modern set, but these are made available for backwards compatibility.

Unsubscribe the originals:

Ploppable Asphalt +
Ploppable Asphalt + [Loading time Fix]


Changelog:

Fixed NullReferenceException in ApplyProperties() method

Root Cause: The mod was using `UnityEngine.Object.FindObjectOfType<NetProperties>()` to access the `NetProperties` singleton, which could return null if the `NetProperties` object hadn’t been instantiated yet in the scene.

Solution: Replaced scene-based lookup with the reliable Singleton pattern used by the game itself:
Changed from: `UnityEngine.Object.FindObjectOfType<NetProperties>().m_upwardDiffuse`
Changed to: `Singleton<NetManager>.instance.m_properties.m_upwardDiffuse`

Impact: The `NetManager` singleton is guaranteed to be initialized before mods run during gameplay, making this approach much more reliable.

Added comprehensive null checks
  • Added validation for `Singleton<NetManager>.instance` before accessing properties
  • Added validation for `netManager.m_properties` to ensure it exists
  • Added validation for `netManager.m_properties.m_upwardDiffuse` before setting texture
  • Added null checks for `prefab.m_material` and `prefab.m_lodMaterial` before texture assignment
Code Improvements
  • Added missing namespace import
  • Added `using ColossalFramework;` to enable access to the Singleton class
  • Added guards in `SetRenderProperties`, `SetRenderPropertiesAll`, `ApplyProperties`, and `ApplyColors` loops to skip props with `m_mesh == null` or missing generated info.
  • Fixed `DesaturationControl` handling with null checks.
Surface Rendering Fixes
  • Preserved original texture behavior: non-decal props (asphalt, cliff, grass, gravel) only set **`_APRMap`** from the original `_ACIMap` texture, matching the original mod exactly.
  • The `ploppableasphalt-decal` mesh continues to set `_MainTex` to `m_upwardDiffuse` as in the original.
  • Used `HasProperty()` guards and null checks on `_APRMap` assignment to avoid shader errors.
  • Ensured the size/prop modifications don’t crash when `m_generatedInfo` or `m_mesh` are null, which previously prevented surfaces from being processed at all.
Settings Migration

**On first load, the mod will automatically:

  1. Detect the old `PloppableAsphaltFix.xml` settings file (from the previous mod version)
  2. Import your custom asphalt color settings
  3. Write the settings to the new location (`Cities_Skylines/ModsSettings/PloppableAsphaltRenewed.xml`)

**Manual cleanup: After migration, you can safely delete the old `PloppableAsphaltFix.xml` file from your main `Cities_Skylines` folder if you wish. Your settings are now stored in the new location.

Source Code:

[github.com]

[www.paypal.com]

Download
Required items:

Click the title to search on this site.


Ability to ReadSteam Workshop