aliens

Author Topic: Land/Underwater craft setting  (Read 3880 times)

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 10466
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
    • Email
Land/Underwater craft setting
« on: April 11, 2020, 09:27:32 pm »
In XCF, we want to go hybrid (create new textures on our globe to represent the seabed, using the texture property fakeUnderwater: true and setting the terrains of these textures to a depth of > 0). However, we faced a problem:
We want to limit the player's use of crafts to different types of environments. Let's say we have cars and helicopters, and naturally we don't want to use them for submarine missions (where the depth is > 0). But we will also have cargo planes to transport submarines, and it will be quite silly to use it for land deployments and obviously will be quite detrimental for the immersion.

Yes, it is possible to limit the player from using craft with startingConditions, but they were originally designed for more specific scenarios, like special missions in Piratez. In this way, we would have to specify it for absolutely all our deployments, and also change absolutely all existing startingConditions, which are already quite complex. This is not a very elegant solution, so maybe it's possible to make a different addition to the code?
How it would work: when you try to go to the mission, the game checks whether the depth on the deployment is acceptable for this craft. And if not, the game displays a window describing that you cannot use this craft for this mission.
(I have discussed it with Finnik, who offered to code this; basically he is leading this idea, but I confirm that it would be useful.)

Perhaps it would be good to use approximately the same syntax as we already use for craftWeapons. You can make two binary parameters: underwaterOnly and landOnly, or make underwaterOnly, for example, as an integer, where -1 means that the depth is not important (the default), 0 only for deployment with depth = 0 and 1 for depth > 0. The current fakeUnderwater parameter for facilities also works similarly. Of course, naming is not the crucial point, so it can be whatever else is necessary.

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 7363
    • View Profile
Re: Land/Underwater craft setting
« Reply #1 on: April 11, 2020, 10:29:43 pm »
Doesn't TFTD already do that?

Some craft cannot go too deep... or is it just for interception?

Offline Finnik

  • Colonel
  • ****
  • Posts: 383
  • Finnik#0257
    • View Profile
Re: Land/Underwater craft setting
« Reply #2 on: April 11, 2020, 10:36:38 pm »
I am a newbie in tftd modding, and I played tftd once when I was 8, so I can't say for sure. But as far as understood ruleset reference - this is only for interception and only because of craft weapon property. If it is possible, I would very welcome some advice on how to do what we need.
« Last Edit: April 11, 2020, 10:43:28 pm by Finnik »

wcho035

  • Guest
Re: Land/Underwater craft setting
« Reply #3 on: April 12, 2020, 10:06:55 am »
I believe Solarius is doing XCF for UFO, not TFTD. A while ago, I raised a similar feature request regarding Submersible combat. Now, the feature request I made is now aligned with this request.

Enabling negative values for UFO trajectories in fakeunderwater: true terrain and etc.


wcho035

  • Guest
Re: Land/Underwater craft setting
« Reply #4 on: April 12, 2020, 10:13:15 am »
Previous request raised.

https://openxcom.org/forum/index.php/topic,7557.0.html

They want certain craft to use certain terrain like car on land,  sub in sea.

UFO can’t have negative value in altitude on land, in sea, negative means UFO is underwater etc.

Solarius and Finnik welcome to Hybrid modding, the more the merrier...

Offline Nord

  • Commander
  • *****
  • Posts: 1411
  • The Gate is open.
    • View Profile
Re: Land/Underwater craft setting
« Reply #5 on: April 12, 2020, 10:47:38 am »
Doesn't TFTD already do that?

Some craft cannot go too deep... or is it just for interception?
In fact, no.
Geoscape depth (which a crafts using) in TFTD is checked through "altitude". "Depth" used only for battlescape.

Offline Finnik

  • Colonel
  • ****
  • Posts: 383
  • Finnik#0257
    • View Profile
Re: Land/Underwater craft setting
« Reply #6 on: April 12, 2020, 02:32:15 pm »
I believe Solarius is doing XCF for UFO, not TFTD.
Of course, that is obvious! I said that because it is based on the same engine, so it does not matter, I can use the same properties, that are used for tftd mods.

Of trajectories, interception and altitudes are not related to the topic. I believe, when deployment is formed and presented on geoscape with its marker, it already has some depth. It can take it from the terrain, or it can be set on deployments rulesets itself. So, deployments on true land would always have depth = 0, like vanilla xcom1. Textures with fakeUnderwater: true would have terrains listed that would have depth > 0. With that, we could split crafts, that are going to land at these deployments, having crafts only for true land operations (car, helicopters, etc), and for underwater operations.

