Current xenophobic malus?

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
Magnate
Space Dragon
Posts: 425
Joined: Sat Nov 08, 2014 3:44 pm

Current xenophobic malus?

#1 Post by Magnate »

Hi all,

Really enjoying 0.4.8. Playing my first game as Trith. The pop malus on my homeworld has tripled since I last looked ~30 turns ago from about -2.8/30 to over -9/34 - so how is this working? Is it getting worse as I research more techs? Or as I acquire more planets? Or as I colonise worlds closer to other races? During this period of tripling, I have expanded a lot, but there have been no new colonies within 5 jumps of my hw.

Is this documented anywhere?

Thx

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

Re: Current xenophobic malus?

#2 Post by Oberlus »

I got curious from your question, so I looked into the FOCS file with the xenophobic macros.

For me, it is a relatively complex and not very intuitive code. I got myself many doubts on what does each line. If I understand it right, the effect XENOPHOBIC_SELF controls the maluses on your (say) Trith colonies, and XENOPHOBIC_OTHER the effects on your non-Trith (and non-Exobot) colonies.

The second EffectsGroup within XENOPHOBIC_SELF (// Give malus to industry, research and happiness for other species nearby) would apply a -10% industry/research malus, and -1 happyness for each non-Trith, owned colony (all this with late priority) to... since I don't really know what "Scope = Source" means here, I don't know if this refers to any planet or any Trith planet or what.
I assume it applies to any Trith planet you own. But maybe it applies to your non-Trith-non-Exobot planets (and then I wouln't understand why the more non-Trith planets around a non-Trith planet could cause harassment to it).

The third EffectsGroup in there would apply to your Trith planets with non-Trith planets within 5 jumps and affect its maximum population (with LAST_BEFORE_OVERRIDE_PRIORITY):

Code: Select all

            effects = SetTargetPopulation value = Value - min(
                    max(Value, 0) * 0.4 * (1 - 0.8^[[XENOPHOBIC_SELFSUSTAINING_QUALIFYING_PLANET_COUNT]]),
                    3 * Target.HabitableSize  // Cap malus at the self-sustaining bonus
            )
So the population of a Trith planet (still unsure about this because I don't understand "Source") will be reduced by Value*0.4*(1-0.8^N) (caped at 3*HabitableSize) where N is the non-Trith planets nearby.
Some examples for different values of N expressed in percentage of the starting population (not considering the cap):
N=1 -> -8% population
N=2 -> -14.4%
N=3 -> -19.52%
N=4 -> -23.616%
N=5 -> -26.8928%

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

Re: Current xenophobic malus?

#3 Post by Dilvish »

Oberlus wrote: Sun Nov 18, 2018 11:47 am since I don't really know what "Scope = Source" means here, I don't know if this refers to any planet or any Trith planet or what.
For Species Effects, all ships and all planets of that Species will get processed as a Source (and in this particular case the "PopulationCenter" restriction in the activation clause will restrict this to Sources that are Planets). So here the "Scope = Source" line means that it will just apply to Trith planets.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

Post Reply