1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Sponsor/Affinity-specific virtues?

Discussion in 'CivBE - Modding Help & Mod Creation' started by GammaNova, Nov 4, 2014.

  1. GammaNova

    GammaNova Chieftain

    Joined:
    Oct 31, 2014
    Messages:
    12
    Just kicking around an idea that I'll do some more exploratory work on when I get home tonight, but I thought something that might be cool to add a bit more of a unique flavor to each faction would be to have a top tier virtue in each tree that is specific to each sponsor and/or affinity.

    Before I get too excited about the prospect, does anyone know if this is currently impossible?

    Examples might be: Polystralia - Might gets a bonus to naval units; Prosperity gets +1 trade routes to capitol; Knowledge gets bonus science from trade routes; Industry gets bonus production from trade routes. (Very minor bonuses, naturally, as we all agree that trade is ridiculous currently, but I'm using this as an example for "flavor") A different faction like ARC would have espionage flavors to their virtues, Koslov might instead get something orbital-ish.

    Could also be combined with slight nerfs to the sponsor's initial perks that instead have to be earned back through this top-tier virtue.

    Brainstorming more than anything at this point, but taking notes.
     
  2. MolybdenumMatt

    MolybdenumMatt Chieftain

    Joined:
    Mar 20, 2015
    Messages:
    3
    I would like to up this topic. I was wondering about the same thing. Having a separate set of virtues for each faction would make them more unique. Is it doable and if yes, then how?
     
  3. HandyVac

    HandyVac Gentleman

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

    Just looking in the xml files, and there's a "TechPrereq" column in the policies table. Assuming that column works (it's not used by any of the vanilla game virtues), you could give each sponsor a unique starting tech, and set those techs as prerequsites for sponsor-unique virtues.
     
  4. MolybdenumMatt

    MolybdenumMatt Chieftain

    Joined:
    Mar 20, 2015
    Messages:
    3
    But that would mean you would have a bunch of virtues that are in everyone's tree, but can be unlocked only by a specific faction, right? I was more thinking of making a unique set of virtues for each player. So whenever you pick a faction you can see and unlock only the ones that are unique to them.
     
  5. Ryika

    Ryika Lazy Wannabe Artista

    Joined:
    Aug 30, 2013
    Messages:
    9,396
    Looking at the UI-File (VirtuesPopup.lua) I assume that it's possible to do something like that, but it would require some knowledge of lua.

    I'm not really sold on the idea that it would be worth the effort though - there are so many easier ways to give unique bonuses, tinkering with the UI and having to fix the issues that would arise seems like overkill to me.
     
  6. lilgamefreek

    lilgamefreek Warlord

    Joined:
    Oct 30, 2014
    Messages:
    229
    I would like to state that this is very possible and not even particularly difficult given the right Lua know-how. It would even be enforceable even for AI without any complicated workarounds.

    All it would need is:
    1.) a custom table that lists the faction/affinity requirements for your custom virtues
    2.) a function that checks whether a player can adopt a virtue based on the table. The function is then registered to GameEvents.PlayerCanAdoptPolicy()
    3.) minor rewriting of the VirtuesPopup.lua (there shouldn't be need to modify its associated .xml) to display only the faction/affinity specific virtue to the human/active player.

    The game's virtue system is actually very flexible from the meta-level. UI is extraordinarily flexible by it's nature, and the PlayerCanAdoptPolicy() GameEvent means you can hinge virtue requirements on very complicated logic based off any data accessible through Lua calls. The hardest thing really would be actual game design, as 8 (12 with rising tide) factions * 3 affinities * 4 branches is 96(144) new virtues that only appear in the late game.
     

Share This Page