Advertiser Content
Seen 2 Weeks Ago
Posted 2 Weeks Ago
1 posts
19 Days
Sorry for my English isn't my native language.

I want to create a mechanic where pokemon have 2 abilities at the same time. Being possible that this second ability is a hidden ability.

Example: That Arcanine can use (Intimidate or Flash Fire) and Justified or any other Hidden ability that decides that pokemon has already in poke.setAbility () at the same time. I think that the values 2, 3, 4 and 5 are the hidden abilities.

And that when seeing the data of my Pokemon both abilities are visible in the Summary Screen.

I do not know if it is feasible to create an extra page to the summary for the hidden ability and also put the IV's and EV's. I have only seen tutorials on how to insert IV's on the same page where it indicates the stats of the Pokemon, therefore I do not know if it is very laborious to create an extra page.

Can you help me create this second ability slot for the hidden ability? Thank you so much.
Seen 18 Hours Ago
Posted 1 Week Ago
200 posts
9.6 Years
Here's the graphics and code I use for my summary screen:

    # Write various bits of text
    textpos = [
       [_INTL(""),292,76,2,base,shadow],
       [sprintf("%d/%d",@pokemon.hp,@pokemon.totalhp),501,84,1,Color.new(64,64,64),Color.new(176,176,176)],
       [_INTL("Atk"),231,116,0,base,statshadows[0]],
       [sprintf("%d",@pokemon.attack),355,116,1,Color.new(64,64,64),Color.new(176,176,176)],
       [_INTL("Def"),231,148,0,base,statshadows[1]],
       [sprintf("%d",@pokemon.defense),355,148,1,Color.new(64,64,64),Color.new(176,176,176)],
       [_INTL("Sp. Atk"),365,116,0,base,statshadows[3]],
       [sprintf("%d",@pokemon.spatk),501,116,1,Color.new(64,64,64),Color.new(176,176,176)],
       [_INTL("Sp. Def"),365,148,0,base,statshadows[4]],
       [sprintf("%d",@pokemon.spdef),501,148,1,Color.new(64,64,64),Color.new(176,176,176)],
       [_INTL("Speed"),231,84,0,base,statshadows[2]],
       [sprintf("%d",@pokemon.speed),355,84,1,Color.new(64,64,64),Color.new(176,176,176)],
       [_INTL("Ability"),224,284,0,base,shadow],
       [PBAbilities.getName(@pokemon.ability),362,284,0,Color.new(64,64,64),Color.new(176,176,176)],
       [_INTL("Ability"),224,184,0,base,shadow],
       [PBAbilities.getName(@pokemon.primaryAbility),362,184,0,Color.new(64,64,64),Color.new(176,176,176)],
    ]
    # Draw all text
    pbDrawTextPositions(overlay,textpos)
    # Draw ability description
    abilitydesc = pbGetMessage(MessageTypes::AbilityDescs,@pokemon.ability)
    drawTextEx(overlay,224,316,282,2,abilitydesc,Color.new(64,64,64),Color.new(176,176,176))
    primabilitydesc = pbGetMessage(MessageTypes::AbilityDescs,@pokemon.primaryAbility)
    drawTextEx(overlay,224,216,282,2,primabilitydesc,Color.new(64,64,64),Color.new(176,176,176))
    # Draw HP bar
    if @pokemon.hp>0
      hpzone = 0
      hpzone = 1 if @pokemon.hp<=(@pokemon.totalhp/2).floor
      hpzone = 2 if @pokemon.hp<=(@pokemon.totalhp/4).floor
      imagepos = [
         ["Graphics/Pictures/Summary/overlay_hp",390,68,0,hpzone*6,@pokemon.hp*96/@pokemon.totalhp,6]
      ]
      pbDrawImagePositions(overlay,imagepos)
    end
Something to note is that primaryAbility is a function I had to create.
For getting the second ability to function, the majority of the work is done by replacing def hasWorkingAbility with:
  def hasWorkingAbility(ability, ignorefainted=false)
    return false if self.isFainted? && !ignorefainted
    return false if @effects[PBEffects::GastroAcid] && ability!=:MULTITYPE && ability!=STANCECHANGE
    if isConst?(@primary,PBAbilities,ability)
      return true
    else
      return isConst?(@ability,PBAbilities,ability)
    end
  end
Although you're on your own for the compiler and stuff, as I'm still having weird problems with that.
Advertiser Content