Author Topic: Two Questions  (Read 414 times)

Offline Barghum

  • Sergeant
  • **
  • Posts: 37
  • Doing my best to help (:
    • View Profile
Two Questions
« on: May 10, 2024, 05:06:09 am »
First on my list of problems: can I make it so that the entire map is a Custom UFO and if so how?

Second: is it possible to recreate UFO extender's  Wreck Analysis via missionCompleteText (or any of the other types of text like that) and if so how can I

thanks for reading  :)

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11496
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Two Questions
« Reply #1 on: May 10, 2024, 10:54:50 am »
First on my list of problems: can I make it so that the entire map is a Custom UFO and if so how?

A UFO by definition (at least mine) does not occupy the entire map, as normally it is not a perfect square, and even if it was, you need to put south and eastern external walls outside. So no, you need to at least place the ground underneath it.

But if you mean the whole area being a single terrain block (map), then sure, you can do that. Just remember to include spawns for X-Com units.


Second: is it possible to recreate UFO extender's  Wreck Analysis via missionCompleteText (or any of the other types of text like that) and if so how can I

I don't know what this option did, but I assume it gave you the research of this particular UFO. If yes, you can do this:

Code: [Select]
alienDeployments:
  - type: STR_SMALL_SCOUT
    unlockedResearch: STR_SMALL_SCOUT

This should automatically give you research on the Small Scout if you win a ground battle with it. Note that you won't get the research if you abandon the mission.

