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 prefabNames = new string[] | |
{ | |
"Pedestrian Connection", | |
"Pedestrian Connection Surface", | |
"Pedestrian Connection Inside", | |
"Pedestrian Connection Underground" | |
}; | |
foreach (var prefabName in prefabNames) | |
{ | |
var prefab = PrefabCollection<NetInfo>.FindLoaded(prefabName); |
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
// Run with ModTools console while the asset is open in asset editor, then save the asset! | |
var prefab = ToolsModifierControl.toolController.m_editPrefabInfo; | |
prefab.m_dlcRequired = SteamHelper.DLC_BitMask.None; |
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 prefabNames = new string[] | |
{ | |
"Pedestrian Connection", | |
"Pedestrian Connection Surface", | |
"Pedestrian Connection Inside", | |
"Pedestrian Connection Underground" | |
}; | |
foreach (var prefabName in prefabNames) | |
{ | |
var prefab = PrefabCollection<NetInfo>.FindLoaded(prefabName); |
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
// Change the LOD distance of building assets. Run this script while the building is loaded in asset editor, then save the building | |
// It basically "fakes" a mesh in the basement, adds something to the building bounds in negative direction. | |
// The game thinks that the asset is bigger and gives it a higher LOD distance | |
// maximum support value is 1000f, minimum is 250f | |
var lodRenderDistance = 1000f; | |
// --- end of editable values --- |
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
using Harmony; | |
using ICities; | |
using UnityEngine; | |
namespace NoParkBuildingFires | |
{ | |
public class Mod : IUserMod | |
{ | |
private const string HarmonyId = "boformer.NoParkBuildingFires"; | |
private HarmonyInstance _harmony; |
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
// Warning: Do not save vehicles after running this script without a game restart! | |
// The vertex paint of the mesh controls the amount of movement: | |
// white means no movement and black means maximum movement. | |
// | |
// If you're using multiple "flag" textures in one prop, (like vanilla flags) | |
// the flag must be entirely black and everything else should be white, | |
// and you can't use the strength variable, otherwise the UV mapping will break. | |
// The flag should be UV mapped onto the flag on the bottom right of the texture. | |
// |
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
// Warning: Do not save vehicles after running this script without a game restart! | |
// Pivot (X, Y, Z, <ignored>) | |
var rollLocation0 = new Vector4(-0.137f, 1.497f, 0.0f, 1.0f); | |
// Rotation Axis (X, Y, Z, <ignored>) | |
var rollParams0 = new Vector4(0.0f, 0.0f, 1.0f, 10.0f); | |
var asset = ToolsModifierControl.toolController.m_editPrefabInfo as PropInfo; | |
asset.m_material.SetVector("_RollLocation0", rollLocation0); |
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
// run this script in asset editor before saving your prop | |
// value should be between 100f and 1000f (1000 is the maximum, higher values will have no effect) | |
var propRenderDistance = 1000f; | |
var fakeTriangleArea = (propRenderDistance - 100f) / 1.41f; | |
fakeTriangleArea *= fakeTriangleArea; | |
var asset = ToolsModifierControl.toolController.m_editPrefabInfo as PropInfo; | |
asset.m_generatedInfo.m_triangleArea = fakeTriangleArea; |
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
// Warning: Do not save vehicles after running this script without a game restart! | |
// Size of decal in meters - width and length | |
// (texture width and height will be stretched to match this) | |
var size = new Vector2(16.0f, 8.0f); | |
// Tiling amount | |
var tile = new Vector3(1.0f, 1.0f); | |
// Box mesh height, leave at a negative value to calculate automatically |
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
AccessTools.Method: Could not find method for type NetworkSkins.Patches.NetManagerCreateSegmentPatch and name Prepare and parameters | |
AccessTools.Method: Could not find method for type NetworkSkins.Patches.NetManagerCreateSegmentPatch and name TargetMethods and parameters | |
AccessTools.Method: Could not find method for type NetworkSkins.Patches.NetManagerCreateSegmentPatch and name TargetMethod and parameters | |
AccessTools.Method: Could not find method for type NetworkSkins.Patches.NetManagerCreateSegmentPatch and name Prefix and parameters | |
AccessTools.Method: Could not find method for type NetworkSkins.Patches.NetManagerCreateSegmentPatch and name Transpiler and parameters | |
AccessTools.Method: Could not find method for type NetworkSkins.Patches.NetManagerCreateSegmentPatch and name Prepare and parameters | |
### Patch NetManager, Boolean CreateSegment(UInt16 ByRef, Randomizer ByRef, NetInfo, UInt16, UInt16, Vector3, Vector3, UInt32, UInt32, Boolean) | |
Exception: Exception from HarmonyInstance "boformer.NetworkSkin |