Change to city growth code. July 28, 2010, 08:32:13 pm Pushed to my github devel branch.Cities will grow with more dense central part.and cityrules.tab parameters for new code:renovations_count -- how many buildings will be renovated in one step.renovations_try -- How many attempts we will do to find them.Don't forget to adjust renovation_percentage.As usual, I need better names for variables/parameters. Quote Selected
Re: Change to city growth code. Reply #1 – July 28, 2010, 09:08:02 pm Thank you for this - will test it presently. How does renovation_percentage need adjusting for this patch? Quote Selected
Re: Change to city growth code. Reply #2 – July 28, 2010, 09:18:54 pm Quote from: jamespetts – on July 28, 2010, 09:08:02 pmHow does renovation_percentage need adjusting for this patch?-10%, I think. Quote Selected
Re: Change to city growth code. Reply #3 – July 28, 2010, 09:28:28 pm Might I ask - why does this need adjusting in this way? Also, I have just applied the patch: when I try to generate a new map, I get a runtime error relating to an uninitialised variable "f" at line 4345 of simcity.cc - what is "f" for?Edit: That seems to be fixed by setting f to 1.0 at line 4312, but does this alter the intended behaviour? Quote Selected Last Edit: July 28, 2010, 09:37:52 pm by jamespetts
Re: Change to city growth code. Reply #4 – July 29, 2010, 03:28:46 am Quote from: jamespetts – on July 28, 2010, 09:28:28 pmMight I ask - why does this need adjusting in this way?I don't know. It just looks that way. Trial & error decision.My patch uses renovation_percentage in somewhat different way then before => new 'best' value must be found.Quote from: jamespetts – on July 28, 2010, 09:28:28 pmAlso, I have just applied the patch: when I try to generate a new map, I get a runtime error relating to an uninitialised variable "f" at line 4345 of simcity.cc - what is "f" for?Yes. it wil break 'city avoid high place' behaviour.It was cut&paste error in my commit 3bae1da8f2eaa26a1d9400a73ed9878b437c1c27.Fix pushed to github. Quote Selected
Re: Change to city growth code. Reply #5 – July 29, 2010, 08:45:10 am Inkelyad,thank you for your answers and for your fix, which I shall apply when I get a chance: that is most helpful. How does your patch alter how "renovation_percentage" works? Quote Selected
Re: Change to city growth code. Reply #6 – July 29, 2010, 09:29:15 am Without too much details and in pseudo-code:Before:Code: [Select]if simrand(100) <= renovation_percentage: try to renovate building via renoviere_gebaeuderenoviere_gebaeude not always do renovation. In my version it is checked.Code: [Select]if simrand(100) <= renovation_percentage: try to renovate building until we renovate renovations_count buildings ( or we do too many attempts) Quote Selected