boformer / BuildingThemes

Mod for Cities:Skylines
http://steamcommunity.com/sharedfiles/filedetails/?id=466158459
MIT License
13 stars 11 forks source link

Themes as separate mods? #16

Closed boformer closed 9 years ago

boformer commented 9 years ago

Creating a custom theme is quite difficult (and it will take some time to create the GUI for it).

A simple solution would be separate mods which add preconfigured themes.

The ingame theme manager could also be a separate mod (we can outsource the xml configuration to that mod)

bloodypenguin commented 9 years ago

I'll see if it's possible to use Improved Assets Panel as theme manager.

SamsamTS commented 9 years ago

I was think about it and I had the idea to use collections. Basically the users enter the collection steam ID or url and the theme is automatically created. I'll help implementing that when I have the time.

boformer commented 9 years ago

An update on this:

Theme Mods are now supported. To create a theme mod, just create a very simple mod with a name and description:

using ICities;

namespace BuildingThemes
{
    public class BuildingThemeTrailerHome : IUserMod
    {
        public string Name
        {
            get
            {
                return "Building Theme: American Trailer Homes";
            }
        }

        public string Description
        {
            get { return "Adds a theme containing 9 low-density residential buildings."; }
        }
    }
}

The theme definition is done by bundling an XML file with the mod. The schema is similar to the Building Themes Main configuration. One mod can also add multiple themes.

<?xml version="1.0" encoding="utf-8"?>
<Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Themes>
    <Theme name="American Trailer Homes">
      <Buildings>
        <Building name="432246045.DK-L1 1x2 American House 1_Data" />
        <Building name="432246308.DK-L1 2x2 American House 1_Data" />
        <Building name="432289854.DK-L1 3x3 American House 1_Data" />
        <Building name="437038660.DK-L1 1x2 Trailer House 2_Data" />
        <Building name="437039049.DK-L1 2x2 Trailer House 2_Data" />
        <Building name="437039368.DK-L1 3x3 Trailer House 2_Data" />
        <Building name="444132040.DK-L1 1x2 USA Trailer House 3_Data" />
        <Building name="444132141.DK-L1 2x2 USA Trailer House 3_Data" />
        <Building name="444132239.DK-L1 3x3 USA Trailer House 3_Data" />
      </Buildings>
    </Theme>
  </Themes>
</Configuration>

A mod like ImprovedModsPanel could detect Building Theme Mods and display them separately (like Color Corrections). Maybe it would even be possible that when you enable a theme in the Content Manager, all contained buildings are also enabled.