Page 1 of 1

General wiki questions

Posted: 27 Apr 2005 02:15
by DaleStan
1) The action 7 wiki page says:

Code: Select all

07/09            B    Action type
<variable>       B    Which variable to base the decision on
<varsize>        B    How many bytes to read from the variable
<condition-type> B    What condition to check
<value>          V    Value to compare with (**size equals <varsize>**)
<num-sprites>    B    How many sprites to skip
The USSet goes out of its way to prove the emphasized section wrong, using <varsize>=04 and then <value>=01, as well as using <varsize>=0.

What gives?
Specifically: In what cases is <varsize> not (necessarily) the length of <value>, and what is the length of <value> in those cases?

(Yes those are all bit-tests, but it looked to me like the wiki said that <varsize> must be 01 for bit-tests)

2) The action 7 wiki page says that variable 88 (GRFid) has a length of "B"
Again, the USSet disagrees.

3) There is no listing for the possible values of action 7 variable 8B. Some possible values are scattered in various action 0 pages, and possibly other places, but I think they should all be collected in one place.

4) There is no mention either way as to whether or not it is possible for an action 6 to modify an action 10. This seems like it would be asking for severe problems, especially if there's an action 9 pointing to the potentially modified action 10.

OT: I guess I need to change my computerized spellchecker to English(UK); I insist on typing "theatre", "rumour", "emphasised", &c. Nevermind that I've lived in .us all my life. :roll:

Posted: 27 Apr 2005 02:42
by Patchman
1)
wiki wrote:For bit tests, this size is ignored. Value must be a BYTE for bit tests, no matter what the size of the variable being tested.
2) Mistake, should be a 4*B. Fixed.

3) Fixed. This information was only in newgrf.txt so far...

4) Well, action 6 is kind of strange at the moment. It's only applied during the initialization of the file and never afterwards. So it should be safe to modify action 10. However, I'm considering to have action 6 be reapplied every time the .grf file is parsed. There used to be good reasons against this in the past, but I don't remember what they were, and don't think they still hold.

Posted: 27 Apr 2005 18:09
by Oracle
Well at least I'm right :).
(I almost always use newgrf.txt while coding so I'm not a heavy user of the wiki.)

Posted: 29 Apr 2005 09:07
by DaleStan
And one more. This time I checked both the wiki and newgrf.txt.

5) Neither of the emphasized phrases (from the standard 02 for stations section) make much sense to me:
wiki wrote:The sets from the most recent action 1 to use for this set ID, in the above order of track types, one for each track type that has different graphics.
newgrf.txt wrote:Number of sprite set in most recent action 1, for each of the track types
Is "One for each of numlittlesets and numlotssets" what they mean? (All GRF files I've checked parse using that interpretation.)

"Track type", at least to me, means railroad/elect.RR/monorail/maglev.

Posted: 29 Apr 2005 14:06
by Patchman
On which wiki page is this exactly? I can't find it.

[edit]Never mind, I didn't read your message properly. Ok, this was correct about a year ago... back then, instead of cargo states, the sets were for the three/four different track types. That proved to be useless, so I changed it to cargo instead.