Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
piratepilates
Mar 28, 2004

So I will learn to live with it. Because I can live with it. I can live with it.



quote:

https://www.reddit.com/r/CitiesSkylines/comments/17loew6/code_deep_dive_residential_rents/

I've done some deep diving into the source code of the game to prepare myself for writing code mods when the time comes. I decided to check out the rent system and how it works at the core level to better understand the problem of high rent and how to solve it through gameplay. What I found was a rich, deep, realistic simulation that takes into account an enormous amount of factors to determine how rent is calculated and whether or not Cims can afford it. The depth of the simulation is stunning, and forces us to totally rethink how we play the game going forward.

...

**Factors affecting rent:**

The game considers a wide variety of factors when determining the rent price for a given building. This is a simplified list of factors, but it goes even deeper than this when actually crunching the numbers.

* Commute time (lower time = higher rent)
* Travel time to shopping (lower time = higher rent)
* This means that mixed use buildings are going to have higher rents due to this alone!
* Household happiness, health, and wellbeing (higher values = higher rent)
* Tax rate (lower tax = lower rent)
* Side note: Children reduce the tax rate of the household! Currently, birth rates are controlled by random chance, but a fun mod might allow citizen happiness to affect the birth rate chance!
* Highest household education level (higher education = higher rent)
* Service coverage (police, healthcare, communication, education, garbage, entertainment, welfare) (higher coverage = higher rent)
* Dwelling unit size (lot size \* floors / units) (higher size = higher rent)
* This means that zoning high density alone may not be enough to help. Consider zoning smaller lots to force smaller dwelling units, but be careful that units don't get too small, because this has a negative effect on happiness.
* Land value (higher value = higher rent)
* Urban blight (nearby crime, abandonment, pollution, homelessness) (more blight = lower rent)
* Building level (higher level = higher rent)

Adbot
ADBOT LOVES YOU

Yaoi Gagarin
Feb 20, 2014

turn off the TV posted:

i don't think that it's fair to say that cities skylines 2 has design problems. you can only really judge the parts of the game and simulation that are working as intended and i haven't seen any complaints about the main menu

loving savage

MikeJF
Dec 20, 2003




WithoutTheFezOn posted:

I know it’s easy to say now, but it was pretty predictable how this was going to go.

There’s performance problems. Then
There are UI problems. Then
There are mechanics problems. …
There are design problems.
Hey there’s not really much game here, it’s really a mod bucket city painter.

If the game were really a fairly simple little city painter it probably wouldn't be so broken. Who knows if it's going to work, but it's clear that at the very least they've tried to create something quite sophisticated.

I don't think there's any real reason to be particularly pessimistic that it's all fundamentally bad and unfixable: it's all just the hallmarks of a simulation game that was forced to be released six months early.

MikeJF fucked around with this message at 02:08 on Nov 2, 2023

Grand Fromage
Jan 30, 2006

L-l-look at you bar-bartender, a-a pa-pathetic creature of meat and bone, un-underestimating my l-l-liver's ability to metab-meTABolize t-toxins. How can you p-poison a perfect, immortal alcohOLIC?



This really emphasizes how inadequate the UI is. There is no way to understand how any of this mechanic works without examining the code. Does make you wonder how many things in the game are actually working but as a player you can't interact with the systems because there's zero information.

Grand Fromage fucked around with this message at 02:18 on Nov 2, 2023

CuddleCryptid
Jan 11, 2013

Things could be going better

My City has been running smoothly and then suddenly got hit with a plague of cars clipping into each other while turning and causing unbreakable 500 car backups.

MikeC
Jul 19, 2004
BITCH ASS NARC

piratepilates posted:

Good poo poo

A lot of this stuff I sorta managed to intuit after a couple of cities but it is nice to know that my over-gentrification of my entire city is likely what is causing me headaches right now with a revolving door of people without the top 2 tiers of education not being able to afford a home. Guess I need to slum it up a bit.

edit: after clicking around on my city's 'struggling' businesses, it appears commercials selling foods and textiles are the ones that are affected. Maybe chemicals as well.

MikeC fucked around with this message at 02:52 on Nov 2, 2023

