• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Space between trainer name and point

  • 12
    Posts
    10
    Years
    • Seen Nov 5, 2013
    i have set:

    def fullname
    return _INTL("{1} {2} {3}",@name,",",self.trainerTypeName)
    end

    between the tranier's name and the point but a space remains.

    Now TrainerName , TrainerClass wants to fight with the space between the trainer name and the point appears but i need "TrainerName, TrainerClass wants to fight" Appears, for the translation of my language.

    how can i adjust that ?
     

    Nickalooose

    --------------------
  • 1,309
    Posts
    16
    Years
    • Seen Dec 28, 2023
    You what?

    So you want it to say;

    "Bob, BugCatcher wants to fight."?
     

    Maruno

    Lead Dev of Pokémon Essentials
  • 5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    The obvious thing is to use this:

    Code:
    def fullname
      return _INTL("{1}, {2}",@name,self.trainerTypeName)
    end
    You were making things more complicated than they need to be.

    That's if you're hard-coding all the language changes, though (i.e. you only want one language in your game). You haven't explained exactly what you want.
     
  • 12
    Posts
    10
    Years
    • Seen Nov 5, 2013
    You what?

    So you want it to say;

    "Bob, BugCatcher wants to fight."?

    Yes, i want it to say that.

    The obvious thing is to use this:

    Code:
    def fullname
      return _INTL("{1}, {2}",@name,self.trainerTypeName)
    end
    You were making things more complicated than they need to be.

    That's if you're hard-coding all the language changes, though (i.e. you only want one language in your game). You haven't explained exactly what you want.


    Oh, sorry, my problem was how to show the TrainerName, a point and the TrainerType.
    Your code works, thanks for that.

    But now i have another question:
    Can i make a game with more languages? if yes, how could i do?
    Thanks for your help.
     
  • 12
    Posts
    10
    Years
    • Seen Nov 5, 2013
    LOL, i'm sorry, i didn't see that page.

    now, i have read it, but i have a problem, i want to show the language option only one time at the beginning (i want to save this choice) before the intro scene and make this option available in the options menu, is it possible ?
     

    Maruno

    Lead Dev of Pokémon Essentials
  • 5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    You can add the ability to change the language to the Options screen, although it's slightly hacky. The code would probably be this (untested):

    Code:
    EnumOption.new(_INTL("Font Style"),[_INTL("English"),_INTL("Deutsch")],
       proc { $PokemonSystem.language },
       proc {|value|  
          $PokemonSystem.language=value
          pbLoadMessages("Data/"+LANGUAGES[$PokemonSystem.language][1])
       }
    ),
    I say "hacky" because you'd have to manually list the languages here as well as in the array in Settings (make sure they match up). Note that you can probably only get about 3 languages listed before you run out of space.

    You'd still also be able to change the language in the Continue/New Game screen, and that's the only time outside of the Options screen you'd be able to change it.
     
  • 12
    Posts
    10
    Years
    • Seen Nov 5, 2013
    if i wanted to set the language choice option before the launch of the game and set a switch so that it wouldnt be repeated after the choice , would it be possible ? i dont understand how to do it.

    Edit: i have tested the code and if i try to change language or if i try to change any options this error message appears:

    ---------------------------
    Pokemon Essentials
    ---------------------------
    Exception: NoMethodError

    Message: undefined method `[]' for nil:NilClass

    PokemonOptions:394:in `pbStartScene'

    PokemonOptions:392:in `call'

    PokemonOptions:106:in `set'

    PokemonOptions:450:in `pbOptions'

    PokemonOptions:449:in `each'

    PokemonOptions:449:in `pbOptions'

    PokemonOptions:443:in `loop'

    PokemonOptions:463:in `pbOptions'

    PokemonOptions:442:in `pbActivateWindow'

    PokemonOptions:442:in `pbOptions'



    This exception was logged in

    C:\Users\Davide\Saved Games/Pokemon Essentials/errorlog.txt.

    Press Ctrl+C to copy this message to the clipboard.
    ---------------------------
    OK
    ---------------------------
     
    Last edited:

    Maruno

    Lead Dev of Pokémon Essentials
  • 5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    You haven't put any languages into the LANGUAGES array in the script section Settings. Go do that - I said to make sure it matches up with the languages mentioned in my code.
     
  • 12
    Posts
    10
    Years
    • Seen Nov 5, 2013
    This is my Languages array:

    LANGUAGES = [
    # ["English","english.dat"],
    # ["Deutsch","deutsch.dat"]
    ]

    I have the same error.
     
    Last edited:

    Maruno

    Lead Dev of Pokémon Essentials
  • 5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    Anything after a # in a line is ignored, because it's a comment. Those comments are there as examples, but aren't doing anything right now. You need to delete those #s and then there'll be multiple languages defined.
     
  • 12
    Posts
    10
    Years
    • Seen Nov 5, 2013
    Oh great, it works, now the last problem:
    If i wanted to set the language choice option before the launch of the game and set a switch so that it wouldnt be repeated after the choice , would it be possible ?
     

    Maruno

    Lead Dev of Pokémon Essentials
  • 5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    There's really no reason to bother doing that. It may be possible, but I don't see the point in figuring out how. All you're doing is reducing the opportunities for the player to change the language, and I don't know why you would want to do that.
     
  • 12
    Posts
    10
    Years
    • Seen Nov 5, 2013
    Because when the game starts only the main language is loading and all non-english people read in english and they might not know english well.
     
    Back
    Top