daem-on / wtherion

A web-based Therion map editor
https://daem-on.github.io/wtherion/
MIT License
17 stars 2 forks source link

document imported from json and exported as th2 has no header #6

Closed CaverBruce closed 1 year ago

CaverBruce commented 2 years ago

Original th2 header

encoding  utf-8
##XTHERION## xth_me_area_adjust -2191.0 608.6357990999987 10720.0085744184 15035.2755905497
##XTHERION## xth_me_area_zoom_to 100
##XTHERION## xth_me_image_insert {3967.638503937 1 1.0} {8550.7240157473 4.5} ptopoHawkes/4-Hawkes_p.xvi 0 {}
##XTHERION## xth_me_image_insert {2954.2132988292997 0 1.0} {8013.663358151501 1.6} ptopoHawkes/2-Hawkes_p.xvi 0 {}
##XTHERION## xth_me_image_insert {1823.89361379 1 1.0} {8670.149380629999 1.4} ptopoHawkes/1-Hawkes_p.xvi 0 {}
##XTHERION## xth_me_image_insert {3347.4742519699994 1 1.0} {9198.117086614 3.18} ptopoHawkes/3-Hawkes_p.xvi 0 {}
scrap 3-HawkesPlan-s1 -projection plan ...

Start of exported th2 with no header (in error)

scrap 3-HawkesPlan-s1 ...

This th2 will not open in XTherion

daem-on commented 2 years ago

I understand the problem with the image_insert headers if you're working in both wtherion and XTherion, I'll try to create a fix.

Otherwise these headers are completely unnecessary, and a lack of them shouldn't stop XTherion from opening the file. What error exactly does XTherion give? Or you can just upload the error causing TH2 file.

CaverBruce commented 1 year ago

For the case of th2 imported by WT, and then saved and exported to th2, this produces a valid file that can be opened by XTherion. Not exactly sure if this is the scenario described in the original post, as in it I mention json. for now I assume this can be closed.