NFO: Industry on water -> with station?

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
andythenorth
Tycoon
Tycoon
Posts: 5658
Joined: 31 Mar 2007 14:23
Location: Lost in Music

NFO: Industry on water -> with station?

Post 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
User avatar
JacobD88
Chief Executive
Chief Executive
Posts: 708
Joined: 16 Aug 2008 17:51
Location: Long Eaton, Nottinghamshire. UK
Contact:

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

Post 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 :)
frosch
OpenTTD Developer
OpenTTD Developer
Posts: 988
Joined: 20 Dec 2006 13:31
Location: Aschaffenburg

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

Post 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.
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
michael blunck
Tycoon
Tycoon
Posts: 5948
Joined: 27 Apr 2005 07:09
Contact:

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

Post 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
Image
User avatar
andythenorth
Tycoon
Tycoon
Posts: 5658
Joined: 31 Mar 2007 14:23
Location: Lost in Music

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

Post 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
Attachments
dredging_site.png
dredging_site.png (52.07 KiB) Viewed 3902 times
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

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

Post by Kogut »

Very interesting industry (sand producer?).
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
User avatar
George
Tycoon
Tycoon
Posts: 4362
Joined: 16 Apr 2003 16:09
Skype: george-vb
Location: Varna, Bulgaria
Contact:

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

Post 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
Image Image Image Image
User avatar
andythenorth
Tycoon
Tycoon
Posts: 5658
Joined: 31 Mar 2007 14:23
Location: Lost in Music

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

Post 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!
User avatar
George
Tycoon
Tycoon
Posts: 4362
Joined: 16 Apr 2003 16:09
Skype: george-vb
Location: Varna, Bulgaria
Contact:

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

Post 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
Image Image Image Image
User avatar
andythenorth
Tycoon
Tycoon
Posts: 5658
Joined: 31 Mar 2007 14:23
Location: Lost in Music

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

Post 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.
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

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

Post 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).
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: Ahrefs [Bot] and 56 guests