So. A lot of cool scripting tricks depend on knowing what unit you're dealing with, and the best (or only..) way to do that is by checking the heights of the units.
Examples of these tricks include using zwzsg style 'raw' transports (which depend on unit heights so that they don't load everything around them), or upgrades (see CvC v0.4), and basically any behavior that stems from the existence of a specific unit.
I was struggling to get an accurate height for a 3do model because the source just says "height=height" and that wasn't incredibly helpful to me (it probably spells it out somewhere, but I wasn't skilled enough to find it..), UpSpring doesn't give an accurate reading for 3dos, 3dobuilder doesn't give heights...ect, ect.
How to get the height of a 3do unit:
Create a transport which can load anything of any size. If you're confused about this, find a transport in any mod and copy its FBI, then crank up all the values that have "transport *" next to them.
Next: go into the script for that transport and find where it says TransportPickup(unitid). Add this line inside the brackets:
Code: Select all
SET VETERAN_LEVEL to (get UNIT_HEIGHT(unitid)*100)
This works for s3os too, but they have much easier ways of figuring out heights (ie, 65536*radius).
If you get errors about VETERAN_LEVEL, just put
Code: Select all
#define VETERAN_LEVEL 32
Hope this is helpful to people.
PS. I didn't know about Zwzsg's cool caliper unit when I went about doing this. I don't know if that works in spring or not, but if it does, I'm sure it would work equally well, if not better.