This file contains hidden or 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 hidden or 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 hidden or 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.IO; | |
using ColossalFramework.Plugins; | |
using ColossalFramework.UI; | |
using ICities; | |
using System; | |
using System.IO; | |
using System.Reflection; | |
using System.Xml.Serialization; | |
using UnityEngine; |
This file contains hidden or 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 hidden or 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 shader = Shader.Find("Custom/Particles/Additive (Soft)"); | |
var asset = ToolsModifierControl.toolController.m_editPrefabInfo as PropInfo; | |
if(asset.m_material != null) asset.m_material.shader = shader; | |
if(asset.m_lodMaterial != null) asset.m_lodMaterial.shader = shader; |
This file contains hidden or 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 prefabNames = new List<string>(); | |
for (uint i = 0; i < PrefabCollection<NetInfo>.LoadedCount(); i++) | |
{ | |
var prefab = PrefabCollection<NetInfo>.GetLoaded(i); | |
if (prefab == null) continue; | |
Debug.Log(prefab); | |
prefabNames.Add(prefab.ToString()); | |
} | |
prefabNames.Sort(); | |
var s="\n"; |
This file contains hidden or 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
Custom/Buildings/Building/AnimUV | |
Custom/Buildings/Building/Basement | |
Custom/Buildings/Building/Construction | |
Custom/Buildings/Building/Default | |
Custom/Buildings/Building/Fence | |
Custom/Buildings/Building/Floating | |
Custom/Buildings/Building/NoBase | |
Custom/Buildings/Building/Water | |
Custom/Buildings/Building/WaterFlow | |
Custom/Buildings/Building/WindTurbine |
This file contains hidden or 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 hidden or 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 hidden or 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
// Rotors Shader | |
// Also deletes LOD. | |
// Prop | |
var shader = Shader.Find("Custom/Vehicles/Vehicle/Rotors"); | |
var asset = ToolsModifierControl.toolController.m_editPrefabInfo as PropInfo; | |
if(asset.m_material != null) asset.m_material.shader = shader; |
OlderNewer