Open TokcDK opened 4 years ago
The configuration file in this plugin has always been a bit pedantic. The library used for .ini file handling considers all characters significant, even white space. This is true for both key and value, which means that in your example case:
"Endpoint "
means." GoogleTranslate"
means.Which is why it creates a new valid configuration line, as though the line you changed did not exist.
So why this library? Well primarily because when I initially made the first version of the plugin available (1.0.0), back when Koikatsu chara maker was first released, I thought UnityInjector was far superior to IPA, so I aligned this library more closely to UnityInjector by using its configuration library (ExIni.dll
). This was easy because the library was not tightly coupled to the plugin manager (UnityInjector) itself, whereas the configuration system in IPA was.
Fast-forward a couple of years and who cares about UnityInjector and IPA now that we have BepInEx? Well, the BepInEx configuration system is certainly a whole lot better, but like IPA, it is tightly coupled to BepInEx itself, which is really a shame, as it really doesn't need to be. But that is kind of a problem for this plugin as it can be and indeed is used with many different plugin managers.
I could of course just toss ExIni.dll
and find a better library that is compatible with Unity's old Mono to handle this, but I am not sure effort required to do this is worth the hassle. ^_^
As such, a fix for this particular problem is probably not right around the corner, but thanks for the report. :)
Understood. As I known ExIni has git repository and can be edited for XUA if need. I also used Exini some time but found there several problems when was impossible to read some parameters and other issues and after just started use stable version of iniparser.
Randomly found some problem when XUAT creating duplicates of parameters in ini.
For exaple I changed parameter
Endpoint=GoogleTranslate
toEndpoint = GoogleTranslate
and with this spaces it still will be valid ini but XUAT when will be executed in game will not chane but will createEndpoint=GoogleTranslate
right afterEndpoint = GoogleTranslate
and section will be looking like this: