Rev 6214 - Acirema Guard Ship in weird place

Describe your experience with the latest version of FreeOrion to help us improve it.

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.
Message
Author
User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Rev 6214 - Acirema Guard Ship in weird place

#1 Post by MatGB »

20130702_222247_capture_001_.jpg
How did that guard ship get there? I'm used to seeing AIs colonising/capturing planets under guard by sacrificing big fleets, but where did the Acirema ship appear from?
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: Rev 6214 - Acirema Guard Ship in weird place

#2 Post by MatGB »

Addenda:

The Acirema homeworld is the planet Lupi a that I'm about to capture in that shot, autosave attached. How did it end up moving? If more details are needed LMK I've not reported a bug before and aren't sure where tog et logfiles from.

(and I can't upload, .sav not alloed and filesize is 1,621Kb, can email or if someone wants to tell me what else is needed instead)
Mat Bowles

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 and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: Rev 6214 - Acirema Guard Ship in weird place

#3 Post by Dilvish »

I've seen acirema guardships all by themselves like that, before, and had always figured them to just be a rare random monster spawn. Looking through the content files now, though, I can't find a reason for them to appear like that. The species effect should only happen in a system with an Acirema colony, and I see no entry for them in the space_monster_spawn_fleets.txt file which specifies the random spawns. Anyone have an idea?
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
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Rev 6214 - Acirema Guard Ship in weird place

#4 Post by Geoff the Medio »

Sounds similar to (the Kraken Nest part of) this: viewtopic.php?p=61697#p61697

AndrewW
Juggernaut
Posts: 791
Joined: Mon Feb 04, 2013 10:15 pm

Re: Rev 6214 - Acirema Guard Ship in weird place

#5 Post by AndrewW »

MatGB wrote:(and I can't upload, .sav not alloed and filesize is 1,621Kb, can email or if someone wants to tell me what else is needed instead)
Just for reference generally if you want to upload a save file compressing it will do the trick.

Can also make it available elsewhere and just provide a link to wherever the file is stored.

User avatar
Cluesen
Space Floater
Posts: 42
Joined: Mon May 20, 2013 4:40 pm

Re: Rev 6214 - Acirema Guard Ship in weird place

#6 Post by Cluesen »

More bugs I found in Rev. 6214:

1. When 2 "Outpost Base" ships are in the same system, you do not get any choice to place an outpost at all.
[edit] When i choose a ship i can place outposts, however this functions kind of weird[/edit]
2. When you go from Main Menu to "Single Player", cancel and try to "Load Game" the result always is "Error - cannot connect to Server".

As for the ACIREMA_GUARD_SHIP mentioned above, i believe the bug is derived from an incomplete scope in the Acirema race definition.
The scope used is "source", but what is the "location" of a race definition? - Everywhere?
I grepped through the default folder and that's the only code creating Acirema guard ships.
I suggest something like:

Code: Select all

        EffectsGroup
            scope = AND [
                Species name = "SP_ACIREMA"
                Planet
                OR [
                    Turn low = 10 high = 10
                    Turn low = 80 high = 80
                    Turn low = 150 high = 150
                    Turn low = 220 high = 220
                    Turn low = 290 high = 290
                ]
                Not WithinStarlaneJumps 1 Contains And [
                    Planet
                    OwnedBy AnyEmpire
                ]
            ]
            activation = source
            effects = CreateShip "SM_ACIREMA_GUARD"
This should create Acirema guard ships in all Systems with Acirema on turn 10, 80, 150, 220 & 290, however it's not tested yet.

[edit] I just realize KRAKEN_NEST was mentioned above ... I've put some time into Kraken, Snowflake and Juggernaut script code and am currently testing it. I'll post that package as soon as i'm assured it contains no more bugs.[/edit]
The beauty of travel is visiting foreign countries and meeting new people.
G.Khan
_______________________________________________________________________
All code provided is released under the CC-BY-SA 3.0 and GPL 2.0 or later licenses

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

Re: Rev 6214 - Acirema Guard Ship in weird place

#7 Post by Dilvish »

Cluesen wrote:1. When 2 "Outpost Base" ships are in the same system, you do not get any choice to place an outpost at all.
[edit] When i choose a ship i can place outposts, however this functions kind of weird[/edit]
Yes, I had just noticed that yesterday myself, I guess my last fix for multiple outpost ships wasn't quite complete. **edit** I just committed a fix for this.**
As for the ACIREMA_GUARD_SHIP mentioned above, i believe the bug is derived from an incomplete scope in the Acirema race definition.
The scope used is "source", but what is the "location" of a race definition? - Everywhere?
No, the species effects processing code specifically looks only for planets and ships as Sources, for whatever Species designation they have (if they have one). So adding an extra 'Planet' requirement shouldn't be required here (though if it made a difference to this bug then that would point to the location of the underlying bug). It looks to me like in this case the guardships get created without actually having the Acirema species designation, so they themselves shouldn't trigger this clause (though the snowballing effect if they did might be a better challenge).
I grepped through the default folder and that's the only code creating Acirema guard ships.
Yes, that's all I've found as well. It suggests to me that the problem is either the serialization/deserialization code or with some memory write access problem.
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
Sloth
Content Scripter
Posts: 685
Joined: Sat Mar 17, 2007 12:28 am

Re: Rev 6214 - Acirema Guard Ship in weird place

#8 Post by Sloth »

Dilvish wrote:No, the species effects processing code specifically looks only for planets and ships as Sources, for whatever Species designation they have (if they have one). So adding an extra 'Planet' requirement shouldn't be required here (though if it made a difference to this bug then that would point to the location of the underlying bug).
When an empire conquers an Acirema planet and produces ships on it, these ships can currently spawn Acirema guards. So the planet restriction is necessary.
All released under the GNU GPL 2.0 and Creative Commons Attribution-ShareAlike 3.0 licences.

User avatar
Cluesen
Space Floater
Posts: 42
Joined: Mon May 20, 2013 4:40 pm

Re: Rev 6214 - Acirema Guard Ship in weird place

#9 Post by Cluesen »

Agreed, i completely oversaw that.
Also there should be

Code: Select all

Not owned by AnyEmpire
added to the scope to prevent captured Acirema planets from producing guards as well.
The beauty of travel is visiting foreign countries and meeting new people.
G.Khan
_______________________________________________________________________
All code provided is released under the CC-BY-SA 3.0 and GPL 2.0 or later licenses

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

Re: Rev 6214 - Acirema Guard Ship in weird place

#10 Post by Geoff the Medio »

Most of these conditions should be left in the activation, as evaluating it is faster than the scope, which might potentially have to check all objects in the universe. The activation condition tests only the source object, before the scope condition is run, and if the source doesn't match, the scope doesn't need to be run at all. Since in this case the effect acts only on the source object anyway, the result is the same.

markpi
Space Floater
Posts: 35
Joined: Tue Jan 01, 2013 11:27 pm

Re: Rev 6214 - Acirema Guard Ship in weird place

#11 Post by markpi »

hi,
when i saw u go into kraken code i remembered one thing
that also occured in one of the latest versions :
genome bank didn´t help against the biological attack of a kraken,
as i would have expected from the description of the bank

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: Rev 6214 - Acirema Guard Ship in weird place

#12 Post by MatGB »

Back to original Guard Ship weirdness.

Now playing #6228, attached is a zip of two save games, auto from #150 and when I noticed it going through stat report in #151. Screenshot 0f #151 also attached.

In #150, I'd hit a few AI scouts at Typhon and all ships in the system were mine. Start of #151, three guard ships appear there. I reloaded from autosave, repeated turn 150, hit end turn, and it repeated.
Guard Ship Appearing-before.zip
Guard Ship appearing.png
ETA: there's another in 'deep space' bottom left of the map just north of cannon. Again, it wasn't there in #150.
Mat Bowles

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

Re: Rev 6214 - Acirema Guard Ship in weird place

#13 Post by Geoff the Medio »

The explanation given earlier in this thread appears to apply in this case. On turn 150, objects with species Acirema spawn guard ships. You have 5 Acirema ships there or arriving at Typhon on turn 151. Between turns 150 and 151, 5 Acrirema guard ships spawn there.

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: Rev 6214 - Acirema Guard Ship in weird place

#14 Post by MatGB »

Geoff the Medio wrote:On turn 150, objects with species Acirema spawn guard ships
Oh gods...

Objects with species Acirema.

They're not coming from nearby Ac planets. They're coming from my Acirema crewed ships (the extra down south spawned where there's a scout ship, and virtually all my ships are being built around my Acirema planets for the obvious shield benefits).

I don't think it makes sense that my ships are spawning monsters they then have to fight ;-)
Mat Bowles

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

Re: Rev 6214 - Acirema Guard Ship in weird place

#15 Post by Geoff the Medio »

MatGB wrote:I don't think it makes sense that my ships are spawning monsters they then have to fight ;-)
It probably wasn't intended to be that way. You could add
"Planet" (without quotes) within the AND condition in the activation condition of the EffectsGroup that creates the ships in the Acirema species definition of species.txt.

Post Reply