WithoutTheFezOn
Aug 28, 2005
Oh no
I see a lot of beverages, which I guess is food.

MikeJF posted:

I don't think there's any real reason to be particularly pessimistic that it's all fundamentally bad and unfixable:
I think it’s fixable. I just think when they fix things those things largely won’t matter.

See the discussion about high rent complaining. Besides the icons (which I’m sure will be removable via mods), will it matter that much? I’m seeing a fair bit of complaining, but they’re all low-density housing and generic industry. Are the buildings half empty? No. Are the residents unhappy? Nope. Are they being abandoned? Doesn’t look like it.

turn off the TV
Aug 4, 2010

moderately annoying

this game has surprisingly nice music that's just stored as loose .ogg files separate from all of the radio segments in a sub directory of the game's install folder

Grand Fromage posted:

This really emphasizes how inadequate the UI is. There is no way to understand how any of this mechanic works without examining the code. Does make you wonder how many things in the game are actually working but as a player you can't interact with the systems because there's zero information.

a lot of that is stuff that they said in the dev diary, you may want to reread some of those to see how things are supposed to work. the rent system actually working exactly as described makes me think that the game just released 6 months early and actually will have all of the cool economic stuff working eventually.

Grand Fromage
Jan 30, 2006

L-l-look at you bar-bartender, a-a pa-pathetic creature of meat and bone, un-underestimating my l-l-liver's ability to metab-meTABolize t-toxins. How can you p-poison a perfect, immortal alcohOLIC?


It doesn't matter what a dev diary said. There is nothing, in game, for me to assess what the rent is of a building or why it is that way. If you want to have 15 different elements going into rent that's fine, but give me an info window when I click a building that shows me that information instead of just "-16 High rent".

I guess I could figure out commute time by following all 200 people living in this skyscraper but I'm not going to do that. Gimme the SimCity 4 commute info view.

E: Wonder how much you can mod the UI. There was a commuter destination mod for 1 that worked... okay, but not great.

Grand Fromage fucked around with this message at 03:30 on Nov 2, 2023

Rev. Bleech_
Oct 19, 2004

~OKAY, WE'LL DRINK TO OUR LEGS!~

why doesn't "snap to roads" actually seem to work with intersections anyway? It doesn't snap, it bends and wobbles around

sitchensis
Mar 4, 2009

Grand Fromage posted:

It doesn't matter what a dev diary said. There is nothing, in game, for me to assess what the rent is of a building or why it is that way. If you want to have 15 different elements going into rent that's fine, but give me an info window when I click a building that shows me that information instead of just "-16 High rent".

I guess I could figure out commute time by following all 200 people living in this skyscraper but I'm not going to do that. Gimme the SimCity 4 commute info view.

E: Wonder how much you can mod the UI. There was a commuter destination mod for 1 that worked... okay, but not great.

Agreed. The simulation depth is great, but it’s not showing up in a way that, visually or game mechanics wise, makes me care as a player.

If the building has a flashing icon above it but fundamentally looks the same as it ever did, then all I’m gonna do is ignore the icon.

If the building has huge, ugly “FOR RENT $$$” signage plastered over it, or if it’s boarded up, or if ugly piles of garbage are randomly generated on it, I will start to care, because now that’s something that affects how my city is looks, and spurs me into finding out what’s wrong — or what’s right, if that’s a visual I’m trying to generate more of if I want to create a slum district.

explosivo
May 23, 2004

Fueled by Satan

sitchensis posted:

Agreed. The simulation depth is great, but it’s not showing up in a way that, visually or game mechanics wise, makes me care as a player.

See: my disappointment when I realized the sports stadiums are always completely empty.

piratepilates
Mar 28, 2004

So I will learn to live with it. Because I can live with it. I can live with it.



Another post by the guy, this time for industrial zone rent:

https://www.reddit.com/r/CitiesSkylines/comments/17loew6/code_deep_dive_residential_rents/k7gms6n/ posted:

