FreeOrion

Forums for the FreeOrion project
It is currently Sun May 27, 2018 9:32 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: problem with blockades
PostPosted: Tue Jan 29, 2013 10:23 pm 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4620
I have pretty consistently observed what seems like a problem / incomplete treatment for blockades -- when I have an aggressive armed fleet parked over a system, all defenses cleared, waiting for invasion troops, my fleet's engagement with the planets seems to alternate. One turn they'll bombard the planets & clear the defenses & ground troops won't regen/advance, but the next turn, apparently the planetary regen occurs after the battle decision, because there will be no battle at all, and the defenses and the ground troops will regen and have positive values at the end of the turn. The turn thereafter there will again be a battle and defenses cleared and ground troop level held stationary. And that continues to alternate.

I suppose the difficulty comes (at least currently) from the regular defense meters being on the same timing as the troops -- the meter regen happens after battles so that the troop meter can check for a battle that turn and know if it should advance. If it's too much trouble to decouple the timing & have shields & defense meters regen before battles, but have the troop meter regen after battles, then perhaps the logic informing troop meter regen could be made to be a little more complex, also holding flat if there is an aggressive enemy fleet in the system, whether or not an actual battle was triggered?

_________________
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0


Top
 Profile  
 
PostPosted: Wed Jan 30, 2013 2:25 am 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12197
Location: Munich
The code that decides if a battle happened in a system could mark a planet as being in a battle even if its meters are all 0 so isn't attacked, as long as there are ships in the system that could have attacked it.

Longer-term, a separate bombardment mechanic was discussed, which would be what reduces planet meters, and that would continue even if the meters are zero, in order to prevent their regen.


Top
 Profile  
 
PostPosted: Wed Jan 30, 2013 5:24 am 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4620
Geoff the Medio wrote:
The code that decides if a battle happened in a system could mark a planet as being in a battle even if its meters are all 0 so isn't attacked, as long as there are ships in the system that could have attacked it.
That sounds like a good solution, at least until some decision is made about bombardment and the other meters. If you're too busy to get to it soon, would you recall any more hints as to particular files I should check?

_________________
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0


Top
 Profile  
 
PostPosted: Wed Jan 30, 2013 11:04 am 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12197
Location: Munich
Dilvish wrote:
...more hints as to particular files I should check?
Probably it's in ServerApp.cpp, when deciding where combats should take place each turn. There also are or recently were a few quirks with that code, that sometimes lead to battles where nothing can attack.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group