• 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!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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.

[Essentials v17.2] Gen 8 stuffs (Abilities, Items & Move)

hi im not an expert to make scripts, but i try to make an item of Gen8


def pbMintUpperEvAndLowerEv(pokemon,scene,ev,ee,messages)
e1=(pokemon.ev[ev]<252 && pokemon.ev[ev]>1 )
e2=(pokemon.ev[ee]>0 && pokemon.ev[ee]>1)
if !e1 && !e2
scene.pbDisplay(_INTL("No tuvo ningún efecto."))
pokemon.calcStats
return false
end

if e1 && e2
pokemon.ev[ev]+=2
pokemon.ev[ee]-=1
pokemon.ev[ev]=252 if pokemon.ev[ev]>252
pokemon.ev[ee]=pokemon.ev[ee] if pokemon.ev[ev]>252
pokemon.ev[ee]=0 if pokemon.ev[ev]<0
pokemon.calcStats
end

scene.pbDisplay(messages[2-(e1 ? 0 : 1)-(e2 ? 0 : 2)])
scene.pbRefresh
return true
end



ItemHandlers::UseOnPokemon.add(:NAIVEMINT,proc{|item,pokemon,scene|
next pbMintUpperEvAndLowerEv(pokemon,scene,PBStats::SPEED,PBStats::DEFENSE,[
_INTL("¡La velocidad de {1} incremento! ¡pero la defensa bajo",pokemon.name),
_INTL("Una estadistica de {1} llego al limite",pokemon.name),
_INTL("La estadisticas de {1} llegaron al limite, no cambiaran mas",pokemon.name)

])
})


750,NAIVEMINT,Naive Mint,Naive Mints,1,20,"When a Pokémon smells this mint, its Speed will grow more easily, but its Sp. Def will grow more slowly.",1,0,0,
 
I noticed that some things in Essentials are wrong, according new mechanics (of course they are, due that Essentials is based on Gen 6).

-Natrual Gift power was increrased in 20. All.
Spoiler:
-Some berries aren't well placed in the code. This is how it should be now.
Spoiler:
-The numbers that represent Atk., Def., Sp. Atk., Sp. Def. and Speed aren't good. That's how it looks in a good way. (0 shouldn't be there, since it represents HP).
Spoiler:
-And finally, the berries related with "pbConfusionBerry", now in Gen 8, they cure 1/3 of the total HP, not 1/8 (Gen 6 and before) or 1/2 (Gen 7).
Spoiler:
 
Last edited:
Hi all. I'm trying to make that when a modified weather ends (like the sun of Sunny Day), the original weather of the map comes back. I mean, for example, if you're in a rainy map, then you use Sunny Day in a battle there, and when the sunlight fades, the rain comes back again, like in Gen 8 (that's why I'm posting this here, but I guess that this happens in past gens too).
That's what I've done:
Spoiler:
But every time that (in this case) the sunlight fades, EVERY weather comes back xd. For some reason, the game isn't "reading" the "if PBFieldWeather::---" parts. Anyone knows how to fix or make it works properly?
 
Last edited:
It is reading them, but they're all always true. That is to say, PBFieldWeather::Sandstorm is not false and is not nil, therefore "if PBFieldWeather::Sandstorm" always runs the code, and the same for the others. You probably want to compare those weathers to something.
 
It is reading them, but they're all always true. That is to say, PBFieldWeather::Sandstorm is not false and is not nil, therefore "if PBFieldWeather::Sandstorm" always runs the code, and the same for the others. You probably want to compare those weathers to something.

Sorry for my ignorance, but is there a way to do it? Some script that I should see and compare? I don't want to bother to anyone, but I need to know where to start or be based on.
 
Sorry for my ignorance, but is there a way to do it? Some script that I should see and compare? I don't want to bother to anyone, but I need to know where to start or be based on.

I guess you want to write your ifs more like "if fieldWeather == PBFieldWeather::Sandstorm". Where "fieldWeather" is the weather on the current map. I guess it will start with $game_map. but I don't know what would come after the dot.
 
Hi all. I'm trying to make that when a modified weather ends (like the sun of Sunny Day), the original weather of the map comes back. I mean, for example, if you're in a rainy map, then you use Sunny Day in a battle there, and when the sunlight fades, the rain comes back again, like in Gen 8 (that's why I'm posting this here, but I guess that this happens in past gens too).
That's what I've done:
Spoiler:
But every time that (in this case) the sunlight fades, EVERY weather comes back xd. For some reason, the game isn't "reading" the "if PBFieldWeather::---" parts. Anyone knows how to fix or make it works properly?

Well, to make it I finally decided to create new effects that only will be activated with the weather that is at the beginning of a battle (Thanks mgriffin for the idea, indirectly xd).

-In PBEffects, add new effects in "# These effects apply to the battle (i.e. both sides)":
Code:
    Sun             = 17
    Rain            = 18
    Sand            = 19
    Snow            = 20

-Then in PokeBattle_ActiveSideField add those new effects:
Code:
      @effects[PBEffects::PsychicTerrain]  = 0
      @effects[PBEffects::Sun]             = false
      @effects[PBEffects::Rain]            = false
      @effects[PBEffects::Sand]            = false
      @effects[PBEffects::Snow]            = false
    end
  end

rescue Exception

-In PokemonBattle_Battle:
Spoiler:
Note: You have to delete the "elsif @field.effects[PBEffects::Weather]==true" part that has the same weather for everyone. For example: in HAIL, you must delete the "elsif @field.effects[PBEffects::Snow]==true" part, in RAINDANCE the "elsif @field.effects[PBEffects::Rain]==true", etc. I didn't created effects for Heavy Rain, Harsh Sun and Strong Winds, since they (originally) only can be setted thanks to an ability. Oh, and my code is in spanish. Don't forget translating if you need.
Hope this helps to improve some games.
 
Last edited:
Utility Umbrella
1) In PokeBattle_Battler
Spoiler:
2) In PokeBattle_BattlerEffects
-In every status we can find the code of Leaf Guard:
Spoiler:
3) In PokeBattle_Move
Spoiler:
4) In PokeBattle_MoveEffects
Spoiler:
5) In PokeBattle_Battle
Spoiler:
-Next thing to do, is about to add the new item to PBS:
Code:
YYY,UTILITYUMBRELLA,Utility Umbrella,Utility Umbrellas,1,2000,"An item to be held by a Pokémon. This sturdy umbrella protects the holder from the effects of sunny and rainy weathers.",0,0,0
Remember that you have to change the "YYY" with the last number that you've not used in your items.txt file.
I know that it's not the original description, but I think it fits better, because the original one says "effects of weather", and this item doesn't help in anything under Hail or in a Sandstorm, only Sun and Rain (that's why I've added Primordial Sea and Desolate Land's weathers too, since they're sun and rain, but "stronger"). But well, if you wanna change it, go ahead, it's your game xd.

