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

Anyone knows what these Unique Ability tags do?

Discussion in 'Civ5 - Creation & Customization' started by Glassmage, Nov 9, 2013.

  1. Glassmage

    Glassmage The Desert Flame

    Joined:
    Apr 23, 2011
    Messages:
    1,633
    Location:
    USA
    So we got some new tags in the civ5traits.xml file in the BNW folder. The new tags are:

    LandBarbarianConversionExtraUnits
    PlotCultureCostModifier
    FaithFromKills - this one I know to be same as god of war pantheon
    UnresearchedTechBonusFromKills
     
  2. Pouakai

    Pouakai It belongs in a museum. Moderator

    Joined:
    Jun 16, 2010
    Messages:
    7,158
    Location:
    Aotearoa
    I could take a guess based on the names, but I think we'd need to test them out to be sure. Chances are they're dead tags if they're not used, since there are a couple of those in the files already. The last one sounds interesting, as it's not just "ScienceFromKills" or something like that. Could be a leftover from the native american faction and have a tech bonus when you kill a more advanced unit that you haven't researched yet or something like that
     
  3. PawelS

    PawelS Ancient Druid

    Joined:
    Dec 11, 2003
    Messages:
    2,803
    Location:
    Poland
    PlotCultureCostModifier - this should change the culture cost of acquiring plots by cities.
    PlunderModifier - this is used by Askia, and increases the gold from capturing cities and barbarian camps.
     
  4. Glassmage

    Glassmage The Desert Flame

    Joined:
    Apr 23, 2011
    Messages:
    1,633
    Location:
    USA
    oh oops nvm on the Plunder one then
     
  5. Barathor

    Barathor Emperor

    Joined:
    May 7, 2011
    Messages:
    1,202
    Cool, I haven't looked at this file in a while and didn't know of some of them.

    LandBarbarianConversionExtraUnits = get "x" extra copies of the barbarian camp unit if it joins your side.

    UnresearchedTechBonusFromKills = % beaker bonus towards unresearched tech upon killing a unit from that tech. (I think this one is a dead tag, though.)
     
  6. Glassmage

    Glassmage The Desert Flame

    Joined:
    Apr 23, 2011
    Messages:
    1,633
    Location:
    USA
    is the extrabarbarian one work? I tested FaithfromKills and that work.
     
  7. JFD

    JFD Kathigitarkh

    Joined:
    Oct 19, 2010
    Messages:
    9,122
    Location:
    The Kingdom of New Zealand
    It's used in the Scramble for Africa scenario, so it should work fine.
     
  8. Glassmage

    Glassmage The Desert Flame

    Joined:
    Apr 23, 2011
    Messages:
    1,633
    Location:
    USA
    really? I'm trying to find it right now and it doesn't appear in the NewCivilizations.xml file in the SfA scenario folder.
     
  9. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,441
    Location:
    Near Portsmouth, UK
    All the code is in the DLL for this to work. It's similar to gaining culture/gold from kills, but grants an amount of beakers towards an unknown tech
     
  10. Barathor

    Barathor Emperor

    Joined:
    May 7, 2011
    Messages:
    1,202
    Oh, cool... that's an interesting ability to maybe use in some mods. Glad it's functional. :)

    I'm just curious, where exactly is the block of code that makes this tag functional? I'm not too familiar with C++, but seeing this example might open my eyes a little more. When I searched through CvTraitClasses.cpp for "UnresearchedTechBonusFromKills", I didn't notice any code that looked like the actual ability, just things that looked like short declarations (if that's what they're called).
     
  11. snarko

    snarko DLLer

    Joined:
    Dec 9, 2003
    Messages:
    1,512
    Location:
    Sweden
    If you are using visual c++ you can right click on a function or variable and select "find all references". This will tell you where the function/variable is used. In this case, "find all references" for GetUnresearchedTechBonusFromKills (CvTraitClasses.h) tells me it's used in CvPlayer.cpp. Double clicking that reference I see it's used in CvPlayer::DoUnresearchedTechBonusFromKill.

    (sometimes find all references will not find all references. This can for example occasionally happen when multiple functions in different classes have the same name.)
     
  12. Barathor

    Barathor Emperor

    Joined:
    May 7, 2011
    Messages:
    1,202
    Thanks for the tip, snarko, and showing me where the other references are. That's sounds really handy. Though, I usually use Notepad++.

    It's strange -- I did a quick search again within Windows Explorer using wildcard asterisks this time (*UnresearchedTechBonusFromKills*) and only the single file popped-up again. I performed the file search in Notepad++, and all the files popped-up. I guess I'll be using that from now on. :D
     
  13. LuvToBuild

    LuvToBuild Prince

    Joined:
    Mar 9, 2006
    Messages:
    564
    Location:
    Evansville, IN
    Sorry to hijack this thread but the title pretty much sums up what I'm wondering about a few UA tags myself. I'm updating/finishing the HOW TO CREATE A NEW TRAIT section of my newbie guide, and while I know most are kind of sort of self-explanatory, I wanted to say more than just "here's some tags, I'll leave it to you to figure out what they do because it's kind of sort of self-explanatory" :)

    For starters, I assume these are tied to any building that has a MaxGlobalInstances, MaxTeamInstances, or MaxPlayerInstances value >=1 (although it could be >=0 since the default value is -1, I'm not sure). While these tags are normally used for world wonders and national wonders, there are some buildings like the recycling center that uses MaxPlayerInstances. I haven't seen any traits besides the unused Industrious that uses these tags but I still thought I would cover them since they are there and I assume the code is in place to make them usable. I guess I'm just wanting some confirmation that my assumptions are correct.
    Code:
    <MaxGlobalBuildingProductionModifier>0</MaxGlobalBuildingProductionModifier>
    <MaxTeamBuildingProductionModifier>0</MaxTeamBuildingProductionModifier>
    <MaxPlayerBuildingProductionModifier>0</MaxPlayerBuildingProductionModifier>
    
     
  14. snarko

    snarko DLLer

    Joined:
    Dec 9, 2003
    Messages:
    1,512
    Location:
    Sweden
    It's considered a world/team/national wonder if it has a limit of anything BUT -1. So if it has 0 or -3 world limit it's a world wonder. You can't build it, but the game will consider it a world wonder all the same.

    Those three tags work exactly like you would expect them to. They will apply to anything considered world/team/national wonder.
     

Share This Page