Yet another font question (different speech fonts for different characters)

Started by rockeh, Tue 22/08/2006 19:58:37

Previous topic - Next topic

rockeh

Hi everyone :)

I have a quick question regarding fonts, or, more to the point, the usage of 2 different fonts. Now, I did look through both the manual and this subforum, but I didn't find a solution to my liking.

So, what I want to do is this: I have the character and an NPC, talking to eachother. However, for the NPC I want to use a different font, to suggest it uses a different language. The font used for this would be a separate one, with none of the letters actually looking like letters :)

Now, I've found 2 solutions so far: either replace unneeded characters in the font with the NPC's characters, or replace the upper- or  lowercase letters in the font.

However, I'd rather not do that.

So, is this possible? If so, how?

Thanks :)

Ashen

Import a second font, and use SetSpeechFont to switch between them for the different characters. You might be interested in Alynn's CharacterFonts Module, which does most of the coding for you. (Although, if it's only for one NPC, it's easy enough to do yourself - Alynn's code may still help.)

If you've already seen this, and it's 'not to your liking' - Sorry, AFAIK it's this, or the way you suggested. If you explained why you don't like it, maybe it could be worked around.
I know what you're thinking ... Don't think that.

Alynn


rockeh

Thanks for the replies, guys :)

I'll have a look at the module -- it seems like the best solution.

As to why I didn't like the replacing font characters idea, it's because of 2 things:
1. I want to use all the available characters
2. I don't want to write gibberish for the NPC, because my idea involves translatng what the NPC says; that is, EGO is supposed to find a translator; is he has it, the NPC will speak using the regular font; if not, the NPC will say the same things, but using the alternate font.

Alynn

Very easy to do with the charfont module

Say font 2 is  your untranslated font, and font 3 is your translated font. cForigner is your character to be translated

if (player.InventoryQuantity(iTranslator.ID) == 1) {
  CharFont.SetCharFont(cForigner, 3);
}
else {
  CharFont.SetCharFont(cForigner, 2);
}


SMF spam blocked by CleanTalk