Evacuation isn't killed

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.
Post Reply
Message
Author
User avatar
Kassiopeija
Dyson Forest
Posts: 212
Joined: Wed Jul 16, 2014 6:14 pm
Location: Black Forest

Evacuation isn't killed

#1 Post by Kassiopeija »

When you re-colonize a planet during the same turn when its population is reduced to 0 (and you get the info: Colony XXX has been destroyed..) and additionally, you've decided to scrap the evacuation, then this is not happening.
In the next turn the evacuation building will still be there and the new settled colonized will be reduced because of it, that is, if you re-colonized with a standard pod the settlers will be reduced to 0 in the same turn (basically the colony pod vanishes) whereas with the cryopod the settlers will be reduced to 1.08, and to 0 in the next turn, the evacuation does neither be scrapped there either.

The scrapping of the evacuation building should happen under all circumstances, regardless of what is being done elsewhere with the outpost/colony. Additionally, the scrapping should be calculated *before* the colonization so that newly colonists aren't initially evacuated.

And if I remember correctly it will be likewise using Concentration Camps.

edit:
on version 0.4.3+ test 7222

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

Re: Evacuation isn't killed

#2 Post by Dilvish »

There is some odd, apparently buggy behavior there with trying to scrap the Evacuation immediately upon the pop hitting zero. I don't see anything about the script for it that would explain why it resurrects itself in that case. Until someone has time to actually debug and fix the thing, we should probably put a warning into the description.

Concentration Camps are a different matter, they have a two-stage implementation where a Special gets applied when the building is removed or scrapped; the special continues for a somewhat random amount of time and is then removed. As far as I'm aware they are working correctly.
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
Kassiopeija
Dyson Forest
Posts: 212
Joined: Wed Jul 16, 2014 6:14 pm
Location: Black Forest

Re: Evacuation isn't killed

#3 Post by Kassiopeija »

I've just made a few tests in order to see if it would be possible to do the whole "kill unwanted pop & re-colonize" with the least turns, but it appears to me that, for now, you'll have to have a "safe" turn in between, ie. you'll have to wait with re-colonization until the icon of Evacuation/Concentration Camp isn't shown at the planet anymore....

Further, I've tested also Concentration Camps but the same error appears there.
The only difference between Evacuation & C.Camps that I could notice was that using an Evacuation will start right within the turn when it is queued (if build during that turn) while the Concentration Camp won't remove/be active during its build-turn but 1 turn after it.

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

Re: Evacuation isn't killed

#4 Post by Dilvish »

Kassiopeija wrote:Further, I've tested also Concentration Camps but the same error appears there.
As I said above, Concentration Camps are working correctly as far as I know -- if you think something is in error with them then please be very specific.
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
Kassiopeija
Dyson Forest
Posts: 212
Joined: Wed Jul 16, 2014 6:14 pm
Location: Black Forest

Re: Evacuation isn't killed

#5 Post by Kassiopeija »

Right, see:

Turn 1: Queued Concentration Camp
Turn 2: Camp is build
Turn 3: Population is reduced
Turn 4: Population has been zeroed out, Message appears "The XYZ colony was destroyed". Here the planet becomes available for re-colonization via, in this case, a CryoColonyPod, which I queued. Additionally, I queue the scraping of the Concentration Camp.
Turn 5: The Camp did zero out the new colonists and again, destroy the colony.
Turn 6: Camp still there, message appears "Depopulation is complete" [<-- one turn too late]

***

Besides, something strange did happen yesterday with Evacuation....
I've had to evacuate all phototropic species from systems containing red stars (due to Artificial Black Hole). However, there was a large or huge planet that still was filled with quite alot Chato (round 40 pop) once the Black Hole was established. This caused the target popultion to be decreased to 0 (-40 no star penalty).
Thus, in the next turn, the population dropped from 37 to 0.
I then re-routed an already existing Colony Ship to this system, which took around 3 or 4 turns to reach it.
Once it was there I've been puzzled that I couldn't colonize the colony, apparently there still were ~20 Chato lurking around and the Evacuation also was there.

Now I don't know exactly why, how & when because I've been amidst a game.... - but could it be possible that the Evacutees from other Chato planets did settle there (the planet was pretty central) - although it was marked for evacuation as well?

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

Re: Evacuation isn't killed

#6 Post by Dilvish »

