how to control which GP bulbs which tech?

davidlallen

Deity
Joined
Apr 28, 2008
Messages
4,743
Location
California
Certain Great People can lighbulb certain technologies. In BTS this is shown in the tech tree with text, "This technology can be invented by a Great XXX". I can't find where this is controlled. It doesn't seem to be in either the gameinfo/civ4specialistinfo.xml or techs/civ4technologyinfos.xml file.

I have added a specialist type and removed two from my mod, so I want to adjust this. But I can't figure out where. Does anybody know?
 
I'm pretty confident its controlled by the flavors in technologyinfos; I don't know how you'd go about associating new specialist types with flavors, though.
 
Interesting. That makes my problem worse, however. I have added a new great person type, "Great Protector". Like a sherriff in the Wild West. He would lightbulb military technologies. There is already a FLAVOR_MILITARY in the techs, which is good; but now I need to know how to say that my Great Protector can lightbulb military flavor. There is a Flavors flag in specialistinfo, but it's blank for all the existing Great People. So that isn't how the game is making the association.

Can anybody figure out the linkage?
 
UnitInfos.xml

Er, thanks, but I guess I need more than a one word answer. For example in the Great Scientist unit, there is a reference to FLAVOR_SCIENCE. I thought the flavor in the unitinfo file would influence the AI to build that unit. Are you saying that because there is some flavor for the great scientist, the AI looks in the technology list and grants a lightbulb for any tech which has the same flavor?

I don't think that is the case, because my new unit has FLAVOR_CULTURE, there are culture technologies, and my unit does not have a lightbulb action button.

Can you tell me a little more about the steps to link them?
 
You also need to give your unit a number for <iBaseDiscover> and <iDiscoverMultiplier>. Just copy some other Great Person's example.

The tech that will be lightbulbed, is the researchable tech with the highest flavour value (that the Great Person also has). If the Great Person and techs have multiple flavours, it's probably the sum of the tech*unit flavours.

Note that you can add new flavours in GlobalTypes.xml.
 
Maniac is correct. Multiply each Flavor value on the Unit by the appropriate Flavor value on the Tech. Add them together for each Tech (if the unit and tech shared more than 1 flavor), and that sets your priority. The Unit will Bulb the highest Score, and in the case of a tie it will Bulb the first one listed in the XML.

iBaseDiscover is how many :research: points the unit will give you toward your tech. iDiscoverMultiplier is how many bonus :research: you get per population point in the city where you Bulb from.
 
Thanks for the help, it is working now. I added a flavor to the unit, and set its iBaseDiscover and iDiscoverMultiplier to nonzero. FWIW, just copying from the spy or general won't help, since those have zero for the discover values.
 
Back
Top Bottom