FORUM ARCHIVED

Tutorial.xml

Discussion in 'Bugs' started by Mobyduck, Sep 16, 2012.

  1. Mobyduck

    Mobyduck Member

    This might be in the wrong section, if that is the case, I apologize.

    Today I decided to give a go in translating the Dungeons of Dredmor game, just for personal usage and training my language skills. I started with the "tutorial.xml" file found in "dungeons of dredmor > game" folder. After creating a backup of the original file, I started translating it directly in the Notepad++ software. After the job was done, I launched the game and, to my surprise, the tutorial menu broke; it was completely empty, and pressing anything in there crashed the game.

    I moved my translation to another fold and got the backup file again. It fixed the issue. I decided to make some tests to see what could have caused this error (all the tutorials in the tutorial menu vanishing), but I still don't know why that happened.

    Here is the original code of the tutorial I translated:

    Code:
      <tutorial>
        <info name="Movement" description="Learn how to move your character around." icon="skills/stat_chr64.png"/>
        <room name="Tutorial Chamber: Movement" playerStartX="4" playerStartY="3"/>
        <script
          text="Welcome to Dungeons of Dredmor! We've got a lot to cover today, so let's get started."/>
        <script text="The object of Dungeons of Dredmor is not necessarily to beat the game. Beating the game is very, very, very, hard. Instead, go into the game seeing if you can do just a little bit better than you did last time. Eventually, you will win!"/>
        <script text="First, however, the Hero Certification Board requires us to explain to you how to play the game so that you can die appropriately at the hands of your enemies. First, let's learn how to move the hero."/>
        <script     
          text="Moving in Dungeons of Dredmor is easy. The W, A, S, and D keys on the keyboard will move your hero up, left, down, and right respectively."/>
        <script text="Try walking over to the first lever and flipping it. To activate an object in Dungeons of Dredmor, simply click on it." trigger="fliplever"/>
        <script action="removeblocker" value="Dwarven Educational Grate"/>
        <script text="Very good - the Dwarven Educational Grate has opened, and you may now proceed to the Very Small Watery Maze section of the tutorial."/>
        <script text="If you don't want to use the keyboard, you can also click on the floor. Your hero will then move to the appropriate square."/>
        <script text="Try using the mouse to move your way through the watery maze below. Note that you can just click on an object, like the lever, to move directly to it." trigger="fliplever"/>
        <script text="Well done! This completes the first tutorial."/>
      </tutorial>
    And here is the translated version:

    Code:
      <tutorial>
        <info name="Movimentação" description="Aprenda como mover seu personagem." icon="skills/stat_chr64.png"/>
        <room name="Tutorial Chamber: Movement" playerStartX="4" playerStartY="3"/>
        <script
          text="Bem vindo a Dungeons of Dredmor! Temos um longo caminho à nossa frente, então vamos começar."/>
        <script text="O objetivo de Dungeons of Dredmor não é necessariamente ganhar. Terminar o jogo é dificil pra burro! Ao invés disso, se preocupe apenas em ir um pouco melhor do que da última vez. Eventualmente, você vai ganhar!"/>
        <script text="Primeiro, entretanto, o Conselho Certificador de Heróis nos obriga a explicar a você como jogar bem, para que posso morrer para seus inimigos da maneira mais adequada. Vamos começar aprendendo a andar."/>
        <script     
          text="Se movimentar em Dungeons of Dredmor é tranquilo. As teclas W, A, S, e D do teclado irão mover seu herói para cima, esquerda, baixo e direita, respectivamente."/>
        <script text="Experimente andar até a primeira alvanca e puxe-a. Para ativar um objeto em Dungeons of Dredmor, basta clicar nele." trigger="fliplever"/>
        <script action="removeblocker" value="Dwarven Educational Grate"/>
        <script text="Muito bom - a Grade Educacional Anã foi aberta, você pode agora prosseguir para o Realmente Pequeno Labirinto com Água do tutorial."/>
        <script text="Se não quiser utilizar o teclado, você pode sempre clicar no chão. Seu herói irá então se mover ao quadrado adequado."/>
        <script text="Use o mouse para se movimentar pelo labirinto à frente. É importante notar que você pode clicar em um objeto, como uma alavanca, para se mover diretamente até ele." trigger="fliplever"/>
        <script text="Muito bom! Isso termina nosso primeiro tutorial."/>
      </tutorial>
    As you can see, the only thing that was changed was the "descriptions" and nothing else, My only guess is that the game doesn't bode well with accentuation.
     
  2. Kazeto

    Kazeto Member

    Diacritical marks. They break XML.

    Not a bug in Dredmor.
     
    Mobyduck likes this.
  3. Daynab

    Daynab Community Moderator Staff Member

    Using the traditional way of inserting characters in html which I don't remember the name of, should work. Of course, by not remembering the name I can't help you find out how to do it.

    For example, É becomes &Eacute;
     
    Mobyduck and Kazeto like this.
  4. Mobyduck

    Mobyduck Member

    I thought it was going to be something like that. Thanks for the quick replies. This means actually trying the translations will be a real pain. Is there any kind of automatic character converter for this type of job?
     
  5. Kazeto

    Kazeto Member

    Not really. But you can run a search-and-replace if make a list of characters and their corresponding codes beforehand.
     
  6. Mobyduck

    Mobyduck Member

    This will have to suffice for now. Thanks for the help.

    Edit --

    Just editing to let you know that adding <?xml version="1.0" encoding="ISO-8859-1" ?> to the .xml file actually solves this problem, as long as the font have the correct accent marks. The new code would be something like:

    Code:
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <tutorialfile>
     
      <tutorial>
      code in here
      </tutorial>
     
    </tutorialfile>
    The translation in-game:

    tutorial acento.png
     
    Daynab likes this.