Author Topic: [Solved] Rules on Armor and Enviromental transformation.  (Read 5226 times)

wcho035

  • Guest
[Solved] Rules on Armor and Enviromental transformation.
« on: August 31, 2019, 05:30:30 am »
Hi guys, I have studied the armor and Environment transformation which enable what unit is allow in a terrain in battle and what is not.

If you create a condition, is this bound to Terrain.. or the UFO deployment when it was shot down?

IF it is UFO Alien Deployment, then I have my answers.

If it is terrain.. how does a separate condition which enable transformation is triggered? It is just a simple question hope some one can help.
« Last Edit: February 11, 2023, 06:38:03 pm by Meridian »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8616
    • View Profile
Re: Rules on Armor and Enviromental transformation.
« Reply #1 on: August 31, 2019, 09:59:50 am »

wcho035

  • Guest
Re: Rules on Armor and Enviromental transformation.
« Reply #2 on: August 31, 2019, 08:58:07 pm »
I have been studying the rulesets and mod examples. I am still confuse at getting a terrain specific Start condition trigger.

Okay, lets say I have a ufo.

It crashes on land, normal condition is trigger. Crash into the sea, sea condition is trigger.

This sea condition would run the transformation codes and restriction on what craft and etc.. from what is declared in the starting condition.

From the coding examples in he mods I have studied, lets say from Xcomfiles, unless you ALREADY KNOW the terrain of which the UFO or mission is already deployed on or to, the trigger is easy to define.

I haven't found any example say, UFO can crash either land or sea, I want a terrain base trigger. Say between land and sea, only it crash on sea would the starting condition can be triggered.

How do you code a starting condition trigger event in a UFO Deployment that you do not know of which terrain it will deploy or crash on? I am just not experience enough with this side of the OXCE.

Mr Meridian, again can you give an example how this can be coded?

If there is an if or else statement, this would be different.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8616
    • View Profile
Re: Rules on Armor and Enviromental transformation.
« Reply #3 on: August 31, 2019, 09:56:17 pm »
1/ When you target a mission site (or a UFO or an alien base) on the Geoscape, the startingConditions of the mission's (or UFO's or alien base's) alienDeployment are used.

2/ When you start a Battlescape, the terrain and alienDeployment are calculated:
a/ if there are enviroEffects defined on the alienDeployment, they will be used
b/ otherwise enviroEffects defined on the terrain will be used


Nothing more, nothing less.

I have been studying the rulesets and mod examples. I am still confuse at getting a terrain specific Start condition trigger.

There are no startingConditions on terrain.
Terrain only has enviroEffects.
« Last Edit: August 31, 2019, 10:13:57 pm by Meridian »

wcho035

  • Guest
Re: Rules on Armor and Enviromental transformation.
« Reply #4 on: September 01, 2019, 04:19:25 am »
So you declare the enviroeffects itself in the Aliendeployment rul file? Or within the terrain id in the globe.rul? Can the armour transformation and what’s allow and forbidden in the terrain can be declared within enviroeffect and treat it as a function?

wcho035

  • Guest
Re: Rules on Armor and Enviromental transformation.
« Reply #5 on: September 01, 2019, 08:12:30 am »
Hi, I have dig into the ruleset, finally saw the light in the tunnel. I will experiment tonight.

wcho035

  • Guest
