Help with xenophobes

Problems and solutions for installing or running FreeOrion, including discussion of bugs if needed before posting a bug report on GitHub. For problems building from source, post in Compile.

Moderator: Oberlus

Message
Author
Magnate
Space Dragon
Posts: 425
Joined: Sat Nov 08, 2014 3:44 pm

Help with xenophobes

#1 Post by Magnate »

Hi all,

I'm playing my first serious game as a xenophobic race (Trith). My homeworld population bobs up and down like crazy with xenophobic frenzy, even though it's out on a long uninhabited string of systems miles from any other inhabited planets. Is this working as designed? Does xeno frenzy come on at vast distances? Is it to do with encountering other species?

Basically every other turn or two, my homeworld pop dips from its max (36) down to 33.2 or so, and then the following turn the pop is back up to max but the industry is down (because of previous pop). Does anyone recognise the behaviour I'm describing?

This is 87b435c btw, 1st June test build.

Thx

CC

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

Re: Help with xenophobes

#2 Post by MatGB »

Not exactly, what's supposed to happen is they lose some of their population bonus (the one they get from being Self Sustaining) for every planet with another species within 5 jumps.

It shouldn't, unless I've misread things, be going up and down every turn.

Bear in mind that the bonus is on top of what every other species gets unless they've already got all the growth specials, and you start with the Concentration Camp tech unlocked, used wisely that can be a real boost for them.

So if you, or an AI, is colonising within 5 jumps then things will fall (and they lose production separately). It might be visible enemy within 5 actually, which would be non-ideal, I'll check that.
Mat Bowles

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

Magnate
Space Dragon
Posts: 425
Joined: Sat Nov 08, 2014 3:44 pm

Re: Help with xenophobes

#3 Post by Magnate »

So after fluctuating a lot my homeworld pop settled at -3.52 (from 44 max), even though the nearest non-Trith world is approx 600uu away. That world also suffers harrassment so I assume this is WAD. Where can I look up the range of the xeno frenzy/harrassment effect?

One oddity though is that my 2nd colony is closer to the Hhhoh world than my homeworld is, yet does not suffer frenzy. Is frenzy also dependent on other factors?

Is there an idiots' guide to playing xenophobes somewhere?

Magnate
Space Dragon
Posts: 425
Joined: Sat Nov 08, 2014 3:44 pm

Re: Help with xenophobes

#4 Post by Magnate »

Ah, thanks - it hadn't occurred to me that it would be jumps not uu. 5 is a lot. Does the frenzy/harrassment worsen with proximity, or is it always a flat rate? Do outposts have any effect or is it only inhabited worlds? Do ships have any effect?

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

Re: Help with xenophobes

#5 Post by MatGB »

Inhabited worlds only, flat rate, the info is a macro in the Species file.
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: Help with xenophobes

#6 Post by MatGB »

Specifically, it's this one

Code: Select all

        EffectsGroup
            scope = Source
            activation = And [
                PopulationCenter
                HasTag name = "SELF_SUSTAINING"
            ]
            stackinggroup = "XENOPHOBIC_POP_SELF"
            accountinglabel = "XENOPHOBIC_LABEL_SELF"
            effects = SetTargetPopulation value = Value * (0.6 + (0.4 * (0.8 ^ 
                Count condition = And [
                    PopulationCenter
                    WithinStarlaneJumps jumps = 5 condition = Source
                    VisibleToEmpire empire = Source.Owner
                    Not OR [ 
                        Species name = Source.Species
                        Species name = "SP_EXOBOT"
                    ]
                    Not Population high = 0
                ]
                ) ) )
I'm not 100% sure why the population centre needs to be visible for the Trith to get the negative population effect, it's supposed to effect their psionic stuff and similar and it does lead to the sub optimal effect that a player that knows what they're doing wants to move scouts away from native planets until they get invaded and concentration camped.

Of course, the flip side is that if it's in effect you can work out how many natives there are nearby, but given it's 5 jumps and it's a flat rate then it's not so bad. For what it's worth, playing on Low starlanes reduces the effect ;-)

Think we need to decide if the visible thing for this malus is a good thing or not (it makes sense for some of the others, but not this one, to me).
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: Help with xenophobes

