Asset Prefab(+Building) AI Changer

Cities: Skylines Mods |

Asset Prefab(+Building) AI Changer


a derivative of Cerebellum’s “BuildingAIChanger” for 1.1.1c+

This mod adds a drop down list to the Asset Property editor that lets you choose any AI for the asset you are editing.

Warning
WorksAsBuilding()

and

WorksAsNet()

checks are not implemented.

It is not known if assigning wildly inappropriate AIs to assets will break them.

Broken assets will fail to load and cannot be fixed with the asset editor.

(While I won’t stop you) from assigning the (Citizen)`PetAI` to your (Building)kennel, or a (Building)`ResidentialBuildingAI` to a (Vehicle)campervan; or any other combination of (Net, Building, Citizen, Vehicle, etc.) — It is strongly recommended that unproven changes be made to a new save file.
Duplicate files can be deleted; backups made after the fact are extraordinarily unlikely to fix anything.

Purpose
The main intended use of this mod is to ease the creation of assets with custom AI classes.

Usage
You do *not* need to know the exact name of the AI class. The drop down list is populated from the assemblies loaded when the asset editor is opened, then ordered by base-classes.

Load an asset with an AI to be replaced. If the asset lacks a suitable PrefabAI the PrefabAISelector panel be hidden.

Click on the name of the desired AI type from the drop down list or mousewheel until it is selected. The checkbox will deselect itself when the selected type does not match the currently loaded type. This was done intentionally as accidental mousewheeling could cause values to be lost accidentally.

Checking the checkbox (it will light) will attempt to replace the current prefab with a one of the specified type, and ‘refresh’ the properties panel. For prefab types for which the properties are suppressed will hide the panel and will not load properties, but will accept the AI specified.

Existing properties on the current AI instance are carried over to the new AI as far as possible, but this part is still very much a work-in-progress. It’s probably a good idea to select the proper AI as early as possible to avoid problems.

Using custom AI classes

If you intend to use a custom prefab AI, make sure to remember the namespace of your mod so that you may spot it in the list. For example, use MySuperMod.SuperAI.

This is not neccessary for the stock AIs as they all seem to be in the root namespace.

Todo

  • Implement sanity warning on AI / Prefab mismatch.
  • Implement expanding dictionary to re-enable free-wheeling through the list w/out clicking the toggle button.
  • Integrate other prefab property mods when other priorities are met (ie never)

Source code & Issues

WARNING: This is just out of the first development phase, don’t expect everything to work flawlessly. Some things might break.

The source code of this mod is available at

The source code the mod on which this built is availble from

If you want to report an issue, please do use the Github issues as I may not always read the steam workshop comments.

Credits
cerebellum
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

This content was uploaded by website visitors. If you notice any mistake, please let us know.


If you haven’t heard about the Cities: Skylines Mods, it’s definitely the time to be introduced. These additional files provide a gamer with extra features which are not originally included to the game. Cities: Skylines Mods free files are costless and can accessed by everyone who is interested. The Cities: Skylines Mods download can be completed easily without putting much effort. All you need to do is save the file to your PC and follow the instructions. There should be any problem with that, so no worries. Huge mass of players is using Cities: Skylines Mods around the world, so you shouldn’t stay behind – just click on Cities: Skylines Mods download button and go for the amazing upgrade! The Cities: Skyline game will change massively and it’s all for the best. Who could refuse adding useful functionality to the game? Definitely not you! So complete Cities: Skylines Mods download and take a look at the new version of the game made exactly by you. Sounds fascinating, isn’t it? But it’s better seeing yourself and fulfilling your craziest ideas. We bet there is bunch of them! Express your creativity and make it as useful as never before. It’s definitely a chance to take!



Useful Information:
- Cities: Skylines 2 Mods
- About Cities: Skyline Game
- How to Install Cities: Skylines Mods

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *