Recent content by James Davy

  1. J

    [Scripting Question] Custom move issues

    Night Terror: It seems to combine the mechanics of Dream Eater, draining moves and Nightmare or Curse (Ghost type effect). Look up how those moves are programmed. My question is; does the attrition aspect end when the target wakes up or is it like the attrition damage dealt from being poisoned...
  2. J

    [Scripting Question] Can I program in a new Generation for the Pokedex?

    In the PBS file "pokemon.txt" there's a property called "Generation". It's not used in vanilla Essentials v21.1.
  3. J

    [Scripting Question] Help defining a status move that has the "burn up" effect

    You defined the move's function in the PBS file as UserLosesWaterTypeRaiseUserDefense2 and in the script as UserLosesWaterTypeRaiseUserDefense3
  4. J

    [Scripting Question] [v20.1] Move That Damages Attracted Foes

    In def pbEffectAfterAllHits make the following change: def pbEffectAfterAllHits(user, target) return if target.fainted? return if target.damageState.unaffected || target.damageState.substitute # return if target.effects[PBEffects::Attract] >= 0 return if...
  5. J

    [Eventing Question] (V18.1) Following Trainer event not working, Syntax error but i don't know what I did wrong

    It appears to be an ID mismatch. If you change the first argument to @event_id that makes the event become the follower event without the possibility of an ID mismatch error.
  6. J

    [Eventing Question] (V18.1) Following Trainer event not working, Syntax error but i don't know what I did wrong

    The bug appears to be in AddDependency2. Check your script and look for anything that doesn't look right.
  7. J

    [Scripting Question] Change species if the Pokémon has a certain form

    V21 code incoming… In [[ Overworld ]], Overworld_DayCare, try this code: def determine_egg_species(parent_species, mother, father) ret = GameData::Species.get(parent_species).get_baby_species(true, mother.item_id, father.item_id) # Check for alternate offspring (i.e. Nidoran...
  8. J

    [Scripting Question] Trainer coding

    Not likely as trainers are defined in the trainers.txt PBS file.
  9. J

    [Scripting Question] Giving Shiny pokemon special EV/IV caps

    Not quite. My initial code had a bug. What I would suggest is in the Pokemon script as follows: # @return [Boolean] whether this Pokémon is shiny (differently colored) def shiny? if @shiny.nil? a = @personalID ^ @owner.id b = a & 0xFFFF c = (a >> 16) & 0xFFFF d =...
  10. J

    [Scripting Question] Attempting to make a move that heals the ally when you do damage (again, sorta)

    What you should do is use two separate arrays for the two values you're working with. class Battle::Move::HealAllyOrDamageFoeAndCureTargetBurn < Battle::Move def pbEffectWhenDealingDamage(user, target) hitAllyId = [] hitAllyHp = [] battler.allAllies.each do |b| next if...
  11. J

    [Scripting Question] Change species if the Pokémon has a certain form

    Sounds like the standard incense item mechanic that changes the newly-hatched Pokémon's species to their baby form (e.g. a female Snorlax holding a Full Incense will lay a Munchlax egg instead of a Snorlax egg). Try copying that. No alternate forms are necessary.
Back
Top