Cities: Skylines

Cities: Skylines

50 ratings
Asset Prefab(+Building) AI Changer
   
Award
Favorite
Favorited
Unfavorite
Mod
File Size
Posted
Updated
28.645 KB
3 Jul, 2015 @ 2:56pm
8 Jul, 2015 @ 4:47pm
2 Change Notes ( view )

Subscribe to download
Asset Prefab(+Building) AI Changer

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.
31 Comments
LemonsterOG 29 Oct, 2020 @ 12:18pm 
:redflare: :redflare: :redflare: :redflare: :redflare: :redflare: :redflare: :redflare: :redflare: :redflare: :redflare: :redflare: :redflare: :redflare: :redflare: :redflare: :redflare:

:vright: :vright: THIS ASSET MAY CAUSE PROBLEMS :vleft: :vleft:

Broken Mods/Assets (read description)

Outdated Mods/Assets (read description)

Problem Mods/Assets (read description)

How to Find Broken and Bloated Assets

:redflare: :redflare: :redflare: :redflare: :redflare: :redflare: :redflare: :redflare: :redflare: :redflare: :redflare: :redflare: :redflare: :redflare: :redflare: :redflare: :redflare:
Cahos Rahne Veloza 29 Oct, 2020 @ 10:37am 
That's why I have added you and a few others on my ignore list a long time ago because you are quite annoying :P
LemonsterOG 29 Oct, 2020 @ 9:52am 
@Cahos Rahne Veloza -- While your information is interesting, this mod is listed as BROKEN by the modding community. Click Here [docs.google.com]

I was merely posting a warning to any player that might attempt to use it, because it does not work properly in-game , in-editor, anywhere. If you know otherwise, you should contact @Avanya.

I am reposting my warning so it appears on top of the comments section, but I will update the wording to reflect where the mod won't work.
Cahos Rahne Veloza 29 Oct, 2020 @ 9:28am 
This mod isn't used ingame :P

Well in "live mode" or City Building Mode anyway. This is only ever used in Asset Editor, you know where you mess around with Asset attributes. And if you do activate it in live mode and try to start or load a saved city, you will most definitely run into problems. So no, this mod IS NOT broken nor is it incompatible. The real issue here is PEBCAk :P

For the correct usage of this Asset information manipulation mod and a few others that are interdependent of each other, see this Guide here...

https://steamproxy.net/sharedfiles/filedetails/?id=471221886&searchtext=Repurpose
Elias 1 May, 2019 @ 2:53am 
Thanx for the response. I found that your similar (?) mod "Asset AI Changer" ( https://steamproxy.net/sharedfiles/filedetails/?id=421616513 ) does what I was looking for. I don't understand the difference between the two mods except for a little different interface/checkbox. So for now I am happy again :D

I also hadn't played the game in a long while (last savegame in october 2017) and it is really hard to find a way back into it, because of all the changes they made and mods that work different or don't work at all ;)
BrowncoatTrekky 30 Apr, 2019 @ 6:41pm 
Hey @Elias, I used the 3rd, 4th, and 6th mods in the above collection and had no issues. I did not use ModTools to activate or use these mods either. It has been some time since I played and was in the editor @Elias, but feel free to add me and we can screenshot and run through your process.
Elias 30 Apr, 2019 @ 5:03pm 
@BrowncoatTrekky @cerebellum
Even when I have only this Mod activated, it doesn't work (no working Dropdown-Menue as it used to be). The only DLC I have is After Dark. Maybe that is the reason why the Mod still works with you?
Would be nice if you had another look into it, because this Mod was very important to me.

(or can someone tell me, where I can find this Option in Modtools? Didn't find the BuildingAI there either)
Bad Apple 8 Jan, 2019 @ 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 24 Nov, 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 31 May, 2018 @ 12:27pm 
This does not work anymore, please update.