FreeOrion

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

All times are UTC


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.



Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Sun Feb 11, 2018 6:41 am 
Offline
Space Kraken

Joined: Fri Jul 03, 2015 2:32 am
Posts: 103
Location: Great White North Eh
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


Attachments:
freeorion one.jpg
freeorion one.jpg [ 202.76 KiB | Viewed 395 times ]
freeorion two.jpg
freeorion two.jpg [ 205.79 KiB | Viewed 396 times ]

_________________
Windows 7 64bit, AMD 8 Core, 8 GB
Nvidia GTX 670 @ 3240x1920
FreeOrion Build: Latest Windows Test Build
Top
 Profile  
 
PostPosted: Sun Feb 11, 2018 7:05 pm 
Offline
Vacuum Dragon
User avatar

Joined: Mon Apr 10, 2017 4:25 pm
Posts: 542
Maybe the troop meter is also subject to the defense regeneration techs?


Top
 Profile  
 
PostPosted: Sun Feb 11, 2018 9:16 pm 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4620
Oberlus wrote:
Maybe the troop meter is also subject to the defense regeneration techs?
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.

_________________
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: Sun Feb 11, 2018 10:09 pm 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12197
Location: Munich
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.


Top
 Profile  
 
PostPosted: Sun Feb 11, 2018 10:56 pm 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4620
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.
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.

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


Top
 Profile  
 
PostPosted: Sun Feb 11, 2018 11:04 pm 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12197
Location: Munich
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.


Top
 Profile  
 
PostPosted: Sun Feb 11, 2018 11:26 pm 
Offline
Space Kraken

Joined: Fri Jul 03, 2015 2:32 am
Posts: 103
Location: Great White North Eh
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 7 64bit, AMD 8 Core, 8 GB
Nvidia GTX 670 @ 3240x1920
FreeOrion Build: Latest Windows Test Build


Top
 Profile  
 
PostPosted: Sun Feb 11, 2018 11:43 pm 
Offline
Programmer

Joined: Sun Feb 14, 2016 12:08 am
Posts: 389
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.


Top
 Profile  
 
PostPosted: Mon Feb 12, 2018 3:49 am 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4620
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.
Ack!

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


Did you have a different recollection than me, or did you perhaps misread my sentence with too many clauses?

_________________
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: Mon Feb 12, 2018 7:43 am 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12197
Location: Munich
Dilvish wrote:
...did you perhaps misread my sentence with too many clauses?
Sorry, I missed this bit...
Quote:
...LastTurnAttackedByShip gate is the newer one we had decided to move to...
But,
Quote:
it does seem like they should both be the same...
.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.


Top
 Profile  
 
PostPosted: Mon Feb 12, 2018 3:17 pm 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4620
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.
Yes, OK; or, if there are several planets present, and the attacker only sends in a single ship.

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, and if a planet wasn't actually attacked then it should get to regen. (edit: I now think that discussion must have been about blocking various damage repair techs for ships, rather than planet regen, since planet regen had long been tied to actually getting hit.)

At least, that's my recollection; I am frustrated by my inability to find that previous discussion via searching. I did find a previous discussion where we noted a related problem-- if an outpost undergoing an extended blockade had gotten its defenses and infrastructure knocked to zero on one turn, then they would still be zero on the next turn, leading to it not getting attacked that next turn and therefore allowing regen for a turn, which we didn't like. In that discussion it seems we had settled on marking such outposts as attacked even if they weren't actually hit.

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


Top
 Profile  
 
PostPosted: Mon Feb 12, 2018 3:53 pm 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12197
Location: Munich
Feel free to switch the scripts back to LastTurnAttackedByShip...


Top
 Profile  
 
PostPosted: Thu Feb 15, 2018 11:18 am 
Offline
Vacuum Dragon
User avatar

Joined: Mon Apr 10, 2017 4:25 pm
Posts: 542
Quote:
planets troops increasing even with attacking ships in orbit
Bump.

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.


Top
 Profile  
 
PostPosted: Sat Feb 17, 2018 7:04 am 
Offline
Space Kraken

Joined: Fri Jul 03, 2015 2:32 am
Posts: 103
Location: Great White North Eh
FYI; Build 02-12 win32, unable to invade now (no invade button), and enemy troops still increasing while i'm in orbit.

_________________
Windows 7 64bit, AMD 8 Core, 8 GB
Nvidia GTX 670 @ 3240x1920
FreeOrion Build: Latest Windows Test Build


Top
 Profile  
 
PostPosted: Sat Feb 17, 2018 10:13 am 
Offline
Vacuum Dragon
User avatar

Joined: Mon Apr 10, 2017 4:25 pm
Posts: 542
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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:  
cron
Powered by phpBB® Forum Software © phpBB Group