• 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!
  • It's time to vote for your favorite Pokémon Battle Revolution protagonist in our new weekly protagonist poll! Click here to cast your vote and let us know which PBR protagonist you like most.
  • 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.

[Script✓] CFRU scripting - How to make a form change item?

benicioneto

Google Destruct
  • 4
    Posts
    12
    Years
    • Seen Jul 12, 2022
    Hello everyone,

    I'm having some dificulty to understand what i should do to make a Gracidea, DNA Splicer ... item.

    I'm using CFRU!

    I know this code in "src > party_menu.c":
    static void ItemUseCB_FormChangeItem(u8 taskId, TaskFunc func)
    {
    struct Pokemon* mon = &gPlayerParty[gPartyMenu.slotId];
    u16 item = Var800E;
    u16 species = GetMonData(mon, MON_DATA_SPECIES2, NULL);

    PlaySE(SE_SELECT);
    switch (item) {
    case ITEM_GRACIDEA:
    #if (defined SPECIES_SHAYMIN && defined SPECIES_SHAYMIN_SKY)
    if (species == SPECIES_SHAYMIN)
    {
    species = SPECIES_SHAYMIN_SKY;
    DoItemFormChange(mon, species);
    gTasks[taskId].func = func;
    }
    else
    #endif
    goto NO_EFFECT;
    break;
    case ITEM_REVEAL_GLASS:
    switch (species) ... {



    That come from this in "src > party_menu.c":
    void FieldUseFunc_FormChangeItem(u8 taskId)
    {
    gItemUseCB = ItemUseCB_FormChangeItem;

    if (gTasks[taskId].data[3] == 0) //From Bag
    {
    SetUpItemUseCallback(taskId);
    }
    else //From Overworld
    {
    FadeScreen(FADE_TO_BLACK, 0);
    gTasks[taskId].func = FormChangeItem_ShowPartyMenuFromField;
    }
    }


    And there is this code in "routinepointers":
    ifdef UNBOUND
    FieldUseFunc_MaxPowder 8876C40
    FieldUseFunc_Honey 8876E7C
    FieldUseFunc_EVReducingBerry 8877C68
    FieldUseFunc_EVReducingBerry 8877C94
    FieldUseFunc_EVReducingBerry 8877CC0
    FieldUseFunc_EVReducingBerry 8877CEC
    FieldUseFunc_EVReducingBerry 8877D18
    FieldUseFunc_EVReducingBerry 8877D44
    FieldUseFunc_VsSeeker 887A054
    FieldUseFunc_FormChangeItem 887BE3C
    FieldUseFunc_FormChangeItem 887BE68
    FieldUseFunc_FormChangeItem 887BE94
    FieldUseFunc_FormChangeItem 887BE10
    FieldUseFunc_FormChangeItem 887CC54
    FieldUseFunc_FormChangeItem 887CC80
    FieldUseFunc_FormChangeItem 887CCAC
    FieldUseFunc_FormChangeItem 887CCD8
    FieldUseFunc_FormChangeItem 887D308
    FieldUseFunc_FormChangeItem 887D334
    FieldUseFunc_AbilityCapsule 8877168
    FieldUseFunc_AbilityCapsule 887CA9C
    endif



    And i know that i need to set a fieldeffect:
    +"DNA SPLICERS", 720, 0, None, 0, <3DAFD6>, 0, 0, key, 4, <null>, 0, <null>, 0

    So how i do config Gracidea item and make it work?
     
    Last edited:
    Back
    Top