Jump to content
  •   Announcement

  •    Alternatively see here for an enhanced Google site search, which you may find provides more accurate search results. (More Info)

Search the Community

Showing results for tags 'example'.



More search options

  • Search By Tags

    Type tags separated by commas. These are keywords which should describe the item of content.
  • Search By Author

Content Type


Forums

  • Simtropolis Department of Public Works
    • Simtropolis Recovery Project
    • The Planning Commission
  • SimCity 4 Players Forum
    • SimCity 4 General Discussion
    • SC4 Showcase
    • SC4 City Journals
    • SC4 Mac Users
    • SC4 Bugs & Technical Issues
  • SimCity 4 Builders Forum
    • SC4 - Custom Content
    • Mapping Community Room
    • SC4 BAT & Lot Workshop
    • SC4 Modding - Open Discussion
    • NAM & Transit Networks
  • Cities: Skylines & CS2
    • Cities: Skylines General Discussion
    • Cities: Skylines Modding - Open Discussion
    • Cities: Skylines Showcase
    • Cities: Skylines City Journals
    • Cities: Skylines Technical Help Q&A
  • SimCity (2013)
    • SimCity (2013) General Discussion
    • SimCity (2013) Modding - Open Discussion
    • SimCity (2013) Region Games
    • SimCity (2013) Showcase
    • SimCity (2013) Technical Help Q&A
  • Simtropolis Social Forum
    • New Members Information
    • Simtropolis Related
    • General Off-Topic
    • Current Events
    • Architecture & Urban Planning
  • Gamer Topics
    • SimCity 3000
    • City-Building Games
    • Gaming Talk
  • Challenges Forum
    • SC4 Challenges - Info and Discussion
  • Trixies Forum
    • Trixie Awards - Community Discussion
  • Club-owners Club's Club Discussion
  • Simtropolis en Español's Plaza Mayor
  • Simtropolis en Español's Soporte Técnico
  • Simtropolis en Español's Parque Industrial
  • SimCampus Students's Topics
  • The Transit and Aviation Geeks Club's Topics
  • Arden County City Council's Topics
  • Alliance of Independent Nations on Simtropolis's Discussion
  • The Major Club's Topics
  • Project Rich Water's Topics
  • Furry Community's Topics
  • Simtropolis Italia's Discussioni
  • New Washington's Topics
  • Everything about details's Topics
  • CityBuildingMasters X's Topics
  • City Journal Club's Topics
  • City Journal Club's Photo Shopping, Type Faces, Page Layout !
  • City Journal Club's Writing
  • Coolio Club For Cool Children's Topics
  • Atlantic Energy Co.'s Topics
  • Micropolis's Topics
  • City-Builders Website's Club Topics
  • SimCity Polska Organization's Topics
  • Simtropolis em português's Topics
  • Simtropolis em português's Fórum
  • My Little Pony Club's Topics
  • SimCity 2000 Resource Club's Topics
  • Simtropolis中文's Topics
  • Simtropolis en français's Topics
  • NewCity's Topics
  • Simtropolis Historical/Aesthetically Accurate Topography Society's Topics
  • Southeast Asian Mayors's Topics
  • Simtropolis Historical/Aesthetically Accurate Topography Society's Request Maps
  • Simtropolis Historical/Aesthetically Accurate Topography Society's Social and Events
  • Simtropolis Historical/Aesthetically Accurate Topography Society's Mapping
  • SimCity 3000 Resource Club's Information
  • The Great British Simtropolis Club's Topics
  • Roller Coaster Park Builders's Topics
  • Banished's Topics
  • Banished's Modding
  • Banished's Questions
  • Banished's Stories
  • Android City Builders & Other Games's Topics
  • City-Builders Website's Banished Toolkit
  • City-Builders Website's Banished Villages
  • City-Builders Website's Banished Achievements
  • Spooky Souls Building's Topics
  • TheoTown's Topics
  • Found Custom Contents's Topics
  • Cities in Motion's Topics
  • SimCity 3000 Resource Club's SC3000 Ordinances
  • SimCity Societies + Destinations's Topics

Categories

  • SimCity 4
    • SC4 Reference
    • SC4 Tutorials
    • BAT & Lot Editor Tutorials
    • Modding Information
    • Mapping & Terraforming
  • Other Games
  • Simtropolis Articles
    • Interviews

Categories

  • News
  • News
  • News

