aliens

Author Topic: Landcraft flag for craft use solely on land unable to dock with seabases.  (Read 318 times)

Offline Precentor Apollyon

  • Commander
  • *****
  • Posts: 650
    • View Profile
Hi Meridian, will you consider this pull request if I can find someone to code it?

An array function in the craft script or detail. It shows which hanger it can't dock or use.

For example. In general, craft can use every hanger you created in the game, only those that are listed in the array the craft can't use.

This has nothing to do with size fit problem. Just sticking to 2x2 hangers, allowing certain craft can use it.

#  - type: STR_HANGARLAND
#    spriteShape: 534
#    spriteFacility: 538
#    size: 2
#    buildCost: 1
#    buildTime: 1
#    monthlyCost: 1
#    crafts: 1
#    mapName: XBUH_01 

#  - type: STR_HANGARSEA
#    spriteShape: 534
#    spriteFacility: 538
#    size: 2
#    buildCost: 1
#    buildTime: 1
#    monthlyCost: 1
#    crafts: 1
#    mapName: XBUH_01 

  - type: STR_LANDCRAFT
    hangerfalse: [STR_HANGARSEA, and etc]    <--------
    sprite: 245
    fuelMax: 9999
    damageMax: 40
    speedMax: 150
    weapons: 1
    accel: 1
    soldiers: 5
    vehicles: 0
    pilots: 1
    costBuy: 75000
    costRent: 5000
    costSell: 0
    refuelRate: 9999
    repairRate: 1
    transferTime: 1
    score: 10
    battlescapeTerrainData:
      name: LANDCRAFT
      mapDataSets:
        - BLANKS
        - LANDCRAFT
      mapBlocks:
        - name: LANDCRAFT
          width: 10
          length: 10
« Last Edit: January 23, 2020, 10:20:28 am by Precentor Apollyon »

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 5867
  • Aaand we're back!
    • View Profile
    • My Wiki
Re: An Array function to prevent a hanger from use or dock by craft.
« Reply #1 on: January 22, 2020, 02:07:27 pm »
I told you multiple times already, I cannot promise something I have no information about.

If the feature and the code is good, I will merge it.
If the feature or the code is bad, I will not merge it.

Offline Precentor Apollyon

  • Commander
  • *****
  • Posts: 650
    • View Profile
Hi Meridian, upon studying the base class today. I have come to a conclusion you probably come to a long time ago. What I was proposing before is not possible.

The code only check for how many hangers are available in a base, when a craft is transferred or purchased into a base.

It cannot distinguished specialized hangers. To specialized will complicate things terribly, like small hanger and large hangers.

Question 1,
As I understand the rules for OXCE. One cannot extend OXC, so every changes must extend into oxce. Is this true? Yes? Mdst of the original base and hanger coding is in OXC from Supsuper's work.

Yankes approach is best size fit. I had thought of this and it make sense why this is done. The code does not allow for hanger type specialization or sizes.

Question 2, a strategy to code this.

So the strategy to make this works is a flag for craft.

Like landcraft : true.

This will act as a check for craft when it is transfer into a base or when a craft is purchased.

If the flag is listed in the craft's description in the craft.rul file. This will show the craft is a land craft when it is purchase or transfer into a sea base. There will be some if statements needed, first is the landcraft: true check and if the lift in the base has     fakeUnderwater: 1

If those two condition are met, then the land craft will see all the available hangers in the base are full and not available, even if there are. Where a sea craft can be transfer there.

All sea crafts in my mod has to have both land and sea capabilities. So they are not affected. 

I want to make sure I have a right strategy to code this. So it is not rejected for being bad out of hand, once if it is coded.

I have no interest in making specialized hanger like if it is large, small or underwater.

This request is now transform into a totally different one, which it blocks a landcraft from using the hanger facilities in an underwater base.
« Last Edit: January 23, 2020, 11:38:36 am by Precentor Apollyon »

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 5867
  • Aaand we're back!
    • View Profile
    • My Wiki
Question 1,
As I understand the rules for OXCE. One cannot extend OXC, so every changes must extend into oxce. Is this true? Yes? Mdst of the original base and hanger coding is in OXC from Supsuper's work.

Of course OXC can be extended... just recently OXC added a feature for you to have surface/underwater ammo.

Offline Precentor Apollyon

  • Commander
  • *****
  • Posts: 650
    • View Profile
I suppose this is because of Supsuper's gracious allowance, he has deviated from standard practice.

However, he's firm that this feature fells under OXCE's domain.

Now, I have to look for volunteers to aid me in this task.

Unless... someone can gracefully help, in the cause of advancing Hybrid compatibility in OXCE.. a step closer to feature completeness that it has all Hybrid functionality.

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 5867
  • Aaand we're back!
    • View Profile
    • My Wiki
I suppose this is because of Supsuper's gracious allowance, he has deviated from standard practice.

However, he's firm that this feature fells under OXCE's domain.

There is no standard practice, and there is no domain.

SupSuper accepts features he likes, I accept features I like... nothing more, nothing less. It's dead simple.

Offline Precentor Apollyon

  • Commander
  • *****
  • Posts: 650
    • View Profile
I didn’t propose this feature out of what I desire in a mod. This is a fundamental necessity needed in any hybrid mod. I hope you approve.

Skyranger can’t dock with sea pen in an underwater base. It is an air craft. Only a Triton or a Trident can.

I was going to ask for a feature where craft can split into air component and submarine component in mapscript for addcraft.

I can do this currently with ufos, having seperate land deployment and sea deployment using their own custom mapscript  with addufos, random terrains and globeterrain. Like blimps carrying a submarine, can land together in a land map, where in a sea map, only the submarine section is possible.

I have recently did a complete overhaul of a lot of UFOs I want to add to the human factions for my mod. Sadly, fearful of copyright reasons, I can’t present them here. Luke has seen them and he’s not the type that’s easily impressed.

I decide to skip it and stick to basic features needed to feature complete the requirements for Hybrid modding.

In my book, this is the second final nail needed in that coffin, aside from underwater interception.

I haven’t updated my Hybrid mod lately because of full on craft and UFO editing with map view

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 5867
  • Aaand we're back!
    • View Profile
    • My Wiki
I didn’t propose this feature out of what I desire in a mod. This is a fundamental necessity needed in any hybrid mod. I hope you approve.

All the more reason to do this in OXC then, no?

Offline Precentor Apollyon

  • Commander
  • *****
  • Posts: 650
    • View Profile
To be honest, I don’t really get deep into which side this feature ends up. I sincerely hope this is not something that unveil there’s a fractious facet in the OXCE and OXC relationship.

If I don’t raise this request, someone in the future could. I am trying to find a reasonable explanation how a land craft like interceptor or skyranger can dive underwater and use a sub pen. Then if I want all my craft amphibious, I may as well wipe off 80% of usable craft in my mod. 

Now, the idea of a floating xcom base does come into my mind yesterday...

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 5867
  • Aaand we're back!
    • View Profile
    • My Wiki
I'm not trying to fight with you.

I'm just answering the questions.

Offline Precentor Apollyon

  • Commander
  • *****
  • Posts: 650
    • View Profile
Re: Landcraft flag for craft use solely on land unable to dock with seabases.
« Reply #10 on: January 24, 2020, 02:46:35 pm »
I am just trying to justify the need of this request. I am feeling a little paraniod that sometimes asking it seems unwelcome.

Always appreciate of your generous help Meridian. That is unquestioned.

Sometimes, it is the communication over the net.. the truth in the meaning can get lost.

Offline Yankes

  • Moderator
  • Commander
  • ***
  • Posts: 2214
    • View Profile
Re: Landcraft flag for craft use solely on land unable to dock with seabases.
« Reply #11 on: January 24, 2020, 11:53:29 pm »
I am trying to find a reasonable explanation how a land craft like interceptor or skyranger can dive underwater and use a sub pen.
Because game say so. This is same how SUBMARINE can FLY over land. We can't change this because its how original game was made, if you want change things like that you need rewrite lot of code and number of persons asking for this will not change it, only number of people who want code it matters and now it is near 0.

Aside for that, this this IS different hangars sizes feature, implementation and problems will be same in both.

Offline Precentor Apollyon

  • Commander
  • *****
  • Posts: 650
    • View Profile
Re: Landcraft flag for craft use solely on land unable to dock with seabases.
« Reply #12 on: January 25, 2020, 08:05:34 am »
I am fully aware of the hanger size issue. The goal of this request is to BLOCK the craft from seeing available hangers in a sea base for land aircraft. After looking through the codes, I believe this is possible with fake information feeding to the craft with the flag that fool it to think there are no hangers available or it is full in a sea base. It is much easier to implement, then again I need to learn c++ to implement it. I have yet to have that kind of time.

Hanger sizes and this request are mutually exclusive to each other, not related. The feature of the other can compliment with this feature together.

Although I am keen about hanger sizes, however in regards of the difficulties to implement. Thus feature is propose instead which would meet my request. 

It is not a selfish request but one to further the goal of Hybrid modding. For every modder walk this hybrid path will meet the need of it one day.

Perhaps the hanger problem or feature implementations can come in parts, this part can be done first and the hanger size later.  My honest question here is, which is easier to implement?  I think I know the answer to that question. I don’t believe this feature would need to be promote to mythical status when it comes to its availability one day.
« Last Edit: January 25, 2020, 08:40:12 am by Precentor Apollyon »