GearCity

GearCity

View Stats:
Speeder 13 Feb, 2022 @ 4:07am
Resource rate increase resource star?
I was testing the city editor, and made a city with "5" as resource rate.
The game show this as 5 green stars... I believe this wasn't intended by you, since resource rate is supposed to be the resource price, and bigger resource rate should display in game as less stars instead.
< >
Showing 1-6 of 6 comments
Xylon 13 Feb, 2022 @ 4:23am 
Nope its exactly like its intended.
Recourcerate defines how good or how easy you are able to get recources in that City.
Eric.B  [developer] 13 Feb, 2022 @ 7:02am 
Xylon covers it, it's how easy it is to get resources. Higher the rate, the cheaper the factory prices are.
Speeder 13 Feb, 2022 @ 8:30am 
Then http://wiki.gearcity.info/doku.php?id=modtools:cityeditor is wrong, it claims increasing resource rate make the city more expensive.

Meanwhile in-game the more stars the cheaper it is.

I found out resource rate actually works as expected as long it is bigger than 0 and smaller than 2... as soon I put a resource rate bigger than 2 then it gets locked into weird stuff. (I also saw it going half red star permanently too)
Eric.B  [developer] 13 Feb, 2022 @ 9:01am 
To the code:

Resizing factories:
f_selectedcityres is resources.
f_prodtech = (((techSlider*1900+f_selectedcityinf*5+(f_selectedcitymanufactoring * (f_selectedcityres/GameData::getSingletonPtr()->maxCityRes)))/2500*f_equipmentwear)) * 100;

So in this, the higher the resources, the better the production technologies are. That results in more vehicles produced per production line.


Costs:

cost = ((175000 * ex_1d04p_year99) + ((40000) * ex_1d03p_year99) + ((50000) * fastpow(0.985, maxbuild))+ ((1000 * ex_1d018p_year99) * fastpow(static_cast<double>(60/(f_selectedcityinf+1.0)),static_cast<double>((year-1899)/24.0))) + ((i_selectedcitypercapita / (f_selectedcityinf/30)) * f_selectedcityres*(i_selectedcitypercapita/10))) * (maxbuild * 1.25);

So yes, it improves production via having easier access to resources, but increases costs as well. (Likely I did this for balancing purposes. The idea being that because resources are more available, you'll use better sources because it increases you production technologies system.) In the very old builds (pre early access even) we had 5 different sliders for making a factory. That is likely why I ended up making resources increase costs, rather than have them increase the many slider values we had which in turn increased costs.


Anyway, as I mentioned before, take what is in the mod tools manual with a grain of salt. They have not been edited yet. I am currently on the game mechanics section of the manual, and it has raw formulas for the game. Once I am done with that, I will begin editing/refining the mod tools section of the manual.


I found out resource rate actually works as expected as long it is bigger than 0 and smaller than 2... as soon I put a resource rate bigger than 2 then it gets locked into weird stuff. (I also saw it going half red star permanently too)

Star wise, resources works like this:

if(f_res > 1.75) Image_CityInfo_Resources_Value->setImage("5stars.dds"); else if(f_res > 1.65) Image_CityInfo_Resources_Value->setImage("4hstars.dds"); else if(f_res > 1.5) Image_CityInfo_Resources_Value->setImage("4stars.dds"); else if(f_res > 1.25) Image_CityInfo_Resources_Value->setImage("3hstars.dds"); else if(f_res > 1.1) Image_CityInfo_Resources_Value->setImage("3stars.dds"); else if(f_res >= 0.9) Image_CityInfo_Resources_Value->setImage("2hstars.dds"); else if(f_res >= 0.8) Image_CityInfo_Resources_Value->setImage("2stars.dds"); else if(f_res >= 0.7) Image_CityInfo_Resources_Value->setImage("1hstars.dds"); else if(f_res > 0.55) Image_CityInfo_Resources_Value->setImage("1stars.dds"); else if(f_res <= 0.55) Image_CityInfo_Resources_Value->setImage("hstars.dds");


But really there is no limits to the variable, except don't go below 0.
Last edited by Eric.B; 13 Feb, 2022 @ 9:02am
Speeder 13 Feb, 2022 @ 10:04am 
The way you setup the formulas then I am not sure how to simualte a city like Volta Redonda, that has plenty of steel because the city has a huge steel mill (the first major steel mill of the country to be precise, built by USA during WWII to help Allies build their stuff using Brazillian labor).

If I set it high to simulate it has a lot of steel, result is high quality but expensive cars... The high quality part makes sense.

But if I set it low to simulate that it has a lot of steel, result is cheap but crap cars... also accurate in the cheap part.
Eric.B  [developer] 13 Feb, 2022 @ 10:08am 
Factory tech mainly plays a role in number of units per factory line, so I would go with higher resources, because costs wise high resources only hurts when you're building the factory. The operating cost will be lower because your building more vehicles because of access to more resources. And that's more important in the long run.
Last edited by Eric.B; 13 Feb, 2022 @ 10:08am
< >
Showing 1-6 of 6 comments
Per page: 1530 50