Resource Depletion

Got an idea for a new feature in TTDPatch? Post it here.

Moderator: TTDPatch Moderators

User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Resource Depletion

Post by wallyweb »

A topic dig (aka search) came up empty. Might be my choice of search terms.
In real life after a resource is located, a well or a mine is established to extract the resource.
The resource available at the location is estimated through drilling and a reasonable estimate for the life of the mine/well is known and is eventually depleted to a level where further extraction is no longer economical.
I may be wrong, but I believe that the unpatched TTDX handles this up to a point, especially with oil wells, however rather unrealistically.
My suggestion is for a patch feature that allows a set author/coder to specify a random resource range for a new resource (mine, well or rig) established either by the game or by prospecting.
The resource would then deplete over time as its product is transported away, and when the resource is fully depleted, the mine, well or rig would shut down and disappear from the game.
The current system of productivity (e.g. New coal seam found ...) would remain in place for the reasons that it currently exists.
The level of resource remaining before depletion would appear in the resource's information window such that a player could occasionally monitor levels and have an approximate handle (the player may need to do a bit of mental arithmetic) on how much longer to service the resource.
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Resource Depletion

Post by DaleStan »

It's already there. Industries have 16 dwords of persistent storage. Coders can use this for anything at all; one of those could easily be used to store the remaining production, and there's plenty of randomness available for initializing (16 bits. A little skimpy, but ...) and adjusting (32 bits per production cycle (production callback), plus 32 bits per month (callback 35)) this number. If desired, the estimated remaining output can be displayed in the industry window, with callback 3A.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Resource Depletion

Post by wallyweb »

Perfect! :D Thanks DaleStan. You are the patchepedia. :wink:
Now all we need is an ambitious industry set author to give it a go. George? PikkaBird? Anybody else?
User avatar
George
Tycoon
Tycoon
Posts: 4363
Joined: 16 Apr 2003 16:09
Skype: george-vb
Location: Varna, Bulgaria
Contact:

Re: Resource Depletion

Post by George »

wallyweb wrote:Perfect! :D Thanks DaleStan. You are the patchepedia. :wink:
Now all we need is an ambitious industry set author to give it a go. George? PikkaBird? Anybody else?
In the TODO list
Image Image Image Image
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Resource Depletion

Post by wallyweb »

George wrote:In the TODO list
Thanks George. :D I'm looking forward to when you move it into the ISDONE list. :wink:
User avatar
George
Tycoon
Tycoon
Posts: 4363
Joined: 16 Apr 2003 16:09
Skype: george-vb
Location: Varna, Bulgaria
Contact:

Re: Resource Depletion

Post by George »

wallyweb wrote:
George wrote:In the TODO list
Thanks George. :D I'm looking forward to when you move it into the ISDONE list. :wink:
It is there for about 2 years :cry:
Image Image Image Image
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5602
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: Resource Depletion

Post by PikkaBird »

Sounds like it would be a relatively easy optional addition to PBI...
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Resource Depletion

Post by wallyweb »

George wrote:It is there for about 2 years :cry:
/me gives George a dusting cloth to dust it off. :D
PikkaBird wrote:Sounds like it would be a relatively easy optional addition to PBI...
Give me a parameter to set and I'll set it. :wink:

If this feature gets implemented I think that it will add a very interesting dynamic to the game. It would actually give me a good reason to spend the several million dollars required to use the prospecting tool.
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5602
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: Resource Depletion

Post by PikkaBird »

Badabing...

Still needs some work, I'm not convinced it's working exactly as it should.
Attachments
Image1.png
Image1.png (51.9 KiB) Viewed 8252 times
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Resource Depletion

Post by wallyweb »

PikkaBird wrote:Badabing...

Still needs some work, I'm not convinced it's working exactly as it should.
Wow! You're fast! :D
Looks good to me.
How does it look before a station is built and the first train arrives?
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5602
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: Resource Depletion

Post by PikkaBird »

wallyweb wrote:How does it look before a station is built and the first train arrives?
Exactly the same, it just says 0%...

There seem to be problems with something (the var 7C registers?) not updating properly when I'm not actually watching the mine. If the mine is off-screen, the stockpile decreases much slower than it should. When the mine is on-screen or I have its window open, it's bang on (tested by comparing the rate of stockpile decrease to the amount of coal transported in the player statistics window).

I'm using three 7C registers; one for the mine's stockpile amount, one for the amount transported to date, and one as a flag to check if the last month has been added to the amount transported.
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Resource Depletion