Categories

  • SimCity 4 Files
    • Residential
    • Commercial
    • Industrial
    • Agricultural
    • Building Sets
    • Civic & Non-RCI
    • Utilities
    • Parks & Plazas
    • Waterfront
    • Transportation
    • Automata
    • Gameplay Mods
    • Graphical Mods
    • DLL Mods
    • Cheats
    • Tools
    • Maps
    • Ready Made Regions
    • Dependencies
    • 3ds Models
    • Obsolete & Legacy
    • Reference & Info
  • SimPeg (PLEX) Files
    • PLEX Custom Lots & Mods
    • CDK - Coastal Development Kit
    • MTP - Mountain Theme Pack
    • SPAM - SimPeg Agricultural Mods
    • PEG Utopian Series
  • SimCityBrasil Files
  • SimCityPolska Files
  • WorkingMan Productions (WMP)
  • Cities: Skylines II Mods
  • Cities: Skylines Buildings
    • CSL Maps
    • CSL Roads & Traffic
    • CSL Vehicle Assets
    • CSL Game Mods
    • CSL Props
    • CSL Programs & Tools
  • SimCity (2013) Buildings
    • SC13 Game Mods
    • SC13 Roads & Traffic
    • SC13 Vehicles
    • SC13 Programs & Tools
    • SC13 User Interface
  • SimCity 3000 Files
    • SC3K Maxis Files
    • SC3K Cities & Maps
  • CitiesXL Buildings
    • CXL Mods & Tools
    • CXL Maps
    • CXL Textures & Props
    • CXL Lots
    • CXL 3d Models
  • Simtropolis en Español's Descargas
  • Club-owners Club's Dirk's Files
  • The Major Club's Files
  • Project Rich Water's Files
  • Furry Community's Files
  • Simtropolis Italia's Archivio
  • New Washington's Files
  • Everything about details's Files
  • CityBuildingMasters X's Files
  • City Journal Club's Files
  • Coolio Club For Cool Children's Files
  • Atlantic Energy Co.'s Files
  • Micropolis's Files
  • City-Builders Website's CB Files
  • SimCity Polska Organization's Files
  • Simtropolis em português's Descargas
  • My Little Pony Club's Files
  • SimCity 2000 Resource Club's SCURK Tilesets
  • SimCity 2000 Resource Club's CITY Files
  • SimCity 2000 Resource Club's Multi Object Tilesets
  • SimCity 2000 Resource Club's Single Object Tilesets
  • Simtropolis中文's Files
  • Simtropolis en français's Files
  • NewCity's Files
  • Simtropolis Historical/Aesthetically Accurate Topography Society's Files
  • Southeast Asian Mayors's Files
  • SimCity 3000 Resource Club's SimCity 3000 Starter Towns
  • SimCity 3000 Resource Club's SimCity 3000 Cities
  • SimCity 3000 Resource Club's SimCity 3000 Terrains
  • The Great British Simtropolis Club's Files
  • Roller Coaster Park Builders's Files
  • Banished's Banished Mods
  • Banished's Kid's Mods
  • Android City Builders & Other Games's Files
  • City-Builders Website's Banished Save Games
  • Banished's Modding Files
  • SimCity 2000 Resource Club's MAC Files
  • Spooky Souls Building's Files
  • TheoTown's Files
  • Found Custom Contents's Chinese Sites
  • Found Custom Contents's European Sites
  • Found Custom Contents's Japanese Sites
  • Found Custom Contents's North America Sites
  • Found Custom Contents's Asia-Pacific Sites
  • Cities in Motion's CiM Maps
  • Cities in Motion's CiM Mods
  • SimCity Societies + Destinations's Files

City Journals

There are no results to display.

There are no results to display.

Calendars

  • Alliance of Independent Nations on Simtropolis's Alliance Calendar
  • Club-owners Club's Events
  • SimCampus Students's Events
  • SimCampus Students's Noggin Thinkers Dates
  • Arden County City Council's Events
  • The Major Club's Events
  • Project Rich Water's Events
  • Furry Community's Events
  • Simtropolis Italia's Eventi
  • New Washington's Events
  • Everything about details's Events
  • CityBuildingMasters X's Events
  • City Journal Club's Events
  • Coolio Club For Cool Children's Events
  • Atlantic Energy Co.'s Events
  • Micropolis's Events
  • SimCity Polska Organization's Events
  • My Little Pony Club's Events
  • Simtropolis中文's Events
  • Simtropolis en français's Events
  • Simtropolis Historical/Aesthetically Accurate Topography Society's Events
  • Southeast Asian Mayors's Events
  • The Great British Simtropolis Club's Events
  • Roller Coaster Park Builders's Events
  • Android City Builders & Other Games's Events
  • Spooky Souls Building's Events
  • TheoTown's Events
  • Cities in Motion's Events