For industry zones, the game calculates rent based on half of the value of the building's upkeep costs + consumption costs. It then calculates the maximum rent the company can afford based on its efficiency, revenue from sold goods (based on market prices and actual orders), overhead (such as taxes, wages, and transportation) then compares the rent with the maximum the company can afford.

The rabbit hole goes deeper when you get into what makes a company profitable in the first place! The simulation considers the actual price of the goods sold for the company, and has an actual goods market underpinning all of this, with local businesses placing real orders for real goods to be delivered at real market prices. This factors in many things such as the cost of resources, labor, transportation, and demands for the goods sold.

There could be a few things causing your industry to struggle to pay rent:

High transportation costs
Are your exports too costly? Do you have a cargo port, train terminal, or airport nearby? Is the only way to export goods by truck across the map?
Are your industry zones too far away from your commercial centers? Are the trucks mired in traffic?
Low efficiency
Is the business fully staffed with employees having the appropriate education level for the job?
Are employees able to make it to work on time? Are there traffic issues you need to deal with during rush hours? Cims actually do work shifts in this game!
EDIT: Are your employees sick? Is poor healthcare causing them to call in?
Have you considered placing signature industrial buildings with efficiency bonuses?
Don't forget the special university that has industrial bonuses!
Market factors
Do you have a significant surplus of the goods sold by the company? Should you raise taxes on this type of goods to discourage more competition in this saturated market? Yes, that may mean this business will fail, but a more viable business producing goods your city needs more will take its place.
Do you have enough local businesses keeping the factories busy with orders? Should you zone more commercial and office space?
Hope this helps!!!

sitchensis posted:

Agreed. The simulation depth is great, but it’s not showing up in a way that, visually or game mechanics wise, makes me care as a player.

If the building has a flashing icon above it but fundamentally looks the same as it ever did, then all I’m gonna do is ignore the icon.

If the building has huge, ugly “FOR RENT $$$” signage plastered over it, or if it’s boarded up, or if ugly piles of garbage are randomly generated on it, I will start to care, because now that’s something that affects how my city is looks, and spurs me into finding out what’s wrong — or what’s right, if that’s a visual I’m trying to generate more of if I want to create a slum district.

I was thinking about this the other day while staring at a sea of "rent is high" icons and wondering why they bothered me so much.

It just feels to me like some basic game dev trope, trying to give insight in to whats happening but not going any deeper. I can see that a bunch of buildings have too high of rents, but I don't know what to do about it, don't know what's causing it, it's obscuring all these buildings, makes the graphics noisy, and doesn't go any deeper than just exposing a number to me. What happens if I ignore the icons? Will my city be affected? Is it going to resolve itself? Are things going to get worse? Will people emigrate and my buildings left to ruin? I don't think so, I'm just going to get more icons until I press the ~ key and not have to see them anymore. As far as I can tell, my city won't look more abandoned, like a 2010's Detroit, if I ignore them. My city doesn't get more rundown if there aren't welfare offices to provide relief. There's no homeless tents or visual or material effects of homelessness (unless I missed it). There's all these systems that have bars and heatmaps and numbers but don't really seem to impact the city in a visceral way.

I think the game (and C:S1) has a bunch of those systems too, where they don't go any deeper than "place a building and watch bar go up". What happens if I don't have enough police stations in the city? Will the city look like crime has taken over? Could I tell from a glance and feel like parts of the city that have high crime actually have high crime? No not really, I just get more icons until I place a police station and see a bar of "crime-itude" go from high to low. There's no decision there either, there's no reason not to place more police stations, especially since I can afford it, so I might as well just place a bunch to resolve the icon and go on with my day.

I'm really hoping (I'm kinda dreading, to be more honest) DLC for this one doesn't just do the thing they did in some of the C:S1 DLC, where they add a "system" that doesn't really have anything to it. Snowfall is like that to me, where heating exists but it doesn't really have any purpose. Yeah it's a snowy map, it gets cold, people need heating, but what's the point in heating in the game? I can afford heating plants, there's no downside to placing them, if I don't place them people get mad, so I place a building and watch a bar go up and move on. Industries is the only DLC where I think they actually implemented something novel and interesting, it wasn't just a "place building and bar go up", it was something that brought a realistic scale, and variety, and choices in what to build, and required a lot of space, and provided jobs and created traffic and helped your city but also came with drawbacks that went beyond a hit to the balance sheet. The industries in 2 so far seem really neutered and I hope I don't have to buy another industries DLC just to go back to what they already nailed.

