Page 1 of 1

problem with blockades

Posted: Tue Jan 29, 2013 10:23 pm
by Dilvish
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?

Re: problem with blockades

Posted: Wed Jan 30, 2013 2:25 am
by Geoff the Medio
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.

Re: problem with blockades

Posted: Wed Jan 30, 2013 5:24 am
by Dilvish
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?

Re: problem with blockades

Posted: Wed Jan 30, 2013 11:04 am
by Geoff the Medio
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.