aliens

Author Topic: Question about save file  (Read 3268 times)

Offline Duffer

  • Squaddie
  • *
  • Posts: 2
    • View Profile
Question about save file
« on: August 20, 2014, 05:29:31 pm »
Hi.

Sorry if i post my question in the wrong forum.

I have a question about the savefile.
I want to create a little tools for savefile in Delphi, but when i'll go to look the structure of this one, there is some weird things.
Example for Soldier, sometimes, the block of data start by -rank: 1 and the next time it start by -id: 19.

So my question, is how this file is create. In my opinion generally there is only one data structure.

Code: [Select]
      - rank: 1
        craft:
          lon: 0.2933465887212589
          lat: -0.281480073230845
          type: STR_AVENGER
          id: 1
        gender: 0
        look: 2
        missions: 38
        kills: 32
        psiTraining: true
        armor: STR_FLYING_SUIT_UC
        improvement: 20
        equipmentLayout:
          - itemType: STR_HEAVY_PLASMA
            slot: STR_RIGHT_HAND
            ammoItem: STR_HEAVY_PLASMA_CLIP
        id: 17
        name: Tuan Yao
        initialStats:
          health: 255
          bravery: 255
          reactions: 255
          firing: 255
          throwing: 255
          strength: 255
          psiStrength: 255
          psiSkill: 0
          melee: 255
          tu: 255
          stamina: 255
        currentStats:
          tu: 255
          stamina: 255
          health: 255
          bravery: 255
          reactions: 255
          firing: 255
          throwing: 255
          strength: 255
          psiStrength: 255
          psiSkill: 20
          melee: 23
- id: 19
        name: Arikiwi Mio
        initialStats:
          tu: 255
          stamina: 255
          health: 255
          bravery: 255
          reactions: 255
          firing: 255
          throwing: 255
          strength: 255
          psiStrength: 255
          psiSkill: 0
          melee: 255
        currentStats:
          tu: 255
          stamina: 255
          health: 255
          bravery: 255
          reactions: 255
          firing: 255
          throwing: 255
          strength: 255
          psiStrength: 255
          psiSkill: 24
          melee: 255
        rank: 1
        craft:
          lon: 0.2933465887212589
          lat: -0.281480073230845
          type: STR_AVENGER
          id: 1
        gender: 1
        look: 3
        missions: 43
        kills: 7
        psiTraining: true
        armor: STR_FLYING_SUIT_UC
        improvement: 24
        equipmentLayout:
          - itemType: STR_HEAVY_PLASMA
            slot: STR_RIGHT_HAND
            ammoItem: STR_HEAVY_PLASMA_CLIP

Offline Falko

  • Commander
  • *****
  • Posts: 802
    • View Profile
Re: Question about save file
« Reply #1 on: August 20, 2014, 05:36:45 pm »
the data structure is in yaml https://www.yaml.org/spec/1.2/spec.html
there seems to be a library for delphi here https://bitbucket.org/OCTAGRAM/delphi-yaml/wiki/Home

Offline Duffer

  • Squaddie
  • *
  • Posts: 2
    • View Profile
Re: Question about save file
« Reply #2 on: August 20, 2014, 07:46:22 pm »
Thanks for your answer
I think i'll go to stop my app because Yaml give me a headache.