planets troops increasing even with attacking ships in orbit
Moderator: Oberlus
Forum rules
Always mention the exact version of FreeOrion you are testing.
When reporting an issue regarding the AI, if possible provide the relevant AI log file and a save game file that demonstrates the issue.
Always mention the exact version of FreeOrion you are testing.
When reporting an issue regarding the AI, if possible provide the relevant AI log file and a save game file that demonstrates the issue.
planets troops increasing even with attacking ships in orbit
Is this an intended change? I noticed that on a scylor planet that I was attacking their troops were increasing even though I had blockading ships in orbit.
In the screencaps below you can see that on turn 131 the planet has 2 troops but on the next turn its grown to 3, even though I have a fleet in orbit and there don't appear to be any stealth issues going on.
(I am in blue, I've taken over Albans a II, but didn't have quite enough troops for Albans a I. By the time the additional dropship was built I found to my surprise it was no longer enough.)
Build 2018-02-04
In the screencaps below you can see that on turn 131 the planet has 2 troops but on the next turn its grown to 3, even though I have a fleet in orbit and there don't appear to be any stealth issues going on.
(I am in blue, I've taken over Albans a II, but didn't have quite enough troops for Albans a I. By the time the additional dropship was built I found to my surprise it was no longer enough.)
Build 2018-02-04
- Attachments
-
- freeorion one.jpg (202.76 KiB) Viewed 6079 times
-
- freeorion two.jpg (205.79 KiB) Viewed 6080 times
Windows 10 64bit, AMD 8 Core, 16 GB
Nvidia GTX 670 @ 3240x1920
FreeOrion Build: Latest Windows Test Build
Nvidia GTX 670 @ 3240x1920
FreeOrion Build: Latest Windows Test Build
Re: planets troops increasing even with attacking ships in o
Maybe the troop meter is also subject to the defense regeneration techs?
Re: planets troops increasing even with attacking ships in o
Checking the scripts, it does not look that way to me, and the troop level techs that provide a bonus troop regen have it gated by LastTurnBattleHere, so that shouldn't be doing it either.Oberlus wrote:Maybe the troop meter is also subject to the defense regeneration techs?
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: planets troops increasing even with attacking ships in o
Should meter regen be gated by when a battle occurred in the system, or by when the planet was attacked? Currently it's the latter, possibly with some lingering buggy - 1's in the scripts.
Re: planets troops increasing even with attacking ships in o
I suppose you mean that the base regen is gated by LastTurnAttackedByShip? Before I posted above, I reviewed the scripts, and it looked pretty clear to me that the bonus regens provided by the troop techs are currently gated by LastTurnBattleHere. As far as which one it *should be*, it does seem like they should both be the same, and as I recall we had previously discussed the overall issue and the LastTurnAttackedByShip gate is the newer one we had decided to move to, these troop regen techs must have just slipped through.Geoff the Medio wrote:Should meter regen be gated by when a battle occurred in the system, or by when the planet was attacked? Currently it's the latter, possibly with some lingering buggy - 1's in the scripts.
As for lingering buggy -1's,
* After your couple of recent commits making corrections for that, I scanned the scripting for any other uses of LastTurnAttackedByShip and found no others
* I have now also scanned for all uses of LastTurnBattleHere, and it looks to me like they are all of the form "Turn low = X.System.LastTurnBattleHere + 1" which looks fine to me (where 'X' was either 'Source' or 'LocalCandidate').
* So those all look fine to me, and I don't think that could have caused the premature (as opposed to delayed) regen anyways
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: planets troops increasing even with attacking ships in o
In troops.macros there is a "(Source.LastTurnAttackedByShip < CurrentTurn)" remaining. Other meters have it as well. I'll switch them to LastTurnBattleHere.
Edit: https://github.com/freeorion/freeorion/ ... f1b690c514
I'm pondering removing several conditions, like Turn, that can be replaced with (Value1 >= Value2) style conditions, to simplify the parser format.
Edit: https://github.com/freeorion/freeorion/ ... f1b690c514
I'm pondering removing several conditions, like Turn, that can be replaced with (Value1 >= Value2) style conditions, to simplify the parser format.
Re: planets troops increasing even with attacking ships in o
I don't know if it's directly related to this or not but I just noticed my ships in orbit around enemy planets are repairing as well.
Windows 10 64bit, AMD 8 Core, 16 GB
Nvidia GTX 670 @ 3240x1920
FreeOrion Build: Latest Windows Test Build
Nvidia GTX 670 @ 3240x1920
FreeOrion Build: Latest Windows Test Build
-
- Programmer
- Posts: 389
- Joined: Sun Feb 14, 2016 12:08 am
Re: planets troops increasing even with attacking ships in o
Given a system with only a single planet with Ancient Guardians, still seeing +1 troop gain where ships have attacked for 5+ turns.
Oddly enough, changing the "increase 1 per turn" effectgroup in /scripting/species/common/troops.macros to equal current turn increases the troop gain to +2.
(LastTurnAttackedByShip < CurrentTurn changed to LastTurnAttackedByShip <= CurrentTurn)
Deleting the effect removes any gain on this planet (in both cases, need to click next turn to update changes on load).
Edit: This was as of fff1390 - "Additional - 1 missed in previous commit.", rebuilding.
Not sure if related, in this same instance the Invade button does not appear when troop ships are in system.
I'll open an issue for unable to invade with savegame later.
Oddly enough, changing the "increase 1 per turn" effectgroup in /scripting/species/common/troops.macros to equal current turn increases the troop gain to +2.
(LastTurnAttackedByShip < CurrentTurn changed to LastTurnAttackedByShip <= CurrentTurn)
Deleting the effect removes any gain on this planet (in both cases, need to click next turn to update changes on load).
Edit: This was as of fff1390 - "Additional - 1 missed in previous commit.", rebuilding.
Not sure if related, in this same instance the Invade button does not appear when troop ships are in system.
I'll open an issue for unable to invade with savegame later.
Re: planets troops increasing even with attacking ships in o
Ack!Geoff the Medio wrote:In troops.macros there is a "(Source.LastTurnAttackedByShip < CurrentTurn)" remaining. Other meters have it as well. I'll switch them to LastTurnBattleHere.
Did you have a different recollection than me, or did you perhaps misread my sentence with too many clauses?Dilvish wrote:...as I recall we had previously discussed the overall issue and the LastTurnAttackedByShip gate is the newer one we had decided to move to
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: planets troops increasing even with attacking ships in o
Sorry, I missed this bit...Dilvish wrote:...did you perhaps misread my sentence with too many clauses?
But,...LastTurnAttackedByShip gate is the newer one we had decided to move to...
.System.LastTurnBattleHere will be the current/last turn for any battle. .LastTurnAttackedByShip will only be the latest turn if the planet was actually attacked by a ship in the battle, which it might not be if there are also allied ships in the battle.it does seem like they should both be the same...
Re: planets troops increasing even with attacking ships in o
Yes, OK; or, if there are several planets present, and the attacker only sends in a single ship.Geoff the Medio wrote:LastTurnAttackedByShip will only be the latest turn if the planet was actually attacked by a ship in the battle, which it might not be if there are also allied ships in the battle.
I am not having luck finding the previous discussion I was thinking of, but one of the examples there was about repeatedly sending in a single small cheap sacrificial ship to initiate combat in the system without a real chance of doing anything except triggering LastTurnBattleHere and blocking local planet defense regen, and the consensus was that we didn't like that being a viable tactic,
Relying on LastTurnBattleHere is a simpler solution, but not one that I really like, and it seems like a pretty big change to me.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: planets troops increasing even with attacking ships in o
Feel free to switch the scripts back to LastTurnAttackedByShip...
Re: planets troops increasing even with attacking ships in o
Bump.planets troops increasing even with attacking ships in orbit
Also, AIs can't conquer my planets, dunno why. And I can't conquer theirs.
I'm over an outposted asteroid belt, with two warships and 16 troops in orbit, combat is being triggered and planet is flat. Yet I won't see the Invade button. There is visibility, double checked.
Before, the AI was orbiting my undefended planet with two warships and 6 or 8 troops for 7 turns, during which the troops of my planet grew from 0.** to 2.**, besides the enemy attacking it.
So something bad is broken.
Edit: maybe it's been fixed along with this. I'll check later on my laptop with compiled FO.
Re: planets troops increasing even with attacking ships in o
FYI; Build 02-12 win32, unable to invade now (no invade button), and enemy troops still increasing while i'm in orbit.
Windows 10 64bit, AMD 8 Core, 16 GB
Nvidia GTX 670 @ 3240x1920
FreeOrion Build: Latest Windows Test Build
Nvidia GTX 670 @ 3240x1920
FreeOrion Build: Latest Windows Test Build
Re: planets troops increasing even with attacking ships in o
Yeah. The compiled version, pulled from github two days ago, has the same problem.
I wonder if it is related to the InitialMeterValue/CurrentMeterValue FOCS thingy?
No need to say this is gamebreaking.
I wonder if it is related to the InitialMeterValue/CurrentMeterValue FOCS thingy?
No need to say this is gamebreaking.