• 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.

[Scripting Question] Change text position in battle factory

5
Posts
1
Years
    • Seen Sep 3, 2022
    So currently I'm trying to re-position the rental Pokemon text, as it is about 5-10 pixels too high and gets cut off. I believe the correct script is
    Code:
    UI_BattleSwap
    and I understand the following:

    Code:
    def pbStartRentScene(rentals)
        @rentals = rentals
        @mode = 0   # rental (pick 3 out of 6 initial Pokémon)
        @viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
        @viewport.z = 99999
        @sprites = {}
        addBackgroundPlane(@sprites, "bg", "rentbg", @viewport)
        @sprites["title"] = Window_UnformattedTextPokemon.newWithSize(
          _INTL("RENTAL POKéMON"), 0, 0, Graphics.width, 64, @viewport
        )
        @sprites["list"] = Window_AdvancedCommandPokemonEx.newWithSize(
          [], 0, 64, Graphics.width, Graphics.height - 128, @viewport
        )
        @sprites["help"] = Window_UnformattedTextPokemon.newWithSize(
          "", 0, Graphics.height - 64, Graphics.width, 64, @viewport
        )
        @sprites["msgwindow"] = Window_AdvancedTextPokemon.newWithSize(
          "", 0, Graphics.height - 64, Graphics.height, 64, @viewport
        )
        @sprites["msgwindow"].visible = false
        pbUpdateChoices([])
        pbDeactivateWindows(@sprites)
        pbFadeInAndShow(@sprites) { pbUpdate }
    end

    this sets the text window sprites


    Code:
      def pbGetCommands(list, choices)
        commands = []
        list.length.times do |i|
          pkmn = list[i]
          category = pkmn.species_data.category
          cmd = _INTL("{1} - {2} Pokémon", pkmn.speciesName, category)
          cmd = "<c3=E82010,F8A8B8>" + cmd if choices.include?(i)   # Red text
          commands.push(cmd)
        end
        return commands
    end

    and this sets the rental pokemon. I tried setting the y-positions on the @sprites but it moves an entire window sprite. How would I do just the text?
     
    5
    Posts
    1
    Years
    • Seen Sep 3, 2022
    @sprites["list"].oy = -15 does move the text but also moves the selector arrow and has this dragging effect of the top layer.
    @sprites["list"].update does nothing.

    Change text position in battle factory
     
    Last edited:
    5
    Posts
    1
    Years
    • Seen Sep 3, 2022
    In SpriteWindow_text I changed the @virtual0y in line 807 from -2 to 0 and in line 739 from -2 to 0. Still working on moving the cursor up without the text.
     
    Back
    Top