Modifiers Based On Themed Museums

Zoythrus

Chieftain
Joined
Jul 11, 2012
Messages
36
Hello,

I'm trying to make a new civ whose ability is "+5% Tourism from every Themed Museum," but I don't understand the LUA well enough to actually do that.

I do know that I need to read all cities, find any Museums, note if the Museums have a theme, then apply the modifier, but haven't figured out how to do it.

Could anyone with a good understanding of LUA point me in the right direction?

Thank you,
-Zoythrus
 
You won't be able to attach your own modifier because there's no function to do so. All GameEffects functions are read-only sort of speak.
Also, i dont think there's a function to change tourism, for that you really need a modifier.
And I think there are no requirements available that detect if a building is a themed one.
So, the only way to do that is a) detect if there's a themed museum using Lua b) place a dummy building if so c) create a modifier and attach it to that building that changes tourism output
 
Well, I did see a thing called "GetAutoThemedBuilding," which I thought would be useful. Seeing as some Social Policies will double Tourism output from specific themed museums, some framework must be there.

Of course, I haven't fully wrapped my mind around just how exactly Civ6 handles its stuff, so I'm not very good at putting this psuedocode into proper code. I wish I had more examples to work off of.
 
Top Bottom