F_AbilityFactor

Question about the F_AbilityFactor for Planet Improvments.

There are 5 imporvments that have this as a field( Eye of the Universe - (.2),Propaganda Machine - (.5),Artificial Slave Center - (.5),Galactic Bazaar - (.5),Omega Defense System - (1.0).

Only 2 of them (Eye of the Universe - (14 - Sensors) and Omega Defense System - (12-Hitpoints)) have a value in the ability type field.

Just one (Eyes of the Universe - 10) has a value in the ability amount field.

For the improvments that do not have a ability type field filled in but have the F_AbilityFactor, how does the game know what ability to apply the modifer to? Does this mean that the ability factor for these does not work or does it default to ability 0?

I found out that the reason the mind control center gives 100% boost to economy is because it has a value of 100 in the ability field amout but does not have a ability type field set, so it defaults to the first ability of 0 (which is economics).

Any help on this would be appreciated.

Side Note: Where can you see what your loyalty level is?



2,993 views 1 replies
Reply #1 Top
You'll notice that F_AbilityFactor was commented out of a lot of other improvements. I believe it's due to a fundamental change in the coding the dev's made partway through (possibly to give an easier mod structure?), but it wasn't changed for a few things. Here's the little I think I know on the subject though.

F_AbilityFactor modifies an ability by a percentage (where 1.0 = 100% and 0.1 = 10%) that is defined in hardcode and related specifically to the internal name of that particular improvement. Simply adding it to another improvement will do nothing, unless its ability tag is already defined somewhere in hardcode.

In the case of Eyes of the Universe, it modifies sensor range by +20%, which is why all of your ships get 15 sensor range after adding it ((base 2, +1 from Sensor tech, +10 from eyes,) x 1.2 > 15). AbilityType and AbilityAmount are linked and unrelated to F_AbilityFactor, and in this case gives the documented +10 to sensor range. I believe this is one of those items where they simply forgot to comment out the F_AbilityFactor, since what it does is not documented in the game.

Omega defense system increases hp's by 100% for that planet only (F_AbilityFactor 1.0). AbilityType in this case is unnecessary also, and is a piece of extraneous code that has no AbilityAmount linked to it and is thus ignored (or gives +0% to all hp's civ-wide, which amounts to the same thing. You can comment out the AbilityType and it still works without it)

Propaganda Machine increases Starbase influence by 50% (0.5)
Articifial Slave Center increases military production by 50% (0.5) (multiplied AFTER all normal +x% bonuses from your civilization and planetary/starbase bonuses)
and
Galactic Bazaar increase the value of the goods you trade by 50% (0.5)

It seems that all of those abilities are something that aren't normally available with a simple AbilityType + AbilityAmount tag. I'm guessing that's why they left those in for those improvements.