• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

Brazilian Joe

Captain
16 Badges
Mar 29, 2010
357
231
  • Cities in Motion 2
  • Sword of the Stars
  • Cities: Skylines Deluxe Edition
  • 500k Club
  • Cities: Skylines - After Dark
  • Cities: Skylines - Snowfall
  • Stellaris Sign-up
  • Cities: Skylines - Natural Disasters
  • Cities: Skylines - Mass Transit
  • Cities: Skylines - Green Cities
  • Cities: Skylines - Parklife
  • Shadowrun Returns
  • Shadowrun: Dragonfall
  • Cities: Skylines Industries
  • Cities: Skylines - Campus
  • Cities: Skylines
CO: can we create a custom district?

How can we define parameters for how it should work/look?

My understanding is that a custom "HelloWorld" District would just replicate the default industry district.

All the baked-in policy management should be part of it without any additional coding.

The modding creativity would be on:

1) Setting custom modifiers for performance, like e.g. Farming boosting city's health or Ore boosting income.
2) OPTIONALLY Setting a 'resource required' constraint.
2.1) OPTIONALLY setting some other requirement, instead or in addition to, a map-based natural resource, e.g. Having more than 5000 educated people and a university.
2.2) OPTIONALLY setting several different constraints for different zoning types.
3) Setting a collection of growable buildings for each zone type. The custom buildings would only grow on top of required resources.


MOD PROJECT: TOURISM DISTRICT

To illustrate the idea, I will describe the guidelines for what a Tourism mod would do:

Tourism District would change what grows on several different zones. Tourism district would be unlocked by having a number of tourists and parks in city, instead of a natural resource.

When a district is specialized to tourism, the following changes would happen:

Tourism District increases income a good deal and happiness moderately, and reduces pollution, but also increases crime rate.

Custom Growables:

Low density commercial:
Small restaurants with open areas with tables outdoors on large plots. Curio stores and plain stores.
IF close to water level: beach umbrellas and kiosks, and street artists as a 1x1 'building'.
IF has forest resource: Camping sites with trailers and tents, pools with waterslides.

High density commercial: Bigger endeavours like restaurants and clubs. Light of the night stuff. Large shopping malls.
IF close to water level: Marinas with different looks for low and high wealth terrain.
Optional addon separate from main mod to add Red Light District if high crime rate.

Offices: Hotels. Hotels everywhere.

Industry: Amusement Parks. Each plot spawns a different attraction.
IF Forestry: should create a Natural Park instead of amusement park, for nature dwellers. Would spawn occasional kiosks, sightseeing places, little ponds, and wildlife. Minimal number of props on growables.
Would work best if pedestrian paths can be zoned too.

All that is needed is access to the Districts skeleton and the necessary hooks to create a custom TOURISM district. ;) Simple to write, but how easy to do?
 
Peeking under the hood:

It seems like there are Services and Subservices coded in the game and RCIO works at different levels between services and subservices.

ItemClass.Service:

Residential
Commercial
Industrial
Offices
Roads
Electricity
Water
Beautification
Garbage
Healthcare
PoliceDepartment
Education
Monument
FireDepartment
PublicTransport
Government

ItemClass.SubService:

ResidentialLow
ResidentialHigh
CommercialLow
CommercialHigh
IndustrialGeneric
IndustrialForestry
IndustrialFarming
IndustrialOil
IndustrialOre

PublicTransportBus
PublicTransportMetro
PublicTransportTrain
PublicTransportShip
PublicTransportPlane

Low density and high density are subservices of commercial and residential. Industrial is a bit different though, where district specializations trigger the building change.

So I am trying to understand the code and whether it's possible to add more SubServices and branch out depending on district specialization e.g.:

If (ResidentialLow == true & DistrictSpecialization == "Tourism") {

//Simulate Tourism stats and grow Tourism buildings instead of the default ones
//Do the Same for RH/CL/CH/O/I

}


CO can you shed any light in here, is it possible or would it be bound to hit a roadblock eventually?