Hovers can't be transported - Page 2

Hovers can't be transported

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

User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6241
Joined: 29 Apr 2005, 01:14

Post by FLOZi »

Actually, it might be better to leave hovers upright=1 as default, (to maintain compatibility, and because it really makes sense for them to be upright over water) but of course it can be overridden with a simple set UPRIGHT to FALSE; in Create().

I can remove the non-transportableness easily enough, but I might be tempted to make it a seperate issue.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

I think it should use the upright tag even with hovers, maybe with a default of 1 if the tag is absent.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Post by Pxtl »

Maybe I'm just silly... but why would you ever want upright=0 for any floating units? Why isn't the behaviour _always_ to be upright when on the surface of the water? Isn't this something that can safely be defaulted (normally I argue against default anything... but in this case the default seems silly)?
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6241
Joined: 29 Apr 2005, 01:14

Post by FLOZi »

Pxtl wrote:Maybe I'm just silly... but why would you ever want upright=0 for any floating units? Why isn't the behaviour _always_ to be upright when on the surface of the water? Isn't this something that can safely be defaulted (normally I argue against default anything... but in this case the default seems silly)?
Who knows? Plus, its easier to code script get/set of it. :wink:
User avatar
Fanger
Expand & Exterminate Developer
Posts: 1509
Joined: 22 Nov 2005, 22:58

Post by Fanger »

im completely fine with the ability to call it via script..

As flozi said you can either just straight up disable it in the create..

or as would make more sense use the terrain differentiation stuff to set it depending on whether the unit is over water...
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6241
Joined: 29 Apr 2005, 01:14

Post by FLOZi »

I decided to submit it in that form, i.e. purely the implementation for the COB call, without affecting current defaults for hovers.

http://spring.clan-sy.com/mantis/view.php?id=445

As you can tell if you look at the diff, its really very simple. Probably simply the case that noone realised it would be useful before and it hadn't been asked for.
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Post by yuritch »

Pxtl wrote:Maybe I'm just silly... but why would you ever want upright=0 for any floating units? Why isn't the behaviour _always_ to be upright when on the surface of the water? Isn't this something that can safely be defaulted (normally I argue against default anything... but in this case the default seems silly)?
It can be useful sometimes. Imagine some quite big unit with hover movetype (the unit is not the classic hovercraft, but something more like wheeled amphibious vehicle instead) that can cross shallow water without being afloat (the water is too shallow for that). That unit will need to be Upright=0. But if it enters deep water (deep enough for it), it floats up and is upright=1 from now on.
User avatar
Fanger
Expand & Exterminate Developer
Posts: 1509
Joined: 22 Nov 2005, 22:58

Post by Fanger »

are you kidding Ive wanted this for so long..

the GD amphbious units in EE are not intended to go underwater.. I have since the beginning of EE wanted them to go across the surface.. only they look retarded doing this currently...

heck I might do the same thing with URC..
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Post by yuritch »

I already have a few such units completed (only they still use script to follow slopes on land as engine changes are not in released version yet). If you want, I can upload them somewhere or mail them to you.
Main features: they follow slopes while on land, they float on the surface while in water (and create some wakes), their water speed is lower than land speed, they switch to floating mode when the water is deep enough (the depth required is set in script), they emit engine sounds while moving.
Problems so far: they are not transportable (as they are hovers), they leave tracks on sea bottom while floating, the texturing is very simple.
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Post by yuritch »

So is anyone working on non-transportable hovers problem?
I can probably try to make a patch myself, but first I need to know what is the best solution. The possibilities as I see them now are:
1. Remove non-transportable hovers, ships and aircraft check completely - let their transportability be decided by size and mass (like for the ground units). Can have side effects like ships suddenly becoming air-transportable in some mods.
2. Add an FBI tag that controls transportability, like CanBeTransported=0|1, defaults to 0. If set to 0, uses the current method (so present mods are unaffected). If set to 1, allows transportation of a unit. In either case size and mass restrictions apply. This can be confusing as people may think CanBeTransported=0 always makes the unit untransportable when in fact it's not, and adding more tags is not such a good idea all by itself.
So, if someone has a better idea, post it here.
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

