"We got incoming" sitrep

For what's not in 'Top Priority Game Design'. Post your ideas, visions, suggestions for the game, rules, modifications, etc.
Post Reply
Message
Author
Ophiuchus
Vacuum Dragon
Posts: 539
Joined: Tue Sep 30, 2014 10:01 am

"We got incoming" sitrep

#1 Post by Ophiuchus » Tue Jan 02, 2018 5:17 pm

what i would find very useful sometimes is a warning if an enemy is known to arrive the next turn at one of your ships (e.g. your scout is sitting in one place for many turns) or colonies.

Would it be possible to generate a sitrep for that?
The game has the information, but i do not think its available for scripting.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

User avatar
Dilvish
AI Lead, Programmer
Posts: 4707
Joined: Sat Sep 22, 2012 6:25 pm

Re: "We got incoming" sitrep

#2 Post by Dilvish » Tue Jan 02, 2018 6:19 pm

Ophiuchus wrote:Would it be possible to generate a sitrep for that?
Seems to me it would, yes.
The game has the information, but i do not think its available for scripting.
Which needed information are you thinking is unavailable?
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

Ophiuchus
Vacuum Dragon
Posts: 539
Joined: Tue Sep 30, 2014 10:01 am

Re: "We got incoming" sitrep

#3 Post by Ophiuchus » Wed Jan 03, 2018 1:20 am

I thought flight plans are unavailable.
But maybe FinalDestinationId and StarlaneSpeed (and stealth/detection??) suffice to calculate arriving ships.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12268
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: "We got incoming" sitrep

#4 Post by Geoff the Medio » Wed Jan 03, 2018 8:10 am

RootCandidate.ETA might help.

Ophiuchus
Vacuum Dragon
Posts: 539
Joined: Tue Sep 30, 2014 10:01 am

Re: "We got incoming" sitrep

#5 Post by Ophiuchus » Sat Jan 06, 2018 10:55 pm

This should probably be moved to scripting.

Anyway, there is a pull request https://github.com/freeorion/freeorion/pull/1934.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

User avatar
Oberlus
Small Juggernaut
Posts: 702
Joined: Mon Apr 10, 2017 4:25 pm

Re: "We got incoming" sitrep

#6 Post by Oberlus » Fri Apr 06, 2018 8:22 am

This is the "At <system>: Next turn enemy ship arrives!" sitrep, right?

There is a presumably bug that allows you to know that an enemy ship is coming although you can't detect that ship.
Check the screenshot. It is turn 77. I assume some flux troopships from yellow (that has been crashing puny mass driver robos against my shielded, 4x laser 4 robos for a while) or maybe some high-stealth monster are getting to that empty system. I won't see it there on turns 78+ because of the Ion Storm.

I'll comment on the corresponding PR if that is convenient.
Attachments
sitrep_undetected_inc_enemy.png
sitrep_undetected_inc_enemy.png (513.29 KiB) Viewed 453 times

User avatar
Dilvish
AI Lead, Programmer
Posts: 4707
Joined: Sat Sep 22, 2012 6:25 pm

Re: "We got incoming" sitrep

#7 Post by Dilvish » Fri Apr 06, 2018 4:44 pm

Oberlus wrote:This is the "At <system>: Next turn enemy ship arrives!" sitrep, right?
Yes
There is a presumably bug that allows you to know that an enemy ship is coming although you can't detect that ship.
What version are you running? We thought we had gotten that fixed a couple months ago now, by changing the priority for this SitRep to be after all the other effects processing (like for ion storms) was done. Could you also post a savegame from turn 76? We might get around to opening an issue, but I'd like to look at it a bit more first.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
Oberlus
Small Juggernaut
Posts: 702
Joined: Mon Apr 10, 2017 4:25 pm

Re: "We got incoming" sitrep

#8 Post by Oberlus » Fri Apr 06, 2018 4:58 pm

