Changing thech properties in the run

galahadba

Warlord
Joined
Apr 28, 2006
Messages
103
Hi, i had put these doubts on another thread that i found by google, but i think here is the right place.

I had made a test mod, the ideia of the mod is to give the player an option to disable the research agreement. so i changed the XML to put a check box on the advanced setup.

I placed a lua script to update the database on the tech when de mod initiates.

so i check if the option is enabled the i update the values on the database.

i updated the text that appears in the diplo screen to say it is disabled and updated the philosofy tech to not allow the trade. the text is ok, but the Tech won't update... i read in the foruns that database updates to tech don't work, as the game have it in memory, so i tried


GameInfo["Technologies"]["TECH_PHILOSOPHY"]["ResearchAgreementTradingAllowed"] = false;

if i query it by the console the value is changed, but it won't apply in the game too... there is a way to change it on the run? or a way to run a script before the database is loaded into memory, so i can change the database and the game load it correctly?
 
Back
Top Bottom