OpenXcom Forum

Modding => OpenXcom Extended => OXCE Support => Topic started by: robin on October 28, 2018, 11:06:10 pm

Title: [Solved] placing one extra UFO on the map ?
Post by: robin 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
      ...
Title: Re: [OXCE] placing one extra UFO on the map ?
Post by: Hobbes 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.
Title: Re: [OXCE] placing one extra UFO on the map ?
Post by: robin on October 28, 2018, 11:26:52 pm
It woorrrksssssssssssssss
Title: Re: [SOLVED][OXCE] placing one extra UFO on the map ?
Post by: davide 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
Title: Re: [SOLVED][OXCE] placing one extra UFO on the map ?
Post by: Hobbes 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.
Title: Re: [SOLVED][OXCE] placing one extra UFO on the map ?
Post by: Solarius Scorch 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).
Title: Re: [SOLVED][OXCE] placing one extra UFO on the map ?
Post by: Hobbes 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.
Title: Re: [SOLVED][OXCE] placing one extra UFO on the map ?
Post by: robin 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
Title: Re: [SOLVED][OXCE] placing one extra UFO on the map ?
Post by: davide on October 29, 2018, 10:27:56 pm
darn it

you still have the card to play for the addCraft command...
Title: Re: [SOLVED][OXCE] placing one extra UFO on the map ?
Post by: robin 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).
Title: Re: [SOLVED][OXCE] placing one extra UFO on the map ?
Post by: davide 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

Title: Re: [SOLVED][OXCE] placing one extra UFO on the map ?
Post by: Solarius Scorch 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.
Title: Re: [SOLVED][OXCE] placing one extra UFO on the map ?
Post by: ohartenstein23 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.
Title: Re: [SOLVED][OXCE] placing one extra UFO on the map ?
Post by: Meridian 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.
Title: Re: [SOLVED][OXCE] placing one extra UFO on the map ?
Post by: davide 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 :-[
Title: Re: [SOLVED][OXCE] placing one extra UFO on the map ?
Post by: Solarius Scorch on October 30, 2018, 12:59:40 am
I believe Solar meant the second easier solution with just a special block and addBlock command with terrain attribute.

Yes, with the added feature of using another terrain, since I imagine the other craft would use different tilesets than the UFO.
Title: Re: [SOLVED][OXCE] placing one extra UFO on the map ?
Post by: robin on October 30, 2018, 09:30:01 pm
Thanks for the answers. I didn't even know you could add maps from another terrain.