Manpower primary industry

Find and discuss all the latest NewGRF releases for TTDPatch and OpenTTD here.

Moderator: Graphics Moderators

McZapkie
Tycoon
Tycoon
Posts: 1176
Joined: 18 Jan 2014 18:10

Manpower primary industry

Post by McZapkie » 19 Aug 2014 22:02

TTD and OpenTTD industry chains are usually completely independent on cities development and passenger transport (if not counting oil rigs).
Cities/towns depend on industry, but there is no feedback.
The only exception is, as far as I know, the YETI extension.

My proposal is to use passengers to create stockpile of "crew" to achieve higher level of primary industry productivity.
There are two crew levels - minimal crew level (10 for extensive industry type and 100 for intensive one) and maximal crew level (100 and 500 respectively).
If crew level is above minimal, crew stockpile is consumed faster and therefore next crew level is much harder to achieve.
Production increase/decrease depend on crew level and industry type.
Extensive type industry (forest, lumber mill, gold mine) have low crew level and limited productivity increase,
whereas intensive type industry (coal and ore mine, plantations) need huge passengers flow but give larger productivity.
Thanks to that, instead of desolated industry chains, you must also develop cities to keep passenger flow high enough - especially challenging if city growth limiting game script is active.
Additionally production level moderated by passenger delivery fits nice into early game stage - usually there is problem with transporting huge amounts of cargo using horse carriages - but if you have no efficient means to transport passengers, productivity level remain small.

Relying on opengfx+industries http://www.tt-forums.net/viewtopic.php?f=67&t=54187 code, I created "Manpower industry" newgrf with above ideas implemented. I used planetmaker code because it have some important features already implemented, is clearly written and therefore I found it as an good example to learn how industry NML works.

I have some questions/problems.

1. I have no idea, how to publish such addon without violating licence or making mess with version numbers/names.
By now I changed repo name in makefile.config, but what about version number?
I'm not familiar with all these version control systems.

2. Because primary industry require passengers, I think it is necessary (for cargodist) and expected (for player) to provide symmetric passenger flow (workers must return).
Because there are only two type of cargos produced, above idea fails in case of farms.
Three solutions can be considered:
a) leave farms untouched (assume that farm workers live on farm)
b) farm accept passengers but doesn't produce them
c) farm produce livestock constantly and repeatedly switches between burst of passengers or grain/maize.
I would like to implement c), but there are some issues discussed in NML thread.
Any advice is appreciated - it is my first industry newgrf modification, I still don't understand some NML and python nuances.

EDIT: version 0.1 uploaded to bananas http:\binaries.openttd.org/bananas/newgrf/Manpower_ogfxindustries-0.1.tar.gz
Last edited by McZapkie on 21 Aug 2014 21:30, edited 2 times in total.
My experimental openTTD server: 149.156.194.203:3979 non-standard client, now testing: JGRPP http://tiny.pl/ggnch
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, preindustrial houses, wired, ECS industry extension, V4 CEE train set.
Addicted to freeciv longturn.

User avatar
kamnet
Moderator
Moderator
Posts: 6719
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: Manpower primary industry

Post by kamnet » 19 Aug 2014 22:30

McZapkie wrote:Relying on opengfx+industries http://www.tt-forums.net/viewtopic.php?f=67&t=54187 code, I created "Manpower industry" newgrf with above ideas implemented. I used planetmaker code because it have some important features already implemented, is clearly written and therefore I found it as an good example to learn how industry NML works.

I have some questions/problems.

1. I have no idea, how to publish such addon without violating licence or making mess with version numbers/names.
By now I changed repo name in makefile.config, but what about version number?
I'm not familiar with all these version control systems.

Test version of newgrf and modified planetmaker source code is attached.
I hope, that it is not unwelcome to modify somebody else source code, however let me know if I accidentally broken some legal or implicit rules.
OpenGFX+ Industries is published under GNU Public License. All you need to do is make your copy available under this license as well, distribute all of the license and info with your product, and make the source code available upon request to anybody who asks. It doesn't have to retain any compatibility, name, revision number etc. with the project you forked it from.