If you do implement CanBeTransported,
you could set it up with 0, 1, and some
other value as the default.

0 - can never be transported
1 - can always be transported
2 - set as is currently done (default value)

You could also use an empty string as
the default value, or a "default" magic
tag, or "auto", or ... ;)
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6241
Joined: 29 Apr 2005, 01:14

Post by FLOZi »

1. Remove non-transportable hovers, ships and aircraft check completely - let their transportability be decided by size and mass (like for the ground units). Can have side effects like ships suddenly becoming air-transportable in some mods.
FTW. Sometimes backwards compatability hacks are required, sometimes it will just be far neater to avoid them.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Post by zwzsg »

For info, the only thing that prevented ships to be transported in TA was that the smallest ship had a 4x4 footprint while every transport was limited to transporting 3x3 sized units. But third party transports with higher "transportsize" could load and unload ships very well, without hacks. And in old TA, genuine Cavedog hovers and planes could be loaded fine by genuine Cavedog transports last time I checked.

So this is not a backward compatibility hack, this is just a pointless and annoying hack.

I still think it's retarded to implement a "CanBeTransported" tag while there is already a "cantbetransported" tag. And I fail to see why any mobile unit, be it plane, hover, or ships, must default to intransportable. The only thing that I understand might be better left untransportable by default are buildings (but I hope it's overridable). But I thought and hope building were just hard coded to have ultra heavy mass by default, and that being untransportable was just a consequence of that.
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Post by yuritch »

zwzsg wrote:I still think it's retarded to implement a "CanBeTransported" tag while there is already a "cantbetransported" tag.
Sorry to inform you, but as of current SVN revision (I'm not sure about past versions) CantBeTransported tag is not read by the Spring engine (or at least I wasn't able to find the code that reads it), so it is non-existant.
Removing the movetype check from transportability condition will be easy, I'll post the required changes here soon. We'll need someone with SVN commit access though...
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Post by Neddie »

Just make sure you don't end up with that one LLTA air transport...

"WTH? Where did all my units go? Oh my god, this dense stack of ugly models is over two hundred units in size! Oh no, I can't self-destruct any of it, toggle the transport and unload, or, indeed, destroy it through conventional means because it sucks up units that come within four elmos..."
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Post by yuritch »

The patch to disable movetype check is simple:

Code: Select all

Index: TransportCAI.cpp
===================================================================
--- TransportCAI.cpp	(revision 3456)
+++ TransportCAI.cpp	(working copy)
@@ -273,8 +273,6 @@
 	// don't transport cloaked enemies
 	if (unit->isCloaked && !gs->AlliedTeams(unit->team, owner->team))
 		return false;
-	if(unit->unitDef->canhover || unit->unitDef->floater || unit->unitDef->canfly)
-		return false;
 	if(unit->xsize > owner->unitDef->transportSize*2)
 		return false;
 	if(!transport->CanTransport(unit))
I submitted it into Mantis: http://spring.clan-sy.com/mantis/view.php?id=460
I have compiled the game with that patch and was able to load hover units and small aircraft into transports (haven't tried with ships yet).
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

neddiedrow wrote:Just make sure you don't end up with that one LLTA air transport...

"WTH? Where did all my units go? Oh my god, this dense stack of ugly models is over two hundred units in size! Oh no, I can't self-destruct any of it, toggle the transport and unload, or, indeed, destroy it through conventional means because it sucks up units that come within four elmos..."
Katamari Damacy Spring.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Post by Pxtl »

In that case, the only real question is one of backwards-compatibility - use CanBeTransported and sensibly avoid negating booleans, or be compatible with OTA (a concept which is rapidly diminishing in value).

Either way, the current system is unjustifiably silly.
manored
Posts: 3179
Joined: 15 Nov 2006, 00:37

Post by manored »

I know this is a bit off topic, but it may affect that modification later:

Im almost sure (unleash one of BA moders made it propositally what would make no sense for me) that amphibious units can be loaded while underwater but cannot be unloaded on water.
User avatar
Peet
Malcontent
Posts: 4384
Joined: 27 Feb 2006, 22:04

Post by Peet »

Yeah I've noticed that too...rather annoying at times.
Post Reply

Return to “Game Development”