Farmlike production forests

Got an idea for OpenTTD? Post it here!

Moderator: OpenTTD Developers

User avatar
Zephyris
Tycoon
Tycoon
Posts: 2897
Joined: 16 May 2007 16:59

Re: NFO: Industry plants arbitrary custom tiles

Post by Zephyris »

Tis true! I hope this happens...

*edit* is this a feature request on bugspray? It would be good to get it up there...
User avatar
Wolf01
Tycoon
Tycoon
Posts: 2016
Joined: 24 Apr 2004 10:43
Location: Venezia - Italia
Contact:

Re: NFO: Industry plants arbitrary custom tiles

Post by Wolf01 »

Zephyris wrote:Tis true! I hope this happens...

*edit* is this a feature request on bugspray? It would be good to get it up there...
eheh, the first time I used it I red "flipray", but "bugspray" is a rather different from "flyspray" (even if bugs and flies are both insects) :P
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2897
Joined: 16 May 2007 16:59

Re: NFO: Industry plants arbitrary custom tiles

Post by Zephyris »

lol, oops, but you know what I mean!
User avatar
Ammler
President
President
Posts: 953
Joined: 18 Jun 2006 18:18
Location: Switzerland
Contact:

Re: NFO: Industry plants arbitrary custom tiles

Post by Ammler »

PhilSophus made a patch for modifing tree cutting: http://www.tt-forums.net/viewtopic.php?p=745610

instead of cutting the trees, maybe, it could be replaced by a custom field...
User avatar
Korenn
Tycoon
Tycoon
Posts: 1735
Joined: 26 Mar 2004 01:27
Location: Netherlands
Contact:

Re: NFO: Industry plants arbitrary custom tiles

Post by Korenn »

I support this suggestion!
User avatar
andythenorth
Tycoon
Tycoon
Posts: 5705
Joined: 31 Mar 2007 14:23
Location: Lost in Music

Re: NFO: Industry plants arbitrary custom tiles

Post by andythenorth »

Korenn wrote:I support this suggestion!
Thanks :)

However to actually get this done, one of us is going to need to either
- provide a patch for it ourselves
- or entice another dev to do so

*And* the patch needs to be to a standard that is sufficient for acceptance into trunk! :twisted:
User avatar
George
Tycoon
Tycoon
Posts: 4364
Joined: 16 Apr 2003 16:09
Skype: george-vb
Location: Varna, Bulgaria
Contact:

Re: NFO: Industry plants arbitrary custom tiles

Post by George »

Korenn wrote:I support this suggestion!
I support it too. The simple trees planting was suggested long ago when new industries were just introduced for TTDPatch.
Image Image Image Image
User avatar
George
Tycoon
Tycoon
Posts: 4364
Joined: 16 Apr 2003 16:09
Skype: george-vb
Location: Varna, Bulgaria
Contact:

Re: NFO: Industry plants arbitrary custom tiles

Post by George »

http://devs.openttd.org/~frosch/texts/farmtiles.txt wrote:1) Industries get callback 0x155, which is called when the game decides to plant a new field.
Input:
Var 10: 0xrrrrYYXX Relative position of the field towards the north tile of the industry. (signed words)
Var 18: 32 random bits
Usual industry and town variables, except all landinfo variables are relative to the desired field position instead of the industry.
Result:
failed Plant regular field
0x0000 Plant no field.
0x0tYX Plant a rectangular field of size X * Y using the IndustryTile from register 0x100 for every tile.
Would it be possible to create normal industry tile that way? For example t may mean (0 - field, 1 - normal tile)
If the callback succeeds the desired field is planted. No further checks are done wrt. planting the tiles (e.g. no callback 2F).
Would it be possible to allow CB 2F (in case t = 1)
If the majority of tiles in the rectangular area is blocked, the whole field is not planted.
I'd suggest to control it with t (add 2 to skip such check)
If the IndustryTile returned is not suitable for farmtiles (see below) an NewGRF error is displayed.
If register 0x100 is 0xFFFF then a regular field with the returned size is planted.
why not to use CB result? What is the profit to use the register here?
TODO: Maybe the landshape property should be checked? Callback looks too troublesome though.

2) The lifetime of the fields is independant from the industry.
Field tiles can be removed by the player any time like regular field.
Field are cleared per tile and not as a whole.
Field can remove theirself whenever they want. (using callback 25 or 26 special result 0xFC)
Field are not removed when the industry closes. They may remove themself after some time, or leave the mess to the player.
Field can tell whether their industry still exists (variable 43 is 0xFFFFFFFF if industry does no longer exist), and in that case also access/write industry variables/storage.
And what should happen if a field tries to access industry storage when it is closed?
4) There is no synchronised animation trigger.
Industry var AA can be used for synchronisation?
5) Fieldtiles are stored as industrytiles on the map.
Do current fields are industry tiles?
6) Fieldtiles do not produce or accept cargo.
If they are industry tiles - why not?

Conclusion:
if this mechanism allows to create tiles on map - it would be nice to make it to allow industry grow (adding tiles to the industry)
Image Image Image Image
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2897
Joined: 16 May 2007 16:59

Re: NFO: Industry plants arbitrary custom tiles

Post by Zephyris »

George wrote:if this mechanism allows to create tiles on map - it would be nice to make it to allow industry grow (adding tiles to the industry)
TBH I think slowly expanding industries are a very different feature to fields...
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: NFO: Industry plants arbitrary custom tiles

Post by Yexo »

George wrote:
If the IndustryTile returned is not suitable for farmtiles (see below) an NewGRF error is displayed.
If register 0x100 is 0xFFFF then a regular field with the returned size is planted.
why not to use CB result? What is the profit to use the register here?
Because the CB result is already used for width/height/t information.
User avatar
George
Tycoon
Tycoon
Posts: 4364
Joined: 16 Apr 2003 16:09
Skype: george-vb
Location: Varna, Bulgaria
Contact:

Re: NFO: Industry plants arbitrary custom tiles

Post by George »

Yexo wrote:
George wrote:
If the IndustryTile returned is not suitable for farmtiles (see below) an NewGRF error is displayed.
If register 0x100 is 0xFFFF then a regular field with the returned size is planted.
why not to use CB result? What is the profit to use the register here?
Because the CB result is already used for width/height/t information.
There are three bits left in third byte (t), imho it would be easier to use them instead of the register.
Image Image Image Image
frosch
OpenTTD Developer
OpenTTD Developer
Posts: 991
Joined: 20 Dec 2006 13:31
Location: Aschaffenburg

Re: NFO: Industry plants arbitrary custom tiles

Post by frosch »

I also think that expanding industries are very different from fields.

Industry tiles have different restrictions than fields. E.g. industry tiles need to be in a rectangle < 16x16 from a fixed north tile.
Farm tiles OTOH can be more far away. (This has implications on tile acceptance and synchronised animation).

Farm tiles can also be removed per tile by a player, and they are even planted partially if only some tiles are blocked.

Variable AA can be accessed as long as the industry exists. If the industry closes, no industry variables are accessible anymore. The tiles also loose track of each other. That is as a long as the industry exists tiles can also recognise neighboured tiles as part of the same industry.
Once the industry closes, every tile is on its own. No industry variables are available. But some industrytile variables still are.
Not available variables are treated specially inside OTTD, but I do not know the behaviour of TTDP. So best is to just not access them :)

About slope checks I have no proper plan.
Also questionable is in which cases field tiles report as "clear land" (like current fields do), and when they report as "industry tiles" (so NewGrf could also identify them and read their nearby-tile-information).
(For AIs they report as "field" in any case.)

Conclusion:
This is really only about fields. Usual industry tiles have different requirements and also other restrictions.
Fields are mostly eyecandy, though they can communicate to some extent with the industry, so industry behaviour can depend on the presence of fields.
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
User avatar
George
Tycoon
Tycoon
Posts: 4364
Joined: 16 Apr 2003 16:09
Skype: george-vb
Location: Varna, Bulgaria
Contact:

Re: NFO: Industry plants arbitrary custom tiles

Post by George »

frosch wrote:Fields are mostly eyecandy, though they can communicate to some extent with the industry, so industry behaviour can depend on the presence of fields.
Would it be possible to do the following:
every field adds 1 unit of production of industry. So, when the player would remove all the fields, production drops to 0?
Image Image Image Image
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: NFO: Industry plants arbitrary custom tiles

Post by Yexo »

George wrote:
frosch wrote:Fields are mostly eyecandy, though they can communicate to some extent with the industry, so industry behaviour can depend on the presence of fields.
Would it be possible to do the following:
every field adds 1 unit of production of industry. So, when the player would remove all the fields, production drops to 0?
Field can tell whether their industry still exists (variable 43 is 0xFFFFFFFF if industry does no longer exist), and in that case also access/write industry variables/storage.
You could add 1 to a specific var in the industry permanent storage during the tileloop of the field tiles for example, then query that variable to see how much you're going to produce.
User avatar
Ammler
President
President
Posts: 953
Joined: 18 Jun 2006 18:18
Location: Switzerland
Contact:

Re: NFO: Industry plants arbitrary custom tiles

Post by Ammler »

andythenorth wrote:There might be some multiplayer gameplay implications if production was dependent on fields....
You mean, if an opponent does "destroy" your fields? Well, that could already be done with the Tropic Lumber Mill too, nobody complained about that. So might not be a really big issue, imo.

How long is the planned tileloop cicle time?
Eddi
Tycoon
Tycoon
Posts: 8289
Joined: 17 Jan 2007 00:14

Re: NFO: Industry plants arbitrary custom tiles

Post by Eddi »

the tileloop touches every tile every 256 ticks. the larger the map, the more tiles get touched at the same time.
User avatar
Hyronymus
Tycoon
Tycoon
Posts: 13235
Joined: 03 Dec 2002 10:36
Location: The Netherlands
Contact:

Farmlike production forests

Post by Hyronymus »

I think we all agree that the current way of depicting production forests is highly unrealistic. Real production forests are far more larger. Is it possible to make production forests like farmfields: spread out on a map (possibly against a slope) and demolishable to put a route through it?
User avatar
FooBar
Tycoon
Tycoon
Posts: 6553
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

Re: Farmlike production forests

Post by FooBar »

See http://www.tt-forums.net/viewtopic.php?f=32&t=42440

But to answer your question: no, it's not possible at the moment. Otherwise FIRS would've had it ;)
User avatar
Hyronymus
Tycoon
Tycoon
Posts: 13235
Joined: 03 Dec 2002 10:36
Location: The Netherlands
Contact:

Re: Farmlike production forests

Post by Hyronymus »

FooBar wrote:See http://www.tt-forums.net/viewtopic.php?f=32&t=42440

But to answer your question: no, it's not possible at the moment. Otherwise FIRS would've had it ;)
Thanks, I merged the topics.

Since it was determined to be difficult, has anything changed by chance :)) .
Post Reply

Return to “OpenTTD Suggestions”

Who is online

Users browsing this forum: No registered users and 19 guests