[BNW] Unit Production Pantheon?

legojoshua12

Chieftain
Joined
Apr 19, 2018
Messages
13
Hello, I was wondering if anyone could help me make a pantheon that gives +10% production towards making units. I tried looking at the xml and there doesn't seem to be an option in the beliefs. Did I miss something or can this be done with lua? Any help is great appreciated. Thanks!
 
Is there anything - trait, policy, building, tech - etc - that gives the required effect? If so, you could detect the belief being adopted and grant a free policy, trait, whatever to achieve the same results
 
Both policies and buildings can give UnitCombatProductionModifiers which will make melee units quicker. I don't know how to make a belief give a free building or policy though. Is it able to be done with lua?

EDIT: I am using a DLC form of modding, if that makes any difference
 
Last edited:
Ok, I have it set up so that I can get when the correct pantheon is adopted, but how do I give a free policy that will increase the unit production by 10%?

My code so far:

Code:
function OnGodWarPantheon(ePlayer, capitalCityId, eReligionPantheon, eBelief)
  if (eReligionPantheon == 6) then
        -- Correct Pantheon Identified, now give the effect
        print("God of War adopted");
    end
end
GameEvents.PantheonFounded.Add( OnGodWarPantheon );
 
Ok, so I fixed my problem and now can make a free bank in the city when I adopt the specific pantheon! Thanks so much for your help with the lua references.

Code:
function OnGodWarPantheon(ePlayer, capitalCityId, eReligionPantheon, eBelief)
  if (eBelief == 6) then
        -- Correct Pantheon Identified, now give the effect
        -- For every city that the player has, build 1 bank in it
        for pCity in Players[ePlayer]:Cities() do
            print("RUNNING");
            pCity:SetNumRealBuilding(GameInfoTypes["BUILDING_BANK"], 1);
        end
    end
end
GameEvents.PantheonFounded.Add( OnGodWarPantheon );
 
You may also need to allow for adopting a religion directly. Although that links takes you to Firaxis added game events, they were all originally from my DLL, and I can't remember the precise details of when they fire (or you could look in the C++ code and figure it out - but probably easier to set up a couple of test cases - give yourself a Prophet before adopting a pantheon)
 
No, I can't modify the dll. My goal is to everything in lua so I can use it on my mac. Thanks for the help though
 
Top Bottom