Resource Depletion
Moderator: TTDPatch Moderators
Resource Depletion
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.
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.
wallyweb on tt-forums: Screenshots - Wallyweb World - Projects & Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
Re: Resource Depletion
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
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Re: Resource Depletion
Perfect!
Thanks DaleStan. You are the patchepedia.
Now all we need is an ambitious industry set author to give it a go. George? PikkaBird? Anybody else?


Now all we need is an ambitious industry set author to give it a go. George? PikkaBird? Anybody else?
wallyweb on tt-forums: Screenshots - Wallyweb World - Projects & Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
- George
- Tycoon
- Posts: 4364
- Joined: 16 Apr 2003 16:09
- Skype: george-vb
- Location: Varna, Bulgaria
- Contact:
Re: Resource Depletion
In the TODO listwallyweb wrote:Perfect!Thanks DaleStan. You are the patchepedia.
![]()
Now all we need is an ambitious industry set author to give it a go. George? PikkaBird? Anybody else?
Re: Resource Depletion
Thanks George.George wrote:In the TODO list


wallyweb on tt-forums: Screenshots - Wallyweb World - Projects & Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
- George
- Tycoon
- Posts: 4364
- Joined: 16 Apr 2003 16:09
- Skype: george-vb
- Location: Varna, Bulgaria
- Contact:
Re: Resource Depletion
It is there for about 2 yearswallyweb wrote:Thanks George.George wrote:In the TODO listI'm looking forward to when you move it into the ISDONE list.

Re: Resource Depletion
Sounds like it would be a relatively easy optional addition to PBI...
Re: Resource Depletion
/me gives George a dusting cloth to dust it off.George wrote:It is there for about 2 years

Give me a parameter to set and I'll set it.PikkaBird wrote:Sounds like it would be a relatively easy optional addition to PBI...

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.
wallyweb on tt-forums: Screenshots - Wallyweb World - Projects & Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
Re: Resource Depletion
Badabing...
Still needs some work, I'm not convinced it's working exactly as it should.
Still needs some work, I'm not convinced it's working exactly as it should.
- Attachments
-
- Image1.png (51.9 KiB) Viewed 9676 times
Re: Resource Depletion
Wow! You're fast!PikkaBird wrote:Badabing...
Still needs some work, I'm not convinced it's working exactly as it should.

Looks good to me.
How does it look before a station is built and the first train arrives?
wallyweb on tt-forums: Screenshots - Wallyweb World - Projects & Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
Re: Resource Depletion
Exactly the same, it just says 0%...wallyweb wrote:How does it look before a station is built and the first train arrives?
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.
Re: Resource Depletion
That's almost realistic ... When the foreman's away the miners will play and productivity takes a bit of a hit.PikkaBird wrote:If the mine is off-screen, the stockpile decreases much slower than it should.

wallyweb on tt-forums: Screenshots - Wallyweb World - Projects & Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
Re: Resource Depletion
Except productivity doesn't take a hit. The mine makes coal out of nowhere instead of out of the stockpile.wallyweb wrote:That's almost realistic ... When the foreman's away the miners will play and productivity takes a bit of a hit.PikkaBird wrote:If the mine is off-screen, the stockpile decreases much slower than it should.
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.
- athanasios
- Tycoon
- Posts: 3138
- Joined: 23 Jun 2005 00:09
- Contact:
Re: Resource Depletion
Well, new coal seam was found but it was kept secret. Someone might declare war on that country to take control of coal production. 

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.
"If no one is a fool I am also a fool." -The TTD maniac.
I prefer to be contacted through PMs. Thanks.
Re: Resource Depletion
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?
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?
wallyweb on tt-forums: Screenshots - Wallyweb World - Projects & Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
Re: Resource Depletion
Productivity levels change randomly as with the original industries; they are not related to the reserves.wallyweb wrote:2. Monthly productivity levels fell over time which is as expected.
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.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?
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%.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.
Re: Resource Depletion
Sounds good.PikkaBird wrote:Productivity levels change randomly as with the original industries; they are not related to the reserves.
Sorry, yes, the 75% was there. 10% is still a bit high for a mine with large resources. Would 5% be possible?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.
Ok. Will a mine that hits 100% eventually have 0% production and disappear?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%.
wallyweb on tt-forums: Screenshots - Wallyweb World - Projects & Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
Re: Resource Depletion
Please re-read the docs for CB3A, especially the part starting "Since TTDPatch 2.6 r1370".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.
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
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Re: Resource Depletion
Oh, nice.DaleStan wrote:Please re-read the docs for CB3A, especially the part starting "Since TTDPatch 2.6 r1370".

Re: Resource Depletion
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.

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 (26.68 KiB) Viewed 9334 times
Who is online
Users browsing this forum: No registered users and 13 guests