probs with tweak of industries

Got a problem with TTDPatch? Get help here.

Moderator: TTDPatch Moderators

Post Reply
User avatar
hovering teacup
Route Supervisor
Route Supervisor
Posts: 429
Joined: 03 Feb 2004 12:40

probs with tweak of industries

Post by hovering teacup »

hi i've recently restarted playing with the new cargo possibilities, so firstly big thanks to Csaboka and secondly i have some troubles;



1) i can't find how to use the prop. 0D of industry tiles nor the callback 2F to check if a slope is suitable. especially, simply setting the prop.0D to 00 does not allow the tile on slopes.


2) can't use the callback of industry location permissibility according to the hight. the following line is supposed to prohibit the industries 0C&1F up to 9th level but actually they can now be put nowhere. inversely if i swap the "8401" and the "8400" they are allowed everywhere, so it's not my fault of coding i hope.
-1 * 14 02 0a 01 81 8a 00 ff 01 01 84 00 48 00 84
-1 * 8 03 0a 02 0c 1f 00 01 00


3) certain house tiles need to be limited in number per population of town (ex. one for 300 denizens) . then i'd need to have access both to a tile variable (for the present number) and a town variable (for the population) in the callback. how is it possible ?


4) tried to use the production callback of house tile to produce the cargos 15 and 1E.
-1 * 18 02 07 00 81 10 00 ff 02 08 9e 00 00 08 95 01 01 20 ff
-1 * 7 03 07 01 09 00 00 00
and... if you serve this tile with a PASSENGER service, lo, suddenly appears as many people as an entire body of Roman legion in your station ! often it's hard for me to see if a trouble is due to a bug or to my fault but this time i'm quite sure it's a bug. if you need to know its action 0 line here it is:
-1 * 29 00 07 0b 01 09 08 5d 09 02 0a 0a ff 0b 00 0d 00 0e 00 0f 00 13 0f f8 15 5d 18 02 1d 02



thanks in advance to all who'd be helpful to solve these problems
------------------------
Image
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: probs with tweak of industries

Post by DaleStan »

1) If you're using callback 2F, the setting of prop 0D doesn't matter (Well, bit 5 still matters)
And setting all the 0Ds to 00 allows on slopes, just not steep slopes, a least when I last tried it.

2) Code looks fine, and you obviously have the correct action 0 bit set, so please post the GRF.

3) Houses have access to town variables through type 82/86/8A action 2s.

4) Again, without the GRF, it's hard to tell what's really happening.
Last edited by DaleStan on 10 Sep 2005 21:02, edited 1 time in total.
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
michael blunck
Tycoon
Tycoon
Posts: 5948
Joined: 27 Apr 2005 07:09
Contact:

Post by michael blunck »

2) is a bug in a58 which has been fixed already by Csaba for the next version.

regards
Michael
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: probs with tweak of industries

Post by DaleStan »

DaleStan wrote:town variables through type 82/83/86/8A action 2s.
/me kicks himself
Towns don't have random bits. I'm not quite sure what type 83 random would do, but it probably wouldn't be what you wanted.
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
User avatar
hovering teacup
Route Supervisor
Route Supervisor
Posts: 429
Joined: 03 Feb 2004 12:40

Re: probs with tweak of industries

Post by hovering teacup »

DaleStan wrote:And setting all the 0Ds to 00 allows on slopes, just not steep slopes, a least when I last tried it.
then something is wrong.. i'll post the grf shortly.

DaleStan wrote:3) Houses have access to town variables through type 82/86/8A action 2s.
problem is that you can't (I think) use variables of different category in one line. it's specified in the second byte of the line, no ? or perhaps is there any way of using a tile variable AND a town variable ? or town can count one specific kind of buildings through a variable larger than 60 or something ? hmm
michael blunck wrote:2) is a bug in a58 which has been fixed already by Csaba for the next version.
a good news :)
------------------------
Image
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: probs with tweak of industries

Post by DaleStan »

hovering teacup wrote:problem is that you can't (I think) use variables of different category in one line. it's specified in the second byte of the line, no ? or perhaps is there any way of using a tile variable AND a town variable ?
Oh. I understand what you're trying to do. AFAIK, that's not possible.
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
User avatar
hovering teacup
Route Supervisor
Route Supervisor
Posts: 429
Joined: 03 Feb 2004 12:40

Post by hovering teacup »

here is a grf (the txt file is its nfo)...

the lines 2-4 for an industry named "EXEMPLE" for the problem of prop. 0D of industry tile

the lines 5-9 for an industry named "EXEMPLE2" for the problem of callback of the same function

and the lines 10-12 for the problem of human flood


hope this clarify something (and must do, as DaleStan has no trouble putting tile on slopes which means there's only problem of coding)



and concerning the above problem 3, I think it's very useful for many people to limit the number of certain house tiles in a town by population or by the size of town area, so I'd hope it, too.
Attachments
exemple.txt
(895 Bytes) Downloaded 56 times
exemple.grf
(240 Bytes) Downloaded 66 times
------------------------
Image
michael blunck
Tycoon
Tycoon
Posts: 5948
Joined: 27 Apr 2005 07:09
Contact:

Post by michael blunck »

> and concerning the above problem 3, I think it's very useful for many people to limit the number
> of certain house tiles in a town by population or by the size of town area

I´m not quite sure if I do understand correctly, but if you want to simply limit the number of a specific building type per town according to town parameters like number of inhabitants or something else, this would be easily possible by using callback 17 and accessing the town structure variables.

regards
Michael
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

michael blunck wrote:If you want to simply limit the number of a specific building type per town according to town parameters like number of inhabitants or something else, this would be easily possible by using callback 17 and accessing the town structure variables.
You can get the town variables (eg population) with type 82/86/8A, OR you can get the number of buildings of this type using type 81/85/89. AFAICT, you can't get both. Is there some trick of which I'm unaware?
hovering teacup wrote:

Code: Select all

3 * 23 00 0a 04 01 00 08 00 09 00 0a 01 05 00 00 00 00 00 23 00 80 1f f1 80
                                                    ^^ ^^ ^^
I've never tried this; and now that I look at it, I agree that the wiki does make it sound like it should work, but what I've always done in this situation is 00 00 FE 00 01.
I'm not surprised it doesn't work in sprite 6; the original tiles don't have callback flags.

You'll have to wait for Csaboka on the house callback. It looks fine to my untrained eye.
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
User avatar
hovering teacup
Route Supervisor
Route Supervisor
Posts: 429
Joined: 03 Feb 2004 12:40

Post by hovering teacup »

@DaleStan
Now I see what was wrong. Thanks.
DaleStan wrote:I'm not surprised it doesn't work in sprite 6; the original tiles don't have callback flags.
The tile acceptance callbacks (kind of cargo and the rate of acceptance) work well though. It's selective :(
------------------------
Image
User avatar
hovering teacup
Route Supervisor
Route Supervisor
Posts: 429
Joined: 03 Feb 2004 12:40

Post by hovering teacup »

*toc toc*

i'd like having an answer or an advice on the 4th point. thanks
------------------------
Image
Post Reply

Return to “Problems with TTDPatch”

Who is online

Users browsing this forum: No registered users and 44 guests