Re: Rules on Armor and Enviromental transformation.
« Reply #6 on: September 01, 2019, 01:12:20 pm »
So here is my feedback after coming so far with my hybrid mod. I have came as far as what Luke has done with his mod.
I hope Meridian can comment on this.

       1) Startingcondition can only be use on Aliendeployment. It is my biggest regret that a few of the jackpot features like forbidden craft and armor cannot be included into the list of features inside of enviroEffects. (I can only use Aliendeployment with startingcondition, if I know first hand which terrain the mission would go on first hand. For a UFO crashing in different terrain, not possible. I am sure Luke has the same problem as I. So problem is, I cannot restrict which craft can land on certain texture or terrain.  Currently in my mod, any craft can land in the ocean. So say a helicopter to Skyranger. I need to limit the craft to be able in landing on certain texture or terrain. Say, it can't land on texture 12, which I had made it into an ocean exclusive terrain unless it is a sub capable craft. In the OXCE rules, I can't find a feature which say, allowcraftunderwater=yes or no.
   
    So, Meridian's here is what I proposing to overcome this, have this global variable in OCXE.
 
       Textureidobjectcanbeused=1,2,3,
   
       This code will allow the item or object (Craft for example) be use on the texture id declared. This code can apply on Tanks, Armour and units. 

       This would allow which terrain id the craft can actually land on. To be honest, I will like Meridian to make it a global variable, so it will work on Aliens, items and etc.

       2) In enviroEffects, I like the amour transformation codes, it allow you to transform land armor to sea armor. In my point of view, it is very useful to change the armor in human from the opposing factions in sea battle.
       However, for my own soldiers, I would like the armour transformation be treated this way.
       If you land a craft in the sea without wearing proper armor, your unit will die. Similarly, if you are wearing Aqualung at 3 miles below the sea.. you will die and crush by pressure.
 
       Meridian, if possible could you include this feature in the enviroEffects,
 
        Mustweararmour:
            -Diving suit
            -Aqualung

        If the soldier are not wearing these armor for that particular terrain, they are subject to environmental damage, like drowning.. and etc. Armour transformation is fine, but if your base does not have the armour.. it is cheating technically.

        I hope the propose features I listed above can be done, they are not coding intensive I hope.
 
        And Meridian, thank you for making OCXE and allowing us in making this Hybrid game dream come true.

Regards.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8616
    • View Profile
Re: Rules on Armor and Enviromental transformation.
« Reply #7 on: September 01, 2019, 01:26:31 pm »
1) Startingcondition can only be use on Aliendeployment. It is my biggest regret that a few of the jackpot features like forbidden craft and armor cannot be included into the list of features inside of enviroEffects.

Starting conditions cannot be defined on terrain, because terrain is not known on the Geoscape.
On the Geoscape, we know only texture (e.g. texture 12)... and the actual terrain is randomly generated only after you land and start the Battlescape.
For example texture 12 in TFTD can be 50% MU terrain, 25% SEABED terrain and 25% CORAL terrain.
So the earliest time I could check the allowed craft would be after the craft has already landed... which is obviously too late.
That is the reason why starting conditions are available only on alien deployments.

wcho035

  • Guest
Re: Rules on Armor and Enviromental transformation.
« Reply #8 on: September 01, 2019, 03:50:58 pm »
Hi Meridian, so texture is not a case of check for conditions but the type of polygon in the geoscape will determine if a craft can land or not, if I am to fully grasp the picture you are painting.

So the code check I propose before, the craft can only land on the polygon you declare would work instead of using the terrain as a conditional check.

Can the engine handle this with the right coding?

Will it be a lot of work? This feature is critical to my mod, with the armour vs environment check if not fatal injury.

Regards.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8616
    • View Profile
Re: Rules on Armor and Enviromental transformation.
« Reply #9 on: September 01, 2019, 05:26:23 pm »
I can probably add startingConditions based on globe textures, I'll check later.

EDIT: implemented here: https://openxcom.org/forum/index.php/topic,11064.0.html
« Last Edit: February 11, 2023, 06:36:43 pm by Meridian »

wcho035

  • Guest
Re: Rules on Armor and Enviromental transformation.
« Reply #10 on: September 01, 2019, 08:29:37 pm »
Thanks Meridian, if you can make these codes available.

-Craft size check for small and large hangers.

-In enviroEffects a check for
-Mustweararmour:
Otherwise suffer environmental damage

and polygon id check for a craft can land or not.

It is probably the most I ask from you.

Radiation damage is optional..

regards