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
| // Detail Script | |
| // Tags a prop as detail prop for custom render distance and optional color matching. | |
| var lod = 100f; // Distance at which LOD appears. | |
| var max = 200f; // Distance at which the prop disappears. | |
| var vegetation = true; // Set to true for color variations override according to Detail mod settings. |
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
| // FlipXZ Script | |
| // Tags a rotors shader vehicle sub mesh for Rotors FlipXZ mod. | |
| var subMesh = 1; // vehicle sub mesh id, starting from 1 | |
| var asset = ToolsModifierControl.toolController.m_editPrefabInfo as VehicleInfo; | |
| asset.m_subMeshes[subMesh].m_subInfo.m_UIPriority = 120122; | |
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
| // Decal Script (based on original script by boformer) | |
| // (added modless shader parameter saving method by boformer) | |
| // | |
| // Removes the need for making a mesh, just import the provided decal mesh | |
| // and this script will automatically change the size you set. | |
| // | |
| // Warning: Do not save vehicles after running this script without a game restart! | |
| var size = new Vector2(8.0f, 8.0f); // Size of decal in meters - width and length |
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
| for (uint i = 0; i < PrefabCollection<CitizenInfo>.LoadedCount(); i++) { | |
| var prefab = PrefabCollection<CitizenInfo>.GetLoaded(i); | |
| if (prefab == null) continue; prefab.m_walkSpeed = 0.5f; } |
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 vehicle sub meshes. | |
| // Run in asset editor and see effects in real time. | |
| // AnimUV Params Mod is not required for using the scripts and saving the asset. | |
| // It's only needed to load the data in-game. | |
| // Animated faces must be vertex painted black! The rest reimains white. |
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
| // reminder: the y axis ingame represents height | |
| // (as opposed to z, usually used in 3d software) | |
| // copy vertex paint from prop to vehicle sub mesh | |
| // vertex color explanation | |
| // RED for blimps(visibility): 0 visible when spinning, 255 visible when stopped | |
| // IDK what red will do on other vehicles |
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 subMesh = 0; // sub mesh id, order as in ui, starting from 1 (0 is main mesh) | |
| var asset = ToolsModifierControl.toolController.m_editPrefabInfo as VehicleInfo; | |
| // required and forbidden flags, use | to set multiple flags | |
| asset.m_subMeshes[subMesh].m_vehicleFlagsRequired = Vehicle.Flags.Created | Vehicle.Flags.Flying; | |
| asset.m_subMeshes[subMesh].m_vehicleFlagsForbidden = Vehicle.Flags.Reversed; | |
| // parked flags | |
| asset.m_subMeshes[subMesh].m_parkedFlagsRequired = VehicleParked.Flags.CustomName; |
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 subMesh = 0; // sub mesh id, order as in ui, starting from 0 | |
| var asset = ToolsModifierControl.toolController.m_editPrefabInfo as BuildingInfo; | |
| // required and forbidden flags, use | to set multiple flags | |
| asset.m_subMeshes[subMesh].m_flagsRequired = Building.Flags.Created | Building.Flags.Active; | |
| asset.m_subMeshes[subMesh].m_flagsForbidden = Building.Flags.Abandoned; | |
| // all building flags: | |
| /* |
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 subMesh = 1; // sub mesh id, order as in ui, starting from 1 | |
| var shader = Shader.Find("Custom/Props/Prop/Default"); // the shader to use | |
| var asset = ToolsModifierControl.toolController.m_editPrefabInfo as VehicleInfo; | |
| asset.m_subMeshes[subMesh].m_subInfo.m_material.shader = shader; | |
| asset.m_subMeshes[subMesh].m_subInfo.m_lodMaterial.shader = shader; | |