Open Ande2004 opened 11 months ago
这是由于UTF8-with BOM的编码导致了STATES =
变成了 \uFEFFSTATES=
, 因此直接所有states无法读取, 闪退
在这个分支里尝试添加了注释, 以避免这种问题再次出现
这种问题在1.5版本之前均未报告, 耐人寻味
此外由于P社似乎在on_action里添加了许多的关于国家tag的代码, 大部分都有检查是否存在的语法糖, 但是有一些仍然是写定的c:TAG = , 在 scripted_effects里也有类似的情况, 因此在修改地图以至于让一些国家消失的时候请谨慎修改, 这些问题在其他只修改本编辑器的相关文件的方式依然出现。
Due to the UTF8 with BOM encoding, STATES =
turns to \uFEFFSTATES=
, which caused crash.
In [this branch]](https://github.com/Linnest2020/Vic3-mapdata-editor/commit/6ba8b24b16de55a10b09ea3fe260db08ea590d9b), I attempt to add quotes to avoid such problems occur.
I never heard the report of such problem before version 1.5, I dont understand.
Further, PDX adds many hardcodes about the country tags in on_action. Mostly they are the syntax sugars to check whether the country tag exists, but there are serval tag are merely 'c:TAG = '. Simliar situation occurs in scripted_effects. Therefore, keep caution during editing the map and make some country disappear. Such problems are also occur by the other methods which just editing the files what my editor edit.
使用地图编辑器制作地图mod,装载mod后无法打开游戏国家选择界面,闪退+崩溃报告,游戏版本1.5.9