The online racing simulator
[RFC] InSim Language Information [implemented]
By replacing Sp3 in IS_NCN (NewCoNnection) with a byte called Lang to point to an enumeration of languages supported by LFS we can find out right away what language that client prefers.

// Language Enumerations (for NCN's Lang byte)
enum
{
LANG_ENGLISH,
LANG_FRENCH,
// ...
LANG_NUM
};

struct IS_NCN // New ConN
{
byte Size; // 56
byte Type; // ISP_NCN
byte ReqI; // 0 unless this is a reply to a TINY_NCN request
byte UCID; // new connection's unique id (0 = host)

char UName[24]; // username
char PName[24]; // nickname

byte Admin; // 1 if admin
byte Total; // number of connections including host
byte Flags; // bit 2 : remote
byte Lang; // See Language Enumerations.
};

What do you all think?
I don't know.. What does Sp3 do?

* Hmm seems to stand for spare3 ... Well.. In that case, awesomeness. But there possibly is a reason why not to do this at this point of time. It's not the first time I mentioned that an user language flag is missing @InSim. [or maybe I wasn't saying it loud enough ]
Sp3 doesn't do anything, it's defined as a spare byte that was never used. It was originally there to pad the length of the NCN packet so that it would be divisible by 4 bytes (32 bits).
You are too quick
Why not, sounds like a good idea.

The only possible issue would be that you couldn't tell if someone changed their language after connecting the server. However, that shouldn't be a big problem, because hardly anyone changes the language frequently.
IP Address discussion has been moved to the following thread ... [RFC] InSim IP Address Information

Quote from Scawen :About language, would anyone not want their language revealed or can we just forget about that? I guess if they don't want to reveal their language, they'd better select English before joining a host.

Host doesn't know guest's language in any way at the moment so it's not just as simple as adding a byte, Guests will need to transmit this info to host on connection. Not hard but just saying, it's not a 1 minute job.

#8 - kdo
Fixed by Flame CZE
FYI, I'm going to put this up for a vote in a few days, the vote will last for two weeks. If anyone has any comments, please make them now.
Quote from cargame.nl :Well.. Hmm.. If language revelation can be something to bully/racist about then there could be an option "do not reveal this to online servers" somewhere? If the InSim don't get this info it can go to any default mode?

Something like language not disclosed or 0. Defaulting to English is not that great, it could give a false assumption that somebody understands English while it's not the case.

I was going to put this up for a vote, then I realized that there still are two open questions.

We still have to discuss what to do when a person does not want to disclose their information. For this I propose that the first value within the Language ENUM is LANG_UNDISCLOSED. Making it the first item in the list just makes it easier should we add more languages to support later on. Within the UI, a checkbox asking if they want this information disclosed to the server (that is unchecked by default) should be made available.

On the other hand, why even consider this? Is there ever going to be a point in time, where you want the game's UI to show information in one language, and the InSim Application to show the information in another? So, I think that's kind of a moot point.

My second question is too Scawen, and how does the game internally store the user's Language information? Is it a ENUM, or is it a string, or something else? Ideally, for your code base, you'd simply just bolt on that too the NCN packet.
I guess its a string, because you can easily create your own language file. Language reported in LFS is infact tx_langname line from language file.

Most effective way definitely will be enum, right now we have 37 languages in LFS, so there is a plently of space for new languages. Or if its easier for Scawen, string will do just fine. BTW I definitely think that disclosed checkbox should be by default on.

Also I'd like to draw attention to thing that if language name (tx_langname) is too long, there will be warning message, however couple of moments later LFS crashes (sometimes when entering options, sometimes when exiting, ...)
That's interesting, I did not know that anyone could add their own language files. I figured that what was on the screen to the right side when you first start the game was the only options. I'm thinking if this is the case, we would need an official set of languages (the ones shipped with the game) as the canonical set. Then if people want to add to their own translations later they could use the same mechanisms within our InSim applications. This pretty much means that it's going to have to be a string, and therefore will not fit into the NCN packet in it's current form. I very much wonder what Scawen will make of all of this.
It would be nice if we could ping scawen and make him pay attention to these threads.
If it needs to be a string, it may as well have its own (optional) packet.
That would mean it maintains compatibility (no need to change the size of NCN); be sent on demand if requested by the InSim; and sent whenever an existing connection changes language.

Alternatively if it were to be a byte incorporated in NCN, PFL has two spare bytes one of which could be used when the language is changed.

Either way, IMO it would be better to have its own packet (or a SMALL) anyway and leave the spare byte in NCN for something more likely to be used - I'd be surprised if many InSim apps would make use of language info.

FGED GREDG RDFGDR GSFDG