I hope some more experienced game developers can give me input on this and if people agree maybe the engine devs will change them.
-
First things first, maxWaterDepth is not be settable in the unitdef, its not a big thing, but its rather impractical.
Its mentioned on the wiki that its not setable in the unitdef, but why is it mentioned at all there and more importantly why is it not settable when other stuff works just fine?
While the waterline tag is not available in movedefs, or atleast the wiki says so, which is also a slight inconvenience. - I noticed is that hover units that enter water move straight into the upright no matter how deep, or rather shallow they are, i think they should only do this when bellow or equal waterline, which looks very odd but also makes unit movements unnatural which may have a minimal impact on gameplay. Another thing is that weapons refuse to fire in water above [i]maxWaterDepth[/i] or waterline for hovers/ships without [i]FireSubmerged = true[/i], again i think they should only refuse to fire when bellow or equal. Ofcourse the firepoint and turret of the weapon to be fired are above the water aswell, perhaps it might be worthwhile considering the weapon position rather unit position in the water. Its no big issue i suppose, but its still a rough edge having to use [i]FireSubmerged[/i] for every unit that can just move a bit in the water seems absurd. Now there is another case to this thing, what if i want a weapon to be fired only from above a certain depth? My game has infantryman that can swim and dont want them to be able to fire while swimming, but i dont want them to refuse to fire everytime they get their toes wet either. [/*]
- A real WTF moment for me was when i turns out that upright = false in the unidef does not work for hovers but SetUnitValue (COB.UPRIGHT, 0) in the unitscript does the trick, its just nonsense in this instance.
- Another absurd thing is that hover movedefs need the "hover" in their name, it seems like a real shitty method to me, even the old "canHover" tag seems like a better solution to me.
I would suggest the game and engine devs to consider these points and im sure there are more issues to be found based on how confusing these things are, i suppose it would warrant a closer look.
But i do have some actual important problems i remain with that really need addressing.
-
First, i have a gadget that calls Spring.MoveCtrl.SetMoveDef to turn a non-hovering unit into a hovering one, it works almost fine except two things.
Spring.MoveCtrl.SetGroundMoveTypeData (unit, "maxSpeed", XXX) XXX does not correspond to the value scale defined in the movedef/unitdef. -
Another is that the unit after having its movedef changed does not move on water, but along under the surface in the water.
I have tried to use Spring.MoveCtrl.SetGroundMoveTypeData (unit, "floatOnWater", true) gives me "Warning: [SetMoveTypeData] incompatible movetype key for SetGroundMoveTypeData". - As a small sidenote, i was told somewhen later that Spring.MoveCtrl.Enable was nececary to call, but it seems that Spring.MoveCtrl.SetMoveDef and Spring.MoveCtrl.SetGroundMoveTypeData work just fine without calling these, give the function name i began wondering what the point of it is.
Quite another issue is that i have units that are already hovers but i want them to move slower when on water, if bellow waterline preferable that is, but i dont know how to do this.
Long post, i hope you find my noob gamdev input useful, i just thought i should mention those since what seems illogical is often a cause for trouble.
And answer my last two questions in the least.