aliens

Author Topic: [Solved] placing one extra UFO on the map ?  (Read 8249 times)

Offline robin

  • Commander
  • *****
  • Posts: 1224
  • ULTIMATE ROOKIE
    • View Profile
[Solved] placing one extra UFO on the map ?
« on: October 28, 2018, 11:06:10 pm »
If I understand correctly:

- The addUFO map command can be used to add UFO on missionSite (objective: 3).
- The UFOName map command can be used to specify a specific UFO.

Can I use them in combination to add two different UFOs to the map?
Example:
Code: [Select]
  - type: MYSCRIPT
    commands:
    - type: addUFO
      UFOName: STR_UFO_A
    - type: addUFO
      UFOName: STR_UFO_B
    - type: fillArea
      ...

Thanks

edit:
Actually the way I would use it is like this:
Code: [Select]
  - type: MYSCRIPT
    commands:
    - type: addUFO  # add UFO generating the mission
    - type: addUFO  # add a specific second UFO
      UFOName: STR_UFO_X
    - type: fillArea
      ...
« Last Edit: February 11, 2023, 05:46:48 pm by Meridian »

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: [OXCE] placing one extra UFO on the map ?
« Reply #1 on: October 28, 2018, 11:14:22 pm »
I'd say yes, although I never attempted it, but it should be pretty easy to test.

Offline robin

  • Commander
  • *****
  • Posts: 1224
  • ULTIMATE ROOKIE
    • View Profile
Re: [OXCE] placing one extra UFO on the map ?
« Reply #2 on: October 28, 2018, 11:26:52 pm »
It woorrrksssssssssssssss

Offline davide

  • Commander
  • *****
  • Posts: 565
    • View Profile
Re: [SOLVED][OXCE] placing one extra UFO on the map ?
« Reply #3 on: October 29, 2018, 12:38:35 am »
it seems to me that perhaps the constraint remained that the two UFOs must share the same tileset

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: [SOLVED][OXCE] placing one extra UFO on the map ?
« Reply #4 on: October 29, 2018, 01:07:31 am »
it seems to me that perhaps the constraint remained that the two UFOs must share the same tileset

Nope, this has been discussed before, addUFO can be used to add maps of different tilesets, as a way to overcome the 256 tile limit for terrains.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11729
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: [SOLVED][OXCE] placing one extra UFO on the map ?
« Reply #5 on: October 29, 2018, 02:24:07 am »
Davide means that both UFOs must have the same tilesets to be displayed correctly. And he is absolutely right (checked it a couple months ago).

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: [SOLVED][OXCE] placing one extra UFO on the map ?
« Reply #6 on: October 29, 2018, 02:34:56 am »
Davide means that both UFOs must have the same tilesets to be displayed correctly. And he is absolutely right (checked it a couple months ago).

My apologies for passing incorrect information then. I misremembered a past discussion about this topic.

Offline robin

  • Commander
  • *****
  • Posts: 1224
  • ULTIMATE ROOKIE
    • View Profile
Re: [SOLVED][OXCE] placing one extra UFO on the map ?
« Reply #7 on: October 29, 2018, 09:21:17 pm »
Davide means that both UFOs must have the same tilesets to be displayed correctly. And he is absolutely right (checked it a couple months ago).
darn it

Offline davide

  • Commander
  • *****
  • Posts: 565
    • View Profile
Re: [SOLVED][OXCE] placing one extra UFO on the map ?
« Reply #8 on: October 29, 2018, 10:27:56 pm »
darn it

you still have the card to play for the addCraft command...

Offline robin

  • Commander
  • *****
  • Posts: 1224
  • ULTIMATE ROOKIE
    • View Profile
Re: [SOLVED][OXCE] placing one extra UFO on the map ?
« Reply #9 on: October 29, 2018, 10:48:54 pm »
you still have the card to play for the addCraft command...
?
I don't understand. I'll try to explain the context.

The idea behind the initial question was to try to setup a mission that "simulated" a landed UFO in process of being land-assaulted by another human team, with X-Com arriving late to the party.
So in the map I'd have three crafts: X-Com craft, a rival human craft*, and the UFO.
* can't use the X-Com craft tileset nor the UFO tilesets, for obvious reasons.
Can I do this using the addCraft command?

(Though honestly, I'm not sure about ultimately adding this kind of mission to my mod; it was mostly an idea that I wanted to test).
« Last Edit: October 29, 2018, 10:50:52 pm by robin »

Offline davide

  • Commander
  • *****
  • Posts: 565
    • View Profile
Re: [SOLVED][OXCE] placing one extra UFO on the map ?
« Reply #10 on: October 29, 2018, 11:14:11 pm »
?
I don't understand. I'll try to explain the context.

....
So in the map I'd have three crafts: X-Com craft, a rival human craft*, and the UFO.

* can't use the X-Com craft tileset nor the UFO tilesets, for obvious reasons.
....

in this case there are no possibilities.

I was thinking about the possibility that xcom soldiers would arrive on site without their own vehicle ... perhaps allowing you to use the addCraft command for something different

Hobbes has developed various missions without the xcom craft


Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11729
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: [SOLVED][OXCE] placing one extra UFO on the map ?
« Reply #11 on: October 30, 2018, 12:06:12 am »
You can add the other craft as a separate terrain instead of UFO. This can be done in OXCE with a mapScript and the "terrain:" flag.

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1933
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: [SOLVED][OXCE] placing one extra UFO on the map ?
« Reply #12 on: October 30, 2018, 12:09:36 am »
This is possible in OXCE if you make the other human faction's craft a separate terrain:

Code: [Select]
mapScripts:
  - name: STR_SCRIPT_WITH_3RD_CRAFT
    commands:
      - type: addCraft # player craft
      - type: addUfo # alien craft
      - type: addBlock # other faction's craft
        size: [1, 1, 4] # should be equal to [x, y, z] size of the craft
        verticalLevels:
          - type: ground # places the LZ
            size: [1, 1, 0] # 0 height means next level will be right on top of this, x, y are the same as the craft
            groups: 1 # LZ map blocks
          - type: middle # places the craft
            size: [1, 1, 4] # size of the craft
            terrain: TERRAIN_FOR_THE_NEW_CRAFT

The caveat to this is that it doesn't work quite the same as the addCraft/Ufo commands; the mission terrain needs to have a group 1 mapblock the same width and length of the craft's map, it can't just fill 1x1 LZ mapblocks underneath for larger craft.

Edit: Ninja'd by Solarius, but I want to add a remark about that - the terrain tag used in tandem with addCraft/Ufo will only change the LZ underneath the craft. However, if you make the new craft map with its own floor so it doesn't need LZ blocks underneath, then you can just use the terrain tag with addBlock.
« Last Edit: October 30, 2018, 12:13:27 am by ohartenstein23 »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9099
    • View Profile
Re: [SOLVED][OXCE] placing one extra UFO on the map ?
« Reply #13 on: October 30, 2018, 12:18:34 am »
I believe Solar meant the second easier solution with just a special block and addBlock command with terrain attribute.

Offline davide

  • Commander
  • *****
  • Posts: 565
    • View Profile
Re: [SOLVED][OXCE] placing one extra UFO on the map ?
« Reply #14 on: October 30, 2018, 12:36:07 am »
My apologies for passing incorrect information then. I misremembered a past discussion about this topic.

me too :-[