Set*MoveType data revision

Set*MoveType data revision

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
User avatar
code_man
Posts: 260
Joined: 19 Jan 2014, 13:10

Set*MoveType data revision

Post 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.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: Set*MoveType data revision

Post 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)
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: Set*MoveType data revision

Post by FLOZi »

Thanks for the clear and concise explanation :-)
User avatar
code_man
Posts: 260
Joined: 19 Jan 2014, 13:10

Re: Set*MoveType data revision

Post 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?
Post Reply

Return to “Game Development”