How can I make resources limited???

DOmar1990

Warlord
Joined
Jan 8, 2011
Messages
218
Location
Puerto Rico, U.S.
Hey, I want to know if I can make resources limited, and if so, how can I make it.

I want Petroleum resources life-limited. Each petroleum resource will have a random lifetime about 50 to 200 turns from the time its starts to be exploted, and at the end of that random lifetime turns, the resource will dissapear. For example, if I discover a petroleum resource at my land, and later send a worker to construct a hole to extract petroleum, at the time that hole is constructed, that petroleum resource will be there only for 123 turns, and after that will dissapears, so then I have to go to another petroleum source and construct another hole to extract another one and keep having petroleum for construct units... but that other one have a lifetime random turns assigned too... until all petroleum on planet dissapears.
So if you have more than one petroleum resource on your land, you better use it one by one, and think twice if you really want to exploit 2 in order to export it. This will create invasions for petroleum resources too.

This idea is from my Mod's idea but I want to make it first than the rest of ideas.
 
I don't know, but this would be cool to reincorporate from Civ3. It would make resources like Iron and Oil necessary to find, and could halt the progress of a war in its tracks. I'll follow this idea and I might try to help every so often.
 
That can be done in Python, such a function is already present in Next War.

Just took that part out and pasted it into a normal CvEventManager.py (didn't test it) and attached it. Search for depletion, there are 2 parts.
 

Attachments

  • CvEventManager.zip
    10 KB · Views: 32
That can be done in Python, such a function is already present in Next War.

Just took that part out and pasted it into a normal CvEventManager.py (didn't test it) and attached it. Search for depletion, there are 2 parts.


Ok I download the .zip and replace with it on my original one at the python files. But there's no necessary to create a path on the bonuses XML to establish how many turns will the resource available to be exploited?
 
No, it doesn't work in this way.
There's no set time a resource is available, it will vanish at a random chance. The chance itself is different for different resources and is set in the CvEventManager.py itself.


ok, so I just replace the original CvEventManager.py with the one that you provide and that's it, it should start vanishing at some poing?
 
basically, it works in the opposite way as discovering resources in mines.

If you are lucky, you can find a gem 1 turn after building the mine, or never even after 1000 turns.
Similarly, the resource can deplete after 1 turn, or never even after 1000 turns
 
Oh ok, not as exactly as I wanted but at least have something about it :)
Thanks :)
 
Top Bottom