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 PropInfo; | |
var off = 15.0f; // amount of hours the light is turned off during the day (15 max) (0 means always on) | |
var random = 0.3f; // adds randomness to time lights turn on/off, if 0 then all lights turn on/off at the same time | |
asset.m_illuminationOffRange.x = 6*Convert.ToSingle(Math.Pow(Convert.ToDouble((6-off/2.5)/6), Convert.ToDouble(1/1.09))); | |
asset.m_illuminationOffRange.y = Mathf.Clamp(6*Convert.ToSingle(Math.Pow(Convert.ToDouble((6-off/2.5)/6), Convert.ToDouble(1/1.09)))-random, 0, 6); |
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/Buildings/Building/NoBase"); | |
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; | |
asset.m_requireHeightMap = false; |
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
// Natural Resource Texture Importer | |
// Imports a natural resource texture and applies the resource values to all cells on the map. | |
// Texture name and location must be gamefolder/textures/res.png | |
// Resolution is 512x512 | |
// | |
// Channel explanation: | |
// Default value for all channels is 128. | |
// | |
// Red (128-0) Oil (inverted) |
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
// m_parkingSpaces | |
// Sets the amount, type, flags, direction and position of parking spaces for props. | |
// I haven't tested or researched this at all. | |
var asset = ToolsModifierControl.toolController.m_editPrefabInfo as PropInfo; | |
var parkingSpaces = 1; // amount of parking spaces | |
PropInfo.ParkingSpace[] temp = new PropInfo.ParkingSpace[parkingSpaces]; |
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
// Network Tiling Script | |
// | |
// Script for saving tiling values for network segment and node textures. | |
// Visible instantly in road editor, mod not required for saving the asset, only for loading it ingame. | |
// | |
// If you load a road with tiling in the asset editor, the tiling won't be visible, | |
// but it's still saved, unless a segment/node is reimported. | |
// Don't touch this part, scroll below it. |
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 NetworkTiling | |
{ | |
public class NetworkTilingMod : 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
Unlimited Money | |
Unlimited Oil And Ore | |
Unlock All | |
ModTools | |
Asset Prefab AI Changer | |
Toggle Asset Properties Panel | |
Asset Item Class Changer | |
Asset UICategory Changer | |
More Network Stuff | |
Prefab Hook |
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; | |
using System.Reflection; | |
using System.Runtime.InteropServices; | |
using System.Threading; | |
using System.Xml.Serialization; |
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
// m_specialPlaces (SittingDown) | |
// Sets the amount, direction and position of sitting places for benches. | |
var asset = ToolsModifierControl.toolController.m_editPrefabInfo as PropInfo; | |
var specialPlaces = 1; // amount of sitting positions | |
PropInfo.SpecialPlace[] temp = new PropInfo.SpecialPlace[specialPlaces]; |
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
// Ploppable Apshalt + (RoadBridge) used for asphalt and pavement. | |
// Automatic normal editing, mesh scaling and vertex painting for main and LOD meshes. | |
// Also removes ruining, and tags as ploppable asphalt prop. | |
var asset = ToolsModifierControl.toolController.m_editPrefabInfo as PropInfo; | |
asset.m_UIPriority = 0; // Set your UI priority! | |
var triangles = asset.m_mesh.triangles; | |
int[] triangleArray = new int[triangles.Length]; |