OpenXcom Forum

OpenXcom => Open Feedback => Topic started by: Nord on November 18, 2016, 09:22:57 am

Title: TFTD depth
Post by: Nord on November 18, 2016, 09:22:57 am
As it seems, depth mechanic in TFTD does not work. Airborne USO not get status "airborne", downed or landed at seabottom gets status "touched down" and maxdepth rules for xcom crafts just ignored. Am i right?
Title: Re: TFTD depth
Post by: Hobbes on November 18, 2016, 07:57:57 pm
As it seems, depth mechanic in TFTD does not work. Airborne USO not get status "airborne", downed or landed at seabottom gets status "touched down" and maxdepth rules for xcom crafts just ignored. Am i right?

Depth is used to determine the palette/sound during tactical missions. As for interceptions and the 'site is too deep' message I just asked Warboy and he told me to ask SupSuper.
Title: Re: TFTD depth
Post by: Warboy1982 on November 18, 2016, 08:02:10 pm
it's not "ignored" it's "vestigial"
the values ARE compared, but all the vanilla craft have a max depth of 3, so the check is moot, because nothing really goes below that.

mods, on the other hand...
Title: Re: TFTD depth
Post by: Nord on November 18, 2016, 08:17:11 pm
Always thinked, that barracuda originally has max depth 2?
Anyway, values compared and what after? I mean, i manually changed maxdepth of triton to 1 and spot no difference.
Title: Re: TFTD depth
Post by: Hobbes on November 18, 2016, 08:38:26 pm
Always thinked, that barracuda originally has max depth 2?
Anyway, values compared and what after? I mean, i manually changed maxdepth of triton to 1 and spot no difference.

Me and Warboy have been discussing this issue on the irc channel today since I'm also curious about if and when this feature works. You can read the discussion here: https://colabti.org/irclogger/irclogger_log/openxcom?date=2016-11-18 (https://colabti.org/irclogger/irclogger_log/openxcom?date=2016-11-18), although the person to ask is SupSuper since he was the one who implemented it.
Title: Re: TFTD depth
Post by: Nord on November 18, 2016, 10:17:32 pm
Ok, i am close to understand how it all works, and, well, a bit sad about it. Of course,  i  can write how i want to see this, but i'm not coder, so you pretty sure knows better. Hope SupSuper will answer something encouraging.
Title: Re: TFTD depth
Post by: AMX on November 20, 2016, 12:36:28 pm
ISTR the only time the "too deep" message came up in the original was when a Barracuda tried to engage a Very Small USO that was moving at max speed.
Title: Re: TFTD depth
Post by: Nord on November 23, 2016, 04:58:27 pm
By the way, max hight in xcom1 may be also useful for aircraft mods.
Title: Re: TFTD depth
Post by: SupSuper on November 27, 2016, 12:07:32 am
The only "craft depth" restriction in the original TFTD was that Barracudas couldn't dogfight USOs at Very Deep depth (which is rare). That's it. There were no Battlescape limitations, no transport craft limitations, no site limitations, no polygon limitations, or whatever else you imagined. It's all just flavour, depth is just altitude with a different name.

Therefore, all that "maxDepth" "maxAltitude" does in OpenXcom crafts is:
- Flag the craft as "underwater" (can only dogfight USOs over polygons)
- Can't dogfight USOs with depth (altitude) higher than the value.

So you can theoretically use it in X-COM 1 but it will likely not work as you expect.
Title: Re: TFTD depth
Post by: Nord on November 27, 2016, 07:36:25 am
- Can't dogfight USOs with depth (altitude) higher than the value.
Exactly that part do not work, as i can see. And that is a problem for me.
Title: Re: TFTD depth
Post by: SupSuper on November 27, 2016, 05:50:59 pm
Well joke's on me, turns out the code only pretended to work when it actually didn't. :P It was mixing site depths and UFO altitudes (which are entirely different things), that's what happens when you overload terms...
I've rewritten the whole dogfight checks to mimic TFTD and renamed the property to "maxAltitude" to avoid confusion.
Title: Re: TFTD depth
Post by: Nord on November 27, 2016, 06:37:00 pm
Sorry, it is late evening and i am not native english speaker, so i did not understand nothing. You found a bug? Or you explain how this feature works?
Title: Re: TFTD depth
Post by: SupSuper on November 27, 2016, 06:58:01 pm
You were correct, it was a bug, I fixed it. Now it works same as TFTD. :)
Title: Re: TFTD depth
Post by: Nord on November 27, 2016, 07:07:00 pm
Oh, and i see new downloadable build. Thank you very much.