News:

A forum for users of LackeyCCG

Main Menu

Multiple languages for a plugin

Started by Seth, November 02, 2011, 03:33:11 AM

Previous topic - Next topic

Seth

Hi there. We're currently building a plugin for the Wakfu TCG, which is originally in French but is being fan-translated (with authorization) to English. Our main purpose is to make the game playable by English speakers although an English version of the game doesn't exist, but since we have all the necessary resources, we'll probably want to allow French players to use the plugin as well. So I was wondering if we should make two separate plugins or if you have some tricks to suggest to use only one for both languages.

I'm expecting the former, if only for the phase names, zones and such. In that case, would it be too much clutter to add both versions to the plugin finder (especially considering that it's a very niche game)?

Trevor

#1
Do you expect french speaking people and english speaking people to be able to play against each other? I don't think that's a good idea for the simple reason that they couldn't communicate, if there was a rules dispute for example.

There are a number of ways to do multi-language plugins.

If you want them to be playable with each other, the card names and set names must be the same. Suppose you had a card named "Dog" from set "first". You could set the card's name to "Dog (Chienne)" and it's set to "first(premier)", or something similar. That way, both languages could understand the cards, and they would be still named the same. You could do the same with phase names, and other things, but I think everything else besides card and set names in a plugin can be language specific. But again, you run the risk of encouraging people who can't communicate to play a game, which can be frustrating.

Another way to go is to have the entire plugin in one language, english for example. And have a .../french/updatelist.txt autoupdate URL to download different card images. So you would be playing in the same language plugin, but one player may see french images while another may see english images.
Or you could do a similar thing, but instead of (or in addition to) downloading different images, you could have them download a card data file with french text instead of english, so on mouse over you could see the language that you spoke. Again, you still would need to keep the card names and set names consistent throughout the different versions, but that would work so you could have the text box in a specific language. Make sure the cards are listed in the same order in each of the plugin's card data files.

There's a lot of different things to do, but nothing is really a perfect solution. I haven't thought long and hard and devised a great method for multilingual support for a single plugin. You can't do it with real cards, so I haven't put a ton of effort into letting lackey do it. Plus, I think it encourages miscommunication. If you have any suggestions of things to improve lackey, with all I've said in mind, please let me know your ideas.

Do you expect the players to be bilingual every time you play? If not, there is the communication problem. If so, then it defeats the purpose of bothering to make more than one language in the plugin.

The simplest way of course is to do a plugin for each language and have them not compatible. I'm fine linking both if you make them. I suggest you name them something like wakfuenglish and wakfufrench, or something like that so people can tell by the plugin name alone.

Seth

Quote from: Trevor on November 02, 2011, 05:05:51 AMDo you expect french speaking people and english speaking people to be able to play against each other? I don't think that's a good idea for the simple reason that they couldn't communicate, if there was a rules dispute for example.
Oh, of course not. I was mostly asking in case you wouldn't like the idea of hosting two versions of a single TCG, and to see if it would be easier than managing two separate plugins.


Quote from: Trevor on November 02, 2011, 05:05:51 AMAnother way to go is to have the entire plugin in one language, english for example. And have a .../french/updatelist.txt autoupdate URL to download different card images.
If we choose this option, I suppose we might as well put an alternate plugininfo.txt and carddata.txt in there as well to have the phases and functions in French as well. Would you prefer that to having two plugins in the game finder?

Quote from: Trevor on November 02, 2011, 05:05:51 AMIf you have any suggestions of things to improve lackey, with all I've said in mind, please let me know your ideas.
Well, I guess most of the things that come to mind would be too much effort considering there probably isn't that much demand for alternate languages (although I haven't been around so I could be wrong about that). I think the main issue for me at the moment is non-qwerty keyboards, which I have read is on your to-do list.

Trevor

I think the best solution is to just have 2 separate and distinct plugins. I don't see a problem in listing it twice, especially if they are named in such a way that a person wouldn't accidentally install the wrong one. Also, make a website and explain that there are 2 versions and they are not compatible.

It looks like a nice CCG.

Seth

Yeah, I can't say much about the mechanics since I've never played CCGs myself, but if nothing else, the art and flavor text are great if you're into the games/series/comics. A friend is dealing with the card data, so I don't know when the final plugin will be ready but I'll let you know when it's up on the website. Thanks for your help.

Seth

My tech-savvy partner hasn't been able to register here (I had a hard time as well, maybe you should look into the account activation process), so I'll ask a couple questions for him.

Foreword: We use an online interface + database to manage the cards' data and generate images with the new text over the original scans. This means that when we find a typo on a card, for example, we just log in, edit the text, save, and the card's image is re-generated on the server. Given how convenient this is, we were planning to generate our lists of cards for the plugin(s) automatically, among other things.

1. We would like to know how the checksums for update.xml are generated, so that our system could update them automatically every time we make a change, instead of us having to manually re-run it under LackeyCCG every time. Is that possible?

2. Since the card images will be changing, is there a way to tell LackeyCCG to redownload certain cards? Or will people have to delete their entire folder when there's an update to re-create their library? I understand that it's not something that comes up for most games, but for us and games that are under development, maybe you could have an extra file (or list in updatelist) telling the program to delete and redownload certain files?

Thanks again for your time :)

Trevor

There are a number of ways of getting people to download the new card image. I suggest using an uninstall.txt or changing the names of the files listed in the card data file.

Here is the code for making a checksum. As you can see, it's not very complicated at all. I actually don't recall writing it, and if I were to write it again I'd probably do it a different way. But since it would make things not backwards-compatible, I've always just kept it the same.

Quoteint GetCheckSumFromFile(char PathNamePart[])
{
   FILE* fp = FOpen(PathNamePart,"rb");
   if(fp==NULL)
      return 0; // If there is no file, return with a sum of 0.
   long f1,f2=0;
   char TempChar=0;
   int Sum=0;
   do
      {
      f1 = f2;
      TempChar = fgetc(fp);
      f2 = ftell(fp);
      if(TempChar!=10 && TempChar!=13)
         Sum+=(unsigned int)TempChar;
      Sum=Sum%100000000; //modulo to prevent memory type overflow               
      } while(f1 != f2);
   fclose(fp);
   return Sum;
}

Seth

Aye, looks like we missed/forgot the uninstall file from the tutorial. Thanks for the checksum! Hopefully we'll have this working soon.

Seth

Hello again. Our plugin is finally close to completion and we have a couple new issues at hand.

1. Character encoding. Accented characters aren't showing up, and we tried UTF-8 and a few other encodings. Is there one that works, or can we expect a fix for this eventually?

2. We would like to use a variant of start.txt that would look for cards with specific types in the deck at the start of the game instead of a card ID. Our game uses a Hero card and a Haven Bag card, each having multiple variants a player can use, but there's always only one of each per deck and they go on the table right at the start of the game. So if at all possible, we'd like our start file to look for the cards with those types and move them from each player's deck to the table automatically. Is it feasible, or could we hack it somehow? At the moment our work-around is to give them two front faces so they can be spotted in the deck and picked out.

Trevor

#9
The unreleased Lackey augments some of the foreign character support. Until it is released, please convert them to the standard equivalent. For example, convert ? to e.

I'm going to be greatly augmenting the power of "start.txt" to add some kinds of scripting. Until then, it only preserves essentially a game state.
As far as "hacking it", there are tons of different things you could do to make things more convenient, such as making another super zone and playing a card from it randomly (or not randomly) or other things like that. Lackey is intended to simulate how things are in real life, so you could just do things as you would with real cards.