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

[Custom Feature Question] Is it possible to program "Auto Battle Mode" to work like the Tactics from Dragon Quest Monsters Joker?

  • 429
    Posts
    4
    Years
    The Tactics System in Dragon Quest Monsters Joker lets the player assign a "Tactic" to their monster, so when "Fight" is selected by the player, your Monsters will decide for themselves what to do based on what Tactic they were given. Monsters following their Tactics are smart enough to not do anything stupid like using a move that will have no effect on their target as long as a better option is available to the Monster. And if your Monster is told to "Follow orders", it will let you decide what it does.

    "Show No Mercy" tells the Monster to do as much damage as possible, using whatever attacking move it knows that will do the most damage to whichever available enemy target will take the most damage from the attack.

    "Focus On Healing" tells the Monster to use a healing move on any ally at 75% HP or less, or if the Monster has no allies at 75% HP or less currently in battle or lacks any healing moves, act as if Mix It Up is the current Tactic.

    "Mix It Up" tells the Monster to pick a random move it knows and use it.

    "Follow Orders" tells the Monster to do whatever his trainer tells him to do.

    There were other Tactics in Dragon Quest Monsters Joker but these four would be the best for Pokemon.

    How can this be programmed into Pokemon Essentials so the player can pick between these four Tactics for each of their Pokemon during battle to automate the move selection process during battle as much as the player desires?

    I already coded an option to show up in the Pokemon Menu outside battle for changing Tactics, it lets the player change the Pokemon's Tactics value from 0 for Follow Orders(The default), 1 for Show No Mercy, 2 for Mix It Up, and 3 for Focus On Healing, but right now that "Tactic" value doesn't actually do anything in battle. I don't know enough about Pokemon Essentials for that part.
     

    StCooler

    Mayst thou thy peace discover.
  • 9,315
    Posts
    4
    Years
    • Seen yesterday
    Hey there,
    So, the basic answer to your question is "yes", because everything you can think of can be programmed (except some mathematical problems but you probably won't think about them).

    So, without trolling.

    Can you change the tactic in battle?
    If yes, then you'll have to code a similar menu to the class of "FightMenuDisplay", and instead of displaying the moves, you display the four tactics.

    Anyways, you'll have to rework the AI system. It's not too complicated though. The AI works with a (badly-written) scoring system; basically the Pokémon checks some variables in game and gives a score reflecting how likely the Pokémon is to choose a given move. You should check every move function and add like +50 to its score if the move corresponds to the given tactic. For example, +50 to any healing move if the tactic is set to "Focus on healing". Or add +50 to the score if it's a damaging move.
    Also, you have to rewrite the pbCommandPhaseLoop function and rework these lines:

    Code:
            case cmd
            when 0    # Fight
              break if pbFightMenu(idxBattler) # add a condition here : if the tactic is set to "Follow Orders"
              # Add here the call to a function that chooses the move by AI depending on the tactic.

    Of course those are some guidelines, I did not delve into the detailed code.
     
  • 429
    Posts
    4
    Years
    Would it be necessary to code Healing Pulse to only target allies? I can't see any situation outside of "Funbro" trolling when anyone would ever want to heal their opponent.

    Speaking of which I made Recycle and Harvest fail to trigger if a Leppa Berry is held, to prevent endless battles via endless PP regeneration.
     
    Back
    Top