Civilization Wiki
Advertisement

I changed the maximum size of the technology chart due to the Info section often hogging the page. Is there a way to add a 'beakers required' to this, so the charts can display the tech needed? Also, how do I utilize the 'leadsto' function in the technology chart? I also don't see a function for improvement unlocks, either.

Irishww (talk) 21:14, November 6, 2014 (UTC)

Hey, thanks for helping out Irishww! I see you already found the file with the tech data, Module:Data/CivBE/Technologies. Certainly you can add whatever data items you think would be appropriate. Take a row like this:
technologies["Habitation"] = { techtype = "Primary", tier = 0, buildings = {"Old Earth Relic", "Clinic"}, units = {"Explorer", "Soldier"}}
You could amend it with beakers and improvements like this (I just made some values up):
technologies["Habitation"] = { beakers = 123, techtype = "Primary", tier = 0, buildings = {"Old Earth Relic", "Clinic"}, units = {"Explorer", "Soldier"}, improvements = {"Foo", "Bar"}}
It would then be easy to take those new items into use in the context of the function that creates the infobox in this module.
The leadsto function is a bit broken as far as I recall, or the name may even be completely misleading. Since you can traverse the tech web both inwards and outwards, the concept of one tech leading to another is a bit vague. I guess we'd rather have some function to just list the adjacent techs, without commenting on which one came first. Cannot really delve deeper into this right now, but we'll figure it out. :)
ZeroOne (talk) 23:38, November 7, 2014 (UTC)

Thanks for the information! I'll start adding in beakers as I work through the module. I also noticed the 'improvements' function isn't yet functional either. I'm still a bit new to the coding aspect haha, but thank you! Irishww (talk) 20:25, November 8, 2014 (UTC)

Advertisement