Station's name from nearby industry (new version: 1.2.1)
Moderator: Graphics Moderators
-
- Engineer
- Posts: 111
- Joined: 08 Feb 2007 11:59
- Skype: a.locritani
- Location: Italy
Re: Station's name from nearby industry
sorry,people,my fault: as frosch says prop 1A are copied, but position constraints are not set by prop 1A.
at first, i thought that the problem was missing 1A props (and so confusing michael), but now I understand that i have to set callbacks in order to obtain the wanted behavior.
now, if anybody knows, why are these constraints not copied? It's a lot of work to obtain the same behaviors and not all are obtainable. i've looked in the code of ottd, i don't understand it fully, but seems that these constraints are setted here. there's no way to let them apply also for copied (prop 08) industries?
i understand that sometimes you don't want them (if you're substituting a forest with something completely different) but in other occasions (as the current) they can be useful.
at first, i thought that the problem was missing 1A props (and so confusing michael), but now I understand that i have to set callbacks in order to obtain the wanted behavior.
now, if anybody knows, why are these constraints not copied? It's a lot of work to obtain the same behaviors and not all are obtainable. i've looked in the code of ottd, i don't understand it fully, but seems that these constraints are setted here. there's no way to let them apply also for copied (prop 08) industries?
i understand that sometimes you don't want them (if you're substituting a forest with something completely different) but in other occasions (as the current) they can be useful.
Re: Station's name from nearby industry
@michael:
The default industries have more restrictions than those settable by property 1A. Take a look at my post above and try to find those restrictions in the newgrfspecs.
The comments in OTTD source suggest, that those restrictions are explicitly left out by property 1A, as they are too special and newgrfs should handle such stuff through callbacks. (you have to ask csaboka for details).
To summarize there is no way for newgrfs to control those additional placement rules. Btw. I have checked: They are present in original TTD but have been slightly modified in OTTD since then (e.g. the configurable distance, and some of the scenario editor stuff).
Also btw. as it fits into this: The same happens for animation of houses and industry tiles. When you use property 08 of them, the newly defined house/industry tile will have no animation. You have to replicate the animation using the animation callbacks.
So to sum up, you cannot "just modify a single property" for houses, industries and industry tiles, as property 08 always looses some stuff.
The default industries have more restrictions than those settable by property 1A. Take a look at my post above and try to find those restrictions in the newgrfspecs.
The comments in OTTD source suggest, that those restrictions are explicitly left out by property 1A, as they are too special and newgrfs should handle such stuff through callbacks. (you have to ask csaboka for details).
To summarize there is no way for newgrfs to control those additional placement rules. Btw. I have checked: They are present in original TTD but have been slightly modified in OTTD since then (e.g. the configurable distance, and some of the scenario editor stuff).
Also btw. as it fits into this: The same happens for animation of houses and industry tiles. When you use property 08 of them, the newly defined house/industry tile will have no animation. You have to replicate the animation using the animation callbacks.
So to sum up, you cannot "just modify a single property" for houses, industries and industry tiles, as property 08 always looses some stuff.
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
-
- Tycoon
- Posts: 5948
- Joined: 27 Apr 2005 07:09
- Contact:
Re: Station's name from nearby industry
@frosch
regards
Michael
Case settled.a.locritani wrote:at first, i thought that the problem was missing 1A props (and so confusing michael), but now I understand that i have to set callbacks in order to obtain the wanted behavior.
From my understnding that´s because original TTD and newgrf animation are two different things. Original TTD animation for houses was only available for one single building.frosch wrote:Also btw. as it fits into this: The same happens for animation of houses and industry tiles. When you use property 08 of them, the newly defined house/industry tile will have no animation. You have to replicate the animation using the animation callbacks.
regards
Michael
-
- Engineer
- Posts: 111
- Joined: 08 Feb 2007 11:59
- Skype: a.locritani
- Location: Italy
Re: Station's name from nearby industry
so, people, in order to apply a simple prop 24 to default industries i've to redefine also the placement constraints? and nevertheless something will still be missing...
please don't misunderstand me, but it's not the most straightforward thing out there...
but i think (and you confirm me this) that there is no other way...but, again, why if I redefine an industry with a position constraint (applied by source code, not grf) i should lost its constraint?
please don't misunderstand me, but it's not the most straightforward thing out there...
but i think (and you confirm me this) that there is no other way...but, again, why if I redefine an industry with a position constraint (applied by source code, not grf) i should lost its constraint?
-
- Tycoon
- Posts: 5948
- Joined: 27 Apr 2005 07:09
- Contact:
Re: Station's name from nearby industry
Didn´t I tell you (or was it in Ammler´s thread?) this wouldn´t be easy? In AlpineClimate I had the same problems with overriding industries.a.locritani wrote:[...]
Csaba once told me that newhouses and newindustries were designed with defining new houses and new industries in mind. Not modifying existing ones.
regards
Michael
-
- Engineer
- Posts: 111
- Joined: 08 Feb 2007 11:59
- Skype: a.locritani
- Location: Italy
Re: Station's name from nearby industry
maybe somebody can help me:
in ottd strange things happen:
i'm setting a parameter with that is
if parameter 01 is not set then set it to 32 (decimal, i think), else skip
if param 01 is equal to 0 then skip 2 sprites
where "defined" means
however, openttd.exe -d grf=7 says me that
so it appears that param 01 is equal to 0.
if i comment (0c ...) the 0d action, on the other hand, i receive a message saying that param 01 is not defined and so the test (07) is skipped.
if i write
and in the meanwhile i set a parameter manually i think that the grf code has priority
any idea about the reason of this? and how can i set a default parameter, now?
in ottd strange things happen:
i'm setting a parameter with
Code: Select all
0D 01 80 32 00
07 01 01 \7= 00 02
if parameter 01 is not set then set it to 32 (decimal, i think), else skip
if param 01 is equal to 0 then skip 2 sprites
where "defined" means
in ottd there is no newgrf(w).cfg so i can exclude first case; and no other parameters are set, because this is the last one.wiki wrote:
- it has been set to any value in the newgrf(w).cfg parameter list
- it or a parameter with higher number has been set to any value by an earlier action D
however, openttd.exe -d grf=7 says me that
Code: Select all
ParamSet:Param 1 already defined, skipping
[..]
SkipIf: Skipping 2 sprites, test was true.
if i comment (0c ...) the 0d action, on the other hand, i receive a message saying that param 01 is not defined and so the test (07) is skipped.
if i write
Code: Select all
0D 01 80 32 00
any idea about the reason of this? and how can i set a default parameter, now?
Re: Station's name from nearby industry
No, that means to set it to the value of parameter 0x32. For constants use 0xFF and append the dword value at the end of the sprite. Btw. you can use grf2html to identify those issues.a.locritani wrote:if parameter 01 is not set then set it to 32 (decimal, i think), else skip
Not sure what you mean here. But the equivalent thing in OTTD is the "Set parameter" button in the newgrf window.a.locritani wrote:in ottd there is no newgrf(w).cfg so i can exclude first case;
Maybe in the previous grfloading stage.a.locritani wrote:ParamSet:Param 1 already defined, skipping
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
Re: Station's name from nearby industry
are exclusive to OpenTTD, or are configured elsewhere in TTDPatch.frosch wrote:The comments in OTTD source suggest, that those restrictions are explicitly left out by property 1A, as they are too special and
And in Patch. The distance to world-edge, for example, is in morebuildoptions, and allows up to an infinite number of tiles between the industry and the world's edge.frosch wrote:They are present in original TTD but have been slightly modified in OTTD since then
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
-
- Engineer
- Posts: 111
- Joined: 08 Feb 2007 11:59
- Skype: a.locritani
- Location: Italy
Re: Station's name from nearby industry
@frosch: thanks, never understood that action D (without using FF) does calculations on parameters. yeah, I know, it's written...
-
- Engineer
- Posts: 111
- Joined: 08 Feb 2007 11:59
- Skype: a.locritani
- Location: Italy
Re: Station's name from nearby industry (new version: 1.2)
New version released: hopefully now without strange behaviors
Re: Station's name from nearby industry (new version: 1.2)
Is this NewGRF also available without the oil modifications? I would like to include it to our grf package.
(if not, how do I need to set parameters to disable that?)
Greets
Ammler
(if not, how do I need to set parameters to disable that?)
Greets
Ammler
Town Names: Portuguese Belarusian French Swiss · Temperate Lumber Mill
Still work in progress: OpenGFX or/and OpenSFX - Please help!
-
- Engineer
- Posts: 111
- Joined: 08 Feb 2007 11:59
- Skype: a.locritani
- Location: Italy
Re: Station's name from nearby industry (new version: 1.2)
If you are talking about oil wells increasing production in temperate climate, simply set parameter #1 = 0 (or don't set it, because it's 0 by default)Ammler wrote:Is this NewGRF also available without the oil modifications? I would like to include it to our grf package.
(if not, how do I need to set parameters to disable that?)
Greets
Ammler
Re: Station's name from nearby industry (new version: 1.2)
Well, and if the distances aren't set, it will use the distance from cfg? So using that GRF without any parameter should not change anything except the station names?a.locritani wrote:
If you are talking about oil wells increasing production in temperate climate, simply set parameter #1 = 0 (or don't set it, because it's 0 by default)
Town Names: Portuguese Belarusian French Swiss · Temperate Lumber Mill
Still work in progress: OpenGFX or/and OpenSFX - Please help!
-
- Engineer
- Posts: 111
- Joined: 08 Feb 2007 11:59
- Skype: a.locritani
- Location: Italy
Re: Station's name from nearby industry (new version: 1.2)
No, sorry. If distance is not set it uses (quoting from first post) "max distance from coast for oil refineries (default 16), min distance from coast for oil rigs (default 16)"Ammler wrote:Well, and if the distances aren't set, it will use the distance from cfg? So using that GRF without any parameter should not change anything except the station names?
Sadly you can't have (it's not possible to obtain because the way these things are managed by the game) both station name from nearby industries and original limitation on industries position, so I've tried to recreate original limitation as similar as possible, but there is a little difference between standard positional constraints (distance from edge of the map) and new constraints (distance from water/ground tiles).
also please consider that this grf only works for standard industries and that in order to use it on other industries set, their developers/maintainers have to add this property to their works.
Who is online
Users browsing this forum: No registered users and 64 guests