McPaul
On my way to become a controversial and hated memb
- 289
- Posts
- 7
- Years
- He/ Him
- Switzerland
- Seen Apr 20, 2025
Hey yo!
After months of crazy depression I'm kinda back in the ROM hack game.
I'm still randomly trying some things to see if I can manage to get through. I want to get rid of HM slaves by letting mons use HM if they can learn them but without them having the move. How could I script that?
I'm currently in pokeruby in the file pokeruby\data\field_move_scripts.inc and take for example the cut script:
S_CuttableTree:: @ 81B0DCC
lockall
goto_if_unset FLAG_BADGE01_GET, CannotUseCut
checkpartymove MOVE_CUT
compare VAR_RESULT, 6
goto_if_eq CannotUseCut
setfieldeffectargument 0, VAR_RESULT
bufferpartymonnick 0, VAR_RESULT
buffermovename 1, MOVE_CUT
msgbox UseCutPromptText, MSGBOX_YESNO
compare VAR_RESULT, NO
goto_if_eq Cut_ChoseNo
msgbox UsedCutRockSmashText, MSGBOX_DEFAULT
closemessage
dofieldeffect FLDEFF_USE_CUT_ON_TREE
waitstate
goto DoTreeCutMovement
end
DoCutFieldEffectScript:: @ 81B0E16
lockall
dofieldeffect FLDEFF_USE_CUT_ON_TREE
waitstate
goto DoTreeCutMovement
end
DoTreeCutMovement: @ 81B0E21
applymovement VAR_LAST_TALKED, TreeCutMovement @ tree cut animation
waitmovement 0
removeobject VAR_LAST_TALKED @ tree disappears
releaseall
end
TreeCutMovement: @ 81B0E30
cut_tree
step_end
CannotUseCut: @ 81B0E32
msgbox CannotUseCutText, MSGBOX_SIGN
releaseall
end
Cut_ChoseNo: @ 81B0E3C
closemessage
releaseall
end
UseCutPromptText: @ 81B0E3F
.string "This tree looks like it can be CUT down.\p"
.string "Would you like to CUT it?$"
UsedCutRockSmashText: @ 81B0E82
.string "{STR_VAR_1} used {STR_VAR_2}.$"
CannotUseCutText: @ 81B0E8E
.string "This tree looks like it can be CUT down.$"
The interesting part there would be checkpartymove MOVE_CUT, it could be replaced by something like (I'm inventing there but let's be creative) checkifpartymoncanlearnmove MOVE_CUT but well I don't know how to do such a thing.
The second part would me making HM moves appear in the Pokémon party menu even if they don't have the move and once the required badge is obtained (for HM moves like FLY for example)
Could maybe someone help me?
Thanks a lot!
After months of crazy depression I'm kinda back in the ROM hack game.
I'm still randomly trying some things to see if I can manage to get through. I want to get rid of HM slaves by letting mons use HM if they can learn them but without them having the move. How could I script that?
I'm currently in pokeruby in the file pokeruby\data\field_move_scripts.inc and take for example the cut script:
Spoiler:
S_CuttableTree:: @ 81B0DCC
lockall
goto_if_unset FLAG_BADGE01_GET, CannotUseCut
checkpartymove MOVE_CUT
compare VAR_RESULT, 6
goto_if_eq CannotUseCut
setfieldeffectargument 0, VAR_RESULT
bufferpartymonnick 0, VAR_RESULT
buffermovename 1, MOVE_CUT
msgbox UseCutPromptText, MSGBOX_YESNO
compare VAR_RESULT, NO
goto_if_eq Cut_ChoseNo
msgbox UsedCutRockSmashText, MSGBOX_DEFAULT
closemessage
dofieldeffect FLDEFF_USE_CUT_ON_TREE
waitstate
goto DoTreeCutMovement
end
DoCutFieldEffectScript:: @ 81B0E16
lockall
dofieldeffect FLDEFF_USE_CUT_ON_TREE
waitstate
goto DoTreeCutMovement
end
DoTreeCutMovement: @ 81B0E21
applymovement VAR_LAST_TALKED, TreeCutMovement @ tree cut animation
waitmovement 0
removeobject VAR_LAST_TALKED @ tree disappears
releaseall
end
TreeCutMovement: @ 81B0E30
cut_tree
step_end
CannotUseCut: @ 81B0E32
msgbox CannotUseCutText, MSGBOX_SIGN
releaseall
end
Cut_ChoseNo: @ 81B0E3C
closemessage
releaseall
end
UseCutPromptText: @ 81B0E3F
.string "This tree looks like it can be CUT down.\p"
.string "Would you like to CUT it?$"
UsedCutRockSmashText: @ 81B0E82
.string "{STR_VAR_1} used {STR_VAR_2}.$"
CannotUseCutText: @ 81B0E8E
.string "This tree looks like it can be CUT down.$"
The interesting part there would be checkpartymove MOVE_CUT, it could be replaced by something like (I'm inventing there but let's be creative) checkifpartymoncanlearnmove MOVE_CUT but well I don't know how to do such a thing.
The second part would me making HM moves appear in the Pokémon party menu even if they don't have the move and once the required badge is obtained (for HM moves like FLY for example)
Could maybe someone help me?
Thanks a lot!