Page 1 of 1
governors elections
Posted: Sat Dec 09, 2006 2:44 am
by SeaWolF K
I have played the game three times now, I have always wondered why I only get elections in Nov 1862. Then I realized looking at the governors screen it states the next election is in 1862 (that would be fine except its Jun 1864 currently). I have saves.
RE: governors elections
Posted: Sat Dec 09, 2006 4:33 pm
by ericbabe
The crucial bit of code is:
int turn = GetTurn();
int year = StartYear+turn/TurnsPerYear;
int halfMonth = (turn%TurnsPerYear);
// is it november?
if (halfMonth==22)
{
if ((year - pState->StartElectionYear)%pState->ElectionPeriodYears == 0)
{
// hold election for state
Acw_StateElection_For(s);
}
}
This seems to be OK, but maybe there's a problem in reading the data file that sets all the state election periods to some wrong time. I'll take a look. Thanks.
RE: governors elections
Posted: Sat Dec 09, 2006 6:37 pm
by SeaWolF K
The code works in Nov 1862 every time (Every state has an election, I know thats not true today but I'm not sure what the election schdule was back then), but there are no more elections after that. And the date for the next election remains as 1862.