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

changing pokemon happiness

  • 124
    Posts
    8
    Years
    • Seen Apr 5, 2024
    I would like to make a script that forces happiness on pokemon, so I can easily evolve pokemon that need their happiness close to max to evolve. Which commands could i use?
     
  • 460
    Posts
    6
    Years
    • Seen yesterday
    I would like to make a script that forces happiness on pokemon, so I can easily evolve pokemon that need their happiness close to max to evolve. Which commands could i use?
    There's no script command or special for setting friendship. You should create a C function that does it with SetMonData, and call that from your script.
     
  • 124
    Posts
    8
    Years
    • Seen Apr 5, 2024
    There's no script command or special for setting friendship. You should create a C function that does it with SetMonData, and call that from your script.
    I would like that, do u have a script in mind I can kinda edit/alter to get that result, one that already has a similar function. And would I need the encryption thing from Ghoulslash?
     
  • 460
    Posts
    6
    Years
    • Seen yesterday
    I would like that, do u have a script in mind I can kinda edit/alter to get that result, one that already has a similar function. And would I need the encryption thing from Ghoulslash?
    You can find a minimal example of a similar C function, and how it's used in a script here on the wiki.
    And no, you don't need an "encryption thing" as the SetMonData function already handles the substruct encryption.
     
  • 124
    Posts
    8
    Years
    • Seen Apr 5, 2024
    You can find a minimal example of a similar C function, and how it's used in a script here on the wiki.
    And no, you don't need an "encryption thing" as the SetMonData function already handles the substruct encryption
    That's good this is what I came up with but, I dont think its working.

    void SetMonFriendship(void)
    {
    u8 friendship = 220;
    SetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_FRIENDSHIP, &friendship);
    }

    am I missing something?

    I think I figured it out!
    thanks, just dont know how to check if it works other than just increasing level to see evolution, I know it works but
    i dont know where the person that checks it is
     
    Last edited:
    Back
    Top