PikkaBird wrote: ... use action D to set a parameter and check it with action 2 var 7F. ...
Yes, I'm aware of that, but it would probably still be better to have a dedicated variable.
1D seems to work in TTDPatch, but is probably not implemented in OpenTTD, it returns 0 in both cases.
rick67 wrote: ... vehicle class vs Set Registration Table of GRFIDs ...
I have no problem with your suggestion as long as other sets (I want to know about) can be identified.
I would like to know (for callback 1D), which is the GRFset that contains the vehicle that wants to be attached to one of my (e.g. CanSet) engines.
LordAzamath wrote: ... implementation of that feature ...
It should have been announced beforehand; we could have had all our say ... eventually it should have been implemented on an opt-in basis for GRFs; unfortunately it was forced upon us coders to deal with the aftermath.
The feature is good; it's how it was implemented that is flawed. With the latest revelations, that all was already possible, that makes it even worse.
I had a clear understanding, that train sets are limited to 116 vehicles by ID in the range of 0x00 .. 0x73 (with all other vehicle types restricted similar). We talked a lot about having more vehicles, we maintained the opinion it is not possible; but no body corrected us that it is already possible. I never tried to define a train vehicle with VehID 0x99 until today. What's the result ? NFORenum doesn't like it and TTDPatch confirms that.
Code: Select all
//!!Error (141): ID 99 out of valid range (00..73).
882 * 92 00 00 24 01 99 21 00 05 00 19 00 24 00 ...
//!!Error (141): ID 99 out of valid range (00..73).
8369 * 10 03 00 01 99 01 FF EF 00 DF 00
Just a minor problem.png
Why has Foobar spent so much time in documenting ID allocations/recommendations for road vehicle sets ? Because there are limits in the number of IDs we have available.
Now, where again can I find documentation, that says more than 116 train vehicles by ID are possible, or even more than 255 ? In TTDPatch, it is not possible; in OpenTTD it supposedly is. But that warrants clear documentation.
The wiki says the ID of an action-0 is an extended byte, so that we can have more than 255 sound effects. Doesn't say other IDs are implemented too.
No mention of it in action-3s and action-4s (I'd like to give a name to my new vehicle with the ID 0x2099).
peter1138 wrote: ... definition of source grf ...
I could have said 'CanSet'; or the set a vehicle is defined in [where its action-0/1/2/3 is defined]; e.g. wagon with ID 0x15 from source.grf (S1) wants to be attached to an engine in another set (S2).
... Engine IDs are word values, so 0xFF is a valid ID ...
So, I found out. 0xFF may be valid in Open but not the Patch.
... Rail track systems are a totally separate feature to engines, ...
Naturally, but are important to work with existing sets in that pool.
... global variables ...
Of course they are global and should remain global; but we would need a new system to define cost bases that can be applied to a particular GRF only.
... mixing vehicles from different sets and h] ...
Being able to block mixing such vehicles and/or knowing more than just the VehID is important.
Basically I want to disallow attaching vehicles from other sets and not allowing my vehicles to be attachable to engines of other sets. But, should I wish to allow this, then I need to know more than just the vehicle ID; I need to know what set they are defined in, because we can still have duplicate vehicle IDs.
... livery overrides ...
That would be a nightmare in mixed trains; not allowing mixed trains solves it for now.
... Documentation ...
Yes, it would be really nice to have the variations between OpenTTD and TTDPatch documented. Not just for me, but there are less experienced coders out there who know less than half as much. It surely would help them.
To summarise in layman terms :
The CanSet is the only train vehicle set I'm ever going to be involved with. I simply want to block any vehicle from any other set to show up in 'my' Purchase Window or behind any Canadian engine in the CanSet. Neither do I want to allow any of 'my' vehicles to show up behind any engine from another set. I will be able to do without other friendly sets, because now we know we can have 256 vehicles by ID in a set (not more, because that does not work yet, because there is no action-3 and 4 support). I don't think DanMacK will be able to come up with enough sprites for another 140 vehicles by ID in my lifetime. The CanSet will remain a single GRF set for now.
Then, the purchase and running cost system, as well as the Narrow Gauge Track system must not be interfered with by other sets.
How, that is or can be achieved is up to Open Devs to decide; I don't want to have something implemented in one particular way, just have it available one way or another.