The documentation can be found at https://github.com/boformer/CustomEffectLoader/blob/master/README.md
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
/* | |
* Copyright 2022 Felix Schmidt | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is | |
* furnished to do so, subject to the following conditions: | |
* |
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 prefab = PrefabCollection<NetInfo>.FindLoaded("Metro Station Track Elevated 01"); | |
prefab.m_availableIn = ItemClass.Availability.AssetEditor; | |
prefab.m_placementStyle = ItemClass.Placement.Manual; |
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 ICities; | |
using System; | |
using ColossalFramework.PlatformServices; | |
using ColossalFramework.Plugins; | |
namespace HarmonyMod { | |
public class Mod : IUserMod { | |
// You can add Harmony 1.2.0.8 as a dependency, but make sure that 0Harmony.dll is not copied to the output directory! | |
// (0Harmony.dll is provided by CitiesHarmony workshop item) |
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
<?xml version="1.0" encoding="utf-8"?> | |
<EffectsDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | |
<Effects> | |
<LightEffect | |
name="boformer.MY CUSTOM EFFECT" | |
type="Spot" | |
intensity="6.2" | |
range="500" | |
spotAngle="10" | |
spotLeaking="0.5" |
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 netManager = NetManager.instance; | |
for (ushort n = 0; n < NetManager.MAX_NODE_COUNT; n++) | |
{ | |
if ((netManager.m_nodes.m_buffer[n].m_flags & NetNode.Flags.Created) != NetNode.Flags.None) | |
{ | |
var segmentCount = netManager.m_nodes.m_buffer[n].CountSegments(); | |
if (segmentCount == 0) | |
{ | |
Debug.Log("Releasing ghost node " + n); | |
netManager.ReleaseNode(n); |
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! | |
// Prop Rotating Script for multiple rotating parts. | |
// Control rotation axis, pivot and speed. | |
// Run in asset editor and see effects in real time. | |
// The LODs are not rotating, they are like regular props. | |
// Vertex color blue channel for rotating parts must be 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
// Warning: Do not save vehicles after running this script without a game restart! | |
// 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! |
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
mkdir "%LOCALAPPDATA%\Colossal Order\Cities_Skylines\Addons\Mods\$(SolutionName)" | |
del "%LOCALAPPDATA%\Colossal Order\Cities_Skylines\Addons\Mods\$(SolutionName)\$(TargetFileName)" | |
xcopy /y "$(TargetPath)" "%LOCALAPPDATA%\Colossal Order\Cities_Skylines\Addons\Mods\$(SolutionName)" | |
xcopy /y "$(TargetDir)0Harmony.dll" "%LOCALAPPDATA%\Colossal Order\Cities_Skylines\Addons\Mods\$(SolutionName)" |
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; |
NewerOlder