This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// You MUST use a unique diffuse texture (put whatever texture in it) to avoid unforeseen consequences! | |
// Import a decal or a big decal as usual and run this script using the texture tag you want: | |
//themedecal-grass | |
//themedecal-cliff | |
//themedecal-sand | |
//themedecal-gravel | |
//themedecal-ruined | |
//themedecal-oil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//asphalt props | |
var asset = ToolsModifierControl.toolController.m_editPrefabInfo as PropInfo; | |
asset.m_mesh.name="ploppableasphalt-prop"; | |
//asphalt decal | |
var asset = ToolsModifierControl.toolController.m_editPrefabInfo as PropInfo; | |
asset.m_mesh.name="ploppableasphalt-decal"; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using ColossalFramework.Plugins; | |
using ColossalFramework.UI; | |
using ICities; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Reflection; | |
using System.Xml.Serialization; | |
using UnityEngine; | |
namespace ThemeDecals |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var vehicle = PrefabCollection<VehicleInfo>.FindLoaded("Sedan"); //get the vehicle | |
var prop = PrefabCollection<PropInfo>.FindLoaded("Cargo container"); //get the prop | |
prop.m_mesh=vehicle.m_mesh; //apply vehicle mesh to the prop | |
prop.m_material.SetTexture("_MainTex", vehicle.m_material.GetTexture("_MainTex")); //apply vehicle diffuse to prop | |
prop.m_material.SetTexture("_XYSMap", vehicle.m_material.GetTexture("_XYSMap")); //apply vehicle XYS to prop | |
Texture2D aci; aci = new Texture2D(1, 1); //make new empty texture | |
aci = vehicle.m_material.GetTexture("_ACIMap"); //WRONG!!! ACI should be made unique/instantiated!? idk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Texture Replacer script by Ronyx69 | |
// INGAME not ASSET EDITOR | |
// Replaces textures ingame in real time! | |
// Much thanks to SamsamTS for explaining Actions to me and being helpful. | |
// D, ACI, XYS textures for buildings, props, vehicles and D, XYCA for trees. | |
// Unfortunately CANNOT replace LOD textures. | |
// Technically I know how to replace LOD textures, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Texture Replacer script by Ronyx69 | |
// ASSET EDITOR, not ingame | |
// Replaces textures in asset editor in real time! | |
// Much thanks to SamsamTS for explaining Actions to me and being helpful. | |
// D, ACI, XYS textures for buildings, props, vehicles and D, XYCA for trees. | |
// Unfortunately CANNOT replace LOD textures. | |
// Technically I know how to replace LOD textures, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// PropMesh To NetworkMesh | |
var propName = "Barrels"; | |
var networkName = "Train Track"; | |
var type = "segment"; // segment or node | |
var id = 1; | |
var replaceTexture = false; // true or false | |
var prop = PrefabCollection<PropInfo>.FindLoaded(propName); // PropInfo, BuildingInfo, VehicleInfo, TreeInfo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//building | |
var shader = Shader.Find("Custom/Buildings/Building/Floating"); | |
var asset = ToolsModifierControl.toolController.m_editPrefabInfo as BuildingInfo; | |
if(asset.m_material != null) asset.m_material.shader = shader; | |
if(asset.m_lodMaterial != null) asset.m_lodMaterial.shader = shader; | |
//prop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using ICities; | |
using System; | |
using System.Reflection; | |
using UnityEngine; | |
namespace LightingRebalance | |
{ | |
public class LightingRebalanceMod : LoadingExtensionBase, IUserMod | |
{ | |
public string Name | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Textures must be placed in gamefolder/textures/props | |
// For example if my prop file name is snow1 and asset name is also snow1, | |
// then the textures would be called snow1.snow1_Data_d.png | |
// snow1.snow1_Data_a.png, snow1.snow1_Data_n.png and so on... | |
var assetname = "snow1.snow1_Data"; // CHANGE ONLY THIS | |
var asset = PrefabCollection<PropInfo>.FindLoaded(assetname); | |
var assetMaterial = asset.m_material; var texturePath = " "; | |
Texture2D providedTexture=null; Color px; |
OlderNewer