Jump to content

How to add acute accents, cedillas, etc. in nss files


Recommended Posts

Good afternoon, my dear VN readers/translators.

I am not too cocky to actually call what I am doing a real translation project of sorts, but please bear with me for a few minutes of your time.

I am messing around with nss files, containing the scripts for Demonbane, JAST USA version.

My mother language is portuguese, and we do have acute accents, cedillas, tildes on top of vogals,  and circumflex accents (in order: é, ç, ã, ê).

I am no programmer, but I learn fast.

While I was able to extract nss files from the nss.npa, change the english text to portuguese, and recompile it back into nss.npa, all these characters simply disappear.

Here's an example: Lets say, the word "Operação" becomes just "Operacao" in the game.

I am editing the nss files using Notepad++, BTW

I believe french has almost all of these special characters, but I am at a loss on what to do to make those characters appear, since I already tried formatting the nss to OEM 863: French, to no avail.

Thanks in advance to whoever bothers to anwer this humble thread of mine.

Edited by AstralSword
Link to comment
Share on other sites

Sorry I forgot to mention that.

OEM 860 breaks the text completely, for some reason.

Using the same word I used as an example before, "Operação" becomes "Opera%**o".

I believe it is because  OEM 860: Portuguese stands for Portugal's portuguese, which differs a bit.

Or maybe the engine just is not compatible with it.

Link to comment
Share on other sites

--pt 
Ao que parece o jogo usa codificação 932 ou seja, Shift JIS, você não pode inserir acento nessa codificação, resultado seria apenas um texto sem acento, isso não é um bug e sim uma "carência de recurso" da engine, isso é muito comum nas visual novels, talvez mais da metade das VNs, basicamente, não tem como por o acento.
Tudo que você pode fazer é editar a fonte do jogo e substituir algum caractere japonês como as katakana ou hiragana com uma letra com acento, por exemplo ã é í e ó; No script do jogo você terá que por o caractere que você substituiu na fonte original, o jogador não pode mudar  a fonte ou verá a letra japonesa no lugar dos acentos.
Você pode também modificar a engine do jogo, mas isso precisa de um hacker na equipe, e em boa parte das vezes alteração na fonte é muito mais prático e realista que modificar a engine do jogo.

-- en

It seems that the game uses 932 encoding ie Shift JIS, you can not enter accent in this encoding, result would be only text without accent, this is not a bug but a "feature shortage" of the engine, this is very common in visual novels, maybe more than half of the VNs basically do not have as put the accent.
All you can do is edit the game font and replace some Japanese character like katakana or hiragana with a letter with an accent, for example ã é í í ó ó; In the game script you will have to by the character you replaced in the original font, the player can not change the font or you will see the Japanese letter in place of the accents.
You can also modify the game engine, but this needs a hacker on the team, and often changing the source is much more practical and realistic than modifying the game engine.

Edited by marcus-beta
Link to comment
Share on other sites

En--

Aw... I also tried another person's sugestion by saving a unicode notepad file, copying the entire script into it, then substituting the original nss file with this new one.

The game froze exactely when the modified text should appear. Yare Yare

Forgive my ignorance, but it there an additional tool I need to edit the game source, save I can identify this said file?

Also, thank you deeply for the reply. I really suck at this.

Pt--

Aw... Também tentei a sugestão de outra pessoa salvando um notepad com programação Unicode, copiando o script inteiro dentro dele e suibstituindo o nss original por esse arquivo.

O jogo congelou exatamente no momento em que o texto modificado deveria aparecer. Yare Yare

Perdoe a minha ignorância, mas existe alguma ferramenta adicional para editar a fonte do jogo, julgando que eu consiga identificar o arquivo que a contém?

No mais, muitíssimo obrigado pelo retorno. Sou excepcionalmente ruim com programação.





 

Edited by AstralSword
Link to comment
Share on other sites

--Pt

