-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Default Off) Item Description Headers #4767
Conversation
Ghoul, do you think you could add an option that shows the header without using up saveblock space so it will basically show up each time you obtain the item even if it is a duplicate? |
Do you think there’s a way this could depart from your actual branch? It’s a commonly merged in branch, so if expansion can handle the conflicts from the original to this one, it would make it significantly easier for people downstream |
Yeah, that's a good option. OW_SHOW_ITEM_DESCRIPTIONS = 0: off, 1 = first time, 2 = always ?
Yeah, can probably move out of item.c to help conflicts. Good idea. |
|
…move code to overworld.c to prevent issues with users whove merged original branch. fix styling
okay added extra config values and moved code to overworld.c. ready for re review |
src/overworld.c
Outdated
#else | ||
void ScriptShowItemDescription(struct ScriptContext *ctx) | ||
{ | ||
u8 UNUSED headerType = ScriptReadByte(ctx); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is there an unused?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is there an unused?
For when the config is off. Otherwise you end with a bunch of warnings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just tried compiling it with line 3478 removed (making it an empty function like the one below), and it compiles just fine :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the ScriptReadByte(ctx);
is necessary to consume the argument of showitemdescription
and showberrydescription
(i.e. .byte 0
and .byte 1
respectively). Otherwise those bytes will be interpreted as commands 0 and 1 (nop
and nop1
respectively, which are harmless in Expansion, but ripe for being replaced by downstream projects).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then perhaps we need to just add the ScriptReadByte
functions but without specified variable to store the returned value in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mrgriffin, @ghoulslash could any of you respond to this please? 👀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mrgriffin @ghoulslash could any of you get back to this? It is the last thing needed to be addressed for a merge 😅
Is there a way we could block the contents of |
If we can complete an emerald playthrough with this on, would that be enough to say "it's probably good"? |
Conflicts |
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
conflicts handled and removed saveblock address comment from global.h. Ready for re-review |
its 3 hours to get to the champion at 1x. I'm just curious what you and alex think is an acceptable merge criteria after the code review, and it sounds like you're saying "nothing, this PR is already battle tested" |
A play-through is not necessary. I'll merge it once the open question gets answered. |
…expansion into rhh/desc_headers
In my old implementation in my hack, I had a
This also failed 100% because the original code doesn't get moved, it just gets duplicated right now which leaves behind a bunch of silent conflicts for the user to solve |
I squashed this PR because ghoul made a brand new branch that had nothing to do with the old history |
We should do the same thing we did for BW map headers then, so avoid conflicts for downstream. |
Adds description headers from my pokeemerald branch. It uses callnative instead of script cmds to cause fewer conflicts. A config has been added which is Off by default so as not to break saves. I added the itemFlags to saveblock3 as well
config:
0 = off
1 = on first obtain (uses save space)
2 = always shot description (no save space required)