Author Topic: [DONE] [Suggestion] Starting conditions, environmental effects  (Read 33053 times)

Offline Eddie

  • Commander
  • *****
  • Posts: 560
    • View Profile
Re: Starting conditions (was: Enviros)
« Reply #15 on: April 09, 2016, 05:13:55 pm »
I think it's possible to replicate TFTD terrors and such. But you can't specify different enviros for a UFO that crashed/landed on land and one that crashed/landed underwater, because they have the same deployments.

I was thinking for a game of TFTD, you can finally have replacement weapons when fighting on land. Not for a Piratez game. In TFTD all terrormissions are on land while all USO assaults are underwater so mission specific variable can be used to good effect.

Offline Eddie

  • Commander
  • *****
  • Posts: 560
    • View Profile
Re: Starting conditions (was: Enviros)
« Reply #16 on: April 25, 2016, 10:02:27 pm »
So I want to make a mod for TFTD that replaces the underwater weapons with the corresponding xcom:eu weapons for terror missions. I've seen there is the parameter "armorTransformations" which I will use to replace diving suits with coveralls. Is there also a "itemTransformations" that I can use to replace jet harpoons with rifles?

Offline Dioxine

  • Commander
  • *****
  • Posts: 5458
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: Starting conditions (was: Enviros)
« Reply #17 on: April 26, 2016, 05:44:42 pm »
Just add rifles normally and prohibit their use underwater.

Offline Eddie

  • Commander
  • *****
  • Posts: 560
    • View Profile
Re: Starting conditions (was: Enviros)
« Reply #18 on: April 26, 2016, 10:38:18 pm »
Yes, that works. But I thought it would be neat if you didn't have to reequip your squad and weapons just got swapped.

Offline Dioxine

  • Commander
  • *****
  • Posts: 5458
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: Starting conditions (was: Enviros)
« Reply #19 on: April 27, 2016, 10:09:39 am »
Personally I'd rather prefer to re-equip than have my loadouts swapped for some random stuff... But that might be just me.

Offline legionof1

  • Commander
  • *****
  • Posts: 1900
  • Bullets go that way. Money comes this way.
    • View Profile
Re: Starting conditions (was: Enviros)
« Reply #20 on: April 27, 2016, 10:23:35 am »
I wouldn't mind a swapout if it was dynamic to your tech level. Just let player know it will happen that way beforehand. Unexplained stuff yeilds oh so much whingeing for the most miniscule shit.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9099
    • View Profile
Re: Starting conditions (was: Enviros)
« Reply #21 on: May 20, 2016, 12:24:21 pm »
Added support for allowed item categories:

E.g.
Code: [Select]
    allowedItemCategories:
      - STR_BAT_CAT_INFILTRATION

If both allowed items and allowed item categories are empty, everything is allowed.
If any of them is not empty, both are checked: an item is allowed either if it is enabled explicitly or if it is enabled via its category.

Online Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11729
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Starting conditions (was: Enviros)
« Reply #22 on: June 12, 2016, 03:21:05 pm »
Meridian, I'm trying to figure out how to do this and I would like to hear your opinion.

Some missions in X-Com Files will take place underwater, using Starting Conditions. However, the problem is that a normal craft doesn't really belong to a see bottom. So I want to use this:


(courtesy of Dioxine)

What do you think I should do?

Option 1: Making it a normal craft.
It's the simple way to go, but I don't like it: what would stop you from using it for normal missions? It'd be silly.

Option 2: Enforcing this craft on land.
This would give much better results, but would require some coding on your part. (Yes, this is sort of stealth request from me, sorry!) It simulates going to the mission site normally, then using the submarine to submerge.
There are generally two ways I can think of to achieve this:
a) Use an analogue of this code used for UFOs in mapScripts:
Code: [Select]
    - type: addUFO
      UFOName: STR_UFONAME
