Skip to content

Instantly share code, notes, and snippets.

@ronyx69
ronyx69 / PropRotating_Mod.cs
Last active September 24, 2018 13:34
Source code for the PropRotating Params mod.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ICities;
using UnityEngine;
namespace PropRotating
{
public class PropRotatingMod : LoadingExtensionBase, IUserMod
@ronyx69
ronyx69 / PropRotating_Script.cs
Last active May 29, 2022 16:00
Script for saving PropRotating params in props. (Added modless shader parameter saving method by boformer.)
// Prop Rotating Script
// Control rotation axis, pivot and speed.
// Run in asset editor and see effects in real time.
// Animated faces must be vertex painted black! The rest reimains white.
// Google how to do vertex color painting in your 3d software of choice!
// The LODs are not rotating, they are like regular props.
// Custom Light Effects Scripts
// Adds custom light effects to props.
// Multiple effects can be added, including vanilla ones.
// The mod is not required to run the scripts or save the asset.
// It's only required for loading them.
using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using System.Linq;
using System.Text;
using System.Reflection;
using ICities;
using UnityEngine;
namespace LightEffects
@ronyx69
ronyx69 / Vehicle_FloorParams.cs
Created June 10, 2017 17:53
Change floor parameters for Vehicle shaders in asset editor.
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);
@ronyx69
ronyx69 / WindTurbine_Scripts.cs
Last active July 4, 2018 07:33
Change parameters for the WindTurbine shader in asset editor or preview ingame.
// 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:
//
@ronyx69
ronyx69 / AnimUV_Scripts.cs
Last active April 10, 2023 12:33
Scripts for saving AnimUV params in props. (Added modless shader parameter saving method by boformer.)
// 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!
@ronyx69
ronyx69 / AnimUV_Mod.cs
Last active June 5, 2018 14:40
Source code for the AnimUV Params mod.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ICities;
using UnityEngine;
namespace AnimUV
{
public class AnimUVMod : LoadingExtensionBase, IUserMod
@ronyx69
ronyx69 / PropVariations_AssetEditor.cs
Last active November 29, 2020 07:25
Sets amount of prop variations and calculates equal probability.
//----------------------------------------------------------------
// 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
@ronyx69
ronyx69 / TransparentSelectors.cs
Last active November 14, 2025 21:05
Source code of the transparent selectors mod.
using ColossalFramework.IO;
using ColossalFramework.UI;
using ICities;
using System;
using System.IO;
using System.Reflection;
using System.Xml.Serialization;
using UnityEngine;
namespace TransparentSelectors