Cities: Skylines

Cities: Skylines

Not enough ratings
Asset Prefab(+Building) AI Changer
 
Rate  
Favorite
Favorited
Unfavorite
Mod
File Size
Posted
Updated
0.027 MB
Jul 3, 2015 @ 2:56pm
Jul 8, 2015 @ 4:47pm
2 Change Notes ( view )

Subscribe to download
Asset Prefab(+Building) AI Changer

Subscribed
Unsubscribe
In 1 collection by Snow_Cat
Snow_Cat's questionable Asset Editor mods
7 items
Description
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 https://github.com/dluechoy/BuildingAIChanger/tree/DropDown

The source code the mod on which this built is availble from https://github.com/cerebellum42/BuildingAIChanger

If you want to report an issue, please do use the Github issues as I may not always read the steam workshop comments.
< >
24 Comments
cieran84 Jan 8 @ 3:52am 
Sometimes it bugs out and stops letting you use the dropdown menu. Unsub/resub should fix the problem, though it can be a bit wonky. Also have to Reload Editor after each new asset if the prefab AI Apply button is greyed out.
BrowncoatTrekky Nov 24, 2018 @ 9:37pm 
Used it earlier today @theKillerChicken converting a Unique Building PrefabAI to a Post Office PrefabAI and no issues. I do have a lag in the editor but do not believe it's from this mod at this time.
TheKillerChicken May 31, 2018 @ 12:27pm 
This does not work anymore, please update.
Elias May 2, 2018 @ 3:40am 
same here... doesn't work anymore. tested it with all mods deactivated except this. it even messes with your other "asset changer" mods, because they fail to show the right category (all assets are identified as props).
PelusoNN Mar 19, 2018 @ 12:25pm 
since the last update, this mod does not work for me. It repeats the list box one time and another and doesn't works. Any solution
stmSantana Mar 15, 2018 @ 1:37am 
The following is the generic Prefab AI changer.

Asset AI Changer
http://steamcommunity.com/sharedfiles/filedetails/?id=421616513
HGscMENTOR Jan 19, 2018 @ 8:12pm 
@Cerrebellum and/or @Snow_Cat
Hi :^)

I have all of your Asset Changing mods (or at least I'm pretty sure I do - Populous gave me a list to subscribe to and all of those mods by you seem to work well), but I still need a mod that will let me go into Asset Editor and, while creating a new residential building, change the number of households in it from the number that were in the original residential building. You see, I'm trying to put a logical number of residences in the highrises based upon the number of floors. For example, a building with four sides and 25 floors should have 100 residences (25 floors times 4 sides), but in the Vanilla building there are only 26 residences.

Do you have a mod for that? If so, I couldn't find one.

I do NOT want to use RICO to accomplish this as I'm trying to create a Non-Rico Gamesave.
Elias Dec 8, 2016 @ 3:51pm 
hi, the problem that matt crux postet on 27th of march seems to be back again since natural disasters. though there are only 332 subscribers, i hope you can fix it, because this mod is so useful to me ( way easier than doing it with modtools). and thanx anyways for your asset-mods... i used those a lot since the beginning.
Zavion Apr 25, 2016 @ 11:00am 
I'm hoping you have time to update this mod. It is by far the most useful mod. I wish you luck and look forward to having this operational once again. Fantastic work.
ArthurKingOfKnights Apr 17, 2016 @ 10:43am 
I hope you will look at it, and update the mod to a working condition.