Today I have a discussion with SupSuper on this topic for a design solution that allow of this feature to be possible. Here is a break down. I want to thank Supsuper for his time, generosity and kindness for this consultation.
Precentor AppollyonToday at 11:17 AM
This question is about having craft able to do submersible interception in ufo enemy unknown.
I am trying to design a solution to code this. I only have limited understanding of the code structure.
Currently ufotrajectories can handle positive value regarding the heights of ufo is flying
If you allow for negative values, and restrict certain texture as to where a ufo can fly in negative values, will this allow UFO to be able to travel submerge underwater? This is just theory on my part. Shoot me down if I am wrong.
for example, like the ufo trajectory matrix
waypoints:
- [A, B, C]
- [D, E, F]
- [G, H, I]
- [J, K, L]
- [M, N, P]
B,E, H, K, N can have negative values, and only in sea texture. This is part 1.
Part 2, is maxAltitude. If I have a new attribute, minAltitude for craft, stating it is allow to go below max altitude, will this be enough to simulate submersible interception?
I hope this question of mine is not too complicated to answer. Please advise me if I miss out some part. I am keen to get the design for this feature to be correct.
SupSuperToday at 11:26 AM
it's pretty complicated. i assume you are talking about a UFO/TFTD hybrid, where the whole globe is polygons?
Precentor AppollyonToday at 11:26 AM
You mean a globe with the polygon to do it?
SupSuperToday at 11:26 AM
globe with land polygons and ocean polygons (as opposed to vanilla UFO which only has land polygons)
Precentor AppollyonToday at 11:27 AM
<Hidden> Yes I have.
SupSuperToday at 11:41 AM
my suggestion is do not be fooled by "altitude" value. it has no gameplay functionality, it's just a number
ufos will only travel where you tell them, so you can easily make them "only" travel on land, or on sea, or both, without code changes
craft is more complicated, you cannot restrict their paths, but you can restrict what they can attack
from there, you can decide: what is submersible interception? craft can only attack ufo X? craft can only attack ufo over polygon X?
if whole globe is polygons, then you can just define restrictions based on textures, instead of making up new altitudes
Precentor AppollyonToday at 12:03 PM
Wow, from what you describe, I pretty much need to throw everything I said before out the window. Now I really appreciate running this through a developer.
So just dissecting what you reply a bit at a time.
"ufos will only travel where you tell them, so you can easily make them "only" travel on land, or on sea, or both, without code changes"
So this is Ufotrajectories. If it is over on water polygon, will having negative
- [A, B, C]
- [D, E, F]
- [G, H, I]
- [J, K, L]
- [M, N, P]
does having negative value for B,E, H, K, and N can simulate the UFO traveling underwater? If I want over sea terrain or texture to have both air and underwater interception.
So some kind of code is needed then if the craft need to "craft can only attack ufo over polygon X?" like to test if the ufo is underwater or in the sky then? When the interception occurs?
SupSuperToday at 12:09 PM
So some kind of code is needed then if the craft need to "craft can only attack ufo over polygon X?" like to test if the ufo is underwater or in the sky then? When the interception occurs?
yes
i don't think setting negative altitude in ufotrajectories does anything
Precentor AppollyonToday at 12:10 PM
I appreciate of any idea you can input
SupSuperToday at 12:11 PM
there is a altitude property. like in TFTD, crafts can't attack "very deep" ufos. but that's it, it has nothing to do with underwater
your original idea, add new "negative altitudes" only used by underwater UFOs and restrict crafts based on that, is possible. but i think it's more complicated than just checking texture
because you have to rework all altitudes so land always use positive altitude and water always use negative altitude
Precentor AppollyonToday at 12:13 PM
Interesting, however the only way to make a ufo to either go above water and underwater over a sea texture is ufotrajectories, yes?
Or there is another way?
SupSuperToday at 12:14 PM
nope. there is no "pathfinding" in globe. ufos and crafts only go in straight lines you give them
so yes to the first question.
Precentor AppollyonToday at 12:15 PM
I understand about the straight line, what about two dimensional point of view, like straight line, height and altitude. So has to be ufotrajectories, yes? Okay, it is ufotrajectories then
Thanks, this solve the ufo travel on different height part over a sea texture
so as to altitude having positive value for land and water always use negative altitude. You can always code it that this will only work on water texture correct? I mean the coding will only kick in on certain texture?
I thought of the max altitude thing and min altitude for this reason.
SupSuperToday at 12:18 PM
yes
but they are designed for vanilla so i can't guarantee it all works
Precentor AppollyonToday at 12:20 PM
Okay, I am asking for the theoretical. So, that's another question for someone else. My consultation is a design plan of what is possible and what is not. So far, your experience and input is most and absolutely insightful. I really appreciate of your time on this.
Final question on the altitude, if the positive altitude part is left alone and unchanged and only the negative altitude is worked on, this will not affect the vanilla altitude mechanic? Like I am keeping the original ufo1 part but adding something to make it work like TFTD.
Is there any theoretical problem this setup might bring up, you believe it could generate?
This would be my last question ask on this topic, I believe I have all the details I need.
SupSuperToday at 12:27 PM
it should be fine. like i said, altitude is only a value, it's not used for anything important that i can remember
it just shows the text 0 = landed, 1 = low, 2 = high, etc
specially in UFO when there's no craft restrictions
Precentor AppollyonToday at 12:27 PM
Thank you supSuper, you have been most helpful. Again, I am very grateful for your time in this discussion.
So you mind of I post of this discussion in the OXCE forum? For the feature request I have raised on this topic?
SupSuperToday at 12:29 PM
go ahead
Precentor AppollyonToday at 12:29 PM
Thank you!