Can you please send me the plugins.js file? I'll try to find where the problem is.
ODW - Multi-Language System Plugin
● ARCHIVED · READ-ONLY
-
-
maybe your parameters of the languages?
in case 1 parameter is empty, this can cause issues as well, or missing languages.
depending what you could set, so it can be useful to see what you miss there.
probably mainly the struct of the parameter "languages", because I think there
is a probably the issue coming from of missing token 0 (which I had before with
an array), so I think there might be in issue there. -
Here are the screenshots of the Languages that I had before this bug showed up, alongside the plugins.js file:
-
At first glance, I don't see anything in the plugin's settings that would be a problem. What's more, I loaded the plugins.js file on a new project, and after disabling all Visustella plugins and running the game with just my plugin, everything worked fine.
Would it be possible to test your game with just the ODW_MultiLanguageSystem plugin active and see if your game launches normally? There will of course be possible errors due to inactive Visustella plugins, but in theory, the error you're experiencing shouldn't be present. And if it's OK, try launching the game by activating the Visustella plugins one after the other.
Finally, taking a closer look at the plugins.js file from Notepad++, I detected this special character in the VisuMZ_1_SkillsStatesCore plugin settings. Is this normal?
Edit: the "6/MSP" code appears 4 times in the VisuMZ_1_SkillsStatesCore plugin settings. In the search box of Notepad++, it appears as a blank space... and in VSCodium (VS like), as the character U+2006. -
Yeah, without any VS plugins, it loads normally, and I think that I found the culprit - OptionsCore! I will need to check deeper into what mess I did there to get the "language" option to work, and why it stopped working. Also, that mysterious character appears to be in a place related to editable JS of the plugin's options, so I don't see anything too wrong with it.
-
Ok, let me (us) know the results of your investigation.
I see, no problem then. It seems to be just another blank space.Also, that mysterious character appears to be in a place related to editable JS of the plugin's options, so I don't see anything too wrong with it. -
BTW, here is the raw string for the whole language option, which evidently is the little nightmare that makes the game refuse to load:
{"Symbol:str":"languageIndex","Icon:num":"20","TextStr:str":"Untitled","TextJS:func":"\"return ODW.MLS.getOption();\"","Accessibility":"","ShowJS:func":"\"// Return Boolean\\nreturn true;\"","EnableJS:func":"\"// Return Boolean\\nreturn true;\"","ExtJS:func":"\"// Return Value\\nreturn 0;\"","Functions":"","DrawJS:func":"\"// Declare Constants\\nconst symbol = arguments[0];\\nconst index = arguments[1];\\nconst title = this.commandName(index);\\nconst rect = this.itemLineRect(index);\\nconst quarterWidth = rect.width / 4;\\nconst halfWidth = rect.width / 2;\\nconst value = this.getConfigValue(symbol);\\n\\n// Draw Command Name\\nthis.resetFontSettings();\\nthis.changePaintOpacity(true);\\nthis.drawTextEx(title, rect.x, rect.y, halfWidth, \\\"left\\\");\\n\\n// Draw Status Text\\nconst en = 'English';\\nconst pl = 'Polski';\\nthis.changePaintOpacity(!value);\\nthis.drawText(en, rect.x + halfWidth, rect.y, quarterWidth, \\\"center\\\");\\nthis.changePaintOpacity(value);\\nthis.drawText(pl, rect.x + halfWidth + quarterWidth, rect.y, quarterWidth, \\\"center\\\");\"","ProcessOkJS:func":"\"// Declare Constants\\nconst symbol = arguments[0];\\nconst value = this.getConfigValue(symbol);\\n\\n// Perform Actions\\nthis.setConfigValue(symbol, !value);\\nthis.redrawItem(this.findSymbol(symbol));\\nthis.playCursorSound();\"","CursorRightJS:func":"\"// Declare Constants\\nconst symbol = arguments[0];\\nconst value = this.getConfigValue(symbol);\\nconst lastValue = value;\\n\\n// Perform Actions\\nthis.setConfigValue(symbol, true);\\nthis.redrawItem(this.findSymbol(symbol));\\nif (this.getConfigValue(symbol) !== lastValue) {\\n this.playCursorSound();\\n}\"","CursorLeftJS:func":"\"// Declare Constants\\nconst symbol = arguments[0];\\nconst value = this.getConfigValue(symbol);\\nconst lastValue = value;\\n\\n// Perform Actions\\nthis.setConfigValue(symbol, false);\\nthis.redrawItem(this.findSymbol(symbol));\\nif (this.getConfigValue(symbol) !== lastValue) {\\n this.playCursorSound();\\n}\"","Data":"","DefaultJS:func":"\"// Declare Constants\\nconst config = arguments[0];\\nconst symbol = arguments[1];\\n\\n// Perform Actions\\nConfigManager[symbol] = false;\"","SaveJS:func":"\"// Declare Constants\\nconst config = arguments[0];\\nconst symbol = arguments[1];\\n\\n// Return Value\\nconfig[symbol] = ConfigManager[symbol];\"","LoadJS:func":"\"// Declare Constants\\nconst config = arguments[0];\\nconst symbol = arguments[1];\\n\\n// Return Value\\nConfigManager[symbol] = config[symbol];\""}
I'll try to recreate it from scratch to see if that helps. -
Here are the instructions for integrating the language option into the Visustella plugin (extract from my plugin). The last time I modified it was when my plugin was launched in 2021... perhaps there are some adaptations to be made with more recent updates to the Visustella plugin.
SpoilerCode:*------------------------------------------------------------------------------ * You use VisuMZ_1_OptionsCore plugin? *------------------------------------------------------------------------------ * * Follow the instructions below to configure the language option in your game. * Only the parameters to be changed are shown. The others can remain at their * default values. * * Symbol: languageIndex * - JS Text: * return ODW.MLS.getOption(); * Functions: * - JS Draw Option: * // Declare Constants * const index = arguments[1]; * const title = this.commandName(index); * const rect = this.itemLineRect(index); * const halfWidth = rect.width / 2; * // Draw Command Name * this.resetFontSettings(); * this.changePaintOpacity(true); * this.drawTextEx(title, rect.x, rect.y, halfWidth, "left"); * // Draw Status Text * this.drawText(this.statusText(index), rect.x + halfWidth, rect.y, halfWidth, "center"); * - JS Process OK: * // Perform Actions * this.processOk(); * - JS Cursor Right: * // Perform Actions * this.cursorRight(); * - JS Cursor Left: * // Perform Actions * this.cursorLeft(); * Data: * - JS Default Value: * // Declare Constants * const symbol = arguments[1]; * // Perform Actions * ConfigManager[symbol] = 0; * -
So, the issue is probably that I just copied some bits from that code, stuck it into OptionsCore and it worked... until now :hswt: Now that I went through that tutorial perfectly, the game works again, with my only nitpick being that the "Language" option isn't consistent in the form of choosing the option compared to other options:
But, still, it's better than the game now working at all. Thank you for your help! :kaothx:
(BTW, I had to use the [MEDIA] tag because I couldn't attach the screenshot due to an unknown error) -
I'm glad to hear it's working now. There's certainly a better way to code the language options in the menu to be consistent with the rest, but that's beyond my scope.
Good luck with the rest of your project, and stay tuned if there are any more "bugs" with my plugin. -
Hi, I feel like I must be doing something wrong. But...
When I set the game's language to something other than the default and then quit out of the game, once I start it up again... the strings for the default language will load, despite the fact I've set the language to something else. Looking in the options, I can see it kept the option of which language to go with, but all the text still uses the default language until I manually set it back.
Surely there's a way to ensure the correct language loads when I start the game, right? What am I doing wrong here?
And yes, I've tested this without any other plugins - I've even made a brand new project containing just this plugin to be absolutely sure. Issue persists. -
Hi @Linatic
Normally the options are saved in the save folder. Did you have deleted the contents of this folder before restarting the game test? One way of checking is to change the BFM volume, for example, and then see if this setting remains the same when the 2nd test is run.
Also, when you press F8 or F12 after starting the game test, do you get an error message in the console? -
Tested it with and without deleting the contents of the save folder, issue persists. To reiterate: the game uses the default language's text strings upon loading even when the game's language is set to something else, like so:
screenshot
(The above screenshot is using VisuMZ OptionsCore, but the issue persists even without it)
Changing any other option works. The option remains changed, and the change is applied next time the game starts.
F8 and F12 don't bring up any errors. -
If you're referring to the language name displayed in the options, this is normal and intended "by default". In good web practice, if you don't use the language codes (e.g. EN, FR, DE...), you display the language name in its original language form. In terms of UX, this makes it easy for the user to identify its own language and select it. And so I designed it for this plugin.
If, however, you wish to translate this text into the active language, all you need to do is code it as text to translate ${} in the plugin parameters. It should work (although I'm using the conditional tense as I don't have access to my PC at the moment to test this... and I can remember if I ever tested it :eswt:).
At least I hope that's the problem you're having. -
It's not. The language in the screenshot is supposed to be set to Brazilian Portuguese. That's the setting I picked before I closed the game.
However, despite the setting being Brazilian Portuguese, as you can see by the rest of the text in the screenshot, everything's in English. The game goes back to English every time the game boots up, completely ignoring what the actual language selected is. -
Hello @Linatic
Please can you send me the plugins.js file, and one of your data JSON files, for eg. system.json. -
Sorry for taking so long. These should suffice for troubleshooting, I think.
Edit: Just a question. When inputting the language code, does it need to be a valid ISO format code? I say this because it turns out there's no separate ISO codes for say, European Portuguese versus Brazilian Portuguese. This makes localizing the game into more "granular" languages like these two somewhat difficult. The zip I included uses the standard code for Portuguese but in my final game I would like if European Portuguese and Brazilian Portuguese were separate (same for European Spanish vs Latin-American Spanish, Parisian French vs Quebecois French, etc) -
Hi @Linatic
Thanks for sharing. As it happens, I haven't discovered anything that would cause the plugin not to work. Here are the screenshots to prove it.
TestTerms tab
Title in English
Title in Portuguese
If you want every text to be translatable in your game, you must "code" with ${} all the texts you have in the various editor tabs (some examples below), just like the messages displayed in-game.
As for the language code, like the label, it's only useful for display purposes, in the options for example. It's up to you to use the format you prefer. But if you want to differentiate between the different types of Portuguese, the easiest way is to use the label that will be clearer and more comprehensible to your players. -
Did you set the language to portuguese, quit out of the game, then booted the game up again?
Edit: here's a video of my problem because I feel like I'm not getting myself through??? I can't be the only person this is happening to, right????
-
Thanks for sharing the video, I finally understood that your problem was related to the restart of the game (and not once launched). And indeed, there's a bug that I'll have to fix.
In the meantime, you can use the previous version in the ZIP below. Between v1.0.2 and v1.0.3, only the text loading process has changed due to this issue, but not the rest. So you can continue to use this v1.0.2 for your game until v1.0.4 arrives.
Edit: v1.0.4 is now available.