Reducing the cost of a specific unit

Would require lua if not dll. I'm not sure where the real 'inquisitor-cost' mechanics are buried -- one of those over-complicated Firaxis-provided UI Lua files, or somewhere in dll.

In any event there's nothing in Buildings-XML Scheme to adjust the cost of a specific unit. It is all hammers-required modifications, and doesn't apply to Missionaries, Inquisitors, and GPeople bought with faith.

You could do a 'backdoor' method with Machiavelli24's SerialEventUnitCreatedGood system, to detect when an Inquisitor is created, and then in the city where purchased, if the building exists, give back the 25% faith-cost to the player. It could be done in lua (which you'd have to do using Machiavelli's system anyway), but it might be a bit complicated to get the current 'faith-purchase-price' of the Inquisitor in order to know how much faith to give back to the player.

There may be a more direct and elegant method via lua but I can't think what it would be at the moment. But then, I haven't tried much cityview.lua modding, and I think that file is like other UI files in that there can be only one active at a time.
 
Would it be possible to simply create another inquisitor that is 25% cheaper and make it purchasable by having the building? Sort of like how the archaeologist is only buildable with a university.
You could try it.
 
Would it be possible to simply create another inquisitor that is 25% cheaper and make it purchasable by having the building? Sort of like how the archaeologist is only buildable with a university.

That's your best bet.... otherwise have fun writing either a roundabout lua function, or an equally long (but strung out over at least 4 .cpp files) set of routines in the .dll (i.e. creating a building_unitcostpurchasemodifierchange table, linking and caching that up with the CvCity class when a building is built, which is then called when a unit is built).
 
Top Bottom