#7 Post by Dilvish »

MatGB wrote:Think we need to decide if the visible thing for this malus is a good thing or not (it makes sense for some of the others, but not this one, to me).
Hmm, yeah, I think "EverBeenVisibleToEmpire" is really more what the intent had been. We didn't want people getting hit by a malus that they had never seen the source of (and possibly even from the very start). If they have never seen it then their client won't know it's there and they wouldn't even be told they have a xenophobic hit from an unknown source planet, they'd simply be told that they have a totally unknown malus.

Also, keep in mind that this isn't only for Trith, it's also for the non-telepathic Eaxaw, so the storyline about telepathic hit even if you can't see them doesn't really fit.

Unfortunately, we don't currently have an EverBeenVisibleToEmpire condition, so this might be the best we can do. If something else comes to mind, I'll post it.
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: Help with xenophobes

#8 Post by MatGB »

The population bonus is for self sustaining xenos only (ie Trith), Eaxaw just get the industry/research problems.

Given that the self sustaining bonus puts them over normal starting pop, I'd say having it there from the start, part of their objective in exploring is to find and destroy the sources of their pain, makes as much sense, just need to make sure the species description has an explanation that makes some sense.
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: Help with xenophobes

#9 Post by Dilvish »

MatGB wrote:The population bonus is for self sustaining xenos only (ie Trith), Eaxaw just get the industry/research problems.
Huh, somehow I had managed to forget about that restriction on the xeno pop malus.

I'd still like to propose one possibility that is a bit less of a change than simply removing the VisibleToEmpire requirement-- that we replace the VisibleToEmpire requirement with

Code: Select all

WithinStarlaneJumps jumps = 2 condition = ExploredByEmpire Source.Owner
That way it won't kick in until the empire is at least close to being able to see it, but once it kicks in it won't fluctuate up and down as ships move around.
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: Help with xenophobes

#10 Post by MatGB »

That's almost certainly going to work, when I finish my current I'll give it a go with Trith and see how it does. Also need to improve the in game explanations a bit I think, have to think about that, any suggestions anyone?
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: Help with xenophobes

#11 Post by MatGB »

Error, slightly beyond me to fix

Code: Select all

2015-06-18 00:37:47.858224 [error] Client : /home/matgb/freeorion.build/default/species.txt:7656:79: Parse error.  Expected Empire = here:
            accountinglabel = "XENOPHOBIC_LABEL_SELF"
            effects = SetTargetPopulation value = Value * (0.6 + (0.4 * (0.8 ^ 
                Count condition = And [
                    PopulationCenter
                    WithinStarlaneJumps jumps = 5 condition = Source
                    WithinStarlaneJumps jumps = 2 condition = ExploredByEmpire Source.Owner
                                                                               ^
                    Not OR [ 
                        Species name = Source.Species
                        Species name = "SP_EXOBOT"
                    ]
                    Not Population high = 0
The arrow's pointing to source.owner in the actual log
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: 13603
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Help with xenophobes

#12 Post by Geoff the Medio »

MatGB wrote:

Code: Select all

Parse error.  Expected Empire = here:
...
                    WithinStarlaneJumps jumps = 2 condition = ExploredByEmpire Source.Owner
                                                                               ^
I think it's being quite specific and clear in this (unusual) case... you need "empire = " before "Source.Owner". All condition parameters must have labels.

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

Re: Help with xenophobes

#13 Post by MatGB »

Ah, still not very good at reading lines with multiple '=' marks, my brain keeps telling me it's invalid. I'll give it another go later.
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: Help with xenophobes

#14 Post by Dilvish »

MatGB wrote:Ah, still not very good at reading lines with multiple '=' marks, my brain keeps telling me it's invalid. I'll give it another go later.
I'm pretty sure our parser would accept it fine broken up into lines like

Code: Select all

WithinStarlaneJumps
    jumps = 2 
    condition = ExploredByEmpire 
                         empire = Source.Owner
if that's more readable for you.
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
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: Help with xenophobes

#15 Post by Dilvish »

So, Mat, did this wind up working like we'd hoped?
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