Welcome to the 42 Amsterdam multiserver.
Results 1 to 5 of 5

Threaded View

  1. #1

    How to use latin extended characters from the Code page on Serious Sam

    Hello guys,

    Today I will show you a tutorial, mostly addressed to West EU languages (ita, fra, esp), on how to use latin extended letters that normally Serious Sam can't allow you to write in console.

    First of all, I have to thank Supersniper98 (I already did, but I'll do it again because you have to know it is thanks to him I'm showing this), who taught me this method a long time ago.

    Now, we will take as a reference the Windows Code Page Table n° 1252.

    So, the first thing we have to do now is to open PersistentSymbols.ini (default path is "C:\Program Files (x86)\Croteam\Serious Sam - The Second Encounter\Scripts") and add many lines, one per character, like this:

    Code:
    persistent extern CTString agr="à";
    persistent extern CTString agrCap="À";
    We just added the "A" with gravis (I put "gr" for "Gravis"). "Cap" is for the capital letter (or "Uppercase"); however you can abbreviate to only "C".

    IMPORTANT: ADD ONLY 15-16 LINES, THEN SAVE AND CLOSE. TO ADD MORE CHARS, OPEN THE FILE AGAIN AND ADD MAX 15-16 LINES!!! IF YOU ADD MORE THAN THAT IN A ROW, THEN SERIOUS SAM WILL RESET ALL SETTINGS AT STARTUP, PLUS YOU WON'T FIND THE LINES ANYMORE IF YOU OPEN PERSISTENTSYMBOLS.INI AFTERWARDS!!!


    After you are done with it, it is time to think about next problem: how do I write extended fonts while in chat?

    Serious Sam has a built-in console command which is called "Say". To use it, open the console by pressing TILDE (international keyboard; for italian keyboards it is "\", but I think everybody of you can do that); then you have to write the entire code: /Say().
    However, you can just type "say" and press TAB, you'll get the command "already ready".

    Now, you have to use the + sign in order to separate each letter, like this:

    Code:
    /Say(agr+egr+igr+ogr+ugr)
    Press ENTER and the console should type the following output --> àèìòù

    But maybe you want to write words separated by spaces. By default, you can just put a space in brackets:

    Code:
    /Say(agr+" "+egr)
    And the output will be --> à è

    But you can add an SP string just like we saw before, to obtain the same result:

    Code:
    persistent extern CTString SP=" "
    Code:
    /Say(agr+SP+egr)
    Output --> à è

    After all, in the Windows Code Page 1252, the space is called SP.



    However, this method results slower if you have to write complex sentences. And another problem is you have to put normal fonts in brackets:
    Code:
    /Say("a"+agr+"m"+egr)
    Output --> aàmè

    So, if you have a good memory, why not give a code to an entire sentence?

    An example in italian --> Mimì, oggi c'è troppo sole là. (=Mimì, it is too sunny down there today)

    Instead of writing a long string, we can invent an acronym for a separate word or, as said above, for the whole sentence. Then put it in a string. Example:

    Code:
    persistent extern CTString mimtrsla="Mimì, c'è troppo sole là";
    Try to use as less initials as you can so you will easily remember each combination.

    However, the advantage of writing simple characters in brackets is that you can write spaces and sentences without need of separate each letter. But remember, when you write a complex "hybrid" sentence, use the + to separate an extended character to the rest:

    Code:
    /Say("Oggi non ho studiato perch"+eac+" stavo male" )
    Output --> Oggi non ho studiato perché stavo male (=I didn't study today because I didn't feel very good)

    Note that I even put spaces in brackets and I separated only the special font.

    Be careful not to mess up when you have to use more extended letters. One example in french and one in spanish:

    Code:
    /Say("J'ai "+eac+"t"+egr+"au supermarch"+eac)
    And you should see this --> J'ai étè au supermarché (=I have been at supermarket)

    An example in spanish. This time we will use the "n" with tilde (remember to add it first!):

    Code:
    /Say("Se"+ntilde+"or, su b"+uac+"squeda se acabo aqu"+iac)
    And you'll read --> Señor, su búsqueda se acabo aquí (=Sir, your search ends here).


    Try to master this technique and you will be able to write the words in their correct form when you are talking to a country mate.


    IMPORTANT: Since Serious Sam can use only 1 fonts table, you won't be able to see cyrillic fonts or even latin fonts from other code pages (there is the East EU latin code page, the turkish one, etc...) if some players are displaying their nicknames or are writing in chat with them. You'll still see your CP-1252 fonts instead.

    For example, for the russian name Макс you'll still see Ìàêñ unless you install cyrillc russian fonts on your Serious Sam copy. Some more characters won't be even displayed on console.

    IMPORTANT x2: Be careful, be very careful, not to use Sam's environment variables (such as "on" or you'll get an error) when editing PersistentSymbols.ini manually.


    And that's all for now.
    Last edited by Marco; 19-05-2020 at 16:31.

 

 

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Back to top