Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Changes in Command Patterns

A topic by Alinamethyst created Jan 04, 2024 Views: 259 Replies: 10
Viewing posts 1 to 3

I know, I know, LocJam 2023 is officially over, however, I would still like to finish and (unofficially) upload my localised version of the game. For that, I would like to change one thing, and since I am not a programmer, I thought asking for help here might be worth a try.

So, the target language for my version is German.

In Italian and English, you type the commands in the imperative: "verb + noun", for instance: "take parachute"

In German, that would be possible as well: "nimm den Fallschirm". However, there are quite a few compound verbs, such as "weglegen" for "drop", which would result in: "lege den Fallschirm weg".

I just can't find a way that this could work, so instead I would like to swap the verb and the noun, which would result in the compound verbs to not be split: "Fallschirm weglegen".  The game just doesn't do it automatically, it cares very about the pattern of verb + noun, and I don't know how to change that so it would actually align with German grammar.

In my screenshot, I used "take parachute". The preferred one ("Fallschirm nehmen") is not recognized ("Wie?"). Please note that this is not supposed to be a discussion about opinions on German grammar.

PS: Just before I wanted to upload this post, I noticed that the input also doesn't recognize the umlauts (ä, ö, ü) as well as the ß (eszet, or sharp s). The latter one is fairly easy to fix, just change every ß in the commands to ss, but typing ae, oe and ue instead of ä, ö ü does not seem very user-friendly.


(1 edit) (+1)

Thank you for your message and no worries. Deadlines aren't really strict in this event.

Federico might pitch in about the sentence ordering thing.

About the accented letters, there is another thread on the topic but the short version is that the game engine can't and won't parse accented letters internally, but can display them to the user.

In other words, if you need players to take the rotzlöffel, you need to register it internally as rotzloffel without any accents. When the player types "nimm den Rotzlöffel" it will be parsed as "nimm rotzloffel", matched correctly with "rotzloffel" and you can then trigger the line "Rotzlöffel genommen, lecker!" accents and all, and players will be none of the wiser.

Not sure how that works with the ß, maybe check if it counts as a kind of accented s or it's just its own thing. Hope it helps!

Thank you for your response!

About the accented letters: I can't even type them in. When I press any of them on my keyboard, they don't show up in the input line and are treated as though they were missing when I press enter.

As I mentioned for the ß, it's not that much of a problem because it is commonly known for German-speaking people that it can easily be replaced with ss, especially since the capitalized ß (= ẞ) is not used at all and all inputs are displayed in capitalized letters. Swiss German doesn't even use ß (plus, Swiss don't have it on their keyboard) but the alternate spelling instead. However, it would be more flexible for the players to have both options. I guess I'd have to tweak the RegEx for that? I usually try to avoid anything with RegEx, but I guess it can't be helped here.

About the compound words, I've also asked an acquaintance of mine. If he finds something that could help, I'll also post it here.

(1 edit)

I've checked and it seems to be an issue with the machine you are currently using. Maybe try working on a different computer to pinpont the issue? For specifically

-Setting my keyboard in German, all accented letters diplayed correctly on the input line
-The game engine parsed them correctly (provided that they are encoded without accents like we said)
-Whenever I pressed ß it got automatically replaced with SS, sidestepping the issue entirely (but you can set the game to recognize both as shown)

Hope this help, have fun




It is indeed an issue with the software I'm using, thank you for that hint.

 I've just checked it, not with a different computer but with a different Internet browser. My default browser is LibreWolf, which is a Firefox derivate, but when I've just checked it on both Firefox and Brave, the input worked. I hadn't thought that that could even be a possibility because the inputs work on all other websites – so why wouldn't they work with a text adventure? (rhetorical question)

Hi..

can you share your code with me so I can have a look and find a fix for that?

Federico

Hi! About the syntax issue: I've asked an acquaintance of mine, and he fixed it by changing the Parser.js file. Now it accepts both the original "verb + noun" and the intended "noun + verb".

As for the issue with the input of accented letters and ß, I figured out it was an issue with my Internet browser. I explained it in another response, but long story short: My default browser is LibreWolf, a derivate of Firefox, but when I tested on the original Firefox and on Brave, the input works as intended.

If you still want to look at my code, I've uploaded the ZIP with my version on Tresorit to download: https://send.tresorit.com/a#ZJR0CtKUFiHO415_IyqpOg

Perfect! :)

Hello, I am curious to see how you solved the word order problem, but it seems the link to your ZIP file has expired.  Could you possibly upload it again? (Some Japanese groups are still working on their localizations..

(1 edit)

Hello! I am no programmer, so I had an acquaintance of mine fix it. Now, the game accepts both the original "verb + noun" and the intended "noun + verb". Although my version still needs some tweaks, I have paused my work on the project because of university exams.

Of course, I can create another link: https://send.tresorit.com/a#OS3-qqQLFD9-604MuAqQ6Q

It automatically expires after 7 days, according to Tresorit Send.

Edit: I should mention that my acquaintance edited the Parser.js file in the subfolder "IFEngine > js".

Thank you! This is very helpful!