• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Serena, Kris, Dawn, Red - which Pokémon protagonist is your favorite? Let us know by voting in our grand final favorite protagonist poll!
  • PokéCommunity supports the Stop Killing Games movement. If you're a resident of the UK or EU, consider signing one of the petitions to stop publishers from destroying games. Click here for more information!
  • 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
    11
    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 ?
     
    You what?

    So you want it to say;

    "Bob, BugCatcher wants to fight."?
     
    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.
     
    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.
     
    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 ?
     
    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.
     
    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:
    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.
     
    This is my Languages array:

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

    I have the same error.
     
    Last edited:
    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.
     
    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 ?
     
    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.
     
    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