piratepilates fucked around with this message at 05:06 on Nov 2, 2023

Bedurndurn
Dec 4, 2008

piratepilates posted:


* Commute time (lower time = higher rent)
* Travel time to shopping (lower time = higher rent)
* This means that mixed use buildings are going to have higher rents due to this alone!
* Household happiness, health, and wellbeing (higher values = higher rent)
* Tax rate (lower tax = lower rent)
* Side note: Children reduce the tax rate of the household! Currently, birth rates are controlled by random chance, but a fun mod might allow citizen happiness to affect the birth rate chance!
* Highest household education level (higher education = higher rent)
* Service coverage (police, healthcare, communication, education, garbage, entertainment, welfare) (higher coverage = higher rent)
* Dwelling unit size (lot size \* floors / units) (higher size = higher rent)
* This means that zoning high density alone may not be enough to help. Consider zoning smaller lots to force smaller dwelling units, but be careful that units don't get too small, because this has a negative effect on happiness.
* Land value (higher value = higher rent)
* Urban blight (nearby crime, abandonment, pollution, homelessness) (more blight = lower rent)
* Building level (higher level = higher rent)


Does half that poo poo even make sense? Commute time to where? My rent goes up if I'm healthy and happy? Getting a degree makes my rent get hiked? Paying less in taxes makes my rent go down?

I don't know how heavily some of those things are weighted, but it sounds like throwing a bunch of extraneous poo poo at a model.

piratepilates
Mar 28, 2004

So I will learn to live with it. Because I can live with it. I can live with it.



Bedurndurn posted:

Does half that poo poo even make sense? Commute time to where? My rent goes up if I'm healthy and happy? Getting a degree makes my rent get hiked? Paying less in taxes makes my rent go down?

I don't know how heavily some of those things are weighted, but it sounds like throwing a bunch of extraneous poo poo at a model.

It's Some Dude on reddit who is decompiling compiled game code and trying to interpret it, so take it with a grain of salt.

But I'm hoping some of this is like, calculating how much a tenant will tolerate rent, instead of setting the rent itself. So if you're in a place near a bunch of parks and fire stations and good schools, you'll be willing to pay more for rent than if you lived next to a garbage dump. If you live close to your job, you'll be less likely to consider rent high, etc.

Now, take me with a grain of salt because I'm interpreting Some Dude on reddit's interpretation, but it gives me hope that they did consider some smarter things here.

Except education, I hope that really means the education skill level of a cim's job and not their actual education. C:S1 had that weird education<->wealth proxy, where your residential level up via education, which I thought was stupid. There are plenty of dumbass NYPD dudes living in nice big houses on Staten Island, and a lot of smart PhDs who can't find a job and live in some tenement in Stuytown. There's some correlation there, but directly linking education and wealth is dumb.

turn off the TV
Aug 4, 2010

moderately annoying

Bedurndurn posted:

Does half that poo poo even make sense? Commute time to where? My rent goes up if I'm healthy and happy? Getting a degree makes my rent get hiked? Paying less in taxes makes my rent go down?

I don't know how heavily some of those things are weighted, but it sounds like throwing a bunch of extraneous poo poo at a model.

yes that all makes sense when you remember that there is not rent in the game and that metric is basically general household expenses adjusted by the cost of living in a particular area and it shouldn't have been called rent

Grand Fromage
Jan 30, 2006

L-l-look at you bar-bartender, a-a pa-pathetic creature of meat and bone, un-underestimating my l-l-liver's ability to metab-meTABolize t-toxins. How can you p-poison a perfect, immortal alcohOLIC?


Yeah they just simplified a bunch of stuff into "rent" to make it manageable. I don't think they intended that literally everyone in your city is renting from... I guess the state? Since you're doing state capitalism too.

Yaoi Gagarin
Feb 20, 2014

