• 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.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Which Pokémon Masters protagonist do you like most? Let us know by casting a vote in our Masters favorite protagonist poll here!
  • Red, Hilda, Paxton, or Kellyn - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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.

[Other Question] Some questions and help regarding the dynamax plugin

Shashu-Greninja

"With great power comes great responsibility"- Whe
  • 99
    Posts
    4
    Years
    Hi PokeCommunity, I recently installed the dynamax plugin in my project, but i have some questions:
    1. After dynamaxing/ gigantamaxing a pokemon when I check the dynamaxed pokemon's summary, the pokemon's icon stays a little longer than usual. Means suppose i gigantamax my pikachu, then in-battle when I check its summary
    from the partuy screen the gigantamax pikachu's icon stays a little longer and then the summary page opens. Is there any way to fix it?
    2. Is any changes made to the battle ui in the dynamax/ raid event plugin? Because after adding the dynamax plugin my custom battle ui gets messed up, mainly the databoxes.
    3. How do I change the sprite positions of the dynamax sprites? Can it changed through the sprite position editor in the debug menu?
    And thats it.... I will be oblidged if anyone helps me out with this. Thanks in Advance :)
     
    Hi,

    1. Find the function pbDynamaxColor:
      Code:
      def pbDynamaxColor
      and replace its code with:
      Code:
        def pbDynamaxColor
          if DYNAMAX_COLOR
            if @pokemon.dynamax?
              alpha_div = (1.0 - self.color.alpha.to_f / 255.0)
              r_base = 217
              g_base = 29
              b_base = 71
              if @pokemon.isSpecies?(:CALYREX)
                r_base = 56
                g_base = 160
                b_base = 193
              end 
              r = (r_base.to_f * alpha_div).floor
              g = (g_base.to_f * alpha_div).floor 
              b = (b_base.to_f * alpha_div).floor 
              a = 128 + self.color.alpha / 2
              @pkmnsprite.color = Color.new(r,g,b,a)
            else
              @pkmnsprite.color = self.color
            end
          end
        end
      What you noticed is that pbDynamaxColor always rewrites the sprite color, even when the sprite is supposed to fade in/fade out.
    2. Yes, because the Max Raid battles use a different set up. Maybe you can try to merge your custom battle script + the Max Raid scripts by checking the switch $game_switches[MAXRAID_SWITCH].
    3. Dynamax sprites have the same position than the usual sprites, as far as I can tell. Gigantamax sprites will have their own positioning in a future update of the plugin. (PS: DO NOT ASK when the new update will be released; it will be released when it is ready.)
     
    Hi,

    1. Find the function pbDynamaxColor:
      Code:
      def pbDynamaxColor
      and replace its code with:
      Code:
        def pbDynamaxColor
          if DYNAMAX_COLOR
            if @pokemon.dynamax?
              alpha_div = (1.0 - self.color.alpha.to_f / 255.0)
              r_base = 217
              g_base = 29
              b_base = 71
              if @pokemon.isSpecies?(:CALYREX)
                r_base = 56
                g_base = 160
                b_base = 193
              end 
              r = (r_base.to_f * alpha_div).floor
              g = (g_base.to_f * alpha_div).floor 
              b = (b_base.to_f * alpha_div).floor 
              a = 128 + self.color.alpha / 2
              @pkmnsprite.color = Color.new(r,g,b,a)
            else
              @pkmnsprite.color = self.color
            end
          end
        end
      What you noticed is that pbDynamaxColor always rewrites the sprite color, even when the sprite is supposed to fade in/fade out.
    2. Yes, because the Max Raid battles use a different set up. Maybe you can try to merge your custom battle script + the Max Raid scripts by checking the switch $game_switches[MAXRAID_SWITCH].
    3. Dynamax sprites have the same position than the usual sprites, as far as I can tell. Gigantamax sprites will have their own positioning in a future update of the plugin. (PS: DO NOT ASK when the new update will be released; it will be released when it is ready.)

    Thanks my first issue is fixed.
    Can you please explain how to merge the battle uis. I didn't get it.
    After my battle ui is fixed I will send you what problems I am facing with the sprite position.
     
    For the Battle UI.
    EDIT: DON'T DO THIS if either of the two conflicting functions uses an "alias".
    You have two conflicting scripts. I don't know which ones, but let's say you have script 1, that defines class A, with function func(). And you have script 2, that redefines class A, by rewriting the function func(), like this:
    Spoiler:


    Go to script 1, rename the function to func1(), and go to script 2, rename the function to func2(). Finally, add a new function func() (the old name of the two conflicting functions) and use the switch to decide which function, between func1() and func2(), you should use.

    Spoiler:

    It's a quick fix but it should work.

    You should have told me the problems with your sprites, I would have replied in the same message -__-
     
    Last edited:
    For the Battle UI.
    EDIT: DON'T DO THIS if either of the two conflicting functions uses an "alias".
    You have two conflicting scripts. I don't know which ones, but let's say you have script 1, that defines class A, with function func(). And you have script 2, that redefines class A, by rewriting the function func(), like this:
    Spoiler:


    Go to script 1, rename the function to func1(), and go to script 2, rename the function to func2(). Finally, add a new function func() (the old name of the two conflicting functions) and use the switch to decide which function, between func1() and func2(), you should use.

    Spoiler:

    It's a quick fix but it should work.

    You should have told me the problems with your sprites, I would have replied in the same message -__-

    Oh sorry for the incovenience caused. For now i am sending the pictures with the original essentials battle ui:-
    The dynamax sprite positions are perfect but when i gigantamax the sprite position is like:-
    https://drive.google.com/file/d/1zr5vH2_CdU-GBGwrmCcFadZGYBf6-q7c/view?usp=sharing
    But this is not the case with Charizard gigantamax sprite:-
    https://drive.google.com/file/d/1Fw_P2tt1P-qFFskt3apRiPtQxW6Cw6gi/view?usp=sharing
    And ya i have disabled the enlarged sprite option.
    +I use the gen 8 project so the base pokemon sprites positions are according to that.

    Also some G-Max move definations are not fitting in the summary screen.
     
    Oh sorry for the incovenience caused. For now i am sending the pictures with the original essentials battle ui:-
    The dynamax sprite positions are perfect but when i gigantamax the sprite position is like:-
    https://drive.google.com/file/d/1zr5vH2_CdU-GBGwrmCcFadZGYBf6-q7c/view?usp=sharing
    But this is not the case with Charizard gigantamax sprite:-
    https://drive.google.com/file/d/1Fw_P2tt1P-qFFskt3apRiPtQxW6Cw6gi/view?usp=sharing
    And ya i have disabled the enlarged sprite option.
    +I use the gen 8 project so the base pokemon sprites positions are according to that.
    I don't want to dig into it at the moment, because as I said, this problem will be solved in the future release of the Dynamax plugin, in which you can control the Gigantamax sprite positions.

    Also some G-Max move definations are not fitting in the summary screen.
    This is a common problem that some usual moves also have ^^"
     
    Back
    Top