Home World Forum
Stars! AutoHost web forums

Jump to Stars! AutoHost


 
 
Home » Stars! Clones, Extensions, Modding » Stars! Nova - Development » Turn year
Turn year Thu, 07 July 2011 17:30 Go to next message
Musmuris

 
Master Chief Petty Officer
Stars! Nova developer
Stars! Nova developer

Messages: 96
Registered: June 2011
So I tried to play a few turns, but found that only the first year orders were taken.

This was due to EmpireData.TurnYear not being updated, so I fixed that (no biggie).

However now the console shows orders turned in for a race as soon as a turn generates.

I'm not sure of the rationale for the console to read and apply the orders every few seconds. Surely all it needs to do open an orders file and look for the turn year (rather than read and apply to a temporary server state which is what I think it does now)?

Report message to a moderator

Re: Turn year Thu, 07 July 2011 17:35 Go to previous messageGo to next message
Aeglos is currently offline Aeglos

 
Chief Warrant Officer 1
Stars! Nova developer
Stars! Nova developer

Messages: 142
Registered: May 2011
Location: Chile
Yes, I encountered this when I refactored the EmpireData stuff. The Console is constantly ticking and reading orders so it can display "last orders turned in" on the player's list as soon as they are submited, which I believe is now broken too.

The console shouldn't read the whole orders though. It should just check if the file has been made and then display "orders turned in". Perhaps peeking inside to check the TurnYear, or we could add the year into the filename; like humanoids.2102.orders.

Report message to a moderator

Re: Turn year Sat, 09 July 2011 02:50 Go to previous messageGo to next message
Daniel is currently offline Daniel

 
Chief Warrant Officer 3
Stars! Nova developer
Stars! Nova developer

Messages: 179
Registered: April 2006
Location: Nowra, Australia
This is caused by the EmpireData.TurnYear having no clear meaning. When does it update? When the turn generates? How then do you know the turn is submitted?

I have created a fix for this by incrementing the turn year in the .orders once the client has submitted it. This is a bit of kludge and a better solution might be to have a TurnSubmitted flag in EmpireData.

I will commit this fix once I have explianed what I have done with Ids...



Have fun.

Report message to a moderator

Re: Turn year Sat, 09 July 2011 03:54 Go to previous messageGo to next message
Aeglos is currently offline Aeglos

 
Chief Warrant Officer 1
Stars! Nova developer
Stars! Nova developer

Messages: 142
Registered: May 2011
Location: Chile
A flag would be better in ClientState rather tha EmpireData I suppose.

And I think TurnYear should be read from the intel and sent by the server, as in "This intel is for XXXX year".

Report message to a moderator

Re: Turn year Sat, 09 July 2011 04:27 Go to previous messageGo to next message
Daniel is currently offline Daniel

 
Chief Warrant Officer 3
Stars! Nova developer
Stars! Nova developer

Messages: 179
Registered: April 2006
Location: Nowra, Australia
Daniel wrote on Sat, 09 July 2011 16:50


I have created a fix for this by incrementing the turn year in the .orders once the client has submitted it. This is a bit of kludge and a better solution might be to have a TurnSubmitted flag in EmpireData.


I have implemented a TurnSubmitted flag in EmpireData. It needs to be in EmpireData so the server can tell if the data it is looking at for 2100 is the empire data it generated at the start of 2100 or the state updated from the orders once turn 2100 has been played by the client.



Have fun.

Report message to a moderator

Re: Turn year Sat, 09 July 2011 05:14 Go to previous messageGo to next message
Daniel is currently offline Daniel

 
Chief Warrant Officer 3
Stars! Nova developer
Stars! Nova developer

Messages: 179
Registered: April 2006
Location: Nowra, Australia
Yes, I have noticed that the "last turned in" year is incremented in the console before the turn is submitted... Getting to it.


Have fun.

Report message to a moderator

Re: Turn year Sat, 09 July 2011 06:19 Go to previous message
Daniel is currently offline Daniel

 
Chief Warrant Officer 3
Stars! Nova developer
Stars! Nova developer

Messages: 179
Registered: April 2006
Location: Nowra, Australia
Fixed.

Edit: Added EmpireData.LastTurnSubmitted to track the most recent game year for which the empire submitted a turn.


[Updated on: Sat, 09 July 2011 06:20]




Have fun.

Report message to a moderator

Previous Topic: Can't produce new designs?
Next Topic: Need to move away from using names as IDs
Goto Forum:
  


Current Time: Thu Apr 18 23:40:00 EDT 2024