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

Project: Generation 6 for Pokémon Essentials (Pokémon sprites and PBS files)

PinkCatDragon

The 17 year old programer. Now byte off
388
Posts
14
Years
I'm sure i did everything you told me and you can try if you change 1.33 to 133 , the damage doesn't change at all
try this
Code:
 if type>=0 && isConst?(attacker.ability,PBAbilities,:PIXILATE) && type=getConst(PBTypes,:NORMAL)
      type=getConst(PBTypes,:FAIRY) || 0
      basedmg=(basedmg*1.333).floor
    end
make sure it goes in pbtype of pokebattle_move
 
20
Posts
10
Years
  • Age 35
  • Seen Jul 16, 2015
I have the Pixilate code right under Minus/Plus. Your code should be something like this:

Code:
if isConst?(type,PBTypes,:NORMAL) && isConst?(attacker.ability,PBAbilities,:PIXILATE)
      type=PBTypes::FAIRY
      [COLOR="Red"]basedmg=(basedmg*1.33).floor[/COLOR]
    end

I suppose that the red part is what you are missing.


I checked my script once again just now and I found what cause my problems!It works now thank you!
 
20
Posts
10
Years
  • Age 35
  • Seen Jul 16, 2015
try this
Code:
 if type>=0 && isConst?(attacker.ability,PBAbilities,:PIXILATE) && type=getConst(PBTypes,:NORMAL)
      type=getConst(PBTypes,:FAIRY) || 0
      basedmg=(basedmg*1.333).floor
    end
make sure it goes in pbtype of pokebattle_move


I put this scipt:
if type==0 && isConst?(attacker.ability,PBAbilities,:PIXILATE)
type=getConst(PBTypes,:FAIRY) || 0
end

above what you taught me and made a mistake!
Thanks!
 
2
Posts
9
Years
  • Age 24
  • Seen Feb 2, 2017
So, does anyone have the code for Sticky Web, Forest's Curse and Trick-or-Treat? The latter two could be done by editing Soak, but they just add a type instead of changing it.
 

Allgamesdude

The Creator of the WIP game, Pokémon Cosmic. Looki
283
Posts
11
Years
Hello All! I have some amazing news for you all! I have been following your posts, and I wanted to include Gen 6 Updates. Unfortunately, I am quite a terrible scripter. I actually went and found out that the creator of the pokémon game, Pokémon Reborn, which is an essentials completed game, has her own webpage. I contacted her, and I wanted to use her Gen 6 stuff. She allowed me full use of it. With credit of course. So, I have contacted her once again, and she, who goes by Amethyst, has allowed me to give you the same resources. All Gen 6 Moves are complete, function codes and everything. All gen 6 Abilities are complete, function codes and everything. All Gen 6 Pokémon are complete. Everything from Gen 6 is complete. The only thing I'm not sure if it is complete or not, is Megas. To my knowledge, this is incomplete. However, please do let me know in this thread, if you guys would want me to post how to get the files and data and scripts and stuff. Credit will still be required to Amethyst, but not to me.


Thanks again!

Pokégod7020
 
20
Posts
10
Years
  • Age 35
  • Seen Jul 16, 2015
I tried to add COMPETITIVE today
Does this ability mean when attacked by moves such as Growl ,the special SPATK will rise?

I script like this:
if pbCanReduceStatStage?(stat,showMessages,selfreduce)
pbReduceStatBasic(stat,increment)
@battle.pbCommonAnimation("StatDown",self,nil) if downanim
if increment==2
@battle.pbDisplay(arrStatTexts[1])
else
@battle.pbDisplay(arrStatTexts[0])
end
##
if !selfreduce && isConst?(self.ability, PBAbilities, :COMPETITIVE) #JV
pbIncreaseStat(PBStats::SPATK,2,false)
@battle.pbDisplay(_INTL("Competitive sharply raised {1}'s Special Attack!", pbThis))
end#
return true
end
return false
end

Am i right ?How to test if this ability is working?
 

WriterRaven

I Illustrate Through Words
54
Posts
9
Years

I would definitely be interested in acquiring a copy of the Gen VI materials. While I don't plan to include anything from Gen VI in my current project, as it began during Gen V, it would still be good to have the relevant materials for making a game with Gen VI elements (Mega Evolutions, the updated type matchups, and new items in particular would see use in projects I would be working on).

Big kudos to Amethyst, of course, for allowing random strangers copies of her work.
 
20
Posts
10
Years
  • Age 35
  • Seen Jul 16, 2015
Mega Launcher: (put it before Flash Fire, in PokeBattle_Move)
Code:
    if isConst?(attacker.ability,PBAbilities,:MEGALAUNCHER) #by ~JV~
          if @id == 25 or @id == 56 or @id == 93 or @id == 548 #each move ID, missing Heal Pulse
              basedmg=(basedmg*1.5).floor
          end
       end

