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

Crystal hack: Pokémon Polished Crystal (update 2.2.0)

755
Posts
7
Years
    • NY
    • Seen Oct 9, 2023
    Question: I'm considering showing move power and accuracy in battle; would this be worth implementing?

    Mockup:

    Pokémon Polished Crystal (update 2.2.0)


    No, I was just pointing out that your change to how battle style worked means I'll get a conflict. But it's not really an issue because the merge should be trivial. :p

    EDIT: and *no*, I'd consider that completely unfair. Also, I want to rewrite the AI to improve it, but haven't gotten to it yet. I guess I wont get to it before 3.0 is done, but yeah.

    I'm not 100% sure on how exactly the game handles battle style right now, but after the rewrite, the offer will only show up if the enemy is switching as a result of a faint that itself wasn't the result from another switch from faint (Spikes loops), and not on double-KOs either.

    Here's the relevant logic: https://sprunge.us/RWFQ

    If you aren't sure you can get some feature rewrite done this year, then please put it off until 3.1 or 4.0.

    Your proposed switch logic makes sense.
     

    FIQ

    251
    Posts
    11
    Years
    • Seen Sep 15, 2022
    Question: I'm considering showing move power and accuracy in battle; would this be worth implementing?

    Wouldn't it be better to be able to access the move interface by pressing Start in the move selection screen, kinda like how you can press L+A in Gen V and forwards? What you showed seems a bit cluttered
    Or, at least being able to actually access the Moves UI in battle -- for some reason, the game doesn't allow you to do this (it removes the option from the options you have in the pokémon list selection menu...?)

    And yeah, I've been holding off AI rewrite already -- otherwise, I'd have mentioned it more and/or created a github issue about it. As it is, it is just listed in my personal github fork of your repo since I haven't done any notable progress on it.
     
    755
    Posts
    7
    Years
    • NY
    • Seen Oct 9, 2023
    Wouldn't it be better to be able to access the move interface by pressing Start in the move selection screen, kinda like how you can press L+A in Gen V and forwards? What you showed seems a bit cluttered
    Or, at least being able to actually access the Moves UI in battle -- for some reason, the game doesn't allow you to do this (it removes the option from the options you have in the pokémon list selection menu...?)

    And yeah, I've been holding off AI rewrite already -- otherwise, I'd have mentioned it more and/or created a github issue about it. As it is, it is just listed in my personal github fork of your repo since I haven't done any notable progress on it.

    I tried enabling the Moves option during battle and it corrupted the graphics. Haven't tried it again since then, but it might be fixable.
     

    FIQ

    251
    Posts
    11
    Years
    • Seen Sep 15, 2022
    Is there a particular reason why you only have "switch sometimes" in the AI flags? This makes it only switch 20% of the time if there's a reasonable reason to do it, and 80% when it really should do it (Perish Song for example). I think "switch often" might be a more reasonable default (it switches 80% of the time if there's a good reason to, and 96% of the time if it really should do it).

    I'm "done" with the faint+switch rewrite (apparently it shaved off around 700 lines of code if you're wondering), and atm I'm trying to deal with a couple of bugs that arised. Apparently I broke enemy nicknames somehow, something I don't really understand atm, which seems like it will be the hardest to track down. I thought I had completely broken the battle engine because it crashed very spectactularly at first, but after forcing enemies to load nicknames from the player party, almost all issues went away. There were a few other bugs, but they seem much simpler.
     
    Last edited:
    755
    Posts
    7
    Years
    • NY
    • Seen Oct 9, 2023
    Is there a particular reason why you only have "switch sometimes" in the AI flags? This makes it only switch 20% of the time if there's a reasonable reason to do it, and 80% when it really should do it (Perish Song for example). I think "switch often" might be a more reasonable default (it switches 80% of the time if there's a good reason to, and 96% of the time if it really should do it).

    I'm "done" with the faint+switch rewrite (apparently it shaved off around 700 lines of code if you're wondering), and atm I'm trying to deal with a couple of bugs that arised. Apparently I broke enemy nicknames somehow, something I don't really understand atm, which seems like it will be the hardest to track down. I thought I had completely broken the battle engine because it crashed very spectactularly at first, but after forcing enemies to load nicknames from the player party, almost all issues went away. There were a few other bugs, but they seem much simpler.

    Early on I copied the leaders'/elites' trainer attributes on the assumption that they were the best. For some reason Schoolboy, Lass, Fisher, and Twins have SWITCH_OFTEN in default pokecrystal. Fixed it just now.

    Thanks for trimming the code down. Hopefully it'll also make implementing more switch-related stuff easier, like U-turn or any abilities.
     
    Last edited:

    FIQ

    251
    Posts
    11
    Years
    • Seen Sep 15, 2022
    U-Turn after rewrite would look something like this:

    Code:
    BattleCommand_UTurn:
        ; check if we have at least 2 fit pokémon
        call UserCanSwitch
        ret nz
        farcall ForceUserSwitchDecision
        ; avoids default withdraw message
        ld a, U_TURN
        ld [wForcedSwitch], a
        ; custom withdraw message
        ld hl, BattleText_UserWentBack
        call StdBattleTextBox
        farcall UserSwitch
        ret
    Compare with how Baton Pass looks like atm. (I made wForcedSwitch be used not just for Roar, but also Baton Pass, and when coded, U-Turn, to allow the switch logic to handle them differently, either by just omitting message(s) or, like in Baton Pass, not reset statuses, etc)

    EDIT: Something I intended to address in the AI rewrite when I get to it (probably not for 3.0) was to, similar to competitive players, roughly know what kind of sets to expect. From the AI's point of view, this amounted to "the AI knows the player's movesets" since I didn't really want to create a huge lookup table for competitive movesets (I considered exempting edge cases who has tons of sets like Mew). If you are fine with this, this change can actually be done on the current AI trivially. If you feel like this is worthwhile, replace PlayerUsedMoves with BattleMonMoves in ai/switch.asm and ai/scoring.asm for Counter+Mirror Coat (Smart_RazorWind is to prevent usage of Razor Wind if Protect -- strangely not 2-turn moves in general -- but I personally feel like the enemy should discover this on its own).
     
    Last edited:
    755
    Posts
    7
    Years
    • NY
    • Seen Oct 9, 2023
    U-Turn after rewrite would look something like this:

    Code:
    BattleCommand_UTurn:
        ; check if we have at least 2 fit pokémon
        call UserCanSwitch
        ret nz
        farcall ForceUserSwitchDecision
        ; avoids default withdraw message
        ld a, U_TURN
        ld [wForcedSwitch], a
        ; custom withdraw message
        ld hl, BattleText_UserWentBack
        call StdBattleTextBox
        farcall UserSwitch
        ret
    Compare with how Baton Pass looks like atm. (I made wForcedSwitch be used not just for Roar, but also Baton Pass, and when coded, U-Turn, to allow the switch logic to handle them differently, either by just omitting message(s) or, like in Baton Pass, not reset statuses, etc)

    EDIT: Something I intended to address in the AI rewrite when I get to it (probably not for 3.0) was to, similar to competitive players, roughly know what kind of sets to expect. From the AI's point of view, this amounted to "the AI knows the player's movesets" since I didn't really want to create a huge lookup table for competitive movesets (I considered exempting edge cases who has tons of sets like Mew). If you are fine with this, this change can actually be done on the current AI trivially. If you feel like this is worthwhile, replace PlayerUsedMoves with BattleMonMoves in ai/switch.asm and ai/scoring.asm for Counter+Mirror Coat (Smart_RazorWind is to prevent usage of Razor Wind if Protect -- strangely not 2-turn moves in general -- but I personally feel like the enemy should discover this on its own).

    I think that "the AI knows the player's movesets" could result in some weird and obviously "cheating" AI behavior. Like, I send out a Persian with Ice Beam against their Dragonite, and they switch out. I'd prefer if the AI discovered the players's moves, but had a separate set of reasonable assumptions, like "Pokémon tend to know STAB moves". And yeah, let's not start a rewrite like that until 3.0 is out.
     

    FIQ

    251
    Posts
    11
    Years
    • Seen Sep 15, 2022
    I think that "the AI knows the player's movesets" could result in some weird and obviously "cheating" AI behavior. Like, I send out a Persian with Ice Beam against their Dragonite, and they switch out. I'd prefer if the AI discovered the players's moves, but had a separate set of reasonable assumptions, like "Pokémon tend to know STAB moves". And yeah, let's not start a rewrite like that until 3.0 is out.

    It partially does that at the moment (where PlayerUsedMoves isn't full) in that it will look at hypothetical STAB moves.

    The major issue with not having any moveset reference whatsoever besides this is that it misses out on coverage attacks. It also doesn't account for stuff like Encore, status moves, etc. This is a rather major undertaking to predict, and the alternative (lookup tables of movesets a la Smogon's databases or similar, which Technical Machine uses) isn't really feasible in this format. This is why I figured letting the AI know it outright was fair. Especially if you consider the fact that the player is a major character, and nothing prevents them from scouting out leaders' movesets in-universe (and giving each NPC trainer a memory of sets is not a good idea) so I figured the reverse -- letting the AI know player movesets (I'd say the player is a pretty major character) -- was fair enough. In addition to this, Anniversary Crystal's "Advanced AI" does give the AI knowledge of the player's movesets, so there is predecent.
    Also, if I, as a player, were battling you and you decided to send out Persian for whatever reason against my Dragonite, I would figure "OK, there has to be a reason you did this", and possibly "predict" the coverage either way.

    I understand what you mean though, it might be jarring/annoying if the AI did this.
     
    755
    Posts
    7
    Years
    • NY
    • Seen Oct 9, 2023
    You can choose a typeface now. The bold one is from the NES. The serif one is called Megan Serif; I'm not really happy with it, let me know if there's a good classic 7x7 computing/gaming font that's distinguished from Normal and Bold.

    Pokémon Polished Crystal (update 2.2.0)


    Edit: Here's my own attempt.

    Pokémon Polished Crystal (update 2.2.0)
     
    Last edited:
    52
    Posts
    7
    Years
  • You can choose a typeface now. The bold one is from the NES. The serif one is called Megan Serif; I'm not really happy with it, let me know if there's a good classic 7x7 computing/gaming font that's distinguished from Normal and Bold.

    Pokémon Polished Crystal (update 2.2.0)


    Edit: Here's my own attempt.

    Pokémon Polished Crystal (update 2.2.0)

    Zelda: Link's Awakening font may work

    Pokémon Polished Crystal (update 2.2.0)


    I attached an extended version of it in a .ttf file (inside the zip)

    View attachment ZeldaDXTTBRK.zip
     

    FIQ

    251
    Posts
    11
    Years
    • Seen Sep 15, 2022
    Maybe the clock cheat should have an equavilent for birth options?
     
    1
    Posts
    7
    Years
    • Seen Jun 30, 2017
    Hello

    Congratulations on this awesome work, its the best rom hack out there. When you expect 2.2.1 to be ready? from what i've seen on github, you already have a lot of new features and fixes that are interesting. Can't wait for it to be available.

    keep up the good work!
     
    Back
    Top