So ufo trajectories, altitude, interception is not related to the topic.

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 7363
    • View Profile
Re: Land/Underwater craft setting
« Reply #7 on: April 12, 2020, 02:39:41 pm »
In fact, no.
Geoscape depth (which a crafts using) in TFTD is checked through "altitude". "Depth" used only for battlescape.

Well yes, it's called altitude, because it's called like that in xcom1. Can't be called both :)
But it represents depth in TFTD, see the translations:

Code: [Select]
  STR_VERY_LOW: "SHALLOW"
  STR_LOW_UC: "NORMAL"
  STR_HIGH_UC: "DEEP"
  STR_VERY_HIGH: "VERY DEEP"

It's the same like "fakeUnderwater" would not be fake underwater in TFTD, but fake dry land.

wcho035

  • Guest
Re: Land/Underwater craft setting
« Reply #8 on: April 12, 2020, 03:50:08 pm »
Of course, that is obvious! I said that because it is based on the same engine, so it does not matter, I can use the same properties, that are used for tftd mods.

Of trajectories, interception and altitudes are not related to the topic. I believe, when deployment is formed and presented on geoscape with its marker, it already has some depth. It can take it from the terrain, or it can be set on deployments rulesets itself. So, deployments on true land would always have depth = 0, like vanilla xcom1. Textures with fakeUnderwater: true would have terrains listed that would have depth > 0. With that, we could split crafts, that are going to land at these deployments, having crafts only for true land operations (car, helicopters, etc), and for underwater operations.

So ufo trajectories, altitude, interception is not related to the topic.

If a solution is to be implement in this, please don't do it just purely for XCF. Please do it for the benefit of all the other Hybrid mods as well. Most of the other Hybrid features implemented prior were designed not for just one mod.

Offline Finnik

  • Colonel
  • ****
  • Posts: 383
  • Finnik#0257
    • View Profile
Re: Land/Underwater craft setting
« Reply #9 on: April 12, 2020, 04:01:57 pm »
If a solution is to be implement in this, please don't do it just purely for XCF. Please do it for the benefit of all the other Hybrid mods as well. Most of the other Hybrid features implemented prior were designed not for just one mod.

I don't think only XCF could use this feature. In any mode where the developer would like to make different crafts for surface and underwater operations, this property will be very handy to use. I'm just saying that from my point of view, this suggestion is mechanically in no way related to what you want for your hybrid mod. As Nord correctly said, depth is a parameter from battlescape and that's all we need. We don't need to introduce other, much more complex mechanics for that.

Negative UFO trajectory altitudes and underwater intercepts are very different mechanics to what we asked.

Offline Nord

  • Commander
  • *****
  • Posts: 1411
  • The Gate is open.
    • View Profile
Re: Land/Underwater craft setting
« Reply #10 on: April 12, 2020, 04:02:29 pm »
Well yes, it's called altitude, because it's called like that in xcom1. Can't be called both :)
But it represents depth in TFTD, see the translations:

Code: [Select]
  STR_VERY_LOW: "SHALLOW"
  STR_LOW_UC: "NORMAL"
  STR_HIGH_UC: "DEEP"
  STR_VERY_HIGH: "VERY DEEP"

It's the same like "fakeUnderwater" would not be fake underwater in TFTD, but fake dry land.
Yes, but for division to surface/shallow/deep/very deep (battlescape) used another parameter:  "depth:" in alienDeployment.

Offline Finnik

  • Colonel
  • ****
  • Posts: 383
  • Finnik#0257
    • View Profile
Re: Land/Underwater craft setting
« Reply #11 on: April 12, 2020, 05:15:26 pm »
Guys, please correct me if I'm wrong. Let's operate on the engine terminology. I understand there are two concepts-- altitude and depth, and they're not related to each other. Altitude is how high an object flies on a geoscape. In TFTD, this parameter works the same way, just for the player in translation its value is turned upside down. And there is depth - this is a property of the terrain and the deployment will take this value from the terrain on which it finds itself. So, as Nord said, these parameters are of different kinds and in fact have no relation to each other, as far as I understand.

If I'm right, our suggestion has nothing to do with either the fakeUnderwater texture property or the altitude (of what? UFOs that are flying around?). It has to do with the depth of the deployment that the XCOM craft is going to fly and land on. This depth of deployment will be obtained either from the terrain of the texture on which it finds itself, or from the terrain that is represented in the deployment itself (for example, missions cargo ships, although they will be on fakeUnderwater, will have their own terrain with a depth 0, so they do not need a submarine). I understand that it is possible to specify depth in the deployment itself, but I do not know how they interact with the depth that comes from the terrain. I think the depth of deployment is used, but that's just my intuition.