The Concentration Camp was previously subject to being manipulated in a way that could be considered exploiting; as I said above, it is by intention that it cannot be instantly and completely done away with via scrapping. Pay attention to the specials that get applied to a planet with a Concentration Camp and after the camp is removed. Also, if you scrap a Concentration Camp it is at first replaced with Concentration Camp Remnants which carry forward some of the negative effects for a while. From your description it still sounds to me like everything is working as intended; you need to pay attention when playing with Fire and/or Death Camps. If you are still convinced something is amiss then post screenshots.
Besides, something strange did happen yesterday with Evacuation.... there was a large or huge planet that still was filled with quite alot Chato (round 40 pop) once the Black Hole was established. This caused the target popultion to be decreased to 0 (-40 no star penalty). Thus, in the next turn, the population dropped from 37 to 0.
A large planet with target 40 pop going to target zero pop due to phototropic species and Black Hole sounds exactly right; the next turn pop dropping from 37 to zero is not right; I think you misread or assumed that.The next turn it should have gone to around 34, then to around 31, then to around 27 or 28, etc., dropping 10% of the diff between current and target each time.
Once it was there I've been puzzled that I couldn't colonize the colony, apparently there still were ~20 Chato lurking around and the Evacuation also was there.
Sounds correct.
could it be possible that the Evacutees from other Chato planets did settle there (the planet was pretty central) - although it was marked for evacuation as well?
Evacuees cannot be sent to planets with Evacuations or Concentration Camps on them, though they can be sent to planets with Concentration Camp Remnants.
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
Kassiopeija
Dyson Forest
Posts: 212
Joined: Wed Jul 16, 2014 6:14 pm
Location: Black Forest

Re: Evacuation isn't killed

#7 Post by Kassiopeija »

Dilvish wrote:The Concentration Camp was previously subject to being manipulated in a way that could be considered exploiting; as I said above, it is by intention that it cannot be instantly and completely done away with via scrapping. Pay attention to the specials that get applied to a planet with a Concentration Camp and after the camp is removed. Also, if you scrap a Concentration Camp it is at first replaced with Concentration Camp Remnants which carry forward some of the negative effects for a while. From your description it still sounds to me like everything is working as intended; you need to pay attention when playing with Fire and/or Death Camps. If you are still convinced something is amiss then post screenshots.
Up above is a step-by-step guide which you can use to re-create the bug. Simply fire up a new game as Eaxaw, they get C.Camps base and put one at your homeworld and follow the above steps. (after I found this in my current game I did create such a new game in order verify this and it was still there....)

It is essentially the same error occuring as with the Evacuation, just with a different building.

And no, it has nothing to do with the Concentration Camp Remains, because they do only show up *after* a C.Camp is finished - which essentially isn't the case and *that is* the problem.

All I can say is that, normally, buildings are scrapped the turn after.
But if you look above you'll notice that I've queued the disassembly of the C.Cap @Turn 4 but @Turn 6 IT IS STILL THERE!

***

Re: on the planet whose pop got entirely missing.
I've looked through my savegames and could find the specific turns, and could isolate/verify the problems/bug, although it might just be a display issue.

I'll upload 3 screenshots to exemplify what I mean.

On Turn256 you'll see that an Artificial Black Hole has been finished at Outpost Kartow beta III (see mouseover popup). At Kartow beta II there's 41.5 Chato where I've queued an Evacuation in order to safe some pop to nearby systems. Please note further that my empirical pop is 2.05.

On Turn257a Kartow beta II doesn't have any pop or production anymore, although the planet hasn't been reduced to an Outpost (no message + focus button still present). My empire shows 0.00 pop whereas the mouseover popup will tell otherwise.
Also note that the pop displays I have 0.0000 Chato pop - which isn't true. The pic Turn257b proves that.

Turn256:
Image

Turn257a:
Image

Turn257b:
Image

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

Re: Evacuation isn't killed

#8 Post by Dilvish »

Ah, ok, for the concentration camp, I had thought your main concern was on losing the newly colonized population, which remains the correct result. I confirmed the issue with colonization blocking the scrapping, however. It turns out it's actually not anything specific to Concentration Camps or Evacuations (it's just those buildings are the most likely to be involved in a concurrent colonization and scrap attempt).

This results from the order of handling at the server -- first all the Orders are processed, and respective planets are marked for invasion or colonization, and respective ships and buildings are marked for scrapping. Then planets marked for colonization are colonized, planets marked for invasion are invaded, and ships and buildings marked for scrapping are scrapped. The quirk is that part of the Colonization process resets the status of all buildings on the planet, so none of them remain marked for scrapping.

Geoff, if a planet is owned and being colonized, it seems to me that the buildings shouldn't need to be reset. The attached planet.patch changes that & prevents this quirky scrapping glitch. Does it look ok to you?

Kassiopeija, as for the evacuation issue in your screenshots, it turns out there was a flaw in the Evacuation script formula such that it didn't properly handle cases where the target pop was substantially below current pop. That is now fixed in SVN, and the revised building file is attached if you want to go ahead and use it.
Attachments
buildings.txt
(55.17 KiB) Downloaded 54 times

[The extension patch has been deactivated and can no longer be displayed.]

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: Evacuation isn't killed

#9 Post by Geoff the Medio »

Dilvish wrote:...if a planet is owned and being colonized, it seems to me that the buildings shouldn't need to be reset.
Does it matter? Building::Reset, sets the owner to nobody and cancels the scrapping flag. Planet::Colonize sets the ownership of all buildings on the planet after the Reset happens.