User avatar
Sylf
President
President
Posts: 958
Joined: 23 Nov 2010 21:25
Location: ::1

Re: Manpower primary industry

Post by Sylf » 20 Aug 2014 02:28

Post the product on bananas, and I'll be happy to test it out in a multiplayer environment.

User avatar
FooBar
Tycoon
Tycoon
Posts: 6559
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

Re: Manpower primary industry

Post by FooBar » 20 Aug 2014 05:29

At least make sure to change the grfid, if you haven't done so already (I don't read it from the post). Choose something completely different, not just increase the last number.
Then version number in relation to OpenGFX+ Industries isn't relevant any more either.

I find the alternating production of passengers/cargo interesting. You should see if switching can be done fast enough for this to work properly.

michael blunck
Tycoon
Tycoon
Posts: 5269
Joined: 27 Apr 2005 07:09
Contact:

Re: Manpower primary industry

Post by michael blunck » 20 Aug 2014 06:00

McZapkie wrote: TTD and OpenTTD industry chains are usually completely independent on cities development and passenger transport (if not counting oil rigs). [...]
I had already put together such extension ("workers") based on original industries back in 2007.

regards
Michael
Image

McZapkie
Tycoon
Tycoon
Posts: 1176
Joined: 18 Jan 2014 18:10

Re: Manpower primary industry

Post by McZapkie » 21 Aug 2014 14:19

michael blunck wrote: I had already put together such extension ("workers") based on original industries back in 2007.
Nice to see that such idea was supported. However probably I will stick with crew for primary production only due to openttd limitations
(moreover, organic and extractive industry usually need larger manual workload then processing one which is easier to automate).
BTW, you remind me about cargo_subtype_display switch - plain "cargo waiting to proceed: xx passengers" is not informal.
Post the product on bananas, and I'll be happy to test it out in a multiplayer environment.l
I found a kind of bug/feature with passengers distribution.
If there are two "passenger hungry" industries within one station range, one industry suck all passengers and second one remain without any:
cargodistribution.png
cargodistribution.png (377.03 KiB) Viewed 21789 times

User avatar
Leanden
Tycoon
Tycoon
Posts: 2621
Joined: 19 Mar 2009 19:25
Location: Kent

Re: Manpower primary industry

Post by Leanden » 21 Aug 2014 14:31

Im afraid that isnt a bug related to your grf but to the openttd in general. When delivering cargo to a station, it will always unload into the nearest industry that will accept that cargo.
Image

User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9282
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Manpower primary industry

Post by planetmaker » 21 Aug 2014 14:37

Leanden wrote:Im afraid that isnt a bug related to your grf but to the openttd in general. When delivering cargo to a station, it will always unload into the nearest industry that will accept that cargo.
Indeed, that's the way the game works. If you need to distribute cargo to several industries, build a transfer station and ship it to small stations adjacent to the industry individually.

McZapkie
Tycoon
Tycoon
Posts: 1176
Joined: 18 Jan 2014 18:10

Re: Manpower primary industry

Post by McZapkie » 21 Aug 2014 22:28

planetmaker wrote:If you need to distribute cargo to several industries, build a transfer station and ship it to small stations adjacent to the industry individually.
Ups, I didn't aware about this feature, now I understand why sometimes cargodist fail to send Engineering Supplies properly - seems that they were eaten by other industry nearby junction station.
To make users aware about this, I decreased passengers acceptance per industry tile, to force players to build stations close to the industry.
The best solution would be switching passenger acceptance off if passengers stockpile is much above maximal level, however personally I find such feature not welcome due to annoying messages (and AFAIK cargodist also doesn't "like" such switching).

Currently stockpile is just "eaten" very fast if above maximal level, to prevent overflow.

Additionally, non-renevable extractive industries have production level locked at mininal level if no primary cargo was transported,
to prevent waste of their resources if accidentally passengers are delivered to mine:
manpower-example1.png
(457.95 KiB) Downloaded 10 times
In above example, only oil is transported, non-renevable oil wells and renevable forestry have normal production levels, coal mine have still lowest production even if crew is delivered, intentionally or not.
On above picture, tramway line was connected to nearby city, but such feed was not sufficient and local railway line to another city was necessary to build.
I see some niches for typical urban transport, because you need to transport huge amount of passengers without post.

Manpower ogfx-industries is already on bananas on-line content.
Because I want to use it on my custom map, there is switch preventing random creation/closure of industry,
similar to manual industries grf.
If you are playing random map, probably you would like to switch it back to restore standard ogfx-industries behaviour.
My experimental openTTD server: 149.156.194.203:3979 non-standard client, now testing: JGRPP http://tiny.pl/ggnch
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, preindustrial houses, wired, ECS industry extension, V4 CEE train set.
Addicted to freeciv longturn.

McZapkie
Tycoon
Tycoon
Posts: 1176
Joined: 18 Jan 2014 18:10

Re: Manpower primary industry

Post by McZapkie » 23 Aug 2014 22:09

Version 0. was uploaded to bannas.
Some bugs related to life time was fixed.
By now, farms have manpower feature enabled only if grain is produced (grain/livestock can be chosen regardless of climate).
I also added coal cargo to steel mill, because original coal chain appear to be somewhat dumb.
Steel mill produce steel if both ore and coal are stockpiled (productivity rate depend on stockpile size).
If only one material is supplied, it would accepted but wasted if stockpile is big (i don't like "stop accepting" feature).
My experimental openTTD server: 149.156.194.203:3979 non-standard client, now testing: JGRPP http://tiny.pl/ggnch
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, preindustrial houses, wired, ECS industry extension, V4 CEE train set.
Addicted to freeciv longturn.

User avatar
Sylf
President
President
Posts: 958
Joined: 23 Nov 2010 21:25
Location: ::1

Re: Manpower primary industry

Post by Sylf » 23 Aug 2014 22:21

So, I had a quick go at the first version posted - I didn't have a much chance at version 0.2.

I don't know if any of this is fixed by version 0.3, but here's stuff I've noticed:
  • Once, I had a diamond mine close on me after I started supplying service to it.
  • Water source doesn't require workers
  • I had somewhat smallish town (population under 1000) provide passengers to a fruit plantation. Eventually, that plantation was overflowing with workers - about 20000 in the stockpile.
  • Oil well eats up the passengers much, much faster than any other industries I've tried so far.
  • Forest, at least this one I serviced, started producing same amount of wood and passengers, and the amount doesn't go much higher than 250 tonnes/pax per month
  • Once a steady flow of passengers are provided to these industries, the production fluctuates far more than the default industries. The fruit plantation, for example, have had anywhere between 250 to 1000 tonnes produced per month.
Attachments
Sontston Transport, 1996-06-30.sav
(564.55 KiB) Downloaded 263 times

McZapkie
Tycoon
Tycoon
Posts: 1176
Joined: 18 Jan 2014 18:10

Re: Manpower primary industry

Post by McZapkie » 24 Aug 2014 10:28

Sylf, thank you for intensive tests of manpower grf.
Seems that you had tested early alpha version, stockpile overflow was fixed before I posted 0.1 on bananas.
Production changes depend now on "closure/change switch" - if this switch is on, industries have original life type,
if off - blackhole type without expiration (not counting mines resources).
There are four types of mines: extensive or intensive and high and small resources.
Diamond mine is an intensive type with small resources so it last not so long if exploited intensively.
I want to reflect, that in tropical industry everything is going fast - but maybe it is a bad feature.
By the way, I want to implement switch to control mines resource decay.
Real water source usually does not need huge crew, and I want to keep similar number of manpower industries for each climate.
My experimental openTTD server: 149.156.194.203:3979 non-standard client, now testing: JGRPP http://tiny.pl/ggnch
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, preindustrial houses, wired, ECS industry extension, V4 CEE train set.
Addicted to freeciv longturn.

McZapkie
Tycoon
Tycoon
Posts: 1176
Joined: 18 Jan 2014 18:10

Re: Manpower primary industry

Post by McZapkie » 27 Aug 2014 13:39

If I understand ChopLumberMillTrees function correctly, amount of wood produced by the lumber mill
is completely irrelevant on production level, only on chopped trees?

User avatar
te_lanus
Transport Coordinator
Transport Coordinator
Posts: 327
Joined: 19 Jul 2012 18:04
Location: The Elizabeth Arkham Asylum for the Criminally Insane

Re: Manpower primary industry

Post by te_lanus » 28 Aug 2014 11:53

Is this normal? Running openttd+industries + this, no other newgrf are activw
Attachments
Unnamed,%201st%20Jan%201990.png
(304.61 KiB) Downloaded 5 times

User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9282
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Manpower primary industry

Post by planetmaker » 28 Aug 2014 12:02

te_lanus wrote:Is this normal? Running openttd+industries + this, no other newgrf are activw
You should only use one industry NewGRF at a time, you use two.

McZapkie
Tycoon
Tycoon
Posts: 1176
Joined: 18 Jan 2014 18:10

Re: Manpower primary industry

Post by McZapkie » 31 Aug 2014 21:41

New 0.4 version was uploaded to bananas online content.
The main change is appearance of lumber mills.
Because thanks to the ogfx-industries you can switch lumber mill as wood producer regardless on climate,
I found these lumber mills very useful to decrease uncontrolled growth of trees.
Trees growth is an issue especially for multipllayer, because of huge map size (trees act as white noise which is hard to compress).

With manpower industries you can allow random creation of lumber mills - they will cut trees n 40x40 square and will shut down if no nearby trees are available. I recommend to use "one industry per town" settings.
Additionally, if you want to use certain mill, you can establish passenger service to keep crew present on site
- it would prevent your lumber mill against shut down even if all nearby trees were cut down.
Unlike other industries, lumber mill crew doesn't increase its production - it depend only on cut trees.
Lumber mill crew is only to protect it if you forgot to plant trees (or you was offline in MP).

Other changes: separate switches to control creation/closure of main industries and town industries,
mine resources decay switch and passenger/mail reduced payment switch.
Passengers and mail are "easy job" to collect, additionally they act as manpower industry booster - therefore payment should be decreased slightly (-30%) for better balance.
There is "reduced passenger payment" newgrf already, but I found 50% reduction too harsh.

Result of manpowered multiplayer:
McTest4, 16th Aug 2043.png
(203.35 KiB) Downloaded 4 times
My experimental openTTD server: 149.156.194.203:3979 non-standard client, now testing: JGRPP http://tiny.pl/ggnch
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, preindustrial houses, wired, ECS industry extension, V4 CEE train set.
Addicted to freeciv longturn.

User avatar
Sylf
President
President
Posts: 958
Joined: 23 Nov 2010 21:25
Location: ::1

Re: Manpower primary industry

Post by Sylf » 01 Sep 2014 16:28

One small note - steel mill doesn't produce anything if a map is created with iron ore chain enabled by coal chain disabled. The GRF should either override the coal chain setting if iron ore chain is enabled, or let the steel mill produce steel without coal if coal chain is disabled. I prefer the latter.

Edit: when livestock is enabled for farms, farms are broken.
1. They act just like when they handle crew. The productivity start at low. But because they can't handle crew, productivity stays low permanently
2. Production last month reads something like "24 items of livestock (crew)"

The behavior of the forest still feel erratic to me. In the beginning of the game, they "consume" the passengers faster than mines.

Other things to note:
1. In the readme for v4, there were marks like v1 and v2 still present.
2. It would really benefit if you explain extensive vs intensive industry behavior in the readme. Then list exactly which industries are categorized which.
3. Better yet, it's best if you display intensive/extensive industry type in the industry dialog box.

McZapkie
Tycoon
Tycoon
Posts: 1176
Joined: 18 Jan 2014 18:10

Re: Manpower primary industry

Post by McZapkie » 02 Sep 2014 13:07

Thanks for kindly planetmaker help, manpower NML source is already available online https://dev.openttdcoop.org/projects/ma ... industries
Sylf wrote:One small note - steel mill doesn't produce anything if a map is created with iron ore chain enabled by coal chain disabled...
Thank you for pointing all flaws. Of course, in absence of coal chain, steel mills should act like default ones.
I will fix also livestock farm to default function.
The behavior of the forest still feel erratic to me. In the beginning of the game, they "consume" the passengers faster than mines.
Passenger "consume" rate depend on waiting passenger (crew) waiting number compared to crew level.
Default minimal crew level for extensive industry is 10, maximal 50,
in case of intensive industry these numbers are 100 and 1000 respectively.
Therefore, if you deliver 80 passengers, they will be removed faster from forest (because this number exceed maximal crew level)
than from mine (below minimal crew level).
Additionally, to prevent excessive stockpile overloading or stockpile overflow, passengers are removed if stockpile is 3 times larger than maximal level.
If you are "spamming" forest with huge number of passengers, surplus will be instantly removed to be close to maximal crew level.
Instead sparse long trains, use frequent service using short train or/and buses/trams.

EDIT: v.0.5 was uploaded, above discussed bugs fixed, polish translation added.
New feature is optional flattening of payment curve - in my opinion very useful for large but sparse maps:
paymentcurves.png
flattened vs original
paymentcurves.png (18.87 KiB) Viewed 20721 times
Original payment curve was designed for maps 256x256 and less.

I have question regarding industry tile animation.
Based on ogfx-industry source, I modified oil wells animation and now it freeze if there is no crew present - it is convenient to check industry state without clicking on industry window.
But I have no idea how to proceed with coal, gold or copper mines - is there any comprehensive list of default industry tiles and corresponding sprites?

User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9282
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Manpower primary industry

Post by planetmaker » 27 Sep 2014 09:12

McZapkie wrote: But I have no idea how to proceed with coal, gold or copper mines - is there any comprehensive list of default industry tiles and corresponding sprites?
There's no list with sprites. The only list which exists (except maybe in the sources of OpenGFX) is http://newgrf-specs.tt-wiki.net/wiki/In ... faultProps and to a lesser degree http://newgrf-specs.tt-wiki.net/wiki/NM ... stry_tiles

McZapkie
Tycoon
Tycoon
Posts: 1176
Joined: 18 Jan 2014 18:10

Re: Manpower primary industry

Post by McZapkie » 27 Sep 2014 20:43

planetmaker wrote: The only list which exists (except maybe in the sources of OpenGFX) is http://newgrf-specs.tt-wiki.net/wiki/In ... faultProps and to a lesser degree http://newgrf-specs.tt-wiki.net/wiki/NM ... stry_tiles
thank you, this second plus opengfx *industries.pnlm are very helpful.

Meanwhile, I created new industry, forest logging camp which can be used instead of forest - it cut trees like lumber mill,
but appears randomly like forests. I found it useful for tree growth control in massive multiplayer maps.
There is only one small issue - logging camp is "planted" instead constructed - it sound somewhat silly.
How to force TTD_STR_NEWS_INDUSTRY_CONSTRUCTION instead of TTD_STR_NEWS_INDUSTRY_PLANTED?
My experimental openTTD server: 149.156.194.203:3979 non-standard client, now testing: JGRPP http://tiny.pl/ggnch
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, preindustrial houses, wired, ECS industry extension, V4 CEE train set.
Addicted to freeciv longturn.

Post Reply

Return to “Graphics Releases”

Who is online

Users browsing this forum: No registered users and 3 guests