governors elections

Post bug reports and ask for tech support here.

Moderator: Gil R.

Post Reply
SeaWolF K
Posts: 143
Joined: Wed Oct 01, 2003 5:28 pm

governors elections

Post 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.
User avatar
ericbabe
Posts: 11852
Joined: Wed Mar 23, 2005 3:57 am
Contact:

RE: governors elections

Post 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.

Image
SeaWolF K
Posts: 143
Joined: Wed Oct 01, 2003 5:28 pm

RE: governors elections

Post 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.
Post Reply

Return to “Forge of Freedom - Support”