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

Great Work Yield Types

Discussion in 'Civ5 - Mod Components' started by whoward69, Oct 10, 2013.

  1. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,410
    Location:
    Near Portsmouth, UK
    Why do Great Works always have to generate Culture? Why can't my academics research an artefact and increase the nations knowledge (science)? Why can't my entrepreneurs put Great Works on display and increase my revenues from entrance fees (gold)? Or if I'm short of public buildings to display Great Works in, why can't I put them into storage in bank vaults gathering dust (no yield)?

    "DLL - Various Mod Components" (version 25) provides all the functionality to enable buildings with Great Work slots to also specify the yield type from those Great Works placed into them. For example, a Great Work placed into a University is used for research so generates YIELD_SCIENCE instead of YIELD_CULTURE, those in an Art Gallery generate YIELD_GOLD (entrance fees), and those in storage in the vault of a Bank generate NO_YIELD.

    "Global - Great Work Research" adds a Great Work slot to the University, generating science instead of culture
    "Global - Great Work Vaults" adds a Great Work slot to the Bank, generating no yield or tourism
    "UI - Great Work Manager" (version 4) has been updated to colour-code the yield from Great Work buildings in their slot bar
    "Global - Palace Extra Great Work" adds an additional Great Work slot to the Palace, themed the same way as Museums. Also fixes the core CultureOverview.lua file to gracefully ignore extra slots added to core buildings (you can't manage the extra slots from the standard UI, but at least it won't crash!)

    For example,

    Palace has an extra Great Work Art(efact) slot and bonuses as per the Museum
    4 Great Works generating +27 culture and +10 tourism


    Move a Great Work from the Palace to the University
    Lost the tourism/culture bonus from the theme in the Palace, lost two culture but gained 3 science (as Great Works in Universities yield science instead of culture)


    Move the other Great Work from the Palace into the vault in the Bank
    Lost 2 tourism (as Great Works hidden from public view don't generate it) and also 2 culture (as Great Works in Banks have no yield)


    The AI code for placing Great Works has been rewritten to allow for yields - if the AI is going for a Spaceship Victory, it will favour placing Great Works into Universities, if it's running short of cash it will try to generate gold, still trying to found/enhance a religion will favour faith related Great Work buildings. You can see how the AI would place your Great Works from Lua via pPlayer: DoSwapGreatWorks(YieldTypes.YIELD_CULTURE) (or whatever yield you want to focus on)

    Source code is on GitHub, search it for MOD_GLOBAL_GREATWORK_YIELDTYPES if you want to see the specifics.
     

    Attached Files:

  2. Qoma

    Qoma Warlord

    Joined:
    Dec 12, 2012
    Messages:
    137
    Oh wow. Now this I have to check out. And Great Works into storage is only one feature? You outdo yourself.
     
  3. Gilgamesch

    Gilgamesch Ancient Alien

    Joined:
    Dec 15, 2010
    Messages:
    2,228
    Location:
    good old germany
    As always :goodjob:.

    Will check it out later when back to Civ.
     
  4. AndreP

    AndreP Chieftain

    Joined:
    Apr 14, 2010
    Messages:
    68
    Here the German translation for "UI - Great Work Manager".

    Great Mod.:)
     
  5. Ekmek

    Ekmek on steam: ekmek_e

    Joined:
    Aug 7, 2002
    Messages:
    6,047
    Location:
    San Diego, California
    Nice!
    Do you have something for adding faith? Holy books, relics, artefacts and the like
     
  6. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,410
    Location:
    Near Portsmouth, UK
    Many thanks - was included in the last update (with credit of course) :)
     
  7. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,410
    Location:
    Near Portsmouth, UK
    If you mean a new GW class of objects, I don't. This "only" allows you to generate yields other than culture from putting the existing GW types - art(efact), music and writing - into appropriate buildings. It doesn't add new types of Great Works (as that's a completely different kind of "hard-coded in the DLL" nightmare).

    You could get Cathedrals to generate faith instead of culture with
    Code:
    UPDATE Buildings
     SET GreatWorkYieldType='YIELD_FAITH'
     WHERE BuildingClass='BUILDINGCLASS_CATHEDRAL';
    
    but not sure if that's what you mean.
     

Share This Page