-
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
Allow users to increase MAX_MONEY #4943
Allow users to increase MAX_MONEY #4943
Conversation
Replaced use of PrintMoneyAmount
Removed GetMaxNumMoneyDigits Converted uses of ConvertIntToDecimalStringN that called for 7 money digits to use MAX_MONEY_DIGITS Replaced 6 money digits in PrintMoneyAmount with MAX_MONEY_DIGITS
…MoneyAmount to use MAX_MONEY_DIGITS
…MoneyAmount to use MAX_MONEY_DIGITS
Fixed PrintMoneyAmount to work with large digits
Explicitly requesting the eyes of @DizzyEggg and @mrgriffin , and I'm happy to wait until they have time or they refuse. |
You have tabs instead of spaces in the vast majority of your files |
|
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.
Nice to see shrinking fonts being used! I think you've summoned me to comment on those bits, and I don't see anything wrong :)
if (numDigits > 8) | ||
PrependFontIdToFit(gStringVar4, txtPtr + 1 + numDigits, FONT_NORMAL, 54); |
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.
Initially I was going to say that PrependFontIdToFit
should work for any number of digits (it just doesn't do anything if the text already fits), but perhaps I'm wrong due to the alignment?
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.
Yeah the spaces fuck it all up, and when I remove the spaces and try to manually align, the text doesn't get overwritten if you change the number of digits mid transaction
Description
MAX_MONEY
to any number up toINT_MAX
, while menus and texts will adjust to match.CountDigits
to work with values greater than 100M.Usage
MAX_MONEY
In
include/money.h
, developers can changeMAX_MONEY
to any integer less than2147483648
.Testing
Clean Branch
You can recreate this branch by applying a patch or pulling the repo. From a clean version of expansion's upcoming, you can either:
Patch
wget https://files.catbox.moe/1urr6w.patch -O increaseMoney.patch ; git apply increaseMoney.patch ; rm increaseMoney.patch
Repo
git remote add psf-expansion https://github.com/PokemonSanFran/pokeemerald-expansion/ ; git pull psf-expansion increaseMoney
Manual Tests
After replicating the branch, to recreate my testing environment, you can either directly download the debug script and config file, or manually create the changes.
Download
MAX_MONEY
9
wget https://files.catbox.moe/ourb5p.h -O include/money.h && wget https://files.catbox.moe/0kor2h.h -O src/data/items.h && wget https://files.catbox.moe/wsd3z6.inc -O data/scripts/debug.inc
99
wget https://files.catbox.moe/pbkxuj.h -O include/money.h && wget https://files.catbox.moe/0kor2h.h -O src/data/items.h && wget https://files.catbox.moe/wsd3z6.inc -O data/scripts/debug.inc
999
wget https://files.catbox.moe/l0gyte.h -O include/money.h && wget https://files.catbox.moe/0kor2h.h -O src/data/items.h && wget https://files.catbox.moe/wsd3z6.inc -O data/scripts/debug.inc
9999
wget https://files.catbox.moe/l1n9g8.h -O include/money.h && wget https://files.catbox.moe/0kor2h.h -O src/data/items.h && wget https://files.catbox.moe/wsd3z6.inc -O data/scripts/debug.inc
99999
wget https://files.catbox.moe/2b4bw0.h -O include/money.h && wget https://files.catbox.moe/0kor2h.h -O src/data/items.h && wget https://files.catbox.moe/wsd3z6.inc -O data/scripts/debug.inc
999999
wget https://files.catbox.moe/e831bv.h -O include/money.h && wget https://files.catbox.moe/0kor2h.h -O src/data/items.h && wget https://files.catbox.moe/wsd3z6.inc -O data/scripts/debug.inc
9999999
wget https://files.catbox.moe/4ehple.h -O include/money.h && wget https://files.catbox.moe/0kor2h.h -O src/data/items.h && wget https://files.catbox.moe/wsd3z6.inc -O data/scripts/debug.inc
99999999
wget https://files.catbox.moe/9yhna4.h -O include/money.h && wget https://files.catbox.moe/0kor2h.h -O src/data/items.h && wget https://files.catbox.moe/wsd3z6.inc -O data/scripts/debug.inc
999999999
wget https://files.catbox.moe/g5yanb.h -O include/money.h && wget https://files.catbox.moe/0kor2h.h -O src/data/items.h && wget https://files.catbox.moe/wsd3z6.inc -O data/scripts/debug.inc
INT_MAX
wget https://files.catbox.moe/f82nww.h -O include/money.h && wget https://files.catbox.moe/0kor2h.h -O src/data/items.h && wget https://files.catbox.moe/wsd3z6.inc -O data/scripts/debug.inc
Manual Testing
MAX_MONEY
to its desired value ininclude/money.h
data/scripts/debug.inc
to match the one providedsrc/data/items.h
to match the one providedVerified Scenarios
All videos show the player:
MAX_MONEY == 9
9.mp4
MAX_MONEY == 99
99.mp4
MAX_MONEY == 999
999.mp4
MAX_MONEY == 9999
9999.mp4
MAX_MONEY == 99999
99999.mp4
MAX_MONEY == 999999
999999.mp4
MAX_MONEY == 9999999
999999.mp4
MAX_MONEY == 99999999
9999999.mp4
MAX_MONEY == 999999999
99999999.mp4
MAX_MONEY == INT_MAX
int.mp4
People who collaborated with me in this PR
This feature was originally written by @DizzyEggg.
Features this PR does NOT handle:
n/a
Discord Contact Info
I am
pkmnsnfrn
on Discord.