Page 6 of 8

Re: SPI -Stockpiled Industries - Development thread

Posted: 28 Jan 2019 20:20
by Diesel Power
I just started using this set and it's fantastic. it's how secondary industies should work.
Sadly i've found a bug. The furniture factory says "basic production available with no textiles". Exept it isn't. see screenie.

Love this set and look forward to more updates soon.

Re: SPI -Stockpiled Industries - Development thread

Posted: 31 Jan 2019 10:21
by 3iff
Typical. No bugs for 2 years then 2 within a week!

Firstly, as sevenfm says, the new industry creation is covered by OTTD and my SPI newgrf has no control. The best way to deal with this is to start the game with low/minimal industries and once the game starts, go into settings/world creation and set industry creation to "funding only". You may need to prevent industries closing (or set a very large time before they do so).

You can also switch between "funding only" and "low" so that you have a burst of new industry creation but you can switch it off whenever you wish. That's probably a more flexible way of controlling things.

The Quarry bug. It seems that I overlooked setting quarries to produce/accept passengers. I also spotted that sand pits didn't produce passengers. I enclose a fix, 1.32b. You can use this for an existing game (with the normal caveats) but existing sand/quarries won't be affected, only new ones.
SPI132b.7z
(496.53 KiB) Downloaded 146 times
I'll have a look at the furniture factory bug. I should have a fix by next week.

Re: SPI -Stockpiled Industries - Development thread

Posted: 31 Jan 2019 10:38
by Argus
I started using the Act Locally, Think Globally game script - Also Villages is villages script can limit industry creation :) After all, somebody wrote about it :)

Re: SPI -Stockpiled Industries - Development thread

Posted: 05 Feb 2019 10:15
by 3iff
V1.32c released to fix the furniture factory bugs.

There were 2 problems, an incorrect reference to a cargo and a missing line to say 'basic production' was active. The new file can be used in an existing game and the furniture factory will work correctly immediately.
SPI132c.7z
(502.38 KiB) Downloaded 202 times
The in-game filename has changed from 1.31 to 1.32c but this is for the correct reference and won't cause any problems. It was confusing me when the grf filenames were all 1.31 but were actually different!

Re: SPI -Stockpiled Industries - Development thread

Posted: 05 Feb 2019 22:36
by Diesel Power
Thanks for the fix!

Re: SPI -Stockpiled Industries - Development thread

Posted: 13 Nov 2019 16:03
by japz
Thanks for making this, this looks really interesting.

I'm trying to create a scenario and I'm running into a problem with my primary industries closing down about a month after loading the scenario. Since this is the first time in many years I'm looking at OpenTTD again, I'm probably doing something wrong, I just can't figure out what :?

I create my scenario with the NewGRFs I want, plop down the industries (I'm using the reduced set), and configured SPI to:
  • Primary industries never close (0 months setting)
  • Allow secondary industries to close = off
  • Fixed primary industries will never go bankrupt
  • Mine resources: infinite resources
When I click on a mine just after game start, before the game had a chance to actually close it, it says: "Mine empty: CLOSEDOWN IS IN PROGRESS !"

I'm on the 1.32c version posted in this thread.

Any thoughts on what might cause this would be welcome!

Re: SPI -Stockpiled Industries - Development thread

Posted: 14 Nov 2019 10:51
by 3iff
No idea. Any chance of seeing the scenario? Preferably without lots of other newgrfs (if at all possible).
I the meantime I'll try to create one myself to see if the same happens.

Re: SPI -Stockpiled Industries - Development thread

Posted: 14 Nov 2019 12:01
by japz
Thank you for the fast response :)

I have been able to narrow it down somewhat. Only industries placed with the "place many industries" tool in the Scenario Editor seem to be affected. Placing industries one by one seems to work as intended.

I've attached a small scenario without any additional NewGRF (openttd version 1.10-beta1) to demonstrate it. The Bauxite mine in the north was created with the spawning tool while the Iron mine in the south was created manually. Hope this helps!
SPI-primary-industry-shutdown.scn
(24.89 KiB) Downloaded 169 times

Re: SPI -Stockpiled Industries - Development thread

Posted: 19 Nov 2019 10:10
by 3iff
Yes, that's what I found.

SPI mine-based industries need a reserve set regardless of the in-game setting. If that reserve is less than 100 the industry will close. Building individual mine-related industries allows the reserve to be set properly.

In the ottd config file there may be a setting "newgrf-developer-tools" in the gui section. This is set to 'false'. If you set it to true then when you click an industry the new window will have an additional icon in the top right (*). Hitting that will bring up a list of internal values for that industry. Part way down is a line saying "Persistent Storage".

Just below that will be 0: W X Y Z (where WXYZ are values). X is the current reserve for mines and Z is the total reserve. X must be >100 or the industry will closedown.

As you have discovered, building the mine manually, this value is set properly.

Re: SPI -Stockpiled Industries - Development thread

Posted: 19 Nov 2019 19:03
by phobos2077
Have anyone tried using this with the day length patch? Is there a global production rate multiplier for the industries?

Thanks.

Re: SPI -Stockpiled Industries - Development thread

Posted: 26 Nov 2019 10:08
by 3iff
I've never tried the daylength patch. Production currently occurs every 74 ticks (I think).

