Loading...
  OR  Zero-K Name:    Password:   

Urchin on land sorta broken?

16 posts, 456 views
Post comment
Filter:    Player:  
sort

4 years ago
While placing urchins on land has its tactical merit, I've noticed quite a few times that there are some issues with it. Specifically, if the location is not "perfect" it would be unable to fire at all (will not even try to). To me it feels sort of wrong, especially since there is no way to know for sure if it will have an issue or not. Stardust on very steep hills have similar issues, where it is tough to tell where the blindspot will be. In some way, this makes gauss the preferred turret as it has no issue with elevation and depression, and can even fire through terrain.

If anyone has an idea on how to fix it I'm all ears, but I think a decent start would be to highlight the build square somehow if the elevation relative to surrounding terrain is too high. Or project firing arc onto terrain? Not sure what is the best way. In some sense making urchin water-only, or giving the torps a bit of high traj early on so they can actually dive into water may be a good start.
+6 / -0
4 years ago
I think giving land-launched torps a trajectory would be the most reliable option. But that leads into the problem of how to do that in the Spring engine. The duck's missile has "trajectoryHeight" of 0.4, but I don't think that tag works for torpedoes. It might be possible to retag it as a missile, but then it would always have that arc, even when launching from water. (Also, it would be able to hit more stuff than it already can. Weird behavior ahoy. We could try changing the targeting tags, but that puts hovercraft in a weird position.)
+0 / -0

4 years ago
Well... Looked at the unit def. Not sure how it knows if its on land or on sea (so traj is applied only when on land). Or maybe just maybe not allow it to be built on land? Suggestions welcome!
+0 / -0
4 years ago
I think that's actually a script thing. Especially because it's only a model change. Maybe look at wind/tidal gen, because that has different functionality depending on where it's placed.
Another thing you might want to look at is, in the Spring engine, how it handles aircraft torpedoes. From what I've read, it should drop a bomb that becomes a torpedo on impact with the water. Maybe you could try something like that, with a mortar, for the on-ground weapon.
+0 / -0

4 years ago
Thanks! It seems that whatever happens with torps is either part of the engine, or I am too lob to find it in game defs. Any advice is appreciated!
+0 / -0


4 years ago
The unit script is the thing that knows whether it is on land or sea. As far as I'm aware the torpedo behaviour is the engine default, with some groundbounce added to help it reach the sea.
+0 / -0


4 years ago
Torpedo physics often make it unable to hit the target even when the torp reaches water and the target is right next, because the inertia makes it jump right out of water. Entering water should probably slow the projectile down to a near-stop. I am unsure if this is doable with mere configuration though.
+0 / -0

4 years ago
Ok just checked with the engine docs... It looks grim. Basically, torps are a special kind of weapon in the engine, and as such they have their own handling for what they do and how they work. One way we can "fix" Urchin a bit is to make it fire the torps sorta like a mortar, so it lands few elmos away from urchin and from there proceeds to target. It would probably work but may allow for ground based urchins to target ground units (which is sort of silly). Arguably, real torpedo launchers actually do work exactly that way, so maybe it is acceptable? I could try to mess with the parameters of the weapon (like targeting arc) and see if I can make it do that, but would be good to get some feedback of whether it's something people generally want to see. Anyway, real launchers work like this:

but there is nothing stopping it from being aimed a bit upwards for more "mortar-like" trajectory. Either way it would make for some interesting dynamic where subs/ducks can just rush close to urchins to become un-targetable by them.
+1 / -0
It should be possible to create a weapon that fires a high-trajectory ballistic Cannon (... or to be fair, almost any other kind of weapon; StarburstLauncher may be quite adequate) shot at a target that then turns into a torpedo when entering water, aimed at whetever the launcher targeted with the cannon shell.

Perhaps it can even be something like the badger's projectile - the launcher can think that the weapon penetrates the water, while the actual shell will smash against the surface of whatever it hits, be it water, land, or unit - and creating the torpedo projectile with arbitrary physical parameters.

The initial shell would probably have no bounce in this particular solution, but it could be induced to fire unconditionally , and the freshly spawned torpedo projectile could have all the bounce it wants.
+0 / -0
4 years ago
But why urchin shouldn't be able to target the ground? I think it would add some more usability for it.
+0 / -0


4 years ago
There are engine tags for colliding with or aiming with various things in mind (friendly, terrain, feature etc..). A decent engine PR could be to add corresponding collideWater and aimWater tags.
+0 / -0


4 years ago
quote:
It should be possible to create a weapon that fires a high-trajectory ballistic Cannon (... or to be fair, almost any other kind of weapon; StarburstLauncher may be quite adequate) shot at a target that then turns into a torpedo when entering water, aimed at whetever the launcher targeted with the cannon shell.


I might have something for this, though the code is very crude.
+0 / -0

4 years ago
Badger-style urchin sounds nice actually. But somehow I wonder if we can copy torp bomber from BA:
[Spoiler]

TLDR: Important different parameters that are different from ZK appear to be
tolerance = 12000,
weapontimer = 5,
turret = false,

Also apparenty this is a thing:
quote:

TorpedoLauncher
Fires a projectile that will behave ballistically out of water and like a missile in water. Usually used with waterWeapon = true so they can fire underwater and target underwater units. An aircraft carrying a #TorpedoLauncher is a special case, the weapon turns into an #AircraftBomb projectile that will spawn a torpedo projectile on impact with water. Visually represented by a pointed black cuboid, usually the default object is replaced by a 3D model.

bool subMissile  default: false  Can the torpedo leave the water and target units and positions on land?


So there is some special code inside the engine to deal with torp bombers specifically. How exactly it works is a big question, but maybe we could ask the guys nicely to allow it to be a flag instead of based off unit category, such that no actual code is needed in ZK itself, just a flag to make engine do the work?
+0 / -0


4 years ago
An engine-side system to make weapons turn into other weapons when they hit the water sounds good. I hold out no hope that such a thing would be implemented though. I would expect avoidWater and collideWater first.
+0 / -0

4 years ago
AUrankAdminGoogleFrog, apparently for torpedo bombers it is already in place. At least docs say it is. And in BA it works so it should be done somehow. AFAIK BA does not use LUA as much.
+0 / -0


4 years ago
I know that torpedo has a hack to make aircraft behave like torpedo bombers. The fact that the engine has hacks in service to TAisms does not imply more hacks can be added. Urchin doesn't fly so I didn't think it was relevant.
+0 / -0