I think it's inspired by this: https://en.wikipedia.org/wiki/Law_of_rent

and to my knowledge it makes sense to simplify it down to just "rent" for the game

the gist is that land value comes from how good a location is for economic activity. in ye olde days that mostly meant how fertile it was, but now it includes things like how close it is to transportation, social services, other businesses, etc.

firms can make more money in Los Angeles or Tokyo than in Boise, so they pay higher wages, and then landlords turn around and squeeze us for every drop of that. even if you buy a house, the price of the land is determined by how much a landlord could charge for rent, so you're effectively paying off some years of this rent to the previous owner in a lump sum

buglord
Jul 31, 2010

Cheating at a raffle? I sentence you to 1 year in jail! No! Two years! Three! Four! Five years! Ah! Ah! Ah! Ah!

Buglord
Patch is like night and day for performance. 7900XT/7800X3D were playable but a real stutter filled mess at 1440p. Now everything is much silkier and smoother. The game does feel a fair bit shallow though, which is a shame. Something that also bugs me is that the service buildings can clash hard with existing building styles. Hospital sticks out like something from Mirrors Edge, whereas the fire stations and schools look way old fashion. Mods will fill that gap, of course, but meh. I also feel like farms got a step back from CS1, which is a number.

Vahakyla
May 3, 2013
Fire and police shouldn’t be a footnote in costs. They should be very expensive so you really think where you put them.

turn off the TV
Aug 4, 2010

moderately annoying

Apparently citizens all have bank accounts that are accurate to the dollar or euro or whatever, at least according to the guy looking through the decompiled code. So there is potentially a hidden stat showing household income that is possibly what wealth reflects and the devs chose to go with taxation based on education level instead of income.

I'm really starting to think that maybe CO didn't actually intend to release this game in 2023.

hemale in pain
Jun 5, 2010




When you plop down a bus stop do all the happy little faces which pop up represent the distance people will walk to it?

lagidnam
Nov 8, 2010

hemale in pain posted:

When you plop down a bus stop do all the happy little faces which pop up represent the distance people will walk to it?

We don't know. It should be the radius that gives houses and the cims inside a bonus to the "public transportation" value. You would think that it's also the same as the distance they want to walk but nobody knows, yet.

Fishstick
Jul 9, 2005

Does not require preheating
Its odd how they went so hard about making service buildings upgradeable and semi-modular, but you can't plop down a train station or rail yard that doesn't come with a shitton of extra tracks. Where's my rural / urban / terminal train stations?

MikeJF
Dec 20, 2003




Fishstick posted:

Its odd how they went so hard about making service buildings upgradeable and semi-modular, but you can't plop down a train station or rail yard that doesn't come with a shitton of extra tracks. Where's my rural / urban / terminal train stations?

Sometimes you just need a Heathmont.



EDIT: or, since we were talking about sinking tracks, a Jolimont. I'd love a nice Jolimont that sinks the line down from the road snap.

MikeJF fucked around with this message at 12:28 on Nov 2, 2023

Martian
May 29, 2005

Grimey Drawer

buglord posted:

I also feel like farms got a step back from CS1, which is a number.

Grain farmland looks the same as livestock farmland lmao

Ms Adequate
Oct 30, 2011

Baby even when I'm dead and gone
You will always be my only one, my only one
When the night is calling
No matter who I become
You will always be my only one, my only one, my only one
When the night is calling



piratepilates posted:

There's no homeless tents or visual or material effects of homelessness (unless I missed it). There's all these systems that have bars and heatmaps and numbers but don't really seem to impact the city in a visceral way.

I agree with the general thrust of what you are saying but just wanted to say that a day or two ago I saw something weird on a tennis court so I zoomed in and it actually was a little group of homeless tents

MikeJF
Dec 20, 2003




Fishstick
Jul 9, 2005

Does not require preheating
Home court advantage

CuddleCryptid
Jan 11, 2013

Things could be going better

I had two shops that were next to each other start producing heart bubbles, which I hadn't seen before. What does that mean? From my experience with the Sims I assume they were loving but I am not sure how that works here.

In regards to industry, I was looking around the other day and was surprised to see how many businesses are just storage yards. I put down some logging industry and the industry around it started daisy chaining a bunch of lumberyards that just store the wood, which makes me wonder how that affects downstream prices if the wood is being quadruple handled.

VVV Ah so that is how land value is born.

CuddleCryptid fucked around with this message at 13:20 on Nov 2, 2023

mutata
Mar 1, 2003

You have to let the wood sit in the lumberyard until heart bubbles appear and the logs start loving.

OddObserver
Apr 3, 2009

Martian posted:

Grain farmland looks the same as livestock farmland lmao

Need cow cims?

Antigravitas
Dec 8, 2019

Die Rettung fuer die Landwirte:
Cows with teeth, of course. Everything needs teeth.

piratepilates
Mar 28, 2004

So I will learn to live with it. Because I can live with it. I can live with it.



Ms Adequate posted:

I agree with the general thrust of what you are saying but just wanted to say that a day or two ago I saw something weird on a tennis court so I zoomed in and it actually was a little group of homeless tents

Oh cool, had no idea. I usually spend my time zoomed out pretty far so I never see stuff like that. I do love that they are actually including stuff like that, maybe they just need to make it more visual from a macro level somehow.

Fishstick posted:

Its odd how they went so hard about making service buildings upgradeable and semi-modular, but you can't plop down a train station or rail yard that doesn't come with a shitton of extra tracks. Where's my rural / urban / terminal train stations?

Yeah I thought it was odd that they made buildings modular and then made the modular parts really uninteresting. There's usually only one upgrade per building that changes the footprint of it, and the others I just lay down asap since money doesn't matter.

Like, why have a clinic and a hospital, when you could have just a clinic and make enough modular systems to it that it builds up to be a hospital. People are complaining about the only schools included being quite large, they could have made the base school really small and you upgrade on more buildings to make it big.

I feel like they made the base of an interesting system there but didn't go all the way with it.

explosivo
May 23, 2004

Fueled by Satan

I wish the modular additions were more flexible with placement, too. It would be nice to be able to place like the elementary school health building across the street, for example.

Mad Wack
Mar 27, 2008

"The faster you use your cooldowns, the faster you can use them again"

Ms Adequate posted:

I agree with the general thrust of what you are saying but just wanted to say that a day or two ago I saw something weird on a tennis court so I zoomed in and it actually was a little group of homeless tents

that's really cool - I have been looking for little details like that and haven't come across any, e.g. my stadium never plays a game, cims don't seem to wander my parks and plazas

any other examples of the lots actually looking "alive"?

Dr. Clockwork
Sep 9, 2011

I'LL PUT MY SCIENCE IN ALL OF YOU!

explosivo posted:

I wish the modular additions were more flexible with placement, too. It would be nice to be able to place like the elementary school health building across the street, for example.

This. It’s especially egregious with the high school sports field.

Archduke Frantz Fanon
Sep 7, 2004

yeah if the modularity worked more like that it would be perfect, but what we have now just makes me yearn for the district based placement

Fishstick
Jul 9, 2005

Does not require preheating

explosivo posted:

I wish the modular additions were more flexible with placement, too. It would be nice to be able to place like the elementary school health building across the street, for example.

Also, wanna relocate it? Tough tits, gotta bulldoze the whole thing, or relocate the whole thing in its current unmodifiable layout. "Modular".

Adbot
ADBOT LOVES YOU

Deltasquid
Apr 10, 2013

awww...
you guys made me ink!


THUNDERDOME

turn off the TV posted:

Apparently citizens all have bank accounts that are accurate to the dollar or euro or whatever, at least according to the guy looking through the decompiled code. So there is potentially a hidden stat showing household income that is possibly what wealth reflects and the devs chose to go with taxation based on education level instead of income.

I'm really starting to think that maybe CO didn't actually intend to release this game in 2023.

Maybe your city doesn’t have the legal competence to impose income taxes.

Maybe education tax is one of the few types of taxes they are allowed to impose since all other taxes already exist as a matter of state or federal law.

Where’s my windows tax slider, CO? https://en.m.wikipedia.org/wiki/Window_tax

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply