Auztralian Industries (AuzInd)

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

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

Re: Auztralian Industries (AuzInd)

Post by planetmaker » 13 Feb 2019 16:16

GarryG wrote:
Quast65 wrote:LSF_ONLY_ON_FLAT_LAND
thanks for that.

I've have got that line in the code, but the split industries sometimes still built 2 levels.
I guess you have to add to the location_check a comparison between the tiles and an arbitrary tile, preferentially with (0,0) the origin of the industry layout, or maybe in the tiles' tile_check callbacks, comparing nearby_tile_height of the current and the origin tile.

Cheers,
pm

User avatar
GarryG
Tycoon
Tycoon
Posts: 3076
Joined: 14 Feb 2015 00:44
Location: Newcastle, Australia

Re: Auztralian Industries (AuzInd)

Post by GarryG » 13 Feb 2019 20:53

planetmaker wrote:I guess you have to add to the location_check a comparison between the tiles and an arbitrary tile, preferentially with (0,0) the origin of the industry layout, or maybe in the tiles' tile_check callbacks, comparing nearby_tile_height of the current and the origin tile.
I copied some of the code from FIRS 1.4.3 with the Industry called Stockyard as it is it 2 sections like I been doing.

Code: Select all

switch(FEAT_INDUSTRYTILES, SELF, stockyard_nearby_industry, (nearby_tile_class( 1, 1) == TILE_CLASS_INDUSTRY) | (nearby_tile_class( 1, 0) == TILE_CLASS_INDUSTRY) | (nearby_tile_class( 1, -1) == TILE_CLASS_INDUSTRY) | (nearby_tile_class( 0, -1) == TILE_CLASS_INDUSTRY) | (nearby_tile_class(-1, -1) == TILE_CLASS_INDUSTRY) | (nearby_tile_class(-1, 0) == TILE_CLASS_INDUSTRY) | (nearby_tile_class(-1, 1) == TILE_CLASS_INDUSTRY) | (nearby_tile_class( 0, 1) == TILE_CLASS_INDUSTRY)) { 1: return CB_RESULT_LOCATION_DISALLOW; return CB_RESULT_LOCATION_ALLOW; }
switch (FEAT_INDUSTRYTILES, PARENT, stockyard_player_check, ( (((extra_callback_info2 & 0xFF00) >> 8) == IND_CREATION_FUND) || (((extra_callback_info2 & 0xFF00) >> 8) == IND_CREATION_PROSPECT) ) ) { 1: return CB_RESULT_LOCATION_ALLOW; stockyard_nearby_industry; }
switch (FEAT_INDUSTRYTILES, SELF, stockyard_location_check, nearby_tile_slope(0,0) == SLOPE_FLAT) { 1: stockyard_player_check; return CB_RESULT_LOCATION_DISALLOW; }
and also have

Code: Select all

 land_shape_flags: bitmask(LSF_ONLY_ON_FLAT_LAND);
In game settings under Environment/Industries. If set "Flat area around industries: 2 tiles" seems to fix the problem.

Cheers
Soot Happens
All my projects are GPLv2 License unless stated.
Auz Project Releases: viewtopic.php?f=67&t=84725
AuzTrains: 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
AuzObjects: viewtopic.php?f=26&t=75657
AuzBridges: viewtopic.php?f=26&t=75248
AuzStations: viewtopic.php?f=26&t=76390
AuzTracks: viewtopic.php?f=26&t=82691
AuzSubwayStations: viewtopic.php?f=26&t=85335

User avatar
Quast65
Tycoon
Tycoon
Posts: 1660
Joined: 09 Oct 2011 13:51
Location: The Netherlands

Re: Auztralian Industries (AuzInd)

Post by Quast65 » 13 Feb 2019 21:30

In game settings under Environment/Industries. If set "Flat area around industries: 2 tiles" seems to fix the problem.
Not a fix, in this case just a work-around for your issue…
Enabling this setting just prevents industries being built in too hilly areas. (thus you wont need too much landscaping to place rails/roads, thus easier gameplay ;-) ).
Projects: http://www.tt-forums.net/viewtopic.php?f=26&t=57266
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959

Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.

User avatar
GarryG
Tycoon
Tycoon
Posts: 3076
Joined: 14 Feb 2015 00:44
Location: Newcastle, Australia

Re: Auztralian Industries (AuzInd)

Post by GarryG » 13 Feb 2019 21:42

Quast65 wrote:Not a fix, in this case just a work-around for your issue…
If I make some the Industries with the overlaps, might be a good idea if I include a message to tell players to change that setting to 2 Tiles to help prevent the problem.

For Industries that I make with 2 roads or 2 tracks, I will pace these along the NE and NW edges so players can bulldoze the slope easy.
Soot Happens
All my projects are GPLv2 License unless stated.
Auz Project Releases: viewtopic.php?f=67&t=84725
AuzTrains: 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
AuzObjects: viewtopic.php?f=26&t=75657
AuzBridges: viewtopic.php?f=26&t=75248
AuzStations: viewtopic.php?f=26&t=76390
AuzTracks: viewtopic.php?f=26&t=82691
AuzSubwayStations: viewtopic.php?f=26&t=85335

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

Re: Auztralian Industries (AuzInd)

Post by planetmaker » 13 Feb 2019 21:56

GarryG wrote:
Quast65 wrote:Not a fix, in this case just a work-around for your issue…
If I make some the Industries with the overlaps, might be a good idea if I include a message to tell players to change that setting to 2 Tiles to help prevent the problem.

For Industries that I make with 2 roads or 2 tracks, I will pace these along the NE and NW edges so players can bulldoze the slope easy.
Honestly, that is a terrible solution. Save yourself and players pain: Don't tell players that your set requires a certain setting when you can use a proper location check to not require doing so. Players will not read that anyway ;) And you won't have to answer support requests you can easily avoid.

What you copied from FIRS does absolutely nothing to solve or tackle the problem you describe. FIRS doesn't try to draw over the tiles between and thus doesn't care about height level differences. You should really look at what it checks. And what you want to check. Probably something like

Code: Select all

nearby_tile_height(0,0) == nearby_tile_height(3,2)
with appropriate offsets would do the trick. Or

Code: Select all

nearby_tile_slope(-1,0) ==  SLOPE_FLAT
for some tiles with appropriate offsets to check the tiles in between:

The land under the industry being flat is required (you check that) - but that is not sufficient.
Additionally you either need to require to be no slopes on certain tiles adjacent of your industry.
Or you need to require additionally identical height for at least two tiles in the disjunct parts of your industry.

User avatar
GarryG
Tycoon
Tycoon
Posts: 3076
Joined: 14 Feb 2015 00:44
Location: Newcastle, Australia

Re: Auztralian Industries (AuzInd)

Post by GarryG » 13 Feb 2019 22:07

planetmaker wrote:The land under the industry being flat is required (you check that) - but that is not sufficient.
You either need to require to be no slopes on certain tiles adjacent of your industry.
Or you need to require identical height for at least two tiles in the disjunct parts of your industry.
Next question how do I do that? :D

I tried to understand the NML Tutorial but just doesn't register in this brain of mine. :roll:
Soot Happens
All my projects are GPLv2 License unless stated.
Auz Project Releases: viewtopic.php?f=67&t=84725
AuzTrains: 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
AuzObjects: viewtopic.php?f=26&t=75657
AuzBridges: viewtopic.php?f=26&t=75248
AuzStations: viewtopic.php?f=26&t=76390
AuzTracks: viewtopic.php?f=26&t=82691
AuzSubwayStations: viewtopic.php?f=26&t=85335

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

Re: Auztralian Industries (AuzInd)

Post by planetmaker » 13 Feb 2019 22:20

I don't know you industry layout.

Play around with modifying the switch which governs the location_check callback of the industry or the tile_check of the industry tile - that's the lowest most one you quote from FIRS.

Make sure you use different tile types for the disjunct parts of your industry. Then the industry tile location check can check for tiles at a given offset being of a certain property.

E.g. assume for the Southern part of the industry to be of a tile type which checks the tiles North of it being flat:

Code: Select all

switch(FEAT_INDUSTRYTILES, SELF, my_industrytile_location_check, nearby_tile_slope(-1,0) == SLOPE_FLAT) {
    1: return CB_RESULT_LOCATION_ALLOW;
    return CB_RESULT_LOCATION_DISALLOW;
}

(...)
    tile_check: my_industrytile_location_check;
(...)
EDIT:
You can simply combine different conditions by either calling subsequent switches (instead of allow). Or you can also combine simple tests in the actual check. FIRS uses both to make quite a lot of checks in the part you quoted - but not for slopes or height. Just for tile types, etc..

User avatar
GarryG
Tycoon
Tycoon
Posts: 3076
Joined: 14 Feb 2015 00:44
Location: Newcastle, Australia

Re: Auztralian Industries (AuzInd)

Post by GarryG » 13 Feb 2019 22:28

Thank you kindly ..

I about to go catch a bus to town as have a few medical appointments and to be tortured (visit Physio). Will give this a try when I get home.

Cheers
Soot Happens
All my projects are GPLv2 License unless stated.
Auz Project Releases: viewtopic.php?f=67&t=84725
AuzTrains: 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
AuzObjects: viewtopic.php?f=26&t=75657
AuzBridges: viewtopic.php?f=26&t=75248
AuzStations: viewtopic.php?f=26&t=76390
AuzTracks: viewtopic.php?f=26&t=82691
AuzSubwayStations: viewtopic.php?f=26&t=85335

User avatar
GarryG
Tycoon
Tycoon
Posts: 3076
Joined: 14 Feb 2015 00:44
Location: Newcastle, Australia

Re: Auztralian Industries (AuzInd)

Post by GarryG » 14 Feb 2019 09:28

planetmaker wrote:Play around with modifying the switch which governs the location_check callback of the industry or the tile_check of the industry tile - that's the lowest most one you quote from FIRS.
Been fiddling around with what you suggested.

Looks like on the right track.

Just the W corners some times is up a level like in this pic.
Slope W corners-1.png
Slope W corners-1.png (25.95 KiB) Viewed 1609 times
I using this code:

Code: Select all

switch (FEAT_INDUSTRYTILES, SELF, CoalMine_tile_height_check, nearby_tile_height(0,0) == nearby_tile_height(2,2)) { 1: CoalMine_player_check; return CB_RESULT_LOCATION_DISALLOW; }
switch (FEAT_INDUSTRYTILES, SELF, CoalMine_location_check, nearby_tile_slope(-1,0) == SLOPE_FLAT) { 1: CoalMine_tile_height_check; return CB_RESULT_LOCATION_DISALLOW; }

  tile_check: CoalMine_tile_height_check;
I tried nearby_tile_height(3,2) and nearby_tile_height(2,2) but these seem to make no difference.

But I intend to keep seeing if I can work it out .. so don't tell me where I going wyong just yet :D

One funny thing has come from this strange idea of mine with the overlaps. Having the Overlap along the north-west and north-east slopes has another problem. They overlap rivers and other Industries and buildings in towns. :D

I keep trying for awhile and see if this is worth continuing on with it.

Cheers
Soot Happens
All my projects are GPLv2 License unless stated.
Auz Project Releases: viewtopic.php?f=67&t=84725
AuzTrains: 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
AuzObjects: viewtopic.php?f=26&t=75657
AuzBridges: viewtopic.php?f=26&t=75248
AuzStations: viewtopic.php?f=26&t=76390
AuzTracks: viewtopic.php?f=26&t=82691
AuzSubwayStations: viewtopic.php?f=26&t=85335

User avatar
GarryG
Tycoon
Tycoon
Posts: 3076
Joined: 14 Feb 2015 00:44
Location: Newcastle, Australia

Re: Auztralian Industries (AuzInd)

Post by GarryG » 15 Feb 2019 05:29

Touch wood .. I think I might have won with the slope problem. I loaded game several times and no Overlap Industries was on any slopes except those with the overlap along the north-west and north-east edges. In some places the overlap was on a slope, or over top of other buildings.

So I will change those Industries so that the over laps go through the middle.

One other problem .. they must have had a lot of rain near this coal mine as they have water running through the middle.
Just hope the miners escaped.
Flooding-5.png
Flooding-5.png (78.64 KiB) Viewed 1496 times
I been playing around with the graphics to see how I could make some industries.

As long as I have ground tiles in the southern section like in these images the RVs and trains enter the overlaps as if they are part of the Industry.
Overlaps in Middle-1.png
Overlaps in Middle-1.png (30.4 KiB) Viewed 1496 times
Overlaps in Middle-2.png
Overlaps in Middle-2.png (22.58 KiB) Viewed 1496 times
Shall see what else I can do.

Cheers
Soot Happens
All my projects are GPLv2 License unless stated.
Auz Project Releases: viewtopic.php?f=67&t=84725
AuzTrains: 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
AuzObjects: viewtopic.php?f=26&t=75657
AuzBridges: viewtopic.php?f=26&t=75248
AuzStations: viewtopic.php?f=26&t=76390
AuzTracks: viewtopic.php?f=26&t=82691
AuzSubwayStations: viewtopic.php?f=26&t=85335

User avatar
GarryG
Tycoon
Tycoon
Posts: 3076
Joined: 14 Feb 2015 00:44
Location: Newcastle, Australia

Re: Auztralian Industries (AuzInd)

Post by GarryG » 19 Feb 2019 03:53

Haven't did much to the Industry set for several days because of personal things in the way.

I done 3 Industries with the overlaps.

The Cold Storage.
Cold Storage.png
Cold Storage.png (29.03 KiB) Viewed 1391 times
Distribution Centre.
Distribution Center-3.png
Distribution Center-3.png (75.25 KiB) Viewed 1391 times
And a Coal Mine. (One of the smokes is just a bit out of alignment )
Coal Mine-2.png
Coal Mine-2.png (303.31 KiB) Viewed 1391 times
I think the coal mine can be improved. as the ground is to neat. Maybe I'll put some fake rust rail tracks on it. Also not sure if have the rusty roof or a cleaner roof.

I'll be busy most of this week and not get much time to do much to this project or any others. But see how things go.
Soot Happens
All my projects are GPLv2 License unless stated.
Auz Project Releases: viewtopic.php?f=67&t=84725
AuzTrains: 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
AuzObjects: viewtopic.php?f=26&t=75657
AuzBridges: viewtopic.php?f=26&t=75248
AuzStations: viewtopic.php?f=26&t=76390
AuzTracks: viewtopic.php?f=26&t=82691
AuzSubwayStations: viewtopic.php?f=26&t=85335

User avatar
GarryG
Tycoon
Tycoon
Posts: 3076
Joined: 14 Feb 2015 00:44
Location: Newcastle, Australia

Re: Auztralian Industries (AuzInd)

Post by GarryG » 23 Feb 2019 22:42

Hi all,

Just to let you know ALL my projects are on hold for a while due to health issues that making it hard for me to sit at computer and do any of this work.

Not sure how long I be out of action.

Cheers.
Soot Happens
All my projects are GPLv2 License unless stated.
Auz Project Releases: viewtopic.php?f=67&t=84725
AuzTrains: 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
AuzObjects: viewtopic.php?f=26&t=75657
AuzBridges: viewtopic.php?f=26&t=75248
AuzStations: viewtopic.php?f=26&t=76390
AuzTracks: viewtopic.php?f=26&t=82691
AuzSubwayStations: viewtopic.php?f=26&t=85335


User avatar
GarryG
Tycoon
Tycoon
Posts: 3076
Joined: 14 Feb 2015 00:44
Location: Newcastle, Australia

Re: Auztralian Industries (AuzInd)

Post by GarryG » 24 Feb 2019 07:01

Thanks Andy, hope back coding in a week or two.
Soot Happens
All my projects are GPLv2 License unless stated.
Auz Project Releases: viewtopic.php?f=67&t=84725
AuzTrains: 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
AuzObjects: viewtopic.php?f=26&t=75657
AuzBridges: viewtopic.php?f=26&t=75248
AuzStations: viewtopic.php?f=26&t=76390
AuzTracks: viewtopic.php?f=26&t=82691
AuzSubwayStations: viewtopic.php?f=26&t=85335

Diesel Power
Traffic Manager
Traffic Manager
Posts: 169
Joined: 18 Jun 2016 19:05

Re: Auztralian Industries (AuzInd)

Post by Diesel Power » 24 Feb 2019 08:09

Hope you get better soon.
No rush to come back, your health comes first.

User avatar
romazoon
Tycoon
Tycoon
Posts: 1290
Joined: 20 Jun 2010 23:16

Re: Auztralian Industries (AuzInd)

Post by romazoon » 25 Feb 2019 15:50

Hi GarryG, sorry to hear that too

Hope you ll be alright and fit very soon

Take care of you

User avatar
GarryG
Tycoon
Tycoon
Posts: 3076
Joined: 14 Feb 2015 00:44
Location: Newcastle, Australia

Re: Auztralian Industries (AuzInd)

Post by GarryG » 25 Feb 2019 20:26

Thanks guys,

I see the quack (doctor) again today as medication I on not helping.

It makes the day boring when I can't sit at my computer to do things for long. Just lay around and watch the junk on TV and nap.

One good thing about laying around gives me time to think of ideas how to do some of the projects.

Cheers
Soot Happens
All my projects are GPLv2 License unless stated.
Auz Project Releases: viewtopic.php?f=67&t=84725
AuzTrains: 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
AuzObjects: viewtopic.php?f=26&t=75657
AuzBridges: viewtopic.php?f=26&t=75248
AuzStations: viewtopic.php?f=26&t=76390
AuzTracks: viewtopic.php?f=26&t=82691
AuzSubwayStations: viewtopic.php?f=26&t=85335

User avatar
GarryG
Tycoon
Tycoon
Posts: 3076
Joined: 14 Feb 2015 00:44
Location: Newcastle, Australia

Re: Auztralian Industries (AuzInd)

Post by GarryG » 26 Feb 2019 08:02

Got new medication today .. if all goes well might be able to start doing things again to the projects by weekend or soon after .. I hope.

I meant to put this here for some of you to have a try and give me an opinion.

It is the game file with those 3 Industries with drive through sections.

I think they make the game a lot more realistic where trucks and/or trains can enter the Industry.

Just not 100% happy with the design. The overlaps can not be on the far ends as often they end up on slopes or over the top of other buildings .. so need to be in the middle .. 1 or 2 rows wide and have the offset of 1 or 2 tiles back.

Trains to fill the offsets I could make matching stations and platforms .. but what about the road vehicles.

Once I get these more satisfactory I will look at doing some more. I think the steel mill would do ok with design like these and probably the grain silos.

Any how, if you like to try them and maybe have a idea for me be appreciated.

Don't worry to much about the smoke and a door out of alignment, will do something about them later.

I meant to put these here several days ago, but forgot.

EDIT (March 4): You will need the latest OpenTTD 1.9.0 to use AuzInd9 due to it has more then 32 cargoes.
Attachments
AuzInd9Feb17.rar
(1.86 MiB) Downloaded 54 times
Last edited by GarryG on 03 Mar 2019 22:47, edited 1 time in total.
Soot Happens
All my projects are GPLv2 License unless stated.
Auz Project Releases: viewtopic.php?f=67&t=84725
AuzTrains: 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
AuzObjects: viewtopic.php?f=26&t=75657
AuzBridges: viewtopic.php?f=26&t=75248
AuzStations: viewtopic.php?f=26&t=76390
AuzTracks: viewtopic.php?f=26&t=82691
AuzSubwayStations: viewtopic.php?f=26&t=85335

User avatar
piratescooby
Transport Coordinator
Transport Coordinator
Posts: 311
Joined: 21 Nov 2014 12:39
Location: The Granite City.

Re: Auztralian Industries (AuzInd)

Post by piratescooby » 26 Feb 2019 09:40

Hey G you take it easy , I too have had meds changed , double strength , I have the Celtic Curse . We have enough to play and test for months , gives us a chance to catch up . Get a notepad , nice strong cuppa , feet up and relax .

User avatar
GarryG
Tycoon
Tycoon
Posts: 3076
Joined: 14 Feb 2015 00:44
Location: Newcastle, Australia

Re: Auztralian Industries (AuzInd)

Post by GarryG » 26 Feb 2019 12:13

Some of your suggestion you mentioned I can do .. cuppa, feet up and relax.

Not game to pick up my Notepad .. already filled lots of pages with ideas. :roll:

Or did you mean computer notepad .. which I don't have as screen to small for me. I prefer desktop computer where I have 2 x 29" monitors side by side. Can have the writing nice and big so easy to see what I typing and find the mistakes later.

Just wish the keys on the keyboard didn't move :rolleyes:

But now .. it time for me to go dream world.

Cheers
Soot Happens
All my projects are GPLv2 License unless stated.
Auz Project Releases: viewtopic.php?f=67&t=84725
AuzTrains: 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
AuzObjects: viewtopic.php?f=26&t=75657
AuzBridges: viewtopic.php?f=26&t=75248
AuzStations: viewtopic.php?f=26&t=76390
AuzTracks: viewtopic.php?f=26&t=82691
AuzSubwayStations: viewtopic.php?f=26&t=85335

Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: No registered users and 9 guests