Offline Barghum

  • Sergeant
  • **
  • Posts: 37
  • Doing my best to help (:
    • View Profile
Re: Two Questions
« Reply #2 on: May 10, 2024, 07:11:35 pm »
Quote
I don't know what this option did

here is the exact wording from the wiki:
Quote
Until the construction of hyper-wave decoders, it is impossible to know what missions aliens are performing. Even after recovering an alien ship, XCOM intelligence is unable to determine what was its purpose. This is no longer true. Salvaged navigation modules can now be analyzed and may reveal what evil intentions the aliens had

image showing how it looked below

Offline Barghum

  • Sergeant
  • **
  • Posts: 37
  • Doing my best to help (:
    • View Profile
Re: Two Questions
« Reply #3 on: May 10, 2024, 08:36:49 pm »
Quote
But if you mean the whole area being a single terrain block (map), then sure, you can do that. Just remember to include spawns for X-Com units.

that is what I want,  however the single terrain block i have made keeps crashing openxcom with this error log:
Code: [Select]
[2024-05-10_12-17-33] [FATAL] OpenXcom has crashed: Map failed to fully generate.thanks for the help.

Offline CrazedHarpooner

  • Sergeant
  • **
  • Posts: 38
    • View Profile
Re: Two Questions
« Reply #4 on: May 10, 2024, 10:28:07 pm »
Whatever a map size is, it MUST fully fill out the entire area. The error in question indicates that the script used for generating that map doesn't ensure everything is filled out resulting in gaps by the time it is done and thus this error. If you're making a single big block, then you need to ensure the mapsize and this block match in size, or if the map area is bigger, place your big block and then use 'fillArea' for any unfilled parts of the map.
« Last Edit: May 13, 2024, 03:46:46 am by CrazedHarpooner »

Offline Barghum

  • Sergeant
  • **
  • Posts: 37
  • Doing my best to help (:
    • View Profile
Re: Two Questions
« Reply #5 on: May 13, 2024, 02:38:10 am »
ok now that I know what the error is I just need to know how to fix it... cuz I have no idea what is going on
so here is the code... thanks for all the help

DEPLOYMENT:
Code: [Select]
alienDeployments:
  - type: STR_PLACEHOLDER_NAME_DEP
    width: 40 #40
    length: 40 #40
    height: 9
MAPSCRIPT:
Code: [Select]
mapScripts:     
  - type: MAP_PLACE_HOLDER_NAME
    commands:
    - type: addBlock
      groups: 0     
      maxUses: 1   
    - type: fillArea
      blocks: 1
      groups: 0     
      maxUses: 1   
TERRAINS:
Code: [Select]
terrains:
  - name: STR_TERRAIN_PLACE_HOLDER_NAME
    script:  MAP_PLACE_HOLDER_NAME
    mapDataSets: 
      - BLANKS
      - ROADS
      - FRNITURE
      - URBITS_DAWN
      - CYBERWAREEXTRA
      - ASHENMOUNT
    mapBlocks:
      - name: BLOCK_PLACEHOLDER_NAME
        width: 40
        length: 40   
        height: 9
        groups: 0
thank you for reading this and for all the help  :)

Offline CrazedHarpooner

  • Sergeant
  • **
  • Posts: 38
    • View Profile
Re: Two Questions
« Reply #6 on: May 13, 2024, 11:07:24 am »
Let's see, in alienDeployments you define a mapsize of 40x40x9. Nothing odd there as I'm assuming you're ommiting the data with all the alien loadouts here for brevety.

However, mapScripts does have an issue with the example you're trying to implement. You haven't specified the 'size' parameter in the 'addBlock' which will default to 1 (or [1,1,0] to be precise). This means the map generator will attempt to locate and use mapBlocks of 10x10 from group 0, but as none of that size are defined in terrains, this part will fail and move on, now your 'fillArea' has no size defined either so the default is use again (size: 1), in this case looking for 10x10 mapBlocks within de defined list composed of solely block ID 1, but the only defined block is of size 40x40 and its ID would be 0, so this command fails to place any blocks too. Remember that mapBlocks are sequentially defined starting with 0.

If you were to add size: 4 to your 'addBlock' command it would now search for blocks of 40x40. Yes, 'size' uses blocks as meassurement, not tiles. For 'fillArea', if your map were larger for any reason, you need to make and define the corresponding blocks in terrais so it can use something to fill. For either case, I don't believe you need 'maxUses', moreso if the map is larger as you would be limiting 'fillArea' which could result in yet another not fully generated map.

MAPSCRIPT: (sample)
Code: [Select]
mapScripts:     
  - type: MAP_PLACE_HOLDER_NAME
    commands:
    - type: addBlock
      size: 4
      groups: 0     
    - type: fillArea

If you're absolutely sure your map will always be the same size as the one specified in the 'addBlock' command you could even ommit the 'fillArea' as this is mostly used, but not exclusively, to fill empty gaps that don't have anything placed in them.

Offline Barghum

  • Sergeant
  • **
  • Posts: 37
  • Doing my best to help (:
    • View Profile
Re: Two Questions
« Reply #7 on: May 13, 2024, 09:50:52 pm »
I have another problem

XCOM cant spawn despite spawn nodes being on the map

once again thank you for the help.

Offline Nord

  • Commander
  • *****
  • Posts: 1652
  • The Gate is open.
    • View Profile
Re: Two Questions
« Reply #8 on: May 14, 2024, 08:42:17 am »
You must place some tiles on your map, marked as x-com spawn nodes in MCD.(byte 59: targettype=1)

Offline Barghum

  • Sergeant
  • **
  • Posts: 37
  • Doing my best to help (:
    • View Profile
Re: Two Questions
« Reply #9 on: May 14, 2024, 07:59:22 pm »
I placed both nodes and tiles...

it's still broken.

Offline Nord

  • Commander
  • *****
  • Posts: 1652
  • The Gate is open.
    • View Profile
Re: Two Questions
« Reply #10 on: May 14, 2024, 09:10:39 pm »
You need at least one node with: "Node rank: 1:X-Com"

Offline Barghum

  • Sergeant
  • **
  • Posts: 37
  • Doing my best to help (:
    • View Profile
Re: Two Questions
« Reply #11 on: May 14, 2024, 10:36:53 pm »
pain

Offline Nord

  • Commander
  • *****
  • Posts: 1652
  • The Gate is open.
    • View Profile
Re: Two Questions
« Reply #12 on: May 15, 2024, 11:01:59 am »
Ok, i have no more easy advices. If you want, you can share your files here, maybe it will be easier with example.