Gale Wings: (put it on PokeBattle_Battle, inside the def "pbPriority", right after Prankster)
Code:
pri+=1 if isConst?(@battlers[i].ability,PBAbilities,:GALEWINGS) && #by ~JV~
         isConst?(move.type,PBTypes,:FLYING)

Competitive: (put it after Defiant on PokeBattle_Effects)
Code:
if !selfreduce && isConst?(self.ability, PBAbilities, :COMPETITIVE) #JV
               pbIncreaseStat(PBStats::SPATK,2,false)
               @battle.pbDisplay(_INTL("Competitive sharply raised {1}'s Special Attack!", pbThis))
         end

I still have some more and I'll post them when I have time and I am also working on some of the more complicated ones like sticky web, protean and the "terrain" moves.


EDIT: Also, you could highlight the moves that already have implemented effects, like the ones that have no effect at all, are just regular multi-hit etc...


I tried to add Gale Wings and Competitive today,
but none of them functioned well
I think I must put the script in the wrong place

Could you please tell me a more accurate place for each of the scipt?
Thanks a lot!
 

PinkCatDragon

The 17 year old programer. Now byte off
388
Posts
14
Years
So, does anyone have the code for Sticky Web, Forest's Curse and Trick-or-Treat? The latter two could be done by editing Soak, but they just add a type instead of changing it.
Put at bottom of PokeBattle_MoveEffects
Code:
class PokeBattle_Move_133 < PokeBattle_Move
  def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
    if opponent.effects[PBEffects::Substitute]>0
      @battle.pbDisplay(_INTL("But it failed!"))  
      return -1
    end
    if isConst?(opponent.ability(true),PBAbilities,:MULTITYPE)
      @battle.pbDisplay(_INTL("But it failed!"))
      return -1
    end
    pbShowAnimation(@id,attacker,opponent,hitnum,alltargets,showanimation)
    opponent.type1=getConst(PBTypes,:GRASS)
    opponent.type2=getConst(PBTypes,:GRASS)
    typename=PBTypes.getName(getConst(PBTypes,:GRASS))
    @battle.pbDisplay(_INTL("{1} transformed into the {2} type!",opponent.pbThis,typename))
    return 0
  end
end
and add to your pbs/moves.txt
*ID HERE*,FORESTCURSE,Forest Curse,133,0,Grass,Status,0,20,0,00,0,bce,Tough,"The user puts a forest curse on the target. Afflicted targets are now Grass type as well."
ill add a three typeing methord later
 
1,224
Posts
10
Years
And since he asked for sticky web as well
Code:
   #StickyWeb
      if pkmn.pbOwnSide.effects[PBEffects::StickyWeb]&&
        !isConst?(pkmn.ability,PBAbilities,:CLEARBODY)&&
          !isConst?(pkmn.ability,PBAbilities,:WHITESMOKE)&&
          !(pkmn.pbHasType?(:FLYING)) &&
          !isConst?(pkmn.ability,PBAbilities,:LEVITATE) &&
          !isConst?(pkmn.item,PBItems,:AIRBALLOON) 
          if isConst?(pkmn.ability,PBAbilities,:CONTRARY)
             if pkmn.pbCanIncreaseStatStage?(PBStats::SPEED)
      pkmn.pbIncreaseStat(PBStats::SPEED,1,false)
    end
            elsif !isConst?(pkmn.ability,PBAbilities,:CONTRARY)
          if pkmn.pbCanReduceStatStage?(PBStats::SPEED)
      pkmn.pbReduceStat(PBStats::SPEED,1,false)
    end
    end
    end
I added this in PokeBattle_Battle under pbOnActiveOne right about healing wish.

The move effect code
Code:
################################################################################
# Entry hazard.  Sticky Web
################################################################################
class PokeBattle_Move_149 < PokeBattle_Move
  def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
    if attacker.pbOpposingSide.effects[PBEffects::StickyWeb]
      @battle.pbDisplay(_INTL("But it failed!"))
      return -1
    end
    pbShowAnimation(@id,attacker,opponent,hitnum,alltargets,showanimation)
    attacker.pbOpposingSide.effects[PBEffects::StickyWeb]=true
    if [email protected]?(attacker.index)
      @battle.pbDisplay(_INTL("A sticky web covered the foe's field!"))
    else
      @battle.pbDisplay(_INTL("A sticky web covers your side of the field!"))
    end
    return 0
  end
end

PBS entry
Code:
605,STICKYWEB,Sticky Web,149,0,BUG,Status,0,20,0,80,0,c,Cute,"The user weaves a sticky net around the opposing team, which lowers their Speed stat upon switching into battle."
And of course add StickyWeb as an effect in PBEffects, and set it to false in the ActiveSide section
 

