[BNW] Help making Great Musician award culture, faith, gold, and science when used.

Cuica

Chieftain
Joined
Sep 11, 2020
Messages
2
Hello, all. I'm new to the forum and mod making for Civ5 and I want to make my own civ. I've got a decent understanding of xml but I am new to lua. I am assuming that the feature I'm trying to implement is only possible with a lua script.

One of my civ's unique units replaces the Great Musician. I want it to award culture, faith, gold, and science (C,F,G,S for short) when consumed for tours, city-state gifts, and creating great works. More specifically, I want concert tours to award four turns worth of net (C,F,G,S) currently generated per turn on top of the tourism it would normally award; Three turns worth for city-state gifts and two turns worth for creating great works.

For example, say this is what my net stat gains are per turn.
[Culture +10] [Faith +4] [Gold +5] [Science +6]

and I have a great musician and I use its concert tour ability on foreign soil like normal and thus receive four turns worth of stats that I generate per turn flat out. i.e.

10 'culture per turn' X 4 'tour multiplier' = 40 'culture awarded'
(4 X 4 = 16 Faith awarded, 5 X 4 = 20 Gold awarded, 6 X 4 = 24 Science awarded)
on top of the normal tourism award.

Is it possible to implement a feature like this, either in xml or lua? If so may I get some suggestions on how? Much appreciated.

Edit: Net stats. So golden age modifiers should be included for massive gains.
 
Last edited:
Not possible with XML. If you're happy to accept that the values for C, F, G and S displayed in the top bar of the UI are wrong (they don't reflect all sources of 'income' accurately) but use those values, then it's just a case of using LUA to store (and persist across game save/load) those values for the last four turns. LUA can also be used to detect the GM being consumed, and then it's "just" a matter of granting the extra 'income'. Late game a GM's concert tour would be adding tens of thousands of science, thousands of culture and gold and hundreds of faith in my games, so a pretty over-powered UU
 
Yeah, your right, it does seem a bit overpowered for late game, so I will definitely nerf it. Perhaps it should give only one resource or maybe just a flat rate. In that case, detecting the GM being consumed as well as adding the resources is the key part of this. The persistence between saves/loads is not something I considered, so I will keep it in mind in case I need it. I'll see if I can write something up and bring it here. Thank you for the reply.
 
Top Bottom