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

[Pokeemerald] [Pokefirered + Pokeemerald] Quest Menu

239
Posts
8
Years
  • Age 31
  • Seen Apr 15, 2024
[Pokefirered] & [Pokeemerald] Quest Menu

This feature was originally implemented for binary hacking, but the PC menu works quite well for a quest menu in my opinion so I kept the original implementation rather than try to improve it.

Pokefirered repo
Pokeemerald repo

zO9MisS.gif


How To Add
How to Use (Pokeemerald):
  • By default the quest menu is added to the start menu when "FLAG_SYS_QUEST_MENU_GET" is set.
  • To open from elsewhere, you just need to call:
    Code:
    QuestMenu_Init(0, <callback>)
  • edit "sSideQuests" with your quest info. Strings are found in "src/strings.c"

How To Use (Pokefirered):
  • If you want to open from elsewhere, you just need to call ItemPc_Init(0, some_callback).
  • The structure, 'sSideQuests' inside src/item_pc.c on line 58 contains each quest's info. The relevant strings can be found in src/strings.c.
  • Changing the default flags, number of quests, etc., can be found in include/quests.h

Scripting Commands:
  • I've added a script command, 'questmenu', that takes a couple arguments and can be used to open the menu, unlock/complete quests, and more. Here's a rundown for the command "questmenu case, questId"
    • openquestmenu (or questmenu QUEST_MENU_OPEN 0): open the quest menu
    • QUEST_MENU_UNLOCK_QUEST questId: unlocks a specific quest
    • QUEST_MENU_COMPLETE_QUEST questId: mark a quest as complete
    • QUEST_MENU_SET_ACTIVE questId: set a quest as the active quest
    • QUEST_MENU_RESET_ACTIVE: remove any active quest
    • QUEST_MENU_BUFFER_QUEST_NAME questId: buffers the questId name to gStringVar1 (STR_VAR_1)
    • QUEST_MENU_GET_ACTIVE_QUEST: returns the active questId to VAR_RESULT
    • QUEST_MENU_CHECK_UNLOCKED questId: checks if the questId has been unlocked. Returns result to VAR_RESULT
    • QUEST_MENU_CHECK_COMPLETE questId: checks if the questId has been completed. Returns result to VAR_RESULT

How To Use (Pokeemerald): The same as above, except everything in contained in src/quests.c, and the function name to call is "QuestMenu_Init(0, some_callback)." A function named "Task_OpenQuestMenuFromStartMenu" is added for you to easily add QUESTS as a start menu option as well

Example Scripts:
Spoiler:
 
Last edited:
49
Posts
5
Years
  • Age 29
  • Seen Dec 27, 2023
The compiler is complaining about "stdpal_get" in e.g. "LoadPalette(stdpal_get(2), 0xD0, 0x20)", I presume the name has chnaged but I cant find the new version.
 
239
Posts
8
Years
  • Age 31
  • Seen Apr 15, 2024
The compiler is complaining about "stdpal_get" in e.g. "LoadPalette(stdpal_get(2), 0xD0, 0x20)", I presume the name has chnaged but I cant find the new version.

I've merged with pret so that problem should be fixed. Thanks for the reminder!
 
Last edited:
23
Posts
6
Years
  • Age 32
  • Seen Nov 28, 2023
Thank you so much for this feature, this is super cool! This can bring just the extra oomph to the depth of a hack. At least I as a completionist am really stoked about having side quests and rewards! This is probably the best modification I've seen thus far. Kudos to you!
 
17
Posts
3
Years
  • Age 28
  • Seen Jul 8, 2022
(EDIT) Never mind, I found the problem. sub_81983AC has been renamed to Menu_InitCursor.
I'll leave the comment here for if anybody else runs into the same problem.

Hi,
I would really like to add this because this is simply an amazing feature!
However, I get the following error:
src/quests.c: In function `Task_QuestMenuSubmenuInit':
src/quests.c:1182: warning: implicit declaration of function `sub_81983AC'

in src/quests it looks as following (Underlined part is row 1182):
Spoiler:

Any idea on how to fix this?
Thanks again for all these amazing features you come up with, not just this one.
 
Last edited:

Jessler

PidgeyFox
33
Posts
6
Years
Hey! I absolutely love this, and I could see it having a big use in my hacks. The one downside I see is that it only saves one active quest at a time. If you could modify this to allow for multiple active quests at once, that would be perfect. That's my only complaint though, it's super useful!
 
239
Posts
8
Years
  • Age 31
  • Seen Apr 15, 2024
Hey! I absolutely love this, and I could see it having a big use in my hacks. The one downside I see is that it only saves one active quest at a time. If you could modify this to allow for multiple active quests at once, that would be perfect. That's my only complaint though, it's super useful!

Thanks! The active quest is more for show than anything. This branch doesn't do anything with the active quest other than display 'active'. If you wanted, you could easily remove it by making "IsActiveQuest" return FALSE. Alternatively, create an "activeQuests" field in the saveblock and have IsActiveQuest return a value based on GetSetQuestFlag and checking some FLAG_GET_ACTIVE. Feel free to reach out to me on discord for more info if this option sounds good and you need some more help implementing it.
 

Jessler

PidgeyFox
33
Posts
6
Years
That sounds exactly like what I was hoping to do with it- I'll give it a shot and if I need more help I'll be sure to reach out. Thanks a lot!
 
Back
Top