aliens

Author Topic: [Suggestion] Interception/Dogfight improvements for Hybrid mods  (Read 3744 times)

wcho035

  • Guest
[Suggestion] Interception/Dogfight improvements for Hybrid mods
« on: November 09, 2019, 05:31:37 am »
Request priority-Mid to Low.

Underwater submarine interception and combat, or terrain binding interception and combat.
*************************************************************************
This feature request is raised originally for Submarine interception and underwater combat in geoscape. Yet, this request
is now extend to terrain binding interception and combat.

For example, land battles like tanks, scavenger crawlers etc. They use land terrain, do not fly or cross sea terrain.
Similarly, ships or submarine, stick to sea terrains and never goes on land.

I have been digging into the oxce ruleset recently. I have come across a few existing functions, by itself or existing in scattered isolation within a mod, if used. Their contribution are under feature and they could be a lot more, if properly utilized together.

For example,

1) In the terrain texture ID section of the oxce ruleset

fakeUnderwater: false  or true.

2) Craft Weapons have

underwaterOnly: True or false.

3) craft have

maxAltitude-

4) ufoTrajectories have waypoints

     0 - Ground
    1 - Very Low
    2 - Low
    3 - High
    4 - Very High

Together with these and two feature request. This can make underwater interception of USO possible.

1) Firstly we need a minAltitude for craft, like what is the max depth the craft could operate.

This minAltitude would only work together with maxAltitude, if the craft is on a terrain texture having fakeUnderwater: true in the terrain texture ruleset.

In essence, we have submarines. Pure submersibles that works only in underwater terrains textures.

minAltitude=4 (Maximum depth it can operate.) Craft won't go on land.
maxAltitude=0 

Similarly, for pure land vehicles on fakeUnderwater:true. The declaration can be

minAltitude=-1 # craft cannot use terrain.
maxAltitude=0

If it is on texture with fakeUnderwater:false, then the tank or ground vehicle would stay on the ground.

2) UFO altitude: from UFOtrajectories are allowed to have negative values.

This allow for UFO or USO to operate on land or sea.

So new UFO altitude: (with the negative values)

     0 - Ground
    -1 - just below surface.
    -2 - Low deep
    -3 - mid deep
    -4 - Very deep

The new ufotrajectories matrix of a USO can be for example.

 waypoints:
   - [A, 0, C]
   - [D, -1, F]
   - [G, -4, I]
   - [J, 2, L]
   - [M, 4, P]

USO goes from zone A to zone b from ground to just below surface, then deeper and deeper before rising to low and then high level.

Using texture Id fakeUnderwater:true and fakeUnderwater:flase flag check. Ufo trajectories on land that has a negative UFO altitude: value must be assigned to use a default positive value of 1.

With these set of modification, and having Craft Weapons using underwaterOnly: True or false.

We can have true underwater interception or pure ground base interception (Tank vs tank type interception)

This feature, with Hanger restricted to certain craft type, and Alienbases having land and sea transformation switch. Would make a hybrid type mod be feature complete.
« Last Edit: February 19, 2023, 01:39:34 pm by Meridian »

Offline luke83

  • Commander
  • *****
  • Posts: 1559
    • View Profile
    • openxcommods
Re: [Suggestion] Underwater submarine interception and combat.
« Reply #1 on: November 09, 2019, 05:40:17 am »
I could use some of the above features in my mod also, especially things like if send out a tank on Geoscape i dont want it to cross over the water sprites, it would be fantastic if it stuck to the land path only and if it couldnt find a path, let me know so i can send him home.

 It all sounds like a Pain to implement in code but i can see he value in it plus there will be more and more Hybrid mods over the next 5 years and i can see people wanting to keep making Geoscape more interesting as right now its pretty simplified ( as far as i know i cant even force my Base to show a different tileset depending upon if build it on land or water, let alone have it check what tile it is on and find the matching set).

wcho035

  • Guest
Re: [Suggestion] Underwater submarine interception and combat.
« Reply #2 on: November 09, 2019, 05:41:50 am »
Thanks for this Luke,  this feature will greatly enhance our mods. Plus once my Vanilla Hybrid mod is out, people can use it as a jumping platform for future hybrid mods.
« Last Edit: November 09, 2019, 05:45:00 am by Precentor Apollyon »

wcho035

  • Guest
Re: [Suggestion] Terrain Binding interception and combat.
« Reply #3 on: December 20, 2019, 03:36:53 am »
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!