Dilvish wrote:What version are you running?
Build 2018-04-02.02f4a84, compiled from source (master, Ubuntu 16.04).
Dilvish wrote:Could you also post a savegame from turn 76?
I'll never remember to change autosave settings to keep all files, and now I'm at turn 130 :(
Well, at least I have the turn 68 saved (posted on issue #2064). I'll reload it and try to get the same result by turn 77+.

User avatar
Dilvish
AI Lead, Programmer
Posts: 4707
Joined: Sat Sep 22, 2012 6:25 pm

Re: "We got incoming" sitrep

#9 Post by Dilvish » Sat Apr 07, 2018 1:48 am

Oberlus wrote:
Dilvish wrote:What version are you running?
Build 2018-04-02.02f4a84, compiled from source (master, Ubuntu 16.04).
02f4a84 does not seem to correspond to any commits in master-- could you double check your local git log to see if you have something extra added in?
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
Oberlus
Small Juggernaut
Posts: 702
Joined: Mon Apr 10, 2017 4:25 pm

Re: "We got incoming" sitrep

#10 Post by Oberlus » Sat Apr 07, 2018 8:30 am

I haven't changed anything in my freeorion folder in the last two months or more. And I thought I had "overwritten" all my changes, that were just the GG size (4 instead of 6, I've checked that GG size in my games is 6).
But I really don't know what I do with git so it's better to check this.

Before starting a new game I do "git pull" and in the build folder "cmake .; make -j3". I did that on the morning of April 2.

The outputs of some git commands regarding "versions" (or I guess, better said, hashes):

Code: Select all

freeorion$ git rev-parse HEAD
02f4a84d8eebe3fb01578e4957b8169ccf20ad14

Code: Select all

freeorion$ git log -1
commit 02f4a84d8eebe3fb01578e4957b8169ccf20ad14
Merge: 6fc4feb aebd907
Author: Oberlus <XXXXXXXXXXX>
Date:   Mon Apr 2 12:32:41 2018 +0200

    Merge branch 'master' of git://github.com/freeorion/freeorion
And I attach the output of "freeorion$ git log HEAD --pretty=format:%s > pretty_format_output".

Haven't had time to replay the game and post save for turn 77-79. Maybe next tuesday.
Attachments
pretty_format_output.zip
(535.99 KiB) Downloaded 14 times

Morlic
AI Contributor
Posts: 246
Joined: Tue Feb 17, 2015 11:54 am

Re: "We got incoming" sitrep

#11 Post by Morlic » Sat Apr 07, 2018 9:48 am

The fact that there is a merge commit implies you had some local changes (so pull couldn't fast-forward). Note that git pull --rebase avoids merge commits and is usually prefered.

Maybe run git diff (with master) to find if there are significant changes that you would like to keep.


To overwrite ALL local changes (use at your own risk and only if you are certain nothing is worth keeping), use

Code: Select all

git fetch && git reset --hard origin/master
(replacing origin with whatever your upstream name is for the freeorion repository). This will make your local branch an exact copy of master including history.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
Oberlus
Small Juggernaut
Posts: 702
Joined: Mon Apr 10, 2017 4:25 pm

Re: "We got incoming" sitrep

#12 Post by Oberlus » Sat Apr 07, 2018 2:53 pm

Thank you, Morlic.

I'm sure there is no relevant change in my system (all changes were to test alternatives for Sly balancing that are not required anymore), so I'll be doing "git fetch && git reset --hard origin/master" happily.

Out of curiosity, "git diff" and "git diff master" gives me no (visible) output. The first was instantaneous and the second took a second to execute. Does that mean there were no differences?

The output of my fetch and hard reset:

Code: Select all

freeorion$ git fetch && git reset --hard origin/master
remote: Counting objects: 12, done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 12 (delta 6), reused 10 (delta 4), pack-reused 0
Unpacking objects: 100% (12/12), done.
From git://github.com/freeorion/freeorion
   f4065c5..9ad91ff  build-manual -> origin/build-manual
HEAD is now at aebd907 Add activation clause to Tidal Lock

User avatar
Dilvish
AI Lead, Programmer
Posts: 4707
Joined: Sat Sep 22, 2012 6:25 pm

Re: "We got incoming" sitrep

#13 Post by Dilvish » Sat Apr 07, 2018 4:06 pm

Oberlus wrote:Out of curiosity, "git diff" and "git diff master" gives me no (visible) output.
I'm pretty sure those compare your working tree to the index of your current git branch (i.e., will show the diff for any un-committed changes that also not yet staged), and so in this case would be expected to have blank output since any changes you had were committed. And I think that if your checked-out branch was already master, then specifying it on that command line would not change anything (and it was probably just a fluke that it took longer); although I'm not 100% sure about this last one-- it could be that it would take that 'master' as a branch name, though from the docs I think that it could be that it took it as a path name that it then spent a little while trying and failing to locate.

The output of my fetch and hard reset:

Code: Select all

...HEAD is now at aebd907 Add activation clause to Tidal Lock
That looks right, good. Lets see if the problem repeats itself now after you rebuild.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
Oberlus
Small Juggernaut
Posts: 702
Joined: Mon Apr 10, 2017 4:25 pm

Re: "We got incoming" sitrep

#14 Post by Oberlus » Tue Apr 10, 2018 10:05 am

I could not reproduce the issue after two tries. Loading from turn 68 and presumably doing the same steps, the Sly didn't send the flux troops that triggered that incoming enemy sitrep. So lets forget about this.

Post Reply