scpcb-ue-my icon indicating copy to clipboard operation
scpcb-ue-my copied to clipboard

Use Json instead of Ini

Open ZiYueCommentary opened this issue 1 year ago • 9 comments

  • [x] SCP-294.ini
  • [ ] NPCBones.ini
  • [x] 1499chunks.ini
  • [x] loading_screens.ini

For designing of ini file, loading_screen.ini is unable to be uploaded to ZiYue Weblate, because we can't modify the section.

We can re-design the architecture of loading_screen.ini, but it's better to use json. I will try to make a json reader to make it.

ZiYueCommentary avatar May 29 '23 14:05 ZiYueCommentary

This may be a bad idea.

Currently, the configs of the game fit with ini. If we change them to json forcibly, we can get more codes and bigger, complex configurations only.

Most configs are not too complex to fit json, except subtitles. But subtitles also takes way more space - the size of subtitles.json is 150% of subtitles.ini.

ZiYueCommentary avatar Oct 23 '23 16:10 ZiYueCommentary

We can rewrite loading screens then. Just make something similar to achievements system

Jabka666 avatar Oct 24 '23 14:10 Jabka666

Also I think we should return thinking about IniControler for subtitles. Using a lot of dlls isn't a good practice

Jabka666 avatar Oct 24 '23 14:10 Jabka666

Also I think we should return thinking about IniControler for subtitles. Using a lot of dlls isn't a good practice

The latest subtitle system is too complex to use ini, even subtitles.ini is not structured like ini at all.

And about too many DLLs - I can merge RapidBson into BlitzToolbox.dll but it helps nothing, instead, this may cause more confusion. If we need it, just leave it there.

ZiYueCommentary avatar Oct 24 '23 14:10 ZiYueCommentary

These files are that I think it is worth converting to json:

  • [ ] SCP-294.ini
  • [ ] NPCBones.ini
  • [ ] loading_screens.ini

ZiYueCommentary avatar Oct 24 '23 14:10 ZiYueCommentary

loading_screens.json and SCP-294.json are not good for backward compatibility in translating. Requires further discussion.

ZiYueCommentary avatar Dec 07 '23 12:12 ZiYueCommentary

Here are two solutions:

  1. Use json for loadingscreens: More obvious file structure, won't be available in ZiYue Weblate.
  2. Use ini for loadingscreens: Can be available in ZiYue Weblate.

Both of them are not considering backward compatibility, so they are for future versions only.

ZiYueCommentary avatar Dec 08 '23 12:12 ZiYueCommentary

What about NPCBones.ini?

Jabka666 avatar May 31 '24 13:05 Jabka666

What about NPCBones.ini?

Obviously it can be converted to. But the complexity of my design made it is not worth to do this. It can and should be replaced by jsonc files, but I don't know how to make this perfectly.

ZiYueCommentary avatar May 31 '24 14:05 ZiYueCommentary