wcho035

  • Guest
Re: Land/Underwater craft setting
« Reply #12 on: April 12, 2020, 06:28:54 pm »
Guys, please correct me if I'm wrong. Let's operate on the engine terminology. I understand there are two concepts-- altitude and depth, and they're not related to each other. Altitude is how high an object flies on a geoscape. In TFTD, this parameter works the same way, just for the player in translation its value is turned upside down. And there is depth - this is a property of the terrain and the deployment will take this value from the terrain on which it finds itself. So, as Nord said, these parameters are of different kinds and in fact have no relation to each other, as far as I understand.

If I'm right, our suggestion has nothing to do with either the fakeUnderwater texture property or the altitude (of what? UFOs that are flying around?). It has to do with the depth of the deployment that the XCOM craft is going to fly and land on. This depth of deployment will be obtained either from the terrain of the texture on which it finds itself, or from the terrain that is represented in the deployment itself (for example, missions cargo ships, although they will be on fakeUnderwater, will have their own terrain with a depth 0, so they do not need a submarine). I understand that it is possible to specify depth in the deployment itself, but I do not know how they interact with the depth that comes from the terrain. I think the depth of deployment is used, but that's just my intuition.

Perhaps it would be good to use approximately the same syntax as we already use for craftWeapons. You can make two binary parameters: underwaterOnly and landOnly, or make underwaterOnly, for example, as an integer, where -1 means that the depth is not important (the default), 0 only for deployment with depth = 0 and 1 for depth > 0. The current fakeUnderwater parameter for facilities also works similarly. Of course, naming is not the crucial point, so it can be whatever else is necessary.

Okay, like Solarius has written, how this terrain binding for relevant vehicles, Car, submarine works is, underwater only and landonly, usind depth.. and craft uses Altitude.

This is very similar to something I propose in the feature request a while ago. If Craft uses altitude=0 can't go higher or lower, it is a car. If Craft use altitude having positive value, say from 0 to above, then it is an aircraft. Altitude negative value, from 0 to negative -5 it is a Submarine.

So if you have two flag for a craft, say, maxAltitude this parameter already exist. So if you have a new parameter like minAltitude, setting BOTH flags as zero. You have a Car.

If maxAltitude=-5 and minAltitude= -1, it is a submarine and so on.

All we need is some kind of texture flag, as to which texture this craft can operate on. Then you got what you need.

If you are going to implement this craft to terrain binding feature. Why not go another step? Having negative waypoints for ufos trajectories?  This will allow craft to intercept certain ufo at certain altitude, it simulate air and underwater combat in a sense. You just need to be able to implement negative values and some check at waypoint 0 on a texture, the ufo is landing or not. If it is on a land then it is, on a sea texture, it is not. Having negative waypoint is an extension to the current waypoints system that's use in ufo.

In TFTD, ufo waypoints are positive, but reflects on the depth it can go. So if you have TFTD and UFO, then UfO and USO can use both positive and negative values for waypoints on sea textures, so they can be in the air if it is positive value or underwater for negative values.

If you want complete Hybrid modding, best to have both, instead of one half done and the other half cast aside.

« Last Edit: April 12, 2020, 06:38:16 pm by Precentor Apollyon »

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 10466
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
    • Email
Re: Land/Underwater craft setting
« Reply #13 on: April 12, 2020, 08:34:35 pm »
Precentor, I'd appreciate if you stick to your thread and not derail this one. Your ideas have little to do with the subject and you're basically hijacking the thread to push your agenda which I am completely uninterested in.

wcho035

  • Guest
Re: Land/Underwater craft setting
« Reply #14 on: April 12, 2020, 09:14:32 pm »
Precentor, I'd appreciate if you stick to your thread and not derail this one. Your ideas have little to do with the subject and you're basically hijacking the thread to push your agenda which I am completely uninterested in.

Understandable, XCF is your mod. However, enabling general hybrid features for modding is for all modders, not just XCF. I am pushing an agenda that is useful for all modders into hybrid modding, not just for XCF alone. I am sure Meridian will want this important feature available in general for all mods instead for some specialize feature for just XCF alone. Beside, I asked for this feature before XCF is transforming into a Hybrid mod.

Also this tread is not a private tread in the XCF section of the forum but a general section.

Lastly, It is the Dev decision from now on how it is done. I have done what I wanted in pointing out the general need out weight specialization for just one mod.