It might have the side effect of undoing any building scrap orders on the same turn as the colonize happens, which might make for some unexpected results, though I'm not sure if the m_ordered_scrapped flag on the building is necessary for the scrapping to happen if the order is still present in the empire's order set...

User avatar
mem359
Dyson Forest
Posts: 214
Joined: Sun Jun 08, 2014 1:18 am

Re: Evacuation isn't killed

#10 Post by mem359 »

I think Kassiopeija's point is that if a player is waiting to repopulate a colony after it is evacuated, they have to remember to do it a turn after the message shows up in the turn summary. Especially for a large galaxy, I have trouble remembering to do that. :mrgreen: (I knew not to populate on the turn I get the message, but after dealing with a bunch of planets, it would slip my mind the next turn to use the colony ship.)

If the game behavior stays the same, it would be convenient to either generate a 2nd message when the Evacuation (or concentration camp?) order clears (the turn after pop goes to zero), or delay the current message by one turn.

For the concentration camps, is what Dilvish mentioned documented somewhere in game? When I conquered an AI planet that was using c.c., I was thoroughly confused when the camp would sometimes regenerate when destroyed, and when it wouldn't. (Now I know better.)

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

Re: Evacuation isn't killed

#11 Post by Dilvish »

Geoff the Medio wrote:Does it matter?... It might have the side effect of undoing any building scrap orders on the same turn as the colonize happens, which might make for some unexpected results,
It does, and it does.
though I'm not sure if the m_ordered_scrapped flag on the building is necessary for the scrapping to happen if the order is still present in the empire's order set...
The (erased) flag is necessary, and the order is no longer being saved at this point to be reprocessed at a later time.

Replication of this takes only about 5 or 6 turns in a new game with Eaxaw, or perhaps a dozen or so turns with other species -- plant a Conc Camp or Evacuation on the homeworld, let it go dead. Proceed another turn for the Camp or Evac to auto-destruct so it's clear it's not some quirk with them. Then mark the Shipyard and Dockyard to be scrapped on the same turn you set the planet to get colonized by your starter colony ship. On the next turn the planet will be colonized but the buildings will not have been scrapped. I had added extra logging to my order.cpp and serverapp.cpp to be clear what was going on, but it's as I described in the post above, and the results are easy to see.

For most cases this doesn't especially matter, including with the Conc Camp since the Remnants would also kill off the new colony, but in the case of an Evacuation this bug causes a new colony to be wrongly killed. This has bothered me for a while but I hadn't chased it down. Now that we know what's going on I think this should get fixed for 0.4.4., if not as in my patch then in some other way if you prefer.
mem359 wrote:For the concentration camps, is what Dilvish mentioned documented somewhere in game? When I conquered an AI planet that was using c.c., I was thoroughly confused when the camp would sometimes regenerate when destroyed, and when it wouldn't. (Now I know better.)
The Conc Camp itself doesn't regenerate -- if you forcibly scrap the Camp it leaves behind Remnants, which have explanatory tooltips and probably have an entry in the pedia. The Remnants could perhaps get a new icon to reduce confusion.
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
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: Evacuation isn't killed

#12 Post by MatGB »

Dilvish wrote:The Conc Camp itself doesn't regenerate -- if you forcibly scrap the Camp it leaves behind Remnants, which have explanatory tooltips and probably have an entry in the pedia. The Remnants could perhaps get a new icon to reduce confusion.
This would probably be a good thing (the current pic with a ruined effect?), it confused me at first when I first saw them, but lots of things confused me while I was learning and until someone else mentions something you don't always remember.

I've rarely, if ever, used evacuation as a building, colonisation is so expensive generally I put up with whatever's there and try to avoid putting phototropes on red stars unless I've got no replacement species, etc. At least the bug in suitability was fixed so that dim/no star actually shows up as a problem for that world now, I do remember losing a Laenfa colony in orbit around a black hole and having no clue why until you guys explained it (and fixed the bug IIRC).

On the other hand...

Concentration Camps destroy themselves on capture, as do other effects, rather than recripting a whole thing, is it posible to simply have the Evacuation have a script effect that blows it up if there/s a change of ownership?

d'oh!, my brain realised as I typed that we're not talking conquest here, even so, is a script effect possible for oncolonisation or similar?
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: Evacuation isn't killed

#13 Post by Geoff the Medio »

Dilvish wrote:Now that we know what's going on I think this should get fixed for 0.4.4 ...
OK.
MatGB wrote:...is it posible to simply have the Evacuation have a script effect that blows it up if there/s a change of ownership?

d'oh!, my brain realised as I typed that we're not talking conquest here, even so, is a script effect possible for oncolonisation or similar?
"oncolonization", no, but a script can check if a building's owner is the empire that produced it, or the empire that owns the planet the building is on.

Post Reply