Gaia and terraform policy

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
drkosy
Space Dragon
Posts: 367
Joined: Sat Jul 11, 2020 9:41 am

Gaia and terraform policy

#1 Post by drkosy »

I just managed to build some artificial paradise worlds. Than I have to realize that their terraforming "by themselves" doesn't count for terraforming as needed to get boni on the "Terraform" policy. Is this intended?

I would like to have the bonus applied for that gaia terraform as well, because gaia helps to take off some mikromanagement.
Want some fresh experience? Try Kosymod

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

Re: Gaia and terraform policy

#2 Post by Geoff the Medio »

From the scripts, I don't see why Gaia-special terraformed planets shouldn't receive bonuses to influence or research when focused or stability in general. It's just based on the distance to the original type, as long as the planet is owned and not a gas giant or asteriods. How it got to its current planet type shouldn't matter.

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

Re: Gaia and terraform policy

#3 Post by Grummel7 »

The planets original type is Gas Giant (or Asteroid Belt), not Barren. Changing it into an artificial planet doesn't change the original type and Planet::TypeDifference() returns 0 when one of the types is Gas Giant or Asteroid Belt.

Perhaps we should change that to e.g. return a fix value or maybe distance to Barren + 1, after all creating an artificial planet is quite a drastic change of a planetary environment.

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

Re: Gaia and terraform policy

#4 Post by Geoff the Medio »

Alternatively, a separate effectsgroup can handle such cases.

User avatar
drkosy
Space Dragon
Posts: 367
Joined: Sat Jul 11, 2020 9:41 am

Re: Gaia and terraform policy

#5 Post by drkosy »

The planets original type is Gas Giant (or Asteroid Belt), not Barren. Changing it into an artificial planet doesn't change the original type and Planet
That is interessting as planets with the gaia-special shouldn't be affected. Unfortunatly I didn't capture such a special in on of my games...
Want some fresh experience? Try Kosymod

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

Re: Gaia and terraform policy

#6 Post by Grummel7 »

Geoff the Medio wrote: Sun Apr 03, 2022 9:25 pm Alternatively, a separate effectsgroup can handle such cases.
You're right, there is no need to change the C++ code. I would rather replace Target.DistanceFromOriginalType with a macro with a special handling for OriginalType Gas Giant or Asteroids, instead of defining new effectgroups.

But what should the value be? Artificial paradise worlds are pretty strong as they are, maybe Difference of 2, regardless of the new type?

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

Re: Gaia and terraform policy

#7 Post by Grummel7 »

drkosy wrote: Mon Apr 04, 2022 5:02 pm That is interessting as planets with the gaia-special shouldn't be affected. Unfortunatly I didn't capture such a special in on of my games...
Just to test it, today I replaced the population on an already gaia planet: Auto-adaptions by the gaia special do count for terraforming, if the planet is not artificial.

Back to the original problem: What do others think: should an artificial planet count as terraformed for the terraforming policy? And if so, then how should the value be calculated?

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

Re: Gaia and terraform policy

#8 Post by Oberlus »

Grummel7 wrote: Thu Apr 14, 2022 12:40 pm should an artificial planet count as terraformed for the terraforming policy? And if so, then how should the value be calculated?
I think it should count as terraformed (and GGs and asteroid belts should count as not terraformed).
For terraformed artificial planets (ex-GGs or belts), take the maximum distance between non-artificial planets? Or max+1.
I guess that max is 4 in the environments wheel, so 4 or 5.

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

Re: Gaia and terraform policy

#9 Post by Grummel7 »

Oberlus wrote: Thu Apr 14, 2022 12:51 pm I think it should count as terraformed (and GGs and asteroid belts should count as not terraformed).
For terraformed artificial planets (ex-GGs or belts), take the maximum distance between non-artificial planets? Or max+1.
I guess that max is 4 in the environments wheel, so 4 or 5.
I thought Artificial planets are already quite string without giving such a big bonus, but fluff-wise it should be big. Since artificial planets come pretty late and are quite expensive, it shouldn't be a real problem anyway.

Suddenly converting asteroids belts makes sense, with 4 or 5 points from terraforming and a great influence species they'll turn into propaganda machines.

User avatar
drkosy
Space Dragon
Posts: 367
Joined: Sat Jul 11, 2020 9:41 am

Re: Gaia and terraform policy

#10 Post by drkosy »

I think it should count as terraformed (and GGs and asteroid belts should count as not terraformed).
How about solving that by remove the lines

Code: Select all

 Not Planet type = GasGiant
           Not Planet type = Asteroids
in the policy focs file

GasGiants as well as Asteroids can't be terraformed, that shouldn't be a problem here.
Want some fresh experience? Try Kosymod

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

Re: Gaia and terraform policy

#11 Post by Grummel7 »

drkosy wrote: Tue Apr 19, 2022 2:05 pm How about solving that by remove the lines

Code: Select all

 Not Planet type = GasGiant
           Not Planet type = Asteroids
in the policy focs file

GasGiants as well as Asteroids can't be terraformed, that shouldn't be a problem here.
These lines exclude GG and asteroids from getting an effect from the policy. The scope is quite right, it is the effect that must be changed.

I've added a PR btw: https://github.com/freeorion/freeorion/pull/3801

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

Re: Gaia and terraform policy

#12 Post by Oberlus »

Grummel7 wrote: Tue Apr 19, 2022 6:25 pm I've added a PR btw: https://github.com/freeorion/freeorion/pull/3801
Great.

Unrelated question:

Code: Select all

         And [
            Target
            (Target.DistanceFromOriginalType = 0)
         ]
Why is the first Target needed?

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

Re: Gaia and terraform policy

#13 Post by Grummel7 »

Oberlus wrote: Tue Apr 19, 2022 6:35 pm Unrelated question:

Code: Select all

         And [
            Target
            (Target.DistanceFromOriginalType = 0)
         ]
Why is the first Target needed?
Hm, good question, seems to work without it...

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

Re: Gaia and terraform policy

#14 Post by Ophiuchus »

Grummel7 wrote: Tue Apr 19, 2022 7:50 pm
Oberlus wrote: Tue Apr 19, 2022 6:35 pm Unrelated question:

Code: Select all

         And [
            Target
            (Target.DistanceFromOriginalType = 0)
         ]
Why is the first Target needed?
Hm, good question, seems to work without it...
Was that part of the Statistic If condition in the SetTargetResearch effect?

a condition considers the whole context as possible candidates; a narrowing of candidates sometimes makes sense performance wise
i am not sure if that an extra Target condition does anything here.. maybe geoff can comment
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: 5715
Joined: Mon Apr 10, 2017 4:25 pm

Re: Gaia and terraform policy

#15 Post by Oberlus »

Ophiuchus wrote: Mon Apr 25, 2022 2:42 pm Was that part of the Statistic If condition in the SetTargetResearch effect?
I think it is the one in PLC_TERRAFORMING_DISTANCE macro.

Post Reply