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

[Scripting Question] Custom move issues

  • 14
    Posts
    308
    Days
    • Seen Oct 7, 2024
    So, I've been inputting custom moves into my game for the final step before play testing for the release of the game but I'm running into an issue with certain moves and their FunctionCode section not working in game like raising their atk or def. If someone can help guide me a bit to figure this out that would be great. I will include the ones that my codes are not working here:

    #-------------------------------
    [NIGHTTERROR]
    Name = Night Terror
    Type = GHOST
    Category = Special
    Accuracy = 100
    Power = 75
    TotalPP = 5
    Target = NearOther
    FunctionCode = HealUserByHalfOfDamageDoneIfTargetAsleepStartDamageTargetEachTurnIfTargetAsleep
    EffectChance = 100
    Flags = CanProtect,CanMirrorMove
    Description = The user enters the foes dream and causes them absorbs their energy to heal itself. The foe continues to take damage after the user leaves due to fear.
    #-------------------------------
    [TWINTWISTER]
    Name = Twin Twister
    Type = FLYING
    Category = Special
    Power = 80
    Accuracy = 90
    TotalPP = 10
    Target = AllNearFoes
    FunctionCode = HitTwoTimesHitsTargetInSkyFlinchTarget
    Flags = CanProtect,CanMirrorMove
    EffectChance = 100
    Description = The user whips up two vicious tornados to tear at the opposing team. It may also make targets flinch.
    #-------------------------------
    [ETERNALVOID]
    Name = Eternal Void
    Type = VOID
    Category = Status
    Accuracy = 0
    TotalPP = 5
    Target = User
    FunctionCode = RaiseUserSpdEvasion2
    EffectChance = 100
    Flags = CanMimic
    Description = The user shrouds itself in a cloak of cosmic energy that conceals itself as well as increasing the speed and power of its attacks.
    #-------------------------------
    [DRACONIANSURGE]
    Name = Draconian Surge
    Type = DRAGON
    Category = Status
    Accuracy = 0
    TotalPP = 5
    Target = User
    FunctionCode = RaiseTargetAtkDefSpd2
    Description = The user releases a surge of energy built up in order to maximize its battling potential.
    EffectChance = 100
    Flags = CanMimic
    #-------------------------------
    [POTENTIALUNLEASHED]
    Name = Potential Unleashed
    Type = NORMAL
    Category = Status
    Accuracy = 100
    TotalPP = 1
    Target = User
    FunctionCode = RaiseTargetMainStats1
    EffectChance = 100
    Flags = CanMimic
    Description = The user unlocks its true potential in one burst.
    #-------------------------------
    [GAMMABURST]
    Name = Gamma Burst
    Type = VOID
    Category = Special
    Power = 100
    Accuracy = 100
    TotalPP = 5
    Target = AllFoes
    FunctionCode = BadPoisonTargetLowerTargetSpd1DoublePowerIfTargetPoisoned
    EffectChance = 100
    Flags = CanProtect,CanMirrorMove
    Description = The user releases a burst of gamma energy that it absorbed while travelling throughout space. The gamma energy causes immense poisoning.
    #-------------------------------
    [METEORSTRIKE]
    Name = Meteor Strike
    Type = VOID
    Category = Special
    Power = 150
    Accuracy = 100
    TotalPP = 5
    Target = AllFoes
    FunctionCode = DoublePowerIfTargetInSkyLowerSpd2
    Flags = CanProtect,CanMirrorMove
    EffectChance = 100
    Description = The user pulls a meteor that are circling the planet down in order to strike its foes.
    #-------------------------------
    [ATOMICSPLICER]
    Name = Atomic Splicer
    Type = VOID
    Category = Physical
    Power = 150
    Accuracy = 100
    TotalPP = 5
    Target = NearOther
    FunctionCode = RemoveProtectionsMayCauseFlinch
    EffectChance = 100
    Flags = CanProtect,CanMirrorMove
    Description = The user uses immense speed to cut through the opponent down to the foes atoms. May cause the opponent to flinch.
    #-------------------------------
    #-------------------------------
    [ORBITALKICK]
    Name = Orbital Kick
    Type = VOID
    Category = Physical
    Power = 80
    Accuracy = 100
    TotalPP = 15
    Target = NearOther
    FunctionCode = PowerLowerWithUserHPRaiseUserSpd1
    EffectChance = 50
    Flags = CanProtect,CanMirrorMove
    Description = The user collects the remainder of its strength to attack the foes with a kick that becomes more brutal with lower hp.
    #-------------------------------
    [STARDUSTUPPERCUT]
    Name = Stardust Uppercut
    Type = VOID
    Category = Physical
    Power = 100
    Accuracy = 100
    TotalPP = 10
    Target = NearOther
    FunctionCode = HitsTargetInSkySleepTarget
    EffectChance = 100
    Flags = CanProtect,CanMirrorMove
    Description = The user uppercuts the foe with such force they are knocked unconscious. The force of this punch allows the user to hit foes even in mid flight.
    #-------------------------------
    [ATOMICDISCHARGE]
    Name = Atomic Discharge
    Type = VOID
    Category = Special
    Power = 250
    Accuracy = 100
    TotalPP = 5
    Target = AllNearOthers
    FunctionCode = UserFaintsExplosiveRemoveProtections
    Flags = CanMirrorMove
    EffectChance = 100
    Description = The user allows the internal cosmic energy inside to explode, inflicting damage on those around it. The user faints upon using this move.
    #-------------------------------
    #-------------------------------
    [SPACIALAWARENESS]
    Name = Spacial Awareness
    Type = VOID
    Category = Status
    Accuracy = 0
    TotalPP = 5
    Target = User
    FunctionCode = RaiseTargetSpEvasion2
    Flags = CanMirrorMove
    EffectChance = 100
    Description = The user closes its eyes to focus on its surroundings, allowing it to evade attacks easier.
    #-------------------------------
    [COSMICWRATH]
    Name = Cosmic Wrath
    Type = VOID
    Category = Status
    Accuracy = 0
    TotalPP = 1
    Target = User
    FunctionCode = RaiseUserMainStats2
    Flags = CanMirrorMove
    EffectChance = 100
    Description = The user unleashes all of the cosmic energy within in order to boost its overall power.
    #-------------------------------
    [CORRUPTEDSOUL]
    Name = Corrupted Soul
    Type = VOID
    Category = Status
    Accuracy = 100
    TotalPP = 5
    Target = NearOther
    FunctionCode = ConfuseTargetLowerTargetDef1
    Flags = CanProtect,CanMirrorMove
    EffectChance = 100
    Description = The user touches the soul of its foe, causing confusion and lowering its defense.
    #-------------------------------
     
    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?

    Twin Twister:
    It appears to be like Hurricane with the mechanics of Double Kick and the chance to make the target(s) flinch. You may want to lower the EffectChance as a value of 100 means it will always happen depending on certain abilities.

    Eternal Void:
    The Void type fascinates me, NGL. Look up Double Team and Agility and combine them together. With that name, it's likely a legendary Pokémon's signature move.

    Draconian Surge:
    Look up the stat boosting aspect of Ancient Power and copy that sans the Special stat increases.

    Potential Unleashed:
    Ancient Power's stat boosts. With a PP of 1, the move 'ought to max out the user's stats instead of boosting by one stage.

    Gamma Burst:
    This combines Toxic, Bubble's Speed drop, and Venoshock into a damaging move and these effects should be additional effects.

    Meteor Strike:
    Hurricane's ability to hit the target during Fly with the additional effect of Scary Face.

    Atomic Splicer:
    Take Feint and give it the additional effect of Bite. The Effect Chance should be lower.

    Orbital Kick:
    Combines Water Spout with the additional Speed boost from Flame Charge.

    Stardust Uppercut:
    Hurricane combined with Hypnosis.

    Atomic Discharge:
    Explosion combined with Feint. My suggestion is add screen removal to the mechanics (à la Brick Break)

    Spacial Awareness:
    Double Team but a two-stage boost.

    Cosmic Wrath:
    See Potential Unleashed.

    Corrupted Soul:
    Combine Dynamic Punch with Leer. The Accuracy may need to be lower.
     
    Okay, so for a lot of these you have combined two function codes and expected them to work as both of the two different function codes, which is not how function codes work. This is different to flags, which do work like that
    What you have to do is basically add the new function codes by combining the two of them. This will be different for each move

    I'll do the first for you:
    Night Terror is obviously a combo of Dream Eater and Nightmare

    It is probably easier to take Dream Eater as a parent class and add Nightmare to it
    1) Let's check out the class for Dream Eater
    Dream Eater Parent Class
    Spoiler:

    So, your move would want to retain the healingMove and the pbFailsAgainstTarget parts
    But we would want to add parts to the pbEffectAgainstTarget

    2) So let's make our new move have HealUserByHalfOfDamageDoneIfTargetAsleep as the parent class name
    And remove those two methods we don't need, as they will carry over
    We then add your function code name as the child class name. Is the real Night Terror the length of that function code?

    That leaves this
    Spoiler:


    3) This does the same as Dream Eater at the moment, so lets add Nightmare into it and have a look
    Looking at the pbFailsAgainstTarget, it would be the same as Dream Eater, except it also fails if the target is in the middle of a nightmare
    In our new class, we can have it such that Nightmare would not start if the target is already having a nightmare
    So we can remove the pbFailsAgainstTarget method, and incorporate the pbEffectAgainstTarget into our class, giving this:
    Spoiler:


    4) Let's give it some tweaks

    a) We will put the Dream Eater and Nightmare parts separately, so if one fails the other doesn't
    This involves getting rid of the "return" on Line 3, and putting an end before our comment separating the two parts
    b) We change our "#" to an "unless" to avoid giving the target if they are already in a nightmare
    c) We add another end to avoid a syntax error
    d) We indent it correctly, because while we may be adding Night Terror, but we still have some standards!

    Night Terror
    Spoiler:


    Please Test this! I was too scared!
    NOTE: This move may do nothing and not show a fail message in very niche circumstances (If no damage was taken by the target and they already had a nightmare), but wont crash the game

    You can use this logic to do the rest of them!
    Good luck with your project!

    Hope this helps!
    Swdfm
     
    Back
    Top