Open tehKaiN opened 5 years ago
The funny thing is that special chars are working just fine in UI. My guess is that it's not rendered the same way, right?
EDIT: After a bit of digging I see that in-game font uses predefined set of characters bound into pre-baked font atlas texture (my guess is that it comes from S3 data files?). How about generating it dynamically using TTF font?
no you are looking at the legacy font drawer see LWJGLTextDrawer or AndroidTextDrawer
yes, I've discovered it this morning. :)
I've hacked together a bit of code to display '?' characters when trying to display a special char that is not in pregenerated font - It fixed some cases where text printing stopped display of rest of UI, but not all. Perhaps I've not patched all needed code. Nonetheless it confirms that it's special-chars related.
I'll dig into it a bit deeper and then try to scan locale for needed chars and generate font atlas from such charset as we discussed at some point on Discord.
I did it in 419b2e2
It is based on the character I found in the locale_* files and therefore not complete
But it's good enough, I guess, since it allows displaying all needed strings. That fixes this issue then. Do you want me to commit '?' replacement afterwards or do you think it's not needed after the fix?
its not necessary because AbstractTextDrawer:222 basically does what your commit would do.
okay, so we'll have to wait for a merge then ;)
I also add this:
"Harbour" is not displayed in the local language. Words are cut at special characters.
Version: 88ba0d98
@PaweX Harbor is not yet localized into Polish so JSettlers will just fallback to English instead of crashing or just showing nothing.
Polish localization can be found here: https://github.com/jsettlers/settlers-remake/blob/master/jsettlers.graphics/src/main/resources/jsettlers/graphics/localization/labels_pl.properties
The English one as a reference how to call and where to place which entry: https://github.com/jsettlers/settlers-remake/blob/master/jsettlers.graphics/src/main/resources/jsettlers/graphics/localization/labels_en.properties
Ok, I will do the translation.
P.S. how to change the language of the game? options.prp is ignored. By changing the language of SIII Gold Edition? If yes, how?
Also, what are the guidelines for translations? I think they should be as close to original retail as possible, but isn't that the problem for the project in terms of copyright? Perhaps they should be done from scratch instead of almost copy-pasting?
Words can't be copyrighted. If we copied all translation file and it's mechanism maybe that would be potentially a problem. But here is something new.
Yes, as close as possible to original. However with some corrections. Anyway JSettlers is a bit different. I only translate this what haven't been translated yet. I will finish it probably today. But there are some things that, very probably, will need to be updated in the future.
BTW. forester message can be sometimes very annoying. Can't it be switched off by default? Why to inform the player that forester doesn't have enough space for new trees? That's not important, especially when our settlement is already large.
Done. #787
@PaweX options can be set directly via the command line or via %APPDATA%.jsettlers.jsettlers or ~/.jsettlers/.jsettlers
Ok thanks, found it. Is there any command prompt in the game? (If not it would be nice to have it.)
There is nothing similar to a command prompt. What kind of commands are you thinking of?
For the in-game command prompt? Many, basically debugging commands (for single player), e.g:
Here are just examples. They act as cheats, so there should be a command that makes them available like "sv_cheats 1". Personally I would like to dynamically (during the game play) reveal the map, control all AI or friendly AI and become a different player.
Command prompt would be also for notifying about warnings and errors. I am thinking about command prompt like in all games based on Source Engine (or older engines, even like Quake's engine): Half_Life2, Portal, Counter Strike etc. - it was my favourite command prompt. Or command prompt like in some other games e.g. Minecraft. I didn't like the one from Settlers IV because it was mixing messages from a game mission, game messages (e.g. you've been attacked) and command prompt and chat.
It would be nice to place "change language" option in the main menu->settings.
--control-all lets you control all players and remove the fog of war via 'w'. Spells are not yet merged https://github.com/paulwedeck/settlers-remake/tree/priests Killing all soldiers/ships is already possible via control-all (just select all and click "kill") You could simply add a change language option to SettingsMenuPanel.java
Thanks for the commands, I was looking for them. I may try to add it, but I am not Java programmer, (I come from C++ background. I made just one Java program at school :) ). But if you say it's simple, I can have a look at it.
When special characters are about to be drawn, the game enters exception which stops further drawing of game view. It's easily reproducible in non-english locales (e.g. Polish)