Only change addUFO to addCraft. This would effectively override your craft with this.
b) Enable switching craft with startingConditions, just like you switch armours. If you land in water, your normal craft is switched to the submarine.

Please tell me if you can help or if you have any alternate ideas.

Offline Dioxine

  • Commander
  • *****
  • Posts: 5458
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: Starting conditions (was: Enviros)
« Reply #23 on: June 12, 2016, 03:27:12 pm »
You don't need that. You can simply add this craft as a mapblock for your undersea map (with undersea ground added around it), with tiles that enable X-Com unit spawn (or spawn points for x-com soldiers, but the previous option is IMO better in this case, especially since it allows retreat). This works exactly like Alien Base Assault: no craft is spawned, but xcom soldiers are spawned on a special mapblock.

Online Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11729
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Starting conditions (was: Enviros)
« Reply #24 on: June 12, 2016, 03:29:43 pm »
You don't need that. You can simply add this craft as a mapblock for your undersea map (with undersea ground added around it), with tiles that enable X-Com unit spawn (or spawn points for x-com soldiers, but the previous option is IMO better in this case, especially since it allows retreat). This works exactly like Alien Base Assault: no craft is spawned, but xcom soldiers are spawned on a special mapblock.

Hmm, you're right. But every time I tried this before I couldn't force the game to accept this block as a valid exit area - no matter what I did to the .mcds, the .rmps and the ruleset, my people would not evacuate if mission is aborted.

Offline Dioxine

  • Commander
  • *****
  • Posts: 5458
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: Starting conditions (was: Enviros)
« Reply #25 on: June 12, 2016, 03:32:41 pm »
You need a floor tile with special flag:59 set to 1 (X-Com Craft).

Online Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11729
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Starting conditions (was: Enviros)
« Reply #26 on: June 12, 2016, 03:38:25 pm »
You need a floor tile with special flag:59 set to 1 (X-Com Craft).

Indeed it works! I swear it didn't before, I thought of that.
But still, this doesn't really solve my problem. The sub in question is composed of completely different tilesets than the terrain, I can't combine these and stay within the limit. (Plus I'd have to build the sub from scratch for every terrain.)
But the mechanics work for a simple grid I added to the terrain. If we can't have any viable way to add the sub, I'll forego it, at least for now. But it would be such a shame.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9099
    • View Profile
Re: Starting conditions (was: Enviros)
« Reply #27 on: June 12, 2016, 09:45:20 pm »
So, is this still a request or not?

And if yes, can you give some foolproof examples of what you want to allow and what you want to disable?

I somehow got lost in the descriptions above...

Online Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11729
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Starting conditions (was: Enviros)
« Reply #28 on: June 12, 2016, 10:03:00 pm »
So, is this still a request or not?

Yes it is, the solution Dioxine suggested is temporary as it doesn't really allow swapping vehicles.

And if yes, can you give some foolproof examples of what you want to allow and what you want to disable?

I somehow got lost in the descriptions above...

Well, there are two options, please consider which is easier:

Option 1) Enable this formula in the mapScripts:

Code: [Select]
    - type: addCraft
      craftName: STR_SUBMARINE

Just like it works for UFOs with the addUFO command.

Option 2) Allow swapping the landed craft according to enviros, exactly like armours now:

Code: [Select]
startingConditions:
  - type: STR_UNDERWATER_GEAR
    craftTransformations:
      STR_SKYRANGER: STR_SUBMARINE

Either of these would work for me, but I think the second option (with startingConditions) would be more useful in general.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9099
    • View Profile
Re: Starting conditions (was: Enviros)
« Reply #29 on: June 12, 2016, 10:18:25 pm »
Hmm, sounds easy, but I can already see 7 billion problems I'll encounter.

Isn't it easier just to disallow Skyranger to "land on water"? Can probably even be done with current ruleset, much like some ships can't go too deep? Or am I simplifying it?

And not to be mean or anything... but you're giving me solutions already... too early for that ... I'd like to hear the requirement first if possible... what are you trying to achieve?