Popular Terraforming

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
LienRag
Cosmic Dragon
Posts: 2146
Joined: Fri May 17, 2019 5:03 pm

Popular Terraforming

#1 Post by LienRag »

On the Snap version of the current 20th game, I found a strange bug :
https://www.freeorion.org/forum/viewtop ... 18#p111871
https://www.freeorion.org/forum/viewtop ... 18#p111872

(Oberlus, maybe you can move these posts here and delete this line ?)

User avatar
Grummel7
Space Dragon
Posts: 335
Joined: Mon Oct 09, 2017 3:44 pm

Re: Popular Terraforming

#2 Post by Grummel7 »

Okay, I can reproduce this: Queue Popular Terraforming and Evacuate Planet on the same planet.
When the planet gets empty before the building is finished, you end up in this situation. You can easily fix it by putting the building to the end of the queue, btw.

Is there a way to script that a building is removed from the queue?
In fact you can even abuse it: Almost finish a one-step Popular terraforming, then replace the species by one that need 4 steps...

Ophiuchus
Programmer
Posts: 3433
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: Popular Terraforming

#3 Post by Ophiuchus »

Grummel7 wrote: Tue May 24, 2022 8:28 pm Okay, I can reproduce this: Queue Popular Terraforming and Evacuate Planet on the same planet.
When the planet gets empty before the building is finished, you end up in this situation. You can easily fix it by putting the building to the end of the queue, btw.
Grummel7 wrote: Tue May 24, 2022 8:28 pm Is there a way to script that a building is removed from the queue?
dont think so. i guess we can change the variable buildcost to maximum cost and change the build condition so no PP gets allotted when population is zero.

does not prevent abusing it with a different species though...

sigh, so i guess we need something like a RemoveEnqueued effect; similar to RemoveEnqueued type = {Building | Ship} name = "NAME"

LienRag, did your planet loose its population?
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

User avatar
LienRag
Cosmic Dragon
Posts: 2146
Joined: Fri May 17, 2019 5:03 pm

Re: Popular Terraforming

#4 Post by LienRag »

Yes, I put the wrong species on it so evacuated my planet to put another instead.
Since the new Colony building was below the Popular Terraforming one, the planet never got repopulated.

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

Re: Popular Terraforming

#5 Post by Geoff the Medio »

Ophiuchus wrote: Tue May 24, 2022 8:46 pm
Grummel7 wrote: Tue May 24, 2022 8:28 pm Is there a way to script that a building is removed from the queue?
dont think so. i guess we can change the variable buildcost to maximum cost and change the build condition so no PP gets allotted when population is zero.
By "build condition" do you mean location condition for the building type? Would setting that to exclude unpopulated planets not fix the issue?

Edit: Looks like it already does, with https://github.com/freeorion/freeorion/ ... #L112-L116 so why is it getting PP allocated?

Would enforcing a minimum build time of 1 turn for various production queue calculations help? Or just adding it to the script?

User avatar
Grummel7
Space Dragon
Posts: 335
Joined: Mon Oct 09, 2017 3:44 pm

Re: Popular Terraforming

#6 Post by Grummel7 »

Actually when I try it now, I cannot reproduce the blocking issue anymore, although the cost is still shown as ? PP and I don't really see why. I guess this can be fixed by scripting, though.
pop_terra_issue.png
pop_terra_issue.png (36.62 KiB) Viewed 2535 times
The main issue however is that the building's variable costs can be abused. To get the best of it:
  • Start two colonies, one for a species whose good type is one step away from current and the one you want to finally settle, whose good type is 4 steps away
  • Finish the first while the second is one step away from being finished
  • Build a popular terraforming (which is cheap for the 1 step species) and almost finish it
  • Evacuate the the first species
  • Finish the second colony
  • Finish popular terraforming (now worth 4 steps and costs 7 times as much) in one turn
I think this cannot be fixed with the current scripting.

Btw.: Could we stop players from enqueuing two colony buildings? Would make sense, but I guess the script would have to actively exclude all other colony buildings...

Daybreak
Vacuum Dragon
Posts: 641
Joined: Mon Aug 13, 2018 10:14 pm

Re: Popular Terraforming

#7 Post by Daybreak »

Considering most players think terraforming is expensive, and try not to do it, why not remove the new Popular Terraforming, and bring back the old code for terraforming and call that Popular Terraforming