Post by wallyweb »

PikkaBird wrote:If the mine is off-screen, the stockpile decreases much slower than it should.
That's almost realistic ... When the foreman's away the miners will play and productivity takes a bit of a hit. :wink:
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5602
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: Resource Depletion

Post by PikkaBird »

wallyweb wrote:
PikkaBird wrote:If the mine is off-screen, the stockpile decreases much slower than it should.
That's almost realistic ... When the foreman's away the miners will play and productivity takes a bit of a hit. :wink:
Except productivity doesn't take a hit. The mine makes coal out of nowhere instead of out of the stockpile.

Attached is the current test version, for bug tracking purposes. The coal, iron ore and copper mines have been updated with the new code.
Last edited by PikkaBird on 27 Sep 2007 09:49, edited 2 times in total.
User avatar
athanasios
Tycoon
Tycoon
Posts: 3138
Joined: 23 Jun 2005 00:09
Contact:

Re: Resource Depletion

Post by athanasios »

Well, new coal seam was found but it was kept secret. Someone might declare war on that country to take control of coal production. :lol:
http://members.fortunecity.com/gamesart
"If no one is a fool I am also a fool." -The TTD maniac.


I prefer to be contacted through PMs. Thanks.
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Resource Depletion

Post by wallyweb »

Some observations after testing for a bit:

1. Service was initiated to two coal mines, one with estimated 150k tons and one with est. 10k tons.
2. Monthly productivity levels fell over time which is as expected.
3. % mined only displays 0, 10, 25, 50 and 100%. For the smaller 10k reserves this was ok but for the larger reserves (150k) it takes a very long time to see the percentages change. Is it possible to have 1% increments?
4. I stopped the game after the 10k mine reached 100% mined. The mine kept on producing after 100% of its reserves were depleted. I expected the mine to stop producing and perhaps disappear from the map. Perhaps this has yet to be coded?
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5602
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: Resource Depletion

Post by PikkaBird »

wallyweb wrote:2. Monthly productivity levels fell over time which is as expected.
Productivity levels change randomly as with the original industries; they are not related to the reserves.
3. % mined only displays 0, 10, 25, 50 and 100%. For the smaller 10k reserves this was ok but for the larger reserves (150k) it takes a very long time to see the percentages change. Is it possible to have 1% increments?
There should be a 75% in there too. It's only meant to be a very rough guide. 1% would not be possible (unless someone wants to write patch code allowing arbitrary values to be dropped into texts!); 10% may be.
4. I stopped the game after the 10k mine reached 100% mined. The mine kept on producing after 100% of its reserves were depleted. I expected the mine to stop producing and perhaps disappear from the map.
It's only estimated reserves, remember - the mine won't suddenly disappear the moment it hits 100%. Very productive mines might gradually wind down over a number of years. Less productive mines might not even reach 100%.
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Resource Depletion

Post by wallyweb »

PikkaBird wrote:Productivity levels change randomly as with the original industries; they are not related to the reserves.
Sounds good.
There should be a 75% in there too. It's only meant to be a very rough guide. 1% would not be possible (unless someone wants to write patch code allowing arbitrary values to be dropped into texts!); 10% may be.
Sorry, yes, the 75% was there. 10% is still a bit high for a mine with large resources. Would 5% be possible?
It's only estimated reserves, remember - the mine won't suddenly disappear the moment it hits 100%. Very productive mines might gradually wind down over a number of years. Less productive mines might not even reach 100%.
Ok. Will a mine that hits 100% eventually have 0% production and disappear?
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Resource Depletion

Post by DaleStan »

PikkaBird wrote:There should be a 75% in there too. It's only meant to be a very rough guide. 1% would not be possible (unless someone wants to write patch code allowing arbitrary values to be dropped into texts!); 10% may be.
Please re-read the docs for CB3A, especially the part starting "Since TTDPatch 2.6 r1370".
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5602
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: Resource Depletion

Post by PikkaBird »

DaleStan wrote:Please re-read the docs for CB3A, especially the part starting "Since TTDPatch 2.6 r1370".
Oh, nice. :D
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5602
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: Resource Depletion

Post by PikkaBird »

Thanks Dale. :)

I'll update the file above. Still have that problem when the mine is offscreen though - I've posted it to the bugtracker.
Attachments
Image1.png
Image1.png (26.68 KiB) Viewed 7910 times
Post Reply

Return to “Suggestions”

Who is online

Users browsing this forum: No registered users and 15 guests