Farmlike production forests
Moderator: OpenTTD Developers
Re: NFO: Industry plants arbitrary custom tiles
Tis true! I hope this happens...
*edit* is this a feature request on bugspray? It would be good to get it up there...
*edit* is this a feature request on bugspray? It would be good to get it up there...
Re: NFO: Industry plants arbitrary custom tiles
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)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...

Re: NFO: Industry plants arbitrary custom tiles
lol, oops, but you know what I mean!
Re: NFO: Industry plants arbitrary custom tiles
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...
instead of cutting the trees, maybe, it could be replaced by a custom field...
Town Names:


Still work in progress: OpenGFX or/and OpenSFX - Please help!
Re: NFO: Industry plants arbitrary custom tiles
I support this suggestion!
Creator of the Openttd Challenge Spinoff, Town Demand patch
After action reports: The path to riches, A dream of skyscrapers
After action reports: The path to riches, A dream of skyscrapers
- andythenorth
- Tycoon
- Posts: 5705
- Joined: 31 Mar 2007 14:23
- Location: Lost in Music
Re: NFO: Industry plants arbitrary custom tiles
ThanksKorenn wrote:I support this suggestion!

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!

FIRS Industry Replacement Set (released) | HEQS Heavy Equipment Set (trucks, industrial trams and more) (finished)
Unsinkable Sam (ships) (preview released) | CHIPS Has Improved Players' Stations (finished)
Iron Horse ((trains) (released) | Termite (tracks for Iron Horse) (released) | Busy Bee (game script) (released)
Road Hog (road vehicles and trams) (released)
Unsinkable Sam (ships) (preview released) | CHIPS Has Improved Players' Stations (finished)
Iron Horse ((trains) (released) | Termite (tracks for Iron Horse) (released) | Busy Bee (game script) (released)
Road Hog (road vehicles and trams) (released)
- George
- Tycoon
- Posts: 4364
- Joined: 16 Apr 2003 16:09
- Skype: george-vb
- Location: Varna, Bulgaria
- Contact:
Re: NFO: Industry plants arbitrary custom tiles
I support it too. The simple trees planting was suggested long ago when new industries were just introduced for TTDPatch.Korenn wrote:I support this suggestion!
- George
- Tycoon
- Posts: 4364
- Joined: 16 Apr 2003 16:09
- Skype: george-vb
- Location: Varna, Bulgaria
- Contact:
Re: NFO: Industry plants arbitrary custom tiles
Would it be possible to create normal industry tile that way? For example t may mean (0 - field, 1 - normal tile)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 allow CB 2F (in case t = 1)If the callback succeeds the desired field is planted. No further checks are done wrt. planting the tiles (e.g. no callback 2F).
I'd suggest to control it with t (add 2 to skip such check)If the majority of tiles in the rectangular area is blocked, the whole field is not planted.
why not to use CB result? What is the profit to use the register here?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.
And what should happen if a field tries to access industry storage when it is closed?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.
Industry var AA can be used for synchronisation?4) There is no synchronised animation trigger.
Do current fields are industry tiles?5) Fieldtiles are stored as industrytiles on the map.
If they are industry tiles - why not?6) Fieldtiles do not produce or accept cargo.
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)
Re: NFO: Industry plants arbitrary custom tiles
TBH I think slowly expanding industries are a very different feature to fields...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)
Re: NFO: Industry plants arbitrary custom tiles
Because the CB result is already used for width/height/t information.George wrote:why not to use CB result? What is the profit to use the register here?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.
- George
- Tycoon
- Posts: 4364
- Joined: 16 Apr 2003 16:09
- Skype: george-vb
- Location: Varna, Bulgaria
- Contact:
Re: NFO: Industry plants arbitrary custom tiles
There are three bits left in third byte (t), imho it would be easier to use them instead of the register.Yexo wrote:Because the CB result is already used for width/height/t information.George wrote:why not to use CB result? What is the profit to use the register here?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.
Re: NFO: Industry plants arbitrary custom tiles
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.
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.
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
- George
- Tycoon
- Posts: 4364
- Joined: 16 Apr 2003 16:09
- Skype: george-vb
- Location: Varna, Bulgaria
- Contact:
Re: NFO: Industry plants arbitrary custom tiles
Would it be possible to do the following: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.
every field adds 1 unit of production of industry. So, when the player would remove all the fields, production drops to 0?
Re: NFO: Industry plants arbitrary custom tiles
George wrote:Would it be possible to do the following: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.
every field adds 1 unit of production of industry. So, when the player would remove all the fields, production drops to 0?
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.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.
- andythenorth
- Tycoon
- Posts: 5705
- Joined: 31 Mar 2007 14:23
- Location: Lost in Music
Re: NFO: Industry plants arbitrary custom tiles
There might be some multiplayer gameplay implications if production was dependent on fields....
FIRS Industry Replacement Set (released) | HEQS Heavy Equipment Set (trucks, industrial trams and more) (finished)
Unsinkable Sam (ships) (preview released) | CHIPS Has Improved Players' Stations (finished)
Iron Horse ((trains) (released) | Termite (tracks for Iron Horse) (released) | Busy Bee (game script) (released)
Road Hog (road vehicles and trams) (released)
Unsinkable Sam (ships) (preview released) | CHIPS Has Improved Players' Stations (finished)
Iron Horse ((trains) (released) | Termite (tracks for Iron Horse) (released) | Busy Bee (game script) (released)
Road Hog (road vehicles and trams) (released)
Re: NFO: Industry plants arbitrary custom tiles
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.andythenorth wrote:There might be some multiplayer gameplay implications if production was dependent on fields....
How long is the planned tileloop cicle time?
Town Names:


Still work in progress: OpenGFX or/and OpenSFX - Please help!
Re: NFO: Industry plants arbitrary custom tiles
the tileloop touches every tile every 256 ticks. the larger the map, the more tiles get touched at the same time.
Farmlike production forests
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?
Re: Farmlike production forests
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
But to answer your question: no, it's not possible at the moment. Otherwise FIRS would've had it

Re: Farmlike production forests
Thanks, I merged the topics.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
Since it was determined to be difficult, has anything changed by chance

Who is online
Users browsing this forum: No registered users and 13 guests