governors elections (Full Version)

All Forums >> [Current Games From Matrix.] >> [American Civil War] >> Forge of Freedom: The American Civil War 1861-1865 >> Forge of Freedom - Support



Message


SeaWolF K -> governors elections (12/9/2006 4:44:25 AM)

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.




ericbabe -> RE: governors elections (12/9/2006 6:33:33 PM)

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.





SeaWolF K -> RE: governors elections (12/9/2006 8:37:30 PM)

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.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
2.15625