aliens

Author Topic: [DONE][Suggestion] Terrain command as an array  (Read 9399 times)

Offline Finnik

  • Commander
  • *****
  • Posts: 508
  • Finnik#0257
    • View Profile
Re: [Suggestion] Terrain comand as an array
« Reply #15 on: January 13, 2020, 04:44:57 pm »
It is expected by the design and we would like to use it this way. Executions, as I understand, call corresponding method separately, so it rolls also separately. In turn, in my realization, for fillArea and addLine we roll once for all blocks added, and it is also what I wanted here.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9098
    • View Profile
Re: [Suggestion] Terrain comand as an array
« Reply #16 on: January 14, 2020, 11:59:43 pm »
Progress report: I think I understood the necessary background for vertical terrain and will be able to merge and test this feature within next 1-3 days.

Offline Finnik

  • Commander
  • *****
  • Posts: 508
  • Finnik#0257
    • View Profile
Re: [Suggestion] Terrain comand as an array
« Reply #17 on: January 15, 2020, 08:39:03 am »
Would it also use randomTerrains property? Or my additions are breaking something?

wcho035

  • Guest
Re: [Suggestion] Terrain comand as an array
« Reply #18 on: January 18, 2020, 01:55:37 pm »
Is this feature available with the current version of OXCE? Or is it still being tested?

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9098
    • View Profile
Re: [Suggestion] Terrain comand as an array
« Reply #19 on: January 18, 2020, 02:01:20 pm »
The changelog says quite clearly what is available in the current version of OXCE.

wcho035

  • Guest
Re: [Suggestion] Terrain comand as an array
« Reply #20 on: January 18, 2020, 02:25:52 pm »
I did read what is available in the current change log. However, seeing the screenshot from this thread, I just wish to confirm if this is being tested. A yes or no will do.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9098
    • View Profile
Re: [Suggestion] Terrain comand as an array
« Reply #21 on: January 18, 2020, 02:48:42 pm »
If the possible answers are only yes and no... then I am forced to say no.

wcho035

  • Guest
Re: [Suggestion] Terrain comand as an array
« Reply #22 on: January 18, 2020, 02:50:08 pm »
Thank you.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9098
    • View Profile
Re: [DONE][Suggestion] Terrain comand as an array
« Reply #23 on: January 18, 2020, 04:37:41 pm »
Would it also use randomTerrains property?

Yes.
And it was also renamed to just `randomTerrain`.

Or my additions are breaking something?

Sort of.
I wanted only one attribute (=the terrain vector) with 2 types of ruleset syntax. Not 2 different attributes.

Merged here: https://github.com/MeridianOXC/OpenXcom/commit/e0582e16acd70dd527ecaf5d64ccfbd3036a04ab

wcho035

  • Guest
Re: [DONE][Suggestion] Terrain comand as an array
« Reply #24 on: January 19, 2020, 07:03:41 am »
Feedback.

I have tested this new feature today. I found the distribution of the different terrain map mix uneven.

Is it possible we can determine the weight of distribution with the terrain mix?

For example.

  - type: Randomseaterrain
    commands:
    - type: addCraft
      groups: 1
      randomTerrain: [SEAFORESTX, CORAL]
    - type: addUFO
      groups: 1
      #UFOName: STR_DREADNOUGHTLAND
      randomTerrain: [SEAFORESTX, CORAL]
    #- type: addUFO
    #  groups: 1
    #  UFOName: STR_FLEET_SUPPLY_CRUISERLAND
    #  randomTerrain: [SEAFORESTX, CORAL]
    - type: addBlock
      randomTerrain: [CORAL, SEAFORESTX]
      executions: 12
    - type: fillArea
      randomTerrain: [SEAFORESTX, CORAL]

Coral appeared around 8 of the maps with seaforestx for 4.

Perhaps something like.

      randomTerrain: [CORAL, SEAFORESTX]
      randomweight: [50,50]

The weight determine the chances of occurrence or the mixture of different terrain map generated?

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11728
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: [DONE][Suggestion] Terrain comand as an array
« Reply #25 on: April 19, 2021, 07:16:06 pm »
I've just realized I'd never properly thanked you for adding this... So many thanks :)