The only problem with that old code is you could put two terraformigs in the queue for same planet - so just prevent that.

User avatar
LienRag
Cosmic Dragon
Posts: 2146
Joined: Fri May 17, 2019 5:03 pm

Re: Popular Terraforming

#8 Post by LienRag »

Popular Terraforming is extremely useful when you want to give bulk orders through the "Objects" panel.

Daybreak
Vacuum Dragon
Posts: 641
Joined: Mon Aug 13, 2018 10:14 pm

Re: Popular Terraforming

#9 Post by Daybreak »

LienRag wrote: Thu Jun 09, 2022 4:13 pm Popular Terraforming is extremely useful when you want to give bulk orders through the "Objects" panel.
You could do that with the old code for terraforming too. It was fantastic.

User avatar
Grummel7
Space Dragon
Posts: 335
Joined: Mon Oct 09, 2017 3:44 pm

Re: Popular Terraforming

#10 Post by Grummel7 »

Daybreak wrote: Thu Jun 09, 2022 6:41 pm
LienRag wrote: Thu Jun 09, 2022 4:13 pm Popular Terraforming is extremely useful when you want to give bulk orders through the "Objects" panel.
You could do that with the old code for terraforming too. It was fantastic.
I actually think that this would indeed be the best solution.
Or rather: change popular terraforming to behave like the old one, except that it can only be enqueued once.
  • It allows bulk terraforming
  • Enqueuing all steps up to good for one planet can be done with targeted T.
  • It cannot be abused
  • Cost and time will be the same, regardless of whether you use popular or targeted T.
  • It can be done with the current scripting.

User avatar
LienRag
Cosmic Dragon
Posts: 2146
Joined: Fri May 17, 2019 5:03 pm

Re: Popular Terraforming

#11 Post by LienRag »

The new options allow to teraform via exobots, for instance.
Not possible with the old code.

Ophiuchus
Programmer
Posts: 3433
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: Popular Terraforming

#12 Post by Ophiuchus »

Another way could be to make popular terraforming do a single terraforming step and re-enqueue until best environment is reached.

This would solve the variable cost issue.
Enqueue position could be an issue though. Old position would not be known, so probably the most sensible position is before the first other project on that planet but as low as possible.

Daybreak could simply use the old code locally as well (after adapting terraforming cost). I am not sure anybody else has his use case
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

Daybreak
Vacuum Dragon
Posts: 641
Joined: Mon Aug 13, 2018 10:14 pm

Re: Popular Terraforming

#13 Post by Daybreak »

LienRag wrote: Sat Jun 11, 2022 12:04 pm The new options allow to teraform via exobots, for instance.
Not possible with the old code.
Well take a further version back and from memory the exobots did terraform but only to adequate I think or something like that

But anyway I think Ophiuchus called it right
Ophiuchus wrote: Wed Jun 15, 2022 7:06 pm Another way could be to make popular terraforming do a single terraforming step and re-enqueue until best environment is reached.
except for re=enqueue. Just leep it one step and then a manual action to place in queue again.

Ophiuchus
Programmer
Posts: 3433
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: Popular Terraforming

#14 Post by Ophiuchus »

Daybreak wrote: Wed Jun 15, 2022 9:32 pm except for re=enqueue. Just leep it one step and then a manual action to place in queue again.
I again see that your use case.
Can you explain why you want to terraform only one step?
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

User avatar
Oberlus
Cosmic Dragon
Posts: 5714
Joined: Mon Apr 10, 2017 4:25 pm

Re: Popular Terraforming

#15 Post by Oberlus »

My use cases:

1. Terraform poor or adequate planet to good of current species. Here I'd like to do the enqueueing once.

2. Terraform planet to a certain environment, for later changing to a diferent species. Here again I'd like to do a single enqueue.

Currently I don't use teraforming, I instead build gaias in good environments with unwanted species then change to desired species (automatic and free terraforming with gaia). If game goes on for too long, in adequate planets with desired species I'd build one terraforming then gaia, but that never happened (PPs go to something else).


With Terraforming policy all this stays the same, just makes more interesting to build gaias then switch species to one that is hostile in that planet. Using terraforming buildings with the policy accelerate the process but it is still more expensive than building only gaias. And you want gaias anyways for the +5 stability and +3*size population.

Post Reply