PinkCatDragon

The 17 year old programer. Now byte off
388
Posts
14
Years
Some altatrions
Use to replace pbTypeModifier in PokeBattle_Move
Code:
def pbTypeModifier(type,attacker,opponent)
    return 4 if type<0
    return 4 if isConst?(type,PBTypes,:GROUND) && opponent.pbHasType?(:FLYING) &&
                isConst?(opponent.item,PBItems,:IRONBALL)
    atype=type # attack type
    otype1=opponent.type1
    otype2=opponent.type2
    otype3=opponent.type3
    if isConst?(otype1,PBTypes,:FLYING) && opponent.effects[PBEffects::Roost]
      if isConst?(otype2,PBTypes,:FLYING)
        otype1=getConst(PBTypes,:NORMAL) || 0
      else
        otype1=otype2
      end
    end
    if isConst?(otype2,PBTypes,:FLYING) && opponent.effects[PBEffects::Roost]
      otype2=otype1
    end
    mod1=PBTypes.getEffectiveness(atype,otype1)
    mod2=(otype1==otype2) ? 2 : PBTypes.getEffectiveness(atype,otype2)
    mod3=1
    if not otype3==nil
     mod3=PBTypes.getEffectiveness(atype,otype3)
    end
    if isConst?(opponent.item,PBItems,:RINGTARGET)
      mod1=2 if mod1==0
      mod2=2 if mod2==0
      mod3=2 if mod3==0
    end
    if isConst?(attacker.ability,PBAbilities,:SCRAPPY) ||
      opponent.effects[PBEffects::Foresight]
      mod1=2 if isConst?(otype1,PBTypes,:GHOST) &&
        (isConst?(atype,PBTypes,:NORMAL) || isConst?(atype,PBTypes,:FIGHTING))
      mod2=2 if isConst?(otype2,PBTypes,:GHOST) &&
        (isConst?(atype,PBTypes,:NORMAL) || isConst?(atype,PBTypes,:FIGHTING))
      mod3=2 if isConst?(otype3,PBTypes,:GHOST) &&
        (isConst?(atype,PBTypes,:NORMAL) || isConst?(atype,PBTypes,:FIGHTING))
    end
    if opponent.effects[PBEffects::Ingrain] ||
       opponent.effects[PBEffects::SmackDown] ||
       attacker.pbOwnSide.effects[PBEffects::Gravity]>0 ||
       attacker.pbOpposingSide.effects[PBEffects::Gravity]>0
      mod1=2 if isConst?(otype1,PBTypes,:FLYING) && isConst?(atype,PBTypes,:GROUND)
      mod2=2 if isConst?(otype2,PBTypes,:FLYING) && isConst?(atype,PBTypes,:GROUND)
      mod1=2 if isConst?(otype3,PBTypes,:FLYING) && isConst?(atype,PBTypes,:GROUND)
    end
    if opponent.effects[PBEffects::MiracleEye]
      mod1=2 if isConst?(otype1,PBTypes,:DARK) && isConst?(atype,PBTypes,:PSYCHIC)
      mod2=2 if isConst?(otype2,PBTypes,:DARK) && isConst?(atype,PBTypes,:PSYCHIC)
      mod3=2 if isConst?(otype3,PBTypes,:DARK) && isConst?(atype,PBTypes,:PSYCHIC)
    end
    return mod1*mod2*mod3
  end
in pokebattle_battler
replace initialize with this one
Code:
def initialize(btl,index)
    @battle       = btl
    @index        = index
    @hp           = 0
    @totalhp      = 0
    @fainted      = true
    @usingsubmove = false
    @stages       = []
    @effects      = []
    @damagestate  = PokeBattle_DamageState.new
    @type3=nil
    pbInitBlank
    pbInitEffects(false)
    pbInitPermanentEffects
  end
  attr_accessor :type3
then like the prevous code add this
Code:
class PokeBattle_Move_133 < PokeBattle_Move
  def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
    if opponent.effects[PBEffects::Substitute]>0
      @battle.pbDisplay(_INTL("But it failed!"))  
      return -1
    end
    if isConst?(opponent.ability(true),PBAbilities,:MULTITYPE)
      @battle.pbDisplay(_INTL("But it failed!"))
      return -1
    end
    pbShowAnimation(@id,attacker,opponent,hitnum,alltargets,showanimation)
    opponent.type3=getConst(PBTypes,:GRASS) #override the 3rd type
    typename=PBTypes.getName(getConst(PBTypes,:GRASS))
    @battle.pbDisplay(_INTL("{1} transformed into the {2} type!",opponent.pbThis,typename))
    return 0
  end
end
 
Last edited:
Back
Top