Active city production ending when?

Discuss anything related to warbarons.

Active city production ending when?

Postby Chazar » Thu Jul 19, 2012 12:26 pm

When does production in active cities stop?

I seem to find active cities that stop with just two 2-turn units, and others that produce five 3-turners. :?: Is this predictable somehow, or is the total number of units produced randomly determined?
Chazar
 
Posts: 670
Joined: Tue Feb 28, 2012 7:51 pm

Re: Active city production ending when?

Postby SnotlinG » Thu Jul 19, 2012 3:49 pm

it is predictable and is limited by either the city income (as it needs to support its defenders) as well as a max number of units. I dont remember the exact code right now though.
SnotlinG
 
Posts: 2148
Joined: Sat Feb 13, 2010 12:42 am

Re: Active city production ending when?

Postby Chazar » Thu Jul 19, 2012 4:09 pm

Arrgh, I guess that is the worst of all possible replies: it can be known, but it isnt known right now. :twisted: :lol:

Well, it is good to know that it is predictable. So it makes at least sense to take measurements. Thanks.
Chazar
 
Posts: 670
Joined: Tue Feb 28, 2012 7:51 pm

Re: Active city production ending when?

Postby kenc80 » Fri Jul 20, 2012 2:49 pm

I think we had a thread about this a year or so ago...we debated having a max limit on total STR in the city and some back and forth. i forgot the result of our convo and quite frankly, am too lazy to research. :mrgreen:
kenc80
 
Posts: 344
Joined: Wed Mar 10, 2010 9:16 pm
Location: South Carolina, USA

Re: Active city production ending when?

Postby Chazar » Fri Jul 20, 2012 4:43 pm

kenc80 wrote:I think we had a thread about this a year or so ago...we debated having a max limit on total STR in the city and some back and forth. i forgot the result of our convo and quite frankly, am too lazy to research. :mrgreen:

Well, I did search the forums already, but I did not find anything relevant. I tried again now, and found this thread, which does not really tell us anything new.

I narrowed the upkeep sum to city income ratio to something between 0.60 and 0.74 already. However, I did not consider a limit on total strength yet to fit my obersvations.
Chazar
 
Posts: 670
Joined: Tue Feb 28, 2012 7:51 pm

Re: Active city production ending when?

Postby SnotlinG » Fri Jul 20, 2012 6:44 pm

if ($cityunits > 4)
{
continue;
}
if ($cityincome/2 < $cityupkeep)
{
continue;
}



So if there are more than 4 units in the city it wont build any. Or if the units in the city has an upkeep that is more than half the city income it wont build any new ones either.
SnotlinG
 
Posts: 2148
Joined: Sat Feb 13, 2010 12:42 am

Re: Active city production ending when?

Postby Chazar » Sat Jul 21, 2012 8:10 am

Thank you! :)

I did not account for the imperative nature of the code (I believe in declarative languages), which is why I had already excluded 50% from my observation: A city with 15 income will thus build 3 units having an upkeep of 3, since 6 < 7.5, albeit the total upkeep in the end is 9 > 7.5, which corresponds to 60% city income being consumed by upkeep in the end in this particular example.
Chazar
 
Posts: 670
Joined: Tue Feb 28, 2012 7:51 pm


Return to Game discussion

Who is online

Users browsing this forum: No registered users and 5 guests

cron
Not able to open ./cache/data_global.php