Page 1 of 1

NFO: Industry on water -> with station?

Posted: 11 Dec 2008 21:29
by andythenorth
I am attempting to code a newgrf industry that is built on water, and includes a station (for routing ships to for cargo collection). To bring it to life, lets say it's a fishing ground, but I want it to work like the default oil rig.

Using Industries Action 0 property 1A (Special industry flags to define special behavior), I can set bit 2, which gives me an industry that is built on water - this works fine in game.

However I can't figure out how to have the industry add a station. I have searched the newgrf specs wiki pages, and searched this forum.

Is it possible to have an industry include a station using newgrf, or is the oil rig station a special case that cannot be replicated by newgrf?

cheers,

Andy

Re: NFO: Industry on water -> with station?

Posted: 12 Dec 2008 12:16
by JacobD88
I remember looking at this a while ago when i wanted to do a water based industry. There is a way to do it, but the only manner in which i have succeeded so far is to replace the oil rig with my new industry, and change the cargo it produces... This of course means that you lose oil from the sea and have to rely on oil wells... Not really a useful thing if you want to keep oil rigs in the game as well as your new industry... Additionally, i could only seem to find that the game just permitted helicopters and/or a given primary cargo for water industries ?(

I would recommend trying to contact PikkaBird, George, or Michael Blunck... They should be able to help if there is a solution out there :) And hopefully their answer will help me too :)

Re: NFO: Industry on water -> with station?

Posted: 12 Dec 2008 19:14
by frosch
Your industry layout has to include two original industry tiles with id 0x18. They must be placed next to each other in Y direciton (i.e. from top left to bottom right).

Those tiles will be converted to station tiles when the industry completes, and will behave like a oilrig (i.e. dock/heliport).
That also means that you cannot associate custom graphics to them, they will always look like plain water tiles. So you should put them somewhere on the back side of your industry, where they are hidden by other tiles.

Using industry property 0x24 you can define the name for the station, so they do not show up as "Oil field".

For an example take a look at George's ECS Agricultural Vector.

Re: NFO: Industry on water -> with station?

Posted: 12 Dec 2008 19:17
by andythenorth
frosch wrote:[..helpful stuff...]
Frosch, you are very helpful, thanks.

There should be a tip jar / beer token system for those who provide answers to NFO problems :)

Re: NFO: Industry on water -> with station?

Posted: 12 Dec 2008 19:47
by michael blunck
andythenorth wrote: Using Industries Action 0 property 1A [...]
Your problem wouldn´t be filed under "industries" but under "industry tiles" ... 8)
Is it possible to have an industry include a station using newgrf, or is the oil rig station a special case that cannot be replicated by newgrf?
Well, depends. And yes, the oil rig is special.

Oil rigs have a special tile (a plain water tile, #18) that becomes a combined ship/aircraft station when construction finishes. Even more special is the fact that ships/helicopters don´t actually go to that tile, but to its SW neighbour tile (see frosch´s post). Oil rigs also use industry tiles of ID "FF", which according to http://wiki.ttdpatch.net/tiki-index.php ... faultProps "doesn´t create anything on the landscape, but the tile is still checked, and construction fails if it isn´t a clear water tile."

Note however, that TTDPatch ensures that no special tile handling (e.g. animations, "rebuilding" of forest tiles or this particular station creation) will occur for new tiles, so there will be no unexpected side effects from using a special substitute tile type. And because of that, you can´t "substitute" those special tile behaviour.

HTH
regards
Michael

Re: NFO: Industry on water -> with station?

Posted: 03 Jan 2010 10:52
by andythenorth
I knew this issue was going to come up...now it has...

Water industries currently have to provide sprites for helipads. This particular chopper is getting some 'hang time' without the blades going round :)

I can solve this graphically by drawing a helipad barge, but it will introduce unnecessary sprites. It would be better to prevent helicopters using this station. I remember discussing ship-only stations with frosch on irc...I can't remember if we solved it, and google isn't my friend today :o

Re: NFO: Industry on water -> with station?

Posted: 03 Jan 2010 17:12
by Kogut
Very interesting industry (sand producer?).

Re: NFO: Industry on water -> with station?

Posted: 07 Jan 2010 10:16
by George
andythenorth wrote:It would be better to prevent helicopters using this station. I remember discussing ship-only stations with frosch on irc...I can't remember if we solved it, and google isn't my friend today :o
If you have only one tile 18h, would you have only the sea port and no heliport? (yes, you would need to define your layout

Re: NFO: Industry on water -> with station?

Posted: 07 Jan 2010 11:55
by andythenorth
George wrote:If you have only one tile 18h, would you have only the sea port and no heliport? (yes, you would need to define your layout
Nice idea, but it seems to be that no station is built with just one tile!

Re: NFO: Industry on water -> with station?

Posted: 07 Jan 2010 14:23
by George
andythenorth wrote:
George wrote:If you have only one tile 18h, would you have only the sea port and no heliport? (yes, you would need to define your layout
Nice idea, but it seems to be that no station is built with just one tile!
then FS#2479

Re: NFO: Industry on water -> with station?

Posted: 07 Jan 2010 19:01
by andythenorth
George wrote:
andythenorth wrote:
George wrote:If you have only one tile 18h, would you have only the sea port and no heliport? (yes, you would need to define your layout
Nice idea, but it seems to be that no station is built with just one tile!
then FS#2479
Discussed quite a bit with Frosch and others on IRC, apparently the best thing is if some more work is done towards newgrf airports, which will allow for industry airports.

Re: NFO: Industry on water -> with station?

Posted: 07 Jan 2010 19:08
by Yexo
andythenorth wrote:Discussed quite a bit with Frosch and others on IRC, apparently the best thing is if some more work is done towards newgrf airports, which will allow for industry airports.
Read your pm, work has been done already. Later work today also allows newgrf "airports" to function for ships. I'll post more later in the newgrf airports topic (in openttd development).