Page 1 of 1
NFO proposal: Road vehicle property 21, visual effects
Posted: 27 Jan 2009 13:54
by peter1138
This is similar to visual effects for trains.
The value is a bitstuffed word, containing:
Bits 0-3: effect offset: a 4 bit signed value with 0 being the center of the vehicle.
Bits 4-5: effect type: same as for trains, 0 = default, 1 = steam, 2 = diesel, 3 = spark. As there is no default for road vehicles, 0 actually means no effect.
Bit 6: unused, as effect type of 0 is disable.
Bit 7: unused, there is no powered wagons concept for road vehicles.
Bits 8-11: 4 bit unsigned height offset for effect, 0 is at road level, 10 is where the effect is placed for trains.
The value can be set using callback 36, however it is only set once on build. This could be changed if desired.
Unlike effects for trains, effect offset applies to all effect types. None of the changes here affect effects for trains.
Re: NFO proprosal: Road vehicle property 21, visual effects
Posted: 27 Jan 2009 16:06
by frosch
Ships! Ships! Ships!
(Though they are longer, the position offset should be enough, as effects far from center would look weird anyway when turning)
Wrt. the callback: It might be more useful when it is called on leaving the depot. So it can change after refitting.
Re: NFO proprosal: Road vehicle property 21, visual effects
Posted: 27 Jan 2009 16:14
by peter1138
Could be done for ships too, yes. The 4 bit height offset might need to be increased in that case...
Re: NFO proprosal: Road vehicle property 21, visual effects
Posted: 27 Jan 2009 16:45
by Zephyris
Yes please

Re: NFO proprosal: Road vehicle property 21, visual effects
Posted: 27 Jan 2009 17:53
by Thief^
peter1138 wrote:Could be done for ships too, yes. The 4 bit height offset might need to be increased in that case...
Well you could use the bit for powered wagons, as there aren't even wagons for ships, let alone powered wagons. That would extend it to 5 bits.
EDIT: or you could extend off the other end. I think you have 4 spare bits that way. I missed that first time.
Re: NFO proprosal: Road vehicle property 21, visual effects
Posted: 27 Jan 2009 19:35
by michael blunck
frosch wrote:Ships! Ships! Ships!
(Though they are longer, the position offset should be enough, as effects far from center would look weird anyway when turning) [...]
Unfortunately, a lot of modern vessels have their smoke stacks at the
very end ...
regards
Michael
Re: NFO proprosal: Road vehicle property 21, visual effects
Posted: 27 Jan 2009 20:25
by andythenorth
peter1138 wrote:2 = diesel
If this is implemented, I'll definitely stick support into HEQS for it! Zmoke belching bulldozers...
cheers,
Andy
Re: NFO proprosal: Road vehicle property 21, visual effects
Posted: 27 Jan 2009 21:35
by peter1138
Hmm, ships, would 5 bit signed be enough or 6 bit to be safe? That's -16 to 15 or -32 to 31 respectively.
To do this we should probably drop the train effect layout, like so:
Bits 0-1: effect type, same as above
Bits 2-7: unsigned 6 bit offset (0 to 63 game units, 32 is central)
Bits 8-12: unsigned 5 bit height offset (0 to 31 pixels)
EDIT: Effect offset for trains is not signed, it is 0 to 15 with 8 being the centre. I have modified the list to match.
Re: NFO proprosal: Road vehicle property 21, visual effects
Posted: 27 Jan 2009 22:50
by DaleStan
"Unused" is generally a bad plan. "Must be zero"/"must be clear" is much better. That way no one can complain when setting the bit starts doing something.
Re: NFO proprosal: Road vehicle property 21, visual effects
Posted: 29 Jan 2009 10:24
by peter1138
I think that's avoided with the new proposed layout, although we could say bits 13-14 must be clear...