aliens

Author Topic: [Battle Generator] Battle.cfg -> issue with facilities section ? [NO ISSUE]  (Read 3549 times)

Offline Aldorn

  • Commander
  • *****
  • Posts: 750
    • View Profile
While testing some new facilities design using battle generator (also with "Base Defense" selected), I noticed some strange behaviour

I don't know if it's an issue or not, I just warn about it

Also, adding a section "facilities:" (see below) inside Battle.cfg works well
Spoiler:
  facilities:
    - type: STR_HANGAR #HG1
      x: 0
      y: 0
    - type: STR_HANGAR #HG2
      x: 2
      y: 0
    - type: STR_HANGAR #HG3
      x: 4
      y: 0
    - type: STR_ACCESS_LIFT #ACC
      x: 0
      y: 2
    - type: STR_LIVING_QUARTERS #LQ1
      x: 0
      y: 3
    - type: STR_SECURITY_ROOM #SRO
      x: 1
      y: 3
    - type: STR_LABORATORY #LAB
      x: 2
      y: 3
    - type: STR_WORKSHOP #WOR
      x: 3
      y: 3
    - type: STR_LIVING_QUARTERS #LQ2
      x: 0
      y: 4
    - type: STR_SMALL_RADAR_SYSTEM #SRS
      x: 1
      y: 4
    - type: STR_SECURITY_FORTRESS #FOR
      x: 2
      y: 4
    - type: STR_GENERAL_STORES #STO
      x: 0
      y: 5
    - type: STR_GENERAL_STORES #STO
      x: 1
      y: 5

But after execution, Battle.cfg is updated (ok)
After update, "facilities:" section becomes weird
The most surprising is it seems to work anyway

Also after execution, it is like below
Spoiler:
  facilities:
    - y: 0
      x: 0
      type: STR_HANGAR
    - x: 2
      type: STR_HANGAR
      y: 0
    - y: 0
      x: 4
      type: STR_HANGAR
    - y: 2
      x: 0
      type: STR_ACCESS_LIFT
    - y: 3
      x: 0
      type: STR_LIVING_QUARTERS
    - y: 3
      x: 1
      type: STR_SECURITY_ROOM
    - y: 3
      x: 2
      type: STR_LABORATORY
    - y: 3
      x: 3
      type: STR_WORKSHOP
    - y: 4
      x: 0
      type: STR_LIVING_QUARTERS
    - y: 4
      x: 1
      type: STR_SMALL_RADAR_SYSTEM
    - y: 4
      x: 2
      type: STR_SECURITY_FORTRESS
    - type: STR_GENERAL_STORES
      x: 0
      y: 5
    - type: STR_GENERAL_STORES
      x: 1
      y: 5

Or is it just that type, x and y may be written in any sequence ?

« Last Edit: July 22, 2014, 07:33:35 pm by Aldorn »

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: [Battle Generator] Battle.cfg -> issue with facilities section ?
« Reply #1 on: July 22, 2014, 07:22:39 pm »
Yaml-cpp doesn't save map contents in a fixed order. This doesn't affect the game, as it's the key names that matter ("type", "x", "y", etc), not the order.

Offline Aldorn

  • Commander
  • *****
  • Posts: 750
    • View Profile
Re: [Battle Generator] Battle.cfg -> issue with facilities section ?
« Reply #2 on: July 22, 2014, 07:33:04 pm »
Nice, thanks