SPI -Stockpiled Industries - Development thread

Discuss, get help with, or post new graphics for TTDPatch and OpenTTD, using the NewGRF system, here. Graphics for plain TTD also acceptable here.

Moderator: Graphics Moderators

Post Reply
User avatar
3iff
Tycoon
Tycoon
Posts: 1093
Joined: 21 Oct 2005 09:26
Location: Birmingham, England

SPI -Stockpiled Industries - Development thread

Post by 3iff »

Coming soon:

SPI (Stock Piled Industries). A fork of FIRS143.

Features
========

An industry set originally based on FIRS143 but with some major differences.
Primary industries are no-grow, with no way to increase output of these during the game.
All industry outputs are greatly reduced.
Secondary production is generally based on 20 units of cargo making 18 units of produce every 256 ticks provided sufficient stocks of materials are available.
There's a cereal farm producing grain only and a printing works, using paper from the paper mill.
Alternative options for the mixed farm and fruit plantation secondary products.
Two-product primary industries now have randomised output levels.
All industries can now be configured for the possibility of closedown.
Secondary industries now have raw material stockpiles and will only make products when they have sufficient stocks.
Three levels of production speed, based on current stockpiles. Controllable by parameters at game start.
Stockpiles are limited to 65,535 units of each cargo (that's the game limit) but you can keep delivering.
Dairies and hotels can be built anywhere.
More varied names when placing nearby stations.
Lots of other changes.

Things to note.

There's just an English language file for now (as this wasn't even planned to be released).
Only one set of industries, for temperate, but it will function on arctic and desert climates.
Prospecting an industry has a 99% success rate. (I hated prospecting and getting nothing).

SPI requires OpenTTD 1.2.0 / trunk r22780 or higher.
Any limitations on FIRS143 also apply here, it won't work well with other industry sets for example.

It should appear on Bananas in a few days time, I just have some cleaning up to do first. I will announce it in the "Graphics Releases" forum when it becomes available.

================================

I began to use FIRS as my preferred industry set but it didn't do exactly what I wanted. As the source was available I could change it, but it was a daunting task as I knew nothing about NML. I started with removing engineering and farm supplies which were useful but incredibly annoying to manage. I changed a few industries too as I began to get a grip on using NML. Next came no-grow industries which fixed primary outputs. I also added randomising initial outputs and changing the second product for a mixed farm.

Finally I had the idea of using stockpiles. I had briefly tried ECS some years ago but I gave that up for some reason.
Various experiments led me to a system that worked and I then incorporated varying production levels depending on industry stock levels (high stock levels allow higher output).

And that's where I am now. This set was entirely for my own consumption hence just the English language file. However, this might be a useful or interesting set for others so I'm releasing version 1.

It's based on the NML source of FIRS143 and is subject to the same limitations as that, so it won't work well or at all with other industry sets and will need a vehicle set capable of carrying the cargos. If you've used FIRS then this will also work (just very differently).

MANY thanks to andythenorth for producing FIRS in the first place.

I welcome comments, feedback, bug reports and alternative language files (but not yet). I do not as yet have any organised setup for this, maybe soon. I hope some people find it interesting.

I'll drop some screenshots here while I'm finishing things off.
Last edited by 3iff on 24 Jun 2015 09:20, edited 1 time in total.
User avatar
3iff
Tycoon
Tycoon
Posts: 1093
Joined: 21 Oct 2005 09:26
Location: Birmingham, England

Re: Coming soon: SPI -Stockpiled Industries

Post by 3iff »

Screenshots of my AI test game.

An aluminium plant waiting for chemicals while a dairy farm announces it's closing down.
Alu and closure.png
Alu and closure.png (451.52 KiB) Viewed 45252 times
The development of a steel mill. Top left window shows lots of scrap metal and coal but a severe lack of iron ore. Production is limping along at half power. Some months later the iron ore has begun to flow (just) and the steel mill is running at normal production. The lower window show the situation some time later where enough iron ore has arrived to take the mill briefly into high production.
steel4.png
steel4.png (453.92 KiB) Viewed 45252 times
User avatar
3iff
Tycoon
Tycoon
Posts: 1093
Joined: 21 Oct 2005 09:26
Location: Birmingham, England

Re: Coming soon: SPI -Stockpiled Industries

Post by 3iff »

A quarry with varied output levels for sand and stone while one dairy farm is heavy on the milk while the other produces much more livestock.
dairy1.png
dairy1.png (163.46 KiB) Viewed 45249 times
Three mixed farms with varied secondary outputs, plant fibres, grain and milk.
mixed2.png
mixed2.png (147.98 KiB) Viewed 45249 times
And that's all for now.
User avatar
supermop
Tycoon
Tycoon
Posts: 1104
Joined: 21 Feb 2010 00:15
Location: Fitzroy North - 96

Re: Coming soon: SPI -Stockpiled Industries

Post by supermop »

I'm excited to play this!

As for the Dairy farm closing mentioned in the first image - do farms close due to lack of farm supplies, or lack of transport of their produce?

I'm hoping someday to see farms (or mines) that get priced out due to development of surrounding land. I assume that will have to wait until GS can force closure.
User avatar
3iff
Tycoon
Tycoon
Posts: 1093
Joined: 21 Oct 2005 09:26
Location: Birmingham, England

Re: Coming soon: SPI -Stockpiled Industries

Post by 3iff »

They can close down because nothing is transported away for 60 months or more (that's the default time but it can be customised or turned off).

There are no farm supplies to worry about. This is going to be very different from FIRS and some people won't like it at all, however, it's a work in progress so things might change.

I should be able to get something in place in the next day or two.
User avatar
Dave
Moderator
Moderator
Posts: 17243
Joined: 26 Dec 2005 20:19
Location: North London

Re: SPI -Stockpiled Industries - Development thread

Post by Dave »

Intriguing. Well done for learning NML to get to this point!
Official TT-Dave Fan Club

Dave's Screenshot Thread! - Albion: A fictional Britain
Flickr


Why be a song when you can be a symphony? r is a...
User avatar
supermop
Tycoon
Tycoon
Posts: 1104
Joined: 21 Feb 2010 00:15
Location: Fitzroy North - 96

Re: SPI -Stockpiled Industries - Development thread

Post by supermop »

Been Having lots of fun with this so far, although as usual I've been distracted by passengers from exploring all of the chains. I like how industries will wait until they have all required materials before producing, instead of just turning cardboard boxes into food. However, for steel and aluminum, I feel that scrap metal should be optional rather than mandatory. Not many scrap yards exist so I find it hard to supply enough to both steel mills and aluminum plants. I feel that maybe the metal plants should need scrap OR ore, with better production if both are present.
User avatar
3iff
Tycoon
Tycoon
Posts: 1093
Joined: 21 Oct 2005 09:26
Location: Birmingham, England

Re: SPI -Stockpiled Industries - Development thread

Post by 3iff »

Thanks for the comments (and all the kind advice and encouragement from others, you know who you are).

There are some balance problems, especially as raw material consumption is outstripped by industrial production in many cases, wood is a particular problem.

I think part of the game with this grf is to go with what is there. If you have lots of scrap metal and iron ore then you can make lots of metal. If these are lacking then you need to ration metal usage. It could be you can't also run an aluminium plant but you can stockpile the bauxite there for the future.

In general, I'd prefer industries to need all the raw materials before making a production run rather than allowing some to be optional (except, see below). You can make metal at the ironworks; that uses just iron ore and wood...but I bet, there's not enough wood.

I'm going to boost in game chances of primary industries slightly. I'll also be looking to increase the default threshold of high production kicking in which might reduce the boom/bust of production output a little.

There is a particular issue with manufacturing supplies that are needed for processing almost all farm products. I have a fix where the grain mill (for example) can make food with just grain but at a slower and less efficient rate. Technically I could do the same with steel/aluminium...I'll have a think. Actually, I've just added it.

I'll probably be releasing the next version in a couple of weeks. If there are any other issues, raise them now.
Last edited by 3iff on 26 Jun 2015 08:10, edited 1 time in total.
User avatar
supermop
Tycoon
Tycoon
Posts: 1104
Joined: 21 Feb 2010 00:15
Location: Fitzroy North - 96

Re: SPI -Stockpiled Industries - Development thread

Post by supermop »

I don't have a problem with the model in general - but I started the game in 1970 so there were no ironworks. I can certainly accept the paper mill, for example, requiring all three in put to produce, but the metal plants seem a bit odd as there is no reason that a steel mill would need scrap metal to make steel. It will need coke (coal or charcoal) to bind the oxygen in the ore, and of course it needs the ore itself, but recycling scrap steel into new metal is not needed. Scrap might even make more sense to use at foundries etc.

One option, to have more common primaries, certainly would help while preserving the unique gameplay. Another idea would be to have a few materials which can be alternates rather than strictly complements -- perhaps a modern paper mill could make paper out of wood or out of plant fibers, or both, but will need the clay and chemicals regardless. For the industries using coal as a thermal fuel rather than a chemical reagent, maybe one could substitute fuel oil or wood? I am not sure these are necessarily realistic, but they might emphasize the NewGrf's gameplay of managing limited stocks of resources. For example, if I built a brick yard in a country with no coal, I might look into firing my kilns with oil instead? Or maybe a somewhat unrealistic charcoal plant could turn extra wood into charcoal, which would just be plain coal in game, but at a rate of 2:1 or worse.

I think the grf is really cool, not trying to complain just excited to see what direction this goes in!
User avatar
3iff
Tycoon
Tycoon
Posts: 1093
Joined: 21 Oct 2005 09:26
Location: Birmingham, England

Re: SPI -Stockpiled Industries - Development thread

Post by 3iff »

No, your comments are very welcome. You have some intriguing ideas.

I've now made scrap metal at steel mills and aluminium plants an option, although production is low without that resource.

A lot of industries are currently as you would find in the original FIRS, I haven't made much attempt to change any relationships so far.

As for using wood/coal instead of coal for fuel, I think that would require a different industry model (oil fired lime kiln for example) although with my current system, I may be able to randomise the second input cargo so that some would need coal, others would need oil.

I can have a look at that possibility.
User avatar
andythenorth
Tycoon
Tycoon
Posts: 5656
Joined: 31 Mar 2007 14:23
Location: Lost in Music

Re: SPI -Stockpiled Industries - Development thread

Post by andythenorth »

In case you haven't seen it, there's a 'snakebite' hg branch for FIRS, which will eventually result in FIRS v2.

There are around 400 commits to snakebite. A lot of the codechanges you probably don't care about for SPI, but there are also many changes to industries:

- new or revised graphics
- adjusted layouts
- changes to dates
- rebalanced probability at map gen. time
- changes to clustering density (spaced further apart, and more clusters more map)
- changes to primary production levels (generally higher, and with a larger random spread)
- multiple bug fixes

:D
User avatar
3iff
Tycoon
Tycoon
Posts: 1093
Joined: 21 Oct 2005 09:26
Location: Birmingham, England

Re: SPI -Stockpiled Industries - Development thread

Post by 3iff »

Yes, I must have a look at that. I haven't yet considered major changes to the industry set, just getting things to work properly is the major challenge for now...but I'm not above stealing the ideas of others. :wink:
User avatar
3iff
Tycoon
Tycoon
Posts: 1093
Joined: 21 Oct 2005 09:26
Location: Birmingham, England

Re: SPI -Stockpiled Industries - Development thread

Post by 3iff »

I'm now playing around with manpower systems. I have a setup where passengers are sent to a coalmine to boost production. It works but I have an annoying problem which I suspect is a game feature.

I have a stockpile limit for passengers at the coal mine (500 at the moment). If I deliver excess passengers, they are all unloaded but I only get payment for the ones that are needed. So, a trainload of 120 arrive, only 50 more can be stockpiled but they all get off anyway.

I presume there's no way to allow 50 to get off and the 70 others to remain on the train for another destination?

------

Is this something to do with callbacks 3D and 2B ?? If so, then I'm completely over my head here.
I think I've disallowed the industry to have more passengers but the industry tiles still allow them to be delivered. Yes?
User avatar
GarryG
Tycoon
Tycoon
Posts: 5850
Joined: 14 Feb 2015 00:44
Location: Newcastle, Australia

Re: SPI -Stockpiled Industries - Development thread

Post by GarryG »

Just found your forum, what your doing sounds really great.

Love the idea having to take people to work, but what about bring them home after a hard days work?

I think if ran a shuttle service using a train or bus with just enough capacity for what that industry needed with the closest towns might work ok. Take people to work and bring them home.

All the best with your project
Soot Happens
Screenshot Of The Month Winner March 2020
All my projects are GPLv2 License unless stated.
Auz Road Sets: viewtopic.php?f=29&t=87335
Auz Project Releases: viewtopic.php?f=67&t=84725
Auz Trains: http://www.tt-forums.net/viewtopic.php?f=26&t=74193
Auz Industry Sets: http://www.tt-forums.net/viewtopic.php?f=26&t=74471
Auz Objects: viewtopic.php?f=26&t=75657
Auz Bridges: viewtopic.php?f=26&t=75248
Auz Stations: viewtopic.php?f=26&t=76390
Auz Tracks: viewtopic.php?f=26&t=82691
Auz Subway Stations: viewtopic.php?f=26&t=85335
Auz Eyecandy TramTracks: viewtopic.php?t=89908
User avatar
GarryG
Tycoon
Tycoon
Posts: 5850
Joined: 14 Feb 2015 00:44
Location: Newcastle, Australia

Re: SPI -Stockpiled Industries - Development thread

Post by GarryG »

Just played a game with your SPI and tried a few extra files to see how it went. If anyone want a Power Station with it. Try Pre-industrial era_houses by McZapkie works well with it and allows delivery of coal to houses if you set the parameters. Can be found in Check online Contents.

In process of testing Town and Industry - Basic Industries with SPI and so far so good. If click on each individual industry they show the correct cargos, just that I haven't yet tried to transport all yet.

Cheers
Soot Happens
Screenshot Of The Month Winner March 2020
All my projects are GPLv2 License unless stated.
Auz Road Sets: viewtopic.php?f=29&t=87335
Auz Project Releases: viewtopic.php?f=67&t=84725
Auz Trains: http://www.tt-forums.net/viewtopic.php?f=26&t=74193
Auz Industry Sets: http://www.tt-forums.net/viewtopic.php?f=26&t=74471
Auz Objects: viewtopic.php?f=26&t=75657
Auz Bridges: viewtopic.php?f=26&t=75248
Auz Stations: viewtopic.php?f=26&t=76390
Auz Tracks: viewtopic.php?f=26&t=82691
Auz Subway Stations: viewtopic.php?f=26&t=85335
Auz Eyecandy TramTracks: viewtopic.php?t=89908
User avatar
3iff
Tycoon
Tycoon
Posts: 1093
Joined: 21 Oct 2005 09:26
Location: Birmingham, England

Re: SPI -Stockpiled Industries - Development thread

Post by 3iff »

GarryG wrote:Love the idea having to take people to work, but what about bring them home after a hard days work?

I think if ran a shuttle service using a train or bus with just enough capacity for what that industry needed with the closest towns might work ok. Take people to work and bring them home.
My current version does just that. I can deliver passengers to certain industries and carry home the ones that have done their shift. I'm still working on this system so it'll be a while before it becomes available.

Manpower is a relatively new concept but there are already industry grfs out there that do it. I'm currently taking some ideas from manpower ogfx industry set, so I'm not doing anything unique.

For this industry set, I'm finding that I need to send every morsel of cargo to secondary industries. I'm not keen on having coal (for example) go into a black hole as it's more valuable going to a steel mill or lime kiln.

Thanks for the kind words.
User avatar
GarryG
Tycoon
Tycoon
Posts: 5850
Joined: 14 Feb 2015 00:44
Location: Newcastle, Australia

Re: SPI -Stockpiled Industries - Development thread

Post by GarryG »

3iff wrote:I'm not keen on having coal (for example) go into a black hole as it's more valuable going to a steel mill or lime kiln.
I never really thought of it that way. It makes a lot of sense.

When you think of it Power Stations don't have a purpose except just receive Coal. Be good I think when a power station is operational (being provided with coal) it provides power to towns and industries within a certain radius and therefore helps increase town sizes and also increase productions of industries. Towns and industries outside this radius, this where Supercheeses "Wires" can come into the game by running power to these.

Look forward to see your next release.
Soot Happens
Screenshot Of The Month Winner March 2020
All my projects are GPLv2 License unless stated.
Auz Road Sets: viewtopic.php?f=29&t=87335
Auz Project Releases: viewtopic.php?f=67&t=84725
Auz Trains: http://www.tt-forums.net/viewtopic.php?f=26&t=74193
Auz Industry Sets: http://www.tt-forums.net/viewtopic.php?f=26&t=74471
Auz Objects: viewtopic.php?f=26&t=75657
Auz Bridges: viewtopic.php?f=26&t=75248
Auz Stations: viewtopic.php?f=26&t=76390
Auz Tracks: viewtopic.php?f=26&t=82691
Auz Subway Stations: viewtopic.php?f=26&t=85335
Auz Eyecandy TramTracks: viewtopic.php?t=89908
User avatar
3iff
Tycoon
Tycoon
Posts: 1093
Joined: 21 Oct 2005 09:26
Location: Birmingham, England

Re: SPI -Stockpiled Industries - Development thread

Post by 3iff »

I'm just doing some last-minute quick testing on SPI 1.1 before I release it, hopefully later today.

There are many significant changes, as in:

New for SPI 1.1
---------------
Some industries can produce at a lower rate even if missing an optional cargo (manu supplies or scrap metal).
Random cargos for mixed farm and fruit plantation have been discontinued.
Overtime production (2* normal) if an industry has 200+ turns of all raw materials in stock.
Can push overtime to 6* normal production if there's 1000+ turns of stock for all raw materials.
(I'd like to see a screenshot of that if you manage it).
Modified textile mill raw material use.
Fixed sawmill display.
Added a number of new oil refinery layouts and graphics.
Added optional manpower production boost (optional in that it doesn't need to be used and it can be switched off).
Added option to allow mines to have a fixed reserve of raw materials (or just have infinite stocks).
Mines with a reserve will close down when they run out, even if they're the only one on the map.
Four ranges of mine size, from small to huge. Reserves are reduced if manpower is switched off.
Reserve levels are shown to the nearest 5kt, so 43,671t is shown as 45kt.
A one-time news report will be issued for mines that are running low on resources.
Another one-time news report for mines near to being exhausted.
Add an option to allow reduced passenger and mail payments of 70% of normal.
LOTS of code changes and tidying up, hopefully it's bug free.
Oil rigs are included in the reserve system but not the manpower system.
Lumber renamed to timber to avoid confusion with the lumber mill, which uses timber but doesn't make timber (lumber).

-------

As long as my AI minions don't discover any problems it should be on Bananas in a few hours.
User avatar
GarryG
Tycoon
Tycoon
Posts: 5850
Joined: 14 Feb 2015 00:44
Location: Newcastle, Australia

Re: SPI -Stockpiled Industries - Development thread

Post by GarryG »

The changes you made sounds like will make it very interesting.

Looking forward to when you release SPI v1.1

Cheers
Soot Happens
Screenshot Of The Month Winner March 2020
All my projects are GPLv2 License unless stated.
Auz Road Sets: viewtopic.php?f=29&t=87335
Auz Project Releases: viewtopic.php?f=67&t=84725
Auz Trains: http://www.tt-forums.net/viewtopic.php?f=26&t=74193
Auz Industry Sets: http://www.tt-forums.net/viewtopic.php?f=26&t=74471
Auz Objects: viewtopic.php?f=26&t=75657
Auz Bridges: viewtopic.php?f=26&t=75248
Auz Stations: viewtopic.php?f=26&t=76390
Auz Tracks: viewtopic.php?f=26&t=82691
Auz Subway Stations: viewtopic.php?f=26&t=85335
Auz Eyecandy TramTracks: viewtopic.php?t=89908
User avatar
3iff
Tycoon
Tycoon
Posts: 1093
Joined: 21 Oct 2005 09:26
Location: Birmingham, England

Re: SPI -Stockpiled Industries - Development thread

Post by 3iff »

Well, I've just discovered a problem so I'll need to have a look at some existing code to see what's happening. I'm not getting as many new industries as I would have hoped. Whether that takes a few days or a few weeks I can't say. Hopefully it'll be just days.

It's nice to know I have at least one fan out there :D
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: Google [Bot] and 10 guests