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
// 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 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
var asset = ToolsModifierControl.toolController.m_editPrefabInfo as BuildingInfo; // BuildingInfo PropInfo VehicleInfo | |
var color1 = new Color32(255, 255, 255, 255); | |
var color2 = new Color32(255, 255, 255, 255); | |
var color3 = new Color32(255, 255, 255, 255); | |
var color4 = new Color32(255, 255, 255, 255); | |
asset.m_material.SetColor("_ColorV0", color1); | |
asset.m_material.SetColor("_ColorV1", color2); |
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
// scripts to change map theme textures, colors and other stuff ingame | |
// textures must be located in gamefolder/textures/ | |
// also applies sharp textures mod default settings | |
// grass.png | |
if (File.Exists("textures/" + "grass.png")) { Texture2D texture2D = new Texture2D(1, 1); | |
texture2D.LoadImage(File.ReadAllBytes("textures/" + "grass.png")); | |
UnityEngine.Object.FindObjectOfType<TerrainProperties>().m_grassDiffuse = texture2D; } | |
TerrainManager.instance.m_properties.InitializeShaderProperties(); |
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.UI; | |
using ICities; | |
using System; | |
using System.IO; | |
using System.Reflection; | |
using System.Xml.Serialization; | |
using UnityEngine; | |
namespace TransparentSelectors |
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
//---------------------------------------------------------------- | |
// Prop Variation Amount Changer | |
//Set amount of prop variations. | |
//If you are increasing the amount, previous variations will be preserved. | |
//If decreasing, all variations will be removed! | |
var variations = 12; //CHANGE THIS |
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 System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using ICities; | |
using UnityEngine; | |
namespace AnimUV | |
{ | |
public class AnimUVMod : LoadingExtensionBase, IUserMod |
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
// Anim UV Scripts | |
// Create scrolling or multi-frame animations for props. | |
// Run in asset editor and see effects in real time. | |
// Animated faces must be vertex painted black! The rest reimains white. | |
// Shades of gray animate slower, don't use unless you know what you're doing. | |
// Google how to do vertex color painting in your 3d software of choice! |
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
// Wind Turbine Scripts | |
// Control wind turbine pivot, rotation mode, blade speed. | |
// Use the wind turbine template when importing! | |
// Vertex Colors | |
// Parts of the mesh must be vertex painted accordingly: | |
// |
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 asset = ToolsModifierControl.toolController.m_editPrefabInfo as VehicleInfo; | |
var vec = new Vector4(0.0f, 5.0f, 0.0f, 0.0f); // (foundation, floor height, width, length) | |
asset.m_material.SetVector("_FloorParams", vec); |