What determines lightbulbing order?

Jet

No, no, please. Please.
Joined
Mar 16, 2006
Messages
2,431
What is the algorithm that determines which tech a great person will bulb?
 
All i know is that if there are two techs a GP can bulb, it will never bulb the one you want.



I don't know what does it, but the BUG mod has a thing in the tech panel where it shows you what a GP will bulb if you had that person, along with the next one.
 
All i know is that if there are two techs a GP can bulb, it will never bulb the one you want.



I don't know what does it, but the BUG mod has a thing in the tech panel where it shows you what a GP will bulb if you had that person, along with the next one.

Actually, it's a little better than that. It shows you which tech the GP will bulb, and which tech the GP will bulb when you finish your current research.

So most of the time those are both the same tech. Sometimes you're researching the bulb tech, and it shows you which tech is up next. Sometimes researching an unrelated tech can change the bulb path, and you're informed about this also
 
Multiply the FLAVOR_XXX value of the Great person in UnitInfos by the matching FLAVOR_XXX of the technologies which you can currently research in TechInfos. The higher number value will be bulbed first. In the case of a tie, whichever one is listed first in the XML wins.


If the mod you are playing lists multiple FLAVOR_XXX types on a great person, you multiply each one by the matching FLAVOR_XXX value on the tech, and then add them together. Pretty sure base BtS only uses a single FLAVOR_XXX for each GP, and the value of all of them is 1, so you can just look at the FLAVOR_XXX values in the TechInfos file and sort numerically, keeping the order unchanged from the XML order in the case of a tie.


For an example:

If Great Sage has FLAVOR_SCIENCE = 3, and FLAVOR_GROWTH = 2 and FLAVOR_RELIGION = 1, and you are currently able to research Agriculture (FLAVOR_GROWTH = 5) and Writing (FLAVOR_SCIENCE = 4) and Education (FLAVOR_GROWTH = 3, FLAVOR_SCIENCE = 2), then the score you get will be:

Agriculture: 2*5 = 10
Writing: 4*3 = 12
Education: 3*2 + 2*3 = 12

Since there is a tie between Writing and Education, the one which is listed first in the XML will be the one you bulb. I believe the XML is mostly set up in alphabetical order, so that would wind up meaning Education.
 
What a horrible and needlessly complex system :(

What would be wrong with just presenting the player with a list of available techs, and letting them pick. Or even just a list of eligible techs for that GP type.


Also, I still find it amusing to hear "bulb" used as a verb.
 
Righteous, thanks x.
 
Back
Top Bottom