Bem, primeiramente não altere a codificação do script, dá pra contar no dedo as engines que suportam outra codificação que não seja a padrão dela, eu que to sempre mexendo com visual novels só me deparei com a KirKiri que suporta ANSI, Unicode e SJIS... Alterar a codificação do arquivo não altera a forma que a engine interpreta o arquivo, isso de alterar codificação do script não irá, de forma alguma dar compatibilidade a acentos no jogo, basicamente editar a fonte é meio chato, suponhamos que o jogo usa a MS Gothic, que é o caso de boa parte das visual novels, e esse mesmo jogo usa a fonte do windows, tu já pode desistir de por acentos sem hacking a MS Gothic é uma família de fontes dentro de um pacote TTC (TrueType Collection) onde ficam as TTF (TrueType Font), Tu teria que extrair a TTF da TTC, depois disso edita-la que é outro problema porque a Gothic não é possível editar em qualquer software por ter muitas línguas mescladas em uma única fonte, depois disso recriar o TTC com as TTF editadas e finalizar instalando a fonte no windows que é o maior dos problemas a MS Gothic é uma das diversas fontes protegida pelo windows, isso mesmo, o windows se recusa de edita-la, pra isso você precisará do acesso de TrustedInstaller, no caso do win 10 a exploit que permite isso está sempre em mudança então seu patch quando publicado deixaria de funcionar um dia, outro método que me foi apresentado pela própria microsoft quando entrei em contato é fazer uso do registro de redireção de fonte, isso funciona e é fácil de incluir num instalador, entretanto irá afetar todo o sistema do jogador e ele caso tente visualizar texto japonês irá acabar vendo os acentos de forma aleatória, por isso substituição de fonte sem hacking não é nada recomendado, o ideal é que altere a engine do jogo pra ler uma fonte com outro nome, geralmente eu chamo de "MS Gothic Modded", com isso não terá nenhuma gambiarra que redirecione os acentos de forma global e nem fica difícil de instalar pro usuário.

Basicamente, apesar de cansativo tu até vai conseguir fazer isso sem conhecimento de programação se correr atrás, mas não será nada apresentável ao publico, portanto tu precisa da ajuda de um hacker.

--en
 

Well, first of all do not change the encoding of the script, you can count on the fingers the engines that support another encoding that is not the standard of it, I always messing with visual novels I only came across KirKiri that supports ANSI, Unicode and SJIS. .. Changing the file encoding does not change the way the engine interprets the file, this change of script encoding will not in any way give compatibility to the accents in the game, basically editing the font is kind of boring, suppose the game uses the MS Gothic, which is the case of most of the visual novels, and that same game uses the source of windows, you can give up for accents without hacking MS Gothic is a font family within a TTC (TrueType Collection ) where the TTF (TrueType Font) are, You would have to extract the TTF from TTC, after that edit it which is another problem because Gothic can not edit in any software because it has many languages merged into a single source, then diss the rebuild TTC with the edited TTF and finalize installing the font in windows which is the biggest of the problems MS Gothic is one of several fonts protected by windows, that's right, windows refuses to edit it, for this you will need the TrustedInstaller access, in the case of win 10 the exploit that allows this is always changing so your patch when published would crash one day, another method that was presented to me by microsoft itself when I contacted and the reply to me is to use the font redirection feature, this works and is easy to include in an installer, however it will affect the entire system of the player and if it tries to visualize Japanese text will end up seeing the accents at random, so font substitution without hacking is not recommended, ideal is that I change the engine of the game to read a font with another name, usually I call it "MS Gothic Modded", with that it will not have any gambiarra that redirect the accents of form gl obal and nor is it difficult to install to the user.

Basically, although tiring you will even be able to do this without programming knowledge if you chase after, but it will not be presentable to the public, so you need the help of a hacker.

Edited by marcus-beta
Link to comment
Share on other sites

You need replace some japanese characters for the letters with accents, of course, you also need to modify a font so that the accent is displayed appropriately in the game. Is a pain in the ass translation while you have to write "este ェ(é) um teste" but you can create a code in php (or java) in order to make that replace automatically so you can just write in portuguese and then apply the code when you've finished the script. 

Edited by Xander
Link to comment
Share on other sites

Hmm. Well, no point in worrying about it now then. I will translate it all with all the accents and whatnot.
When or if the thing is finished (I am really in the mood about it, but who knows. I just hope to live up to it) I will work on that.

Thank you all about the replies, really. Any developments I get done in this small semi-project of mine, I will post here.

I gotta just tell ya. What motivated me to even think about starting was this fictional woman. Oh man, oh man, oh man. How gorgoeus can a female character be?

f3yliw.jpg

Lolis or spoiled brats have nothing on this haha

Edited by AstralSword
Adding more stuff and preventing DP.
Link to comment
Share on other sites

Sorry about Double posting, but I don't know if editing will get the post into the recent activity front.

I translated the introduction yesterday, but the Shift-Jis simply don't retain any of the special characters. It is not even the game that breaks it up. It is this stupid format.

I had to read thru it all over again to put back the accents, and saved the whole script in an Unicode txt file, so I would not lose anything.

The thing is: I type the word "Operação". It appears like that in the file, so I save it.

After that, I closed the thing and opened it again, and it was "Operacao".

I am even messing around with a Hex editor now, with the exe opened as I type. Is there any way to get the exe into accepting Unicode? Because all the other encoding types actually get the codes pretty messed and the scene goes on without showing any text and the sprites do not get into the game. The bgm starts though.

Edited by AstralSword
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...