 |
|  |
 |
|
Peter Triggs
|
|
Gone Fishin, Canada
Jan 2000 time: 05:34
|
|
code:
m_warDiscontent = 0;
const GovernmentRecord *grec = g_theGovernmentDB->Get(p->m_government_type);
if(militaryUnitsOutOfCities > grec->GetWarDiscontentMaxUnits()) {
sint32 diff = militaryUnitsOutOfCities - grec->GetWarDiscontentMaxUnits();
double total = diff * grec->GetWarDiscontentPerUnit();
double perCity;
if(all_cities.Num() < 1)
perCity = 0;
else
perCity = total / all_cities.Num();
m_warDiscontent = perCity;
}
So,
total = (militaryUnitsOutOfCities - WarDiscontentMaxUnits) * WarDiscontentPerUnit
And then (per city): warDiscontent = total/number_of_your_cities
I'll try to track down 'AtHomeRadius' now.
Edit: Yuk. Basically, if an army is further than AtHomeRadius away from one of it's cities, it may contribute to some 'overseas' measure, but I can't find where this is used.
Last edited by Peter Triggs on 24-03-2004 at 21:02
|
|
|  |
All times are GMT. The time now is 05:34. Apolyton Time is 00:34. |
top of page
|
|
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|