Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
-- Reset turn of next treasure generation
--(Davidaf - removed the old line and added my implementation using the new variable)
local iRandom = Game.Rand(25, "Delay between natural wonder treasures");
DAVIDAF_iGenerateTreasureTurn = iGameTurn + 25 + iRandom
savedData.SetValue("DAVIDAF_iGenerateTreasureTurn", DAVIDAF_iGenerateTreasureTurn) -- Store in save data
end
end);
And that would be it. Thanks for your reply too Auroar, good to know the mod isn't dead. merci beaucoup for so many hours of entertainment with your mod.
=) =) =)
--(KLUDGE - using an unused modern era CvGame data field as a counter)
--local iGenerateTreasureTurn = Game:GetNoNukesCount();
--(Davidaf - commented the line above for keepsaking and added new implementation using a save dependant storage space for the generatetreasureturn variable.
-- used my name as TAG to avoid any possible conflicts, even though unlikely but just following the wiki guidelines found here https://modiki.civfanatics.com/index.php/Persisting_data_(Civ5))
local savedData = Modding.OpenSaveData();
local DAVIDAF_iGenerateTreasureTurn = savedData.GetValue("DAVIDAF_iGenerateTreasureTurn");
if (DAVIDAF_iGenerateTreasureTurn == nil) then
DAVIDAF_iGenerateTreasureTurn = 1;
end
local iGameTurn = Game.GetGameTurn();
local iFeatureID;
-- Time to generate a treasure?
(wonder list here)
(...)
Second half that goes below the wonders in another message
I first tried commenting those lines and voila, nukes were buildable and manhattan project too, as in vanilla.
But of course this would break the treasure spawns around natural wonders so I worked out a way to get it doing its thing again.
will post in a new message if you want to add it to the main mod(steam character limit)