fechan / civ5map-tools

Tools for reading Civilization 5 map files
GNU General Public License v3.0
0 stars 1 forks source link

Update ksy to include new discoveries #2

Open landall opened 4 years ago

landall commented 4 years ago
  - id: maybe_lua_params
    doc: |
      I don't know what's in here. It accompanies the lua stuff, so maybe
      it defines options that passed into the lua file or something?
    size: 36
    if: version == 0xC
  - id: lua_script_len
    type: u4
    if: version == 0xC
  - id: lua_script
    type: null_terminated_str
    size: lua_script_len
    if: version == 0xC

This part is wrong. This is the situation that there is only Global Mod Data. If no Mod Data, this part is 0 bytes. If there is any Plot Data, this part is much complex and I cannot guess out how long it is.

fechan commented 4 years ago

That's a good catch. Do you have examples of civ5maps that fit the patterns you described?

landall commented 4 years ago

i am updating my discovery here. https://forums.civfanatics.com/threads/civ5map-file-format.418566/

Some part of it is guessed by decompiled the World Builder. Some part is guessed by saving a map after each modification.

fechan commented 4 years ago

Mod data section is now corrected https://github.com/fechan/civ5map-tools/commit/548ae02a8fda01d0b662d6d9e102fd4347e2b58c I completely screwed up the implementation, so I'm starting fresh.

Mod data section is now corrected (for real this time!) https://github.com/fechan/civ5map-tools/commit/272b089751804966ae35100f3b530087a5fa6fc0

I'm going to leave the issue open while I try to implement some of the new discoveries