AffinityValueNeeded

JayBee

Chieftain
Joined
Aug 17, 2015
Messages
2
I was thinking about adding a new faction, which takes only 50% penalty for non-dominant affinities. For instance, for the dominant affinity, it takes 16 points to reach level 5 from level 4. For the non-dominant affinity, it takes 20 points. I want to build a faction that can reduce it to 18 points.
The needed value can be edited in CivBEAffinities.xml by changing the 'AffinityValueNeededAsNonDominant' value, but turns out it changes the required affinity value globally, instead of affecting only one faction. Maybe I should look at the 'ChangeAffinityScore' function for further information, but after googling it, I found that according to Malwr.com, that part is included in the 'CvGameCoreDLLFinalRelease.dll'. Damn. The core source file for Civ 5 can be found in the SDK, but I have no luck finding the core source file for Beyond Earth. Obviously there is nothing related to affinity in the source file for Civ 5, so I'm out of solutions. Is there any way out of this?
 
ChangeAffinityScore is a function that can be called in lua scripts to give a specific number of affinity points to a specific civ.
E.g.
Code:
pPlayer:ChangeAffinityScore(GameInfo.Affinity_Types["AFFINITY_TYPE_SUPREMACY"].ID, 10);
would give 10 supremacy points to pPlayer.

So you could probably achieve the effect you want with a lua script that adds a few points to each of your civ's non-dominant affinities whenever they gain a level in their dominant one.
 
Source Code for Beyond Earth isn't available unfortunately.

But HandyVac is right, that would work. player:GetDominantAffinityType() can be used to check which Affinity is the dominant one.

I don't think there is a known way to trigger a function when Affinity is gained though, so unless I've missed something a workaround would be needed there.
 
Back
Top Bottom