Since we already made changes that break external packs when releasing 8.0 we might as well have a critical look at DefCore entries again and see which are still used and which may better be properties. I will make one post per entry to be discussed. Please add one if you want to change something.
FireTop: I am removing this (already done locally). It is not used and all fire stuff is done in C4Script.
AttractLightning: Unused as well currently and lightning is fully implemented in C4Script, could be a property that does not be in the engine instead.
Float:
I think it would be good to make this a property, for example you can turn an object into a floating in C4Script or change the floating height. Any objections or potential problems?
I think it would be good to make this a property, for example you can turn an object into a floating in C4Script or change the floating height. Any objections or potential problems?
Properties in movement code always have a bit of extra overhead. On the other hand, if it's just read for objects in liquids it's probably not a big deal.
If you replace it, maybe replace it with a density property instead? So something could float in lava, but sink in water.
If you replace it, maybe replace it with a density property instead? So something could float in lava, but sink in water.
That would be two properties then? Because objects also need to tell their float height relative to their center.
NoBreath: Because BreatheWater already is a property. Needs adjustment in the engine code, though.
Maybe make it a flag-based property (Breathe=0 ~ NoBreath=1; Breathe=1 ~ NoBreath=0 & BreatheWater=0; Breathe=2 ~ NoBreath=0 & BreatheWater=1)
The breathing code is simple anyway, why not remove it from the engine and add it to objects that breathe specifically with an effect and/or library? Of course, that would be one more thing that a newcomer would need to keep in mind when adding an animal.
Edit: the flag based approach is good, especially if you can tell the object to breathe air and water
Edit: the flag based approach is good, especially if you can tell the object to breathe air and water
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill