Speaking in Tongues

Ideas and suggestions for game mechanics and rules.
Locked
User avatar
Teric neDhalir
Githyanki
Posts: 1495
Joined: Mon Jan 05, 2004 10:04 pm
Location: Manchester UK

Speaking in Tongues

Post by Teric neDhalir »

Hi all,
I know we now have the option of PCs speaking different languages, is that scriptable for non-chat events? e.g. inscriptions (= placeable names) in Dwarvish; NPC conversations in Abyssal; books in Elvish?

If anyone could point me at some docs or which scripts to look in to search for functions I would be grateful.
Teric
User avatar
AcadiusLost
Chosen of Forumamus, God of Forums
Posts: 5061
Joined: Tue Oct 19, 2004 8:38 am
Location: Montara, CA [GMT -8]
Contact:

Post by AcadiusLost »

The language scripts themselves are buried in among the tangle of DMFI and gui_DMFI scripts (you can check them out in the OAS2 module if you like, but be forewarned, they're a poorly documented mess).

As currently set up, they're not too practical to manage for conversations with NPCs. What you could do is check whether a PC has the same language as the NPC with a conditional, and offer either gibberish, or the actual translated convo, as a private conversation. The functions to check whether a PC knows a given language should be straightforward; if they're a mess, we can encapsulate them into a nice, friendly, documented ACR function. We could write up a generic conditional script for this, and check against a local string defined on the NPC/creature blueprint in the toolset like ACR_PRIMARY_LANGUAGE="Undercommon".

In terms of books/reading/writing, Bartleby had some inspired thoughts on the matter, I think he posted some screenshots in Custom Content. It's going to be a lot of work, but I'd definitely like to get it into the ACR and available ingame ASAP.

Excellent thoughts, let's keep them coming.
User avatar
Teric neDhalir
Githyanki
Posts: 1495
Joined: Mon Jan 05, 2004 10:04 pm
Location: Manchester UK

Post by Teric neDhalir »

Yes, you're right AL it's terrifying! However.. In dmfi_inc_langexe is this function:

DMFI_IsLanguageKnown(object oPC, string sLang);

which looks promising. sLang would be LNG_DWARF, LNG_ELVEN etc I presume. I've tried to put that into a starting conditional for a conversation and it don't work, but that's more than likely something I've done wrong. I'll see if I can think of a more failsafe test. (Did I mention how much I hate scripting?)

TnD
User avatar
Teric neDhalir
Githyanki
Posts: 1495
Joined: Mon Jan 05, 2004 10:04 pm
Location: Manchester UK

Post by Teric neDhalir »

After an hour or two gazing at the innards of the dmfi scripts I gave up and guessed. I should do that more often.

As mentioned above the function you need is;

DMFI_IsLanguageKnown(object oPC, string sLang);

plus the include "dmfi_inc_langexe". The string sLang is just the language name e.g. DWARF, ELVEN etc. with no prefix (which is where I was going wrong).

I wrote a conversation with the following as as conditional script on each node with different languages defined as sLang and amazingly the NPC answers differently depending on what language my test PCs speak. Huzzah!
///////////////////////////////////////////
gc_checkhaslanguage. Teric neDhalir 23/6/08.
Returns TRUE if PC has the DMFI language defined in sLang
///////////////////////////////////////////
#include "dmfi_inc_langexe"

int StartingConditional(string sLang)
{
object oPC = GetPCSpeaker();
if (DMFI_IsLanguageKnown(oPC, sLang) == TRUE) return TRUE;
return FALSE;
}

It should be pretty simple to expand that to reading inscriptions on placeables etc. Any ideas how to make books/scrolls?

Teric
User avatar
Teric neDhalir
Githyanki
Posts: 1495
Joined: Mon Jan 05, 2004 10:04 pm
Location: Manchester UK

Post by Teric neDhalir »

Carrying on in this vein I've now made a placeable blueprint where you can define what language is necessary to read the inscription on a gravestone or name on a sign. Details are in the Builders' Share Folder thread at the top of this forum. I would appreciate any feedback on whether you think it works.

As an aside, AL, I seem to have different lists of bonus languages for the OAS and 011 (in that the ACR version seems Amn-centric, for obvious reasons). Do you have a list of ACR-supported languages or should I just pull them from the initialization code?
User avatar
AcadiusLost
Chosen of Forumamus, God of Forums
Posts: 5061
Joined: Tue Oct 19, 2004 8:38 am
Location: Montara, CA [GMT -8]
Contact:

Post by AcadiusLost »

The list of script-supported languages doesn't change, the customizations you're seeing are for the ones that are offered as bonus ones at character creation, which I've customized for each server based on the FRCS tables. It would be better to do this by PC starting region, of course, but haven't thought of a good way to handle that yet. Another of the long list of things we could manage if we had a good tlk/hak solution at time of character creation.

So I've edited 3 versions of that DMFI langexe file, one for Amn, one for Western Heartlands (which the OAS2 has), and one for the Silver Marches. Think I set Ayergo up with the WHL one as well, as the closest to BG as a starting point. I'd recommend you just swap in the one from the OAS2 for 011.
Locked