Best thing to do it try it and see what happens. If it doesn't work properly (or as expected) then it might be helpful to know. No idea if it would be possible to correct any potential fault.

Re: SPI -Stockpiled Industries - Development thread

Posted: 15 Feb 2021 14:02
by luk3Z
There are 2 versions of spi1.32.grf:
1st: 3,33 MB modified 2016-09-07
2nd: 3,35 MB modified 2019-01-31

1st (older) is from "online content" ingame.
2nd (newer SPI132c.7z) is from this thread posted 5 Feb 2019, o 12:15.

Older version is on the bananas: https://bananas.openttd.org/package/newgrf/31ff0505

Re: SPI -Stockpiled Industries - Development thread

Posted: 22 Jun 2021 20:52
by Lt_Joker
Small bug with the Quarry when in snow:
quarry.jpg
quarry.jpg (218.73 KiB) Viewed 4434 times

Re: SPI -Stockpiled Industries - Development thread

Posted: 22 Jun 2021 23:29
by GarryG
Hi, need to be patient with 3iff to answer .. he doesn't have his own computer and when he gets chance he visits her library to use computers there.

Cheers

Re: SPI -Stockpiled Industries - Development thread

Posted: 24 Jun 2021 03:05
by Lt_Joker
Yeah no big deal I'll probably not use this in snow soon anyway. Found another problem though:
port.jpg
port.jpg (126.82 KiB) Viewed 7411 times
Also only happens in snow and those red lines are animated and blink red-black. When the snow goes away the buildings return.

Re: SPI -Stockpiled Industries - Development thread

Posted: 10 Aug 2021 09:15
by 3iff
It's good to be back, be patient, the library has reopened...perhaps I should get my own broadband!!

The snow thing I can't fix. I never use the snow terrain...and I'm really hopeless at the graphics bit. My expertise is with the production side of the newgrf.
Andythenorth (and perhaps others) did the graphics and I simply copied/pasted.

If anyone can fix it then I'd be happy to incorporate it.

Re: SPI -Stockpiled Industries - Development thread

Posted: 10 Aug 2021 11:24
by GarryG
3iff wrote: 10 Aug 2021 09:15 It's good to be back
Good to hear your still with us.

Your expertise is pretty good as you help get me started in doing Industries :D .

Cheers

Re: SPI -Stockpiled Industries - Development thread

Posted: 12 Aug 2021 09:05
by 3iff
A pleasure...but I learnt from Firs/Andythenorth so it all goes around...
and you've helped others.

Now just need to get back in the groove.

Re: SPI -Stockpiled Industries - Development thread

Posted: 17 Aug 2021 09:29
by 3iff
I've just got NMLC 0.5.3 working (just to find v6 is now out!), anyway, I can new have industries accepting and producing up to 16 cargos of each.

That means I can finally expand SPI to have many multiple cargos per industry. It also means I can start work on SPI v2.

I'm currently converting SPI code to compile with the new NMLC (it does but with many 1000's of warnings). My first experimental change now has a food processor accepting grain, milk, livestock, fruit and fish (5 in all) to make food.

SPI v2 is a LONG WAY from being done...but at least I've now started.
------------------------------------------

As for changes, the industry set is likely to expand a bit and some new cargos will appear.
I'm seriously considering removing the manpower aspect as I never use it and the code would be tidier if it went. Does anyone ever use this in SPI?

I'm also open to ideas and suggestions to expand this project. I can't promise to include anything/everything but I'm willing to listen.
There have been a lot of changes since I released the last version so I have been busy.

I'll probably open a new topic for this project in the near future...

Re: SPI -Stockpiled Industries - Development thread

Posted: 17 Aug 2021 09:49
by sevenfm
I tried to play with manpower but with PASS cargo and cargodist algorithms it doesn't really work well for me. Maybe if it was special worker cargo (or if regular buildings are set to not accept passengers, so you only transport pass from houses to industries and maybe to other towns). I really like the concept of transporting workers or boosting production that way, it just doesn't work well with default PASS cargo in my view.
I think you can also use other city cargo types to boost certain industry, like send them gold from banks to increase production or something. Or secondary industries may require/produce mail for high production level.
As for changes, in general I like SPI as it is (and cannot play other sets for some reason).
I did a few tweaks, though:
- limit max distance from source industry to destination early in the game, so horses and slow boats are more useful, also fishing grounds are closer to ports when playing early
- added petrol because I like it as town received cargo and can use pipes for it
- I also brought back fertilizer as a separate cargo because I like it and not just generic "farm supplies"
- all or most of secondary industries are placed near towns, which looks more realistic for me and distinguishes industry types, also it makes early food transporting easier with horses
- added some limits for the number of industries on the map, like don't build food sources if there are more than consumers (could be probably replaced with probability dynamic modifiers)
- added town industry "town hall" which was supposed to display some useful information and produce workers
- implemented experimental way of controlling industry numbers and types, when building industry depends on total map population and local town population and number of other industries, using town industries as a base (so you need to deliver food and goods to towns to make them grow which results in new industries appearing), was interesting but didn't work really well
- tweaked station ratings to reduce pass numbers on rarely used stations and divide cargos to slow/fast/express types

Maybe you'll want to experiment with some ideas, hope your work on new set will go well and good luck with it! Will definitely play it when it's released.