City-building game(s)

Found 2 results

  1. A small example how to replace the AI of a custom building asset on startup: In this example the AI extends from PlayerBuildingAI, that means it has basic stats like a construction cost, it can catch fire etc. But of course you can also extend from any other AI (BuildingAI or CommonBuildingAI if you want to start from scratch). The AI in this example displays a counter value in the building info window. The counter is increased after SimulationStep is called 16 times (SimulationStep is called about once every second on normal speed). The mod expects a local building asset with the file name "thing" and asset name "Thing". The AI is replaced before the prefab is initialized. That means there should be no bad side effects. The mod requires Harmony. Just place 0Harmony.dll in the same folder as the mod dll. It is not compatible with Loading Screen Mod. If you want to support LSM and LSM Test, take a look at the source code of Custom Animation Loader. using ColossalFramework.Packaging; using Harmony; using ICities; using UnityEngine; namespace AiReplace { public class AiReplaceMod : IUserMod { private const string HarmonyId = "boformer.AiReplace"; private HarmonyInstance _harmony; public string Name => "AI Replace"; public string Description => "Replaces AI"; public void OnEnabled() { if (_harmony != null) return; Debug.Log("AiReplace Patching..."); _harmony = HarmonyInstance.Create(HarmonyId); _harmony.PatchAll(GetType().Assembly); } public void OnDisabled() { _harmony.UnpatchAll(HarmonyId); _harmony = null; Debug.Log("AiReplace Reverted..."); } } public class MyBuildingAI : PlayerBuildingAI { public override string GetLocalizedStats(ushort buildingID, ref Building data) { var counter = data.m_customBuffer1; return $"Counter: {counter}"; } public override void SimulationStep(ushort buildingID, ref Building data) { Debug.Log("SimulationStep!"); if ((SimulationManager.instance.m_currentFrameIndex & 0xFFF) >= 0xF00) { Debug.Log("SimulationStep was called 16 times!"); data.m_customBuffer1++; } base.SimulationStep(buildingID, ref data); } } // Vanilla Asset Loader [HarmonyPatch(typeof(PackageDeserializer), "DeserializeGameObject")] public static class PackageAssetPatch { public static void Postfix(Package package, GameObject __result) { var prefab = __result.GetComponent<BuildingInfo>(); if (prefab == null) return; Debug.Log($"Instantiate {package.packageName} {prefab.name}"); // packageName is file name of the .crp file (for local .crp files) // prefab name is the "Asset Name" you set in Asset Editor + "_Data" if (package.packageName == "thing" && prefab.name == "Thing_Data") { var oldAi = prefab.gameObject.GetComponent<BuildingAI>(); UnityEngine.Object.DestroyImmediate(oldAi); var newAi = prefab.gameObject.AddComponent<MyBuildingAI>(); Debug.Log($"AI replaced!"); } } } }
  2. Lately we've had considerable new members who are somewhat at sea on getting a city going. Here is one I started a couple of days ago as part of my new region. It is in the black, but it has no services other than power and water (the pond in the lower centre). Admittedly, there is a lot of custom content here. The farms are SPAM and the pond is also from Pegasus. Many of the 2 x 1 buildings are from Paeng (thanks, Paeng.) The game is yelling at me for not watering all the buildings. I'll do that when I open this city again. I've always considered the best way to get a city off the ground without cheats is to start the way cities usually do either with something riparian, or a farm group and a little rail junction. This one is the latter. Later on, you can think of the nice, big farms in terms of new subdivisions. Here's the image. Enjoy. Oh, and notice that this baby is only four Sim-months old, exactly.
×

Thank You for the Continued Support!

Simtropolis depends on donations to fund site maintenance costs.
Without your support, we just would not be in our 24th year online!  You really help make this a great community. *:thumb:

But we still need your support to stay online. If you're able to, please consider a donation to help us stay up and running. This helps sustain a platform where we can share our community creations for years to come.

Make a Donation, Get a Gift!

Expand your city with the best from the Simtropolis Exchange.
Make a Donation and get one or all three discs today!

STEX Collections

By way of a "Thank You" gift, we'd like to send you our STEX Collector's DVD. It's some of the best buildings, lots, maps and mods collected for you over the years. Check out the STEX Collections for more info.

Each donation helps keep Simtropolis online, open and free!

Thank you for reading and enjoy the site!

More About STEX Collections