[PokeCommunity.com] [Essentials v17.2] Gen 8 stuffs (Abilities, Items & Move)

Now, we only need to code the Blunder Policy.
 
Last edited:
I have coded Blunder policy but not able to provide code yet
 
Adding Zacian/ Zamazenta Crowned Forme:
V 1.0:
Spoiler:


V2.0:
What I did, thanks to:
Code:
"getForm"=>proc{|pokemon|
   next 1 if isConst?(pokemon.item,PBItems,:RUSTEDSHIELD) && $startBattle
   next 0
},
If you change Zamazenta's sprite while Behemoth Bash, its battler sprite won't change.

So, I made another script:
Spoiler:
 
Last edited:
Adding Zacian/ Zamazenta Crowned Forme:
Spoiler:

If you're using Essentials v16.2, you'll realise the script PField_Battles doesn't exist. For it to work:
Spoiler:
 
For Toxtricity's new evolution method and new alternative form:

Spoiler:
 
For Toxtricity's new evolution method and new alternative form

Here what I did for Toxel's evolution method (v17.2):
Spoiler:
 
Hello,

I was adding the attacks and abilities to my essentials project, but, after add the Punk Rock, in a pokemon battle this appears:

Excepción: NoMethodError
Mensaje: undefined method `pbProcessTurn' for #<PokeBattle_Battler:0xc5c1ba0>
PokeBattle_Battle:3103:in `pbAttackPhase'
PokeBattle_Battle:3100:in `each'
PokeBattle_Battle:3100:in `pbAttackPhase'
PokeBattle_Battle:3088:in `times'
PokeBattle_Battle:3088:in `pbAttackPhase'
PokeBattle_Battle:2769:in `pbStartBattleCore'
PokeBattle_Battle:2768:in `logonerr'
PokeBattle_Battle:2768:in `pbStartBattleCore'
PokeBattle_Battle:2754:in `loop'
PokeBattle_Battle:2777:in `pbStartBattleCore'

please help!
 
"Ernn, Punk Rock doesn't edit nothing about pbProcessTurn. You need double check what you added before Punk Rock."

yeah i know, but before add it the battles works great, anyway, can you know what con i do to fix it, 'cause i look all in that lines and i am desperate.
 
I added those EXP. Candies and it gave me this error:

Script 'PItem_Items' line 72: NoMethodError occurred.
undefined method"[]" for nil:NilClass

Here's the line 72:

Spoiler:

I followed all your instructions to the letter, so how to fix this?
 
Back
Top