Anyway, I've put a bundle of scripts together ( in one sitting, so I don't know if they'll stay quite the same way as they are! ). The autonumber widget itself is exactly like putting numbers actually into a body model, just extracted into a child object - the only difference I can see is that the TrainDecal shader won't alpha blend for child objects, it just does alpha transparency like the older shaders. You can set the contents of child objects like that just the same as setting the number plates on signals. If you're interested in the rest of it ( how it actually works for one thing ), the functionality is mostly in Assets/K-Rail/Scripts/Generic/Lib/PAN.lua - which is a bit rough & ready but at least is functional.
If you're a painter & don't care about the rest, all you need as far as scripts go is in the script to the boxcar. You just have to set up the names of your child objects, and then obviously add the child objects to the blueprint. Doing number textures is exactly like doing them for normal autonumbers. If someone wants to do a range of better widgets, please please do :P I didn't really pay much attention to material settings.
And now a slightly clever bit: if you still want the default stock's autonumbers to work but you want to use this system to set up per-car logos, or weathering children, or anything texture sets can do and you want a set of numbers with extra digits, you can add the car itself ( or you should be able to, I must admit I've not really tried it given I have nothing to test atm ) like this:
- Code: Select all
PAN_NewAutonumberArray( { "" }, 0, 5 )
and it should use the first 5 digits. The last two digits are the parameters to lua's string.sub() if you want to look it up. If there's any point I could do more complicated things by passing functions instead of substring indexes, but let's wait & see if someone needs it.
Anyway please give me some time to do my CN cars, there's plenty else you can do ;) click the boxcar image to grab the example. You will need Michael's 40ft PS-1 freeware boxcar first ( if you want to use it, at least ), and it lives in Greatnortherner/Alleghany as KR CN 40ft PS1 Boxcar

Any questions, fire away. If for some strange reason you want to use the current scripts, talk to me first, I can probably provide a better alternative at the moment... too many things liable to change.
Edit: to save a bit of confusion, links to examples below:
* Example boxcar - there's no autonumbers set up, the format is two letters and 5 or 6 numbers, the letters will determine which door and roof type you get.
* Latest WIP script package - 12/11/2011 10:00 - you will need this also.
And a little more complicated example, but this one has a second texture set, a bit of translation to reach different parts of the texture set & resizing the number panel in the child matrix in the wagon blueprint:

* Example caboose
And you need the script package too.