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 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 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 NetInfo; | |
// change half width | |
asset.m_halfWidth = 22.0f; | |
// enable create pavement | |
asset.m_createPavement = true; | |
// change the color of basic segment 0 |
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 (and Building Sub Mesh) Anim UV Scripts | |
// Create scrolling or multi-frame animations for buildings. | |
// Run in asset editor and see effects in real time. | |
// Ingame the building might require electricity to animate. | |
// No mods required, the changes save and load in vanilla. |
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
// Prop Rotating Script for multiple rotating parts. | |
// Control rotation axis, pivot and speed. | |
// Run in asset editor and see effects in real time. | |
// Prop Rotating Params Mod is not required for using the scripts and saving the asset. | |
// It's only needed to load the data in-game. | |
// The LODs are not rotating, they are like regular props. |
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
// props | |
var asset = ToolsModifierControl.toolController.m_editPrefabInfo as PropInfo; | |
asset.m_UIPriority = 1; | |
// trees | |
var asset = ToolsModifierControl.toolController.m_editPrefabInfo as TreeInfo; | |
asset.m_UIPriority = 1; | |
// buildings |
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 shader = Shader.Find("Custom/Buildings/Building/Default"); | |
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 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/Fence"); | |
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 = true; |
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 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; |
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 shader = Shader.Find("Custom/Props/Prop/Default"); | |
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; | |
asset.m_requireHeightMap = false; |
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 shader = Shader.Find("Custom/Props/Prop/Fence"); | |
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; | |
asset.m_requireHeightMap = true; |