1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  3. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  4. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  5. Dismiss Notice
  6. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

Affinities As Yields

Discussion in 'CivBE - Released Mods' started by HandyVac, Feb 16, 2015.

  1. HandyVac

    HandyVac Gentleman

    Joined:
    Apr 24, 2014
    Messages:
    270
    Gender:
    Male
    Location:
    The shire where the oxen cross the river. UK.
    It bugs me a little that the main way to gain affinities is by researching techs, since to my mind affinities should be more like an ideology or philosophy, representing how your people use what they know, rather than what they know. And what better way to judge the ideology of your civilisation than by what it chooses to build?
    So in this mod I remove the affinity rewards from researching techs and instead make tile improvements and buildings yield affinity points per-turn.

    Key Changes

    - No techs grant affinity points when researched. I.e. Affinity comes from what your choose to do with your knowledge, not what you know.

    - Many (but not all) buildings and tile improvements yield affinity points per turn, so what you build dictates the affinity you progress towards. I.e. The work and living environment of your colony influences the ideology of your citizens.

    For example, and not an exhaustive list:
    farms, mines, domes, vivariums and old earth relics yield Purity points
    generators, manufatories, nodes, autoplants and networks yield Supremacy
    paddocks, plantations, biowells, xenonurseries and alien preserves yield Harmony​

    - User interface changes show the new yields in tooltips, production lists and techweb filters. New icons in the city view screen show the total produced by that city, and the dropdowns from the top menu show the total produced colony-wide.
    Hopefully all this makes it clear to the player what to build to persue which affinity.



    Screenshots:
    Spoiler :

    Spoiler :

    Spoiler :

    Spoiler :

    Spoiler :

    Spoiler :


    Now compatible with Rising Tide:
    DOWNLOAD FROM CIVFANATICS
    DOWNLOAD FROM STEAM

    With alternate version for use without Rising Tide:
    DOWNLOAD THE NON-RISING-TIDE VERSION FROM STEAM


    Original first post:
    Spoiler :
    This is very much a work in progress, but I thought I'd share what I have so far.

    It bugs me a little that the main way to gain affinities is by researching techs, since to my mind affinities should be more like an ideology or philosophy, representing how your people use what they know, rather than what they know. And what better way to judge the ideology of your civilisation than by what it chooses to build?
    So in this mod I remove all affinity rewards from techs and instead make tile-improvements yield affinity-points-per-turn when worked. ;)

    Download The Latest Version Here

    So Far
    The following tile improvements yield affinity when worked (not labelled in-game yet, but functioning):
    • Generator - 1 Supremacy
    • Quarry - 1 Supremacy
    • Firaxite Mine - 3 Supremacy
    • Geothermal Well - 2 Supremacy
    • Array - 3 Supremacy
    • Node - 4 Supremacy

    • Plantation - 1 Harmony
    • Paddock - 1 Harmony
    • Work Barge - 1 Harmony
    • Xenomass Well - 3 Harmony
    • Biowell - 4 Harmony
    • Alien Nest - 4 Harmony

    • Farm - 1 Purity
    • Mine - 1 Purity
    • Floatstone Quarry - 3 Purity
    • Petrol Well - 2 Purity
    • Dome - 3 Purity
    • Terrascape - 4 Purity
    Thresholds for the affinity-points needed to level-up have been increased (though probably not enough) so you don't earn levels too quickly.

    Still To Do
    Add supprt for affinity-yields from buildings
    Change civilopedia entries and help texts to mention the new yields
    Balance the numbers so that all three affinities can be gained with equal ease. (supremacy tends to get left behind at the moment)
    If possible, tweak the UI for showing tile yields, so icons for affinity yields are visible on the map.
     
  2. Diemex

    Diemex Chieftain

    Joined:
    Aug 4, 2007
    Messages:
    20
    Location:
    C A N A D A
    Interesting idea. I suspect late game you're affinity will go through the roof.. I'll have to try this one out. (Can you actually 'work' an alien nest ?)
     
  3. HandyVac

    HandyVac Gentleman

    Joined:
    Apr 24, 2014
    Messages:
    270
    Gender:
    Male
    Location:
    The shire where the oxen cross the river. UK.
    updated to (v 10)

    Now supports yields from buildings, both as a flat yield and a percentage modifier for that city.

    Added modified versions of InfoTooltipInclude.lua and PlotMouseoverInclude.lua, to show the new affinity yields in tooltips for map plots, city build lists and techweb.
     
  4. Minor Annoyance

    Minor Annoyance Chieftain

    Joined:
    Jun 27, 2007
    Messages:
    2,247
    Gender:
    Male
    Location:
    Hamilton, Ontario
  5. Gorbles

    Gorbles Load Balanced

    Joined:
    Nov 24, 2014
    Messages:
    1,774
    Location:
    UK
    Great work, been looking through the mod files. Really nice stuff!
     
  6. Diemex

    Diemex Chieftain

    Joined:
    Aug 4, 2007
    Messages:
    20
    Location:
    C A N A D A
    Hope you don't mind some feedback.

    I gave this mod a shot and it was ok, though the affinities came way too fast for me. Here's how my game went for an idea of the pace :

    Standard Size, Gemini difficulty.

    After only a few turns I was locked down into a dominant Affinity. Not sure how that happened but I was forced into harmony almost straight away... (I guess from making plantations) So ok... mindflower it is !

    Turn 110
    3 Cities, population total : 11
    5 Harmony, 5 Purity and 3 Supremacy
    Its very early in the game, my cities are stuck on a little isle and underdeveloped.

    Turn 170
    3 Cities, pop 23
    Affinities 13/7/6
    Its still rather early in the game.. I have no army to speak of and not a lot of tech yet, at this point I see my affinity is going to max out and so is the AI so I better start racing towards my victory conditions.

    Turn 200
    3 Cities Pop 27
    18/9/7 (I have reached maximum harmony affinity)
    At this point its an all out race... as the AI players mostly have 18/18/18 affinity levels ! But I dont think they understand the new system as they are not progressing towards victory.

    Turn 303 (victory)
    3 cities 38 pop
    18/15/12

    It was an interesting game and quite fun, but I'm not sure how to properly pursue/lockin an affinity during the first 10 turns. Also it seems that you really don't have time to explore/research much at all... you pretty much have to beeline to your victory conditions... not necessarily a bad thing though.

    I did notice one other odd thing... though this is not really mod related... can probably happen in any game under right conditions. I had over 10 affinity ea when I researched tech for the aircraft carrier unit. It was odd because all my units were 'green' / harmony affinity based but my carrier was given the option to select any of the upgrades... thus I could have a supremacy(yellow) carrier while the rest of my units were harmony. I think the devs never expected anyone to have such high affinity levels when they researched that tech.
     
  7. ShadoWarrior

    ShadoWarrior Chieftain

    Joined:
    Dec 16, 2001
    Messages:
    8
    This is true for all unit types that have different versions based on affinity. I have played several games over the past few months in which I had selected a supremacy or purity option for an upgrade despite harmony being my primary. I do, however, play with only the total domination (conquest) victory enabled, so tech-rushing becomes quite important in keeping ahead of the AI opponents, and I gain a lot of affinity from techs of course.
     
  8. HandyVac

    HandyVac Gentleman

    Joined:
    Apr 24, 2014
    Messages:
    270
    Gender:
    Male
    Location:
    The shire where the oxen cross the river. UK.
    Yep, looks like affinity levels are gained much too fast at the moment, I'll have to increase the points-needed-for-next-level thresholds some more. It's gonna take a while of trial and error to get that pacing just right.
    I suspect the aparrent tardiness of the AI in progressing to victory is another symptom of fast affinity leveling, since if they haven't researched the tech to build that victory wonder they can't start winning yet, no matter how many affinity levels they have.

    Another problem with pacing here is affinity-level thresholds don't scale with the selected game-speed. I've been testing the mod on Quick game speed, but levels are going to be gained in the same number of turns in Standard, Epic or Marathon too, which is obviously not ideal. :mischief:
    I'll need to figure out a way to change the level thresholds dynamically via lua depending on gamespeed (another thing to add to my to do list), but until then I reccomend playing this mod on quick.
     
  9. Diemex

    Diemex Chieftain

    Joined:
    Aug 4, 2007
    Messages:
    20
    Location:
    C A N A D A
    Thanks for your work in any case. Its still a worthy mod as is. I look forward to any updates it may receive.
     
  10. HandyVac

    HandyVac Gentleman

    Joined:
    Apr 24, 2014
    Messages:
    270
    Gender:
    Male
    Location:
    The shire where the oxen cross the river. UK.
    Updated to (v 17)

    - Increased the spacing between affinity levels by roughly three times. In my test runs the AI now gets it's first affinity level around turn 30, and maxes out it's dominant one around turn 400, which seems reasonable on quick gamespeed.

    - Added support for player perks which change the affinity yield from buildings.

    - Added modified version of UnitPanel.lua, to show affinity-yields-changes for worker builds.

    - Added modified version of TopPanel.lua, to show you colony's total affinity-yield-per-turn in the affinity level tooltips.
     
  11. Japper007

    Japper007 Chieftain

    Joined:
    Oct 6, 2014
    Messages:
    387
    Gender:
    Male
    Location:
    The Netherlands
    This sounds really good! Gaining affinity this way seems a lot more lore-friendly.

    I had a similar idea a while back, though I didn't create a mod (no time, and I'm a lousy coder).
     
  12. Japper007

    Japper007 Chieftain

    Joined:
    Oct 6, 2014
    Messages:
    387
    Gender:
    Male
    Location:
    The Netherlands
    I don't think this has anything to do with the mod, the AI seems to just kinda stumble into a victory, or not do anything at all. I played an Apollo game recently where a runaway Koslov had fully conquered ARC (he had like 30 cities) and had full Purity, yet didn't make progress towards any of the victories.:crazyeye:
     
  13. HandyVac

    HandyVac Gentleman

    Joined:
    Apr 24, 2014
    Messages:
    270
    Gender:
    Male
    Location:
    The shire where the oxen cross the river. UK.
    Updated to (v 18)

    - Bugfix. Mod will no longer make the game freeze when you get a "choose a free affinity level" quest reward.

    - General pass over buildings and wonders to give them appropriate affinity-yield values. Buildings from further out in the techweb give larger yields, wonders either increase the percentage yield in that city, or increase yields from a certain building type.

    - Increased spacing between affinity levels, to accomodate the increased yields from buildings.

    - Manufactories now yield 2 supremacy. Should make supremacy levels a little easier to get, and gives supremacists more of a chace to get production.
     
  14. HandyVac

    HandyVac Gentleman

    Joined:
    Apr 24, 2014
    Messages:
    270
    Gender:
    Male
    Location:
    The shire where the oxen cross the river. UK.
    On a related note, several times now playing with this mod I've seen the AI building a victory wonder for an affinity other than their dominant one. I.e. a harmony civ building the Emancipation Gate, or a purity civ winning with a Mind Flower.

    I'm not sure if thats the AI following some grand strategy to level-up affinity A but accidentally getting affinity B instead from the yields system, or if the AI just picks a victory at random when it happens to meet the prereqs for all of them.
     
  15. Minor Annoyance

    Minor Annoyance Chieftain

    Joined:
    Jun 27, 2007
    Messages:
    2,247
    Gender:
    Male
    Location:
    Hamilton, Ontario
    I think the AI perhaps doesn't understand how to get affinity so it picks a goal and doesn't know how to get there. This may be why Firaxis didn't go this way with affinity. It's hard to get the AI to effectively build cities, and even harder if they also have to follow a bigger strategy when doing it.
     
  16. Ryika

    Ryika likes cookies and milk.

    Joined:
    Aug 30, 2013
    Messages:
    8,468
    When it comes to victory wonders the AI will usually just build whatever is available first, as they have insanely high flavor-numbers (200, while everything else has about 5-25, going to 50 for some wonders).

    @Topic: That's a REALLY cool project, so much more interesting than what we currently have in the game.

    I personally would remove the affinities from the standard builds though, as they're not really divided by affinity - a supremacy player will for example not be able to spam generators and still do fine overall. Everyone goes for farms early on. I personally think a more balanced version would be to instead add these yields when certain affinity-related techs are reached - you could display that in the tech web via dummy-playerperks.
     
  17. lilgamefreek

    lilgamefreek Chieftain

    Joined:
    Oct 30, 2014
    Messages:
    229
    Since you've modified some UI elements, it would be relatively easy to modify the techweb to use the old affinity icons instead for yield modifications. It would make things clearer. This may have the additional bonus of allowing the same improvement to have different affinity yields, depending on which research path you take.
     
  18. HandyVac

    HandyVac Gentleman

    Joined:
    Apr 24, 2014
    Messages:
    270
    Gender:
    Male
    Location:
    The shire where the oxen cross the river. UK.
    Updated to (V 22)

    - Optimised code to run faster (by saving info about yields in a lua table, instead of doing the same database lookups an ever-increasing number of times each turn)

    - Changed filters in the techweb screen, filtering by affinity now highlights all buildings and improvements which give that affinity yield. (Should make it clearer for the player which techs to prioritise when persuing a certain affinity).
     
  19. thecrazyscot

    thecrazyscot Spiffy

    Joined:
    Dec 27, 2012
    Messages:
    1,668
    Awesome awesome work! :goodjob:

    Have you thought about adding/changing some quest decisions to increase affinity points for certain buildings?
     
  20. HandyVac

    HandyVac Gentleman

    Joined:
    Apr 24, 2014
    Messages:
    270
    Gender:
    Male
    Location:
    The shire where the oxen cross the river. UK.

Share This Page