Page 1 of 1

Set*MoveType data revision

Posted: 24 Nov 2015, 21:46
by code_man
I recently tried working with the 3 MoveCtrl.Set*MoveTypeData functions, i was wondering why are there 3 different ones despite the usage being the same?
Infact SetGroundMoveTypeData and SetAirMoveTypeData share many of the same keys.
However SetGunshipMoveTypeData does not, i find this odd and it is a problem for me, i could work around it ofcourse but its a very rough edge.

Unless there is some good reason for keeping the 3 seperated, i suggest merging them all into one function and having they keys for non-gunships being applicable to gunships too.
I cant even make sense of the gunship type keys.

Also i have noticed that when an error occurs it prints an error message with some non-ascii, character at the end.

Another thing, Spring.MoveCtrl.SetGroundMoveTypeData (unit, "floatOnWater", true) gives an error that key is incompatible for this movetype data, whats the story behind this?

It would be good if an engine dev took a bit of time and have a second look at those functions.

I would really apreciate it tough if SetAirMoveTypeData could be applied to gunships too.

Re: Set*MoveType data revision

Posted: 26 Nov 2015, 17:38
by Kloot
why are there 3 different ones despite the usage being the same?
There are three different movetypes (Ground/Strafe/Hover) which do not all share the same properties or behavior, so it is convenient to expose a separate function for each type.
the keys for non-gunships being applicable to gunships too ... SetAirMoveTypeData could be applied to gunships too
Not possible in all cases, for example max{Aileron,Elevator,Rudder} have no gunship-equivalents.
Also i have noticed that when an error occurs it prints an error message with some non-ascii, character at the end.
Has been fixed for 101.
Another thing, Spring.MoveCtrl.SetGroundMoveTypeData (unit, "floatOnWater", true) gives an error that key is incompatible for this movetype data, whats the story behind this?
Simply that floatOnWater is a static UnitDef property and can not be changed at runtime as of yet. (the tag-system sucks)

Re: Set*MoveType data revision

Posted: 26 Nov 2015, 18:45
by FLOZi
Thanks for the clear and concise explanation :-)

Re: Set*MoveType data revision

Posted: 16 Dec 2015, 20:57
by code_man
Kloot wrote: There are three different movetypes (Ground/Strafe/Hover) which do not all share the same properties or behavior, so it is convenient to expose a separate function for each type.
I dont know much but it hardly seems they have many differences, seems more like each one is built on another from what i have seen, ground->air->gunship.
Now im really curious why you would consider three different function that all do the same thing convenient.
Not possible in all cases, for example max{Aileron,Elevator,Rudder} have no gunship-equivalents.
If they arent applicapable then keys who have no equivalent should simply be ignored.

Why would gunships be so advanced?
I thought the only difference they had was that they could move sideways.
What is even worse apparently SetAirMoveTypeData have totally different key names than the other two for equivalent functionality, atleast from my limited understanding.
Simply that floatOnWater is a static UnitDef property and can not be changed at runtime as of yet. (the tag-system sucks)
Damnit!
Alternative suggestions or will 101 implement this?