Callback: Build probability
From GRFSpecs
Revision as of 20:43, 30 November 2023 by Andythenorth (talk | contribs) (→Build probability (e.g. Reverse rail vehicle on build) (162))
Probability of reversing rail vehicle on build (162)
This callback assigns rail vehicles a random chance of being built facing forward or backward (reversed) when purchased.
Return a value between 0...100 (decimal) to indicate the probability of being reversed.
The same random-reverse behaviour can be implemented without the callback, by randomly switching to reversed sprites in the vehicle's varaction 2 chain, but this is inefficient as it typically causes sprites to be duplicated in the grf.