Anyone knows what these Unique Ability tags do?

Glassmage

The Desert Flame
Joined
Apr 23, 2011
Messages
1,675
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
 
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
 
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.
 
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.)
 
is the extrabarbarian one work? I tested FaithfromKills and that work.
 
UnresearchedTechBonusFromKills = % beaker bonus towards unresearched tech upon killing a unit from that tech. (I think this one is a dead tag, though.)

It's used in the Scramble for Africa scenario, so it should work fine.
 
It's used in the Scramble for Africa scenario, so it should work fine.

really? I'm trying to find it right now and it doesn't appear in the NewCivilizations.xml file in the SfA scenario folder.
 
UnresearchedTechBonusFromKills

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
 
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).
 
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.)
 
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
 
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>
 
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.
 
Top Bottom