• 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!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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.

Soft EXP Level Caps

This thread's probably dead so this is a long shot, but could anyone help me out? I can't find the file src\battle_scripts_commands.c and a bunch of other lines seem to be missing. Does this still work with the current release of CFRU?
What do you mean by "still"?
This area of the forum encompasses ROM Hacking with Pret's decompilation projects.
The CFRU is a C injection that goes into a ROM, which is binary hacking territory. It is not related to decomp hacking.
This was never meant to be used with the CFRU. It's a modification of code for Pokeemerald.
If you want to port it to the CFRU, you're free to do so, but this isn't the right part of the forum to ask about it.
 
I'd like to report a bug in the daycare functionality. In src/daycare.c, cap is never related to sLevelCaps anywhere, so it's by default set to zero. This means every single mon will be affected by the soft level cap on experience for the daycare. This can be easily fixed by adding cap = sLevelCaps; at the beginning of both for loops.
 
Hello! Just to know. Is this possible to do with a Ruby hack ? And 2nd what application are you using to do this ?
 
Hello! Just to know. Is this possible to do with a Ruby hack ?
Yeah, it should be. It's all code, so in the worst case scenario, it can be adjusted.
Keep in mind this is a feature written for the decompilation projects though.
And 2nd what application are you using to do this ?
No programs besides a good text editor to read and write code with.
Notepad++, Visual Code Studio, or any equivalents to either of those would do.
 
Okay so can I get some explaining to how to do this in ruby(if it's different from the others gen 3 hacks)
 
I got several questions. 1 what application can I use to do that? And 2. Is the code different in a Ruby hack ? If not. Just explain to me how to add all of this if you can please 🙏🏾
 
Okay so can I get some explaining to how to do this in ruby(if it's different from the others gen 3 hacks)
I got several questions. 1 what application can I use to do that? And 2. Is the code different in a Ruby hack ? If not. Just explain to me how to add all of this if you can please ������������
How do I open a rom with theses ?
You have to understand that this is not a feature you can apply to a ROM.
As explained above, this is a feature meant to be merged into a project created using the decompilation projects made by Pret.
In a few words, the decompilation projects are copies of the games' source code created from scratch by exporting and translating ASM Routines into code written in C, the same programming language in which Game Freak wrote these games back in the day.
When you use the decompilation projects to perform modifications of these games, you don't work with a ROM. You work with plain source code.
As a result of this all being code and as you were already told, it can be handled or edited using a good text eitor such as Notepad++, a source code editor such as Visual Studio Code, or any equivalents.

Explaining to you the exact step-by-step process to implement this feature in a Pokeruby project would be too tiresome.
I suggest you to get acquainted with the decomps and give it a shot yourself.
You have a tutorial on how to set up an environment to use the decomps with here.
The rest is just a matter of copying and pasting the pieces of code that PokemonCrazy wrote in the main post, and then trying to build a ROM with it.
Depending on the label differences, you may need to tweak the code a bit to get it to build.
That's expected, as Pokeruby is far behind in terms of documentation compared to Pokefirered or Pokeemerald.
 
Thanks for your honesty and your response I've used HMA Editor so I think I can't even do what you're saying because it's in binary. But now I know what to do if I ever want to make another gen 3 game. Thanks at least for that
 
I'm trying to implement the code, but at some point the code you provide differs from mine too much. I'm using the rh-hideout expansion (v 1.6.2) which is probably the reason.

you wrote, that one should search for the line

if (GetMonData(&gPlayerParty[gBattleStruct->expGetterMonId], MON_DATA_HP))

in case 2.

However, case 2 is structured completely different in my version.

Spoiler:

I don't know if the soft-level cap is even possible with this setup. Do you have a solution for that? That would be really great.
 
I'm trying to implement the code, but at some point the code you provide differs from mine too much. I'm using the rh-hideout expansion (v 1.6.2) which is probably the reason.

you wrote, that one should search for the line



in case 2.

However, case 2 is structured completely different in my version.

Spoiler:

I don't know if the soft-level cap is even possible with this setup. Do you have a solution for that? That would be really great.

The code you posted calls a function called "ApplyExperienceMultipliers". That sounds like a good place to insert the code that multiplies exp by the result of GetPkmnExpMultiplier.
 
So if I Get this right, the function should change as follows:

Spoiler:

I'll try this out now.
 
Okay, it does not work.

instead, I'm greeted with this error when trying to make the gba file:

Code:
`__cmpdi2' referenced in section `.text' of src/battle_script_commands.o: defined in discarded section `.text' of ../../tools/agbcc/lib/libgcc.a(_cmpdi2.o)
`__floatdidf' referenced in section `.text' of src/battle_script_commands.o: defined in discarded section `.text' of ../../tools/agbcc/lib/libgcc.a(_floatdidf.o)

I have no idea what's happening in that error msg tbh. I get the syntax but I don't get, why it's happening.

Edit:

This error occurs once I edit void ApplyExperienceMultipliers. It does not appear before that.
 
Last edited:
Okay, it does not work.

instead, I'm greeted with this error when trying to make the gba file:

Code:
`__cmpdi2' referenced in section `.text' of src/battle_script_commands.o: defined in discarded section `.text' of ../../tools/agbcc/lib/libgcc.a(_cmpdi2.o)
`__floatdidf' referenced in section `.text' of src/battle_script_commands.o: defined in discarded section `.text' of ../../tools/agbcc/lib/libgcc.a(_floatdidf.o)

I have no idea what's happening in that error msg tbh. I get the syntax but I don't get, why it's happening.

Edit:

This error occurs once I edit void ApplyExperienceMultipliers. It does not appear before that.

Seems like the linker doesn't like you multiplying a u64 with a double.
Here's a version of the function that doesn't do that:

Spoiler:
 
Okay, it does not work.

instead, I'm greeted with this error when trying to make the gba file:

Code:
`__cmpdi2' referenced in section `.text' of src/battle_script_commands.o: defined in discarded section `.text' of ../../tools/agbcc/lib/libgcc.a(_cmpdi2.o)
`__floatdidf' referenced in section `.text' of src/battle_script_commands.o: defined in discarded section `.text' of ../../tools/agbcc/lib/libgcc.a(_floatdidf.o)

I have no idea what's happening in that error msg tbh. I get the syntax but I don't get, why it's happening.

Edit:

This error occurs once I edit void ApplyExperienceMultipliers. It does not appear before that.

Hey, I'm running into the same issue using Pokeemerald-expansion. Wondering if you figured this out and/or if Anon822's solution worked for you.

Edit: For anyone else that ends up here, I added Snibble's code with Anon822 extra lines and everything seems to be working. No errors and some test battles in game are yielding exp numbers that I would expect.
 
Last edited:
Hey all!
I followed these steps but it doesnt seem to work for me.
I tried it on a fresh copy of firered. I havent tried the daycare xp gain yet, but I would assume that also doesnt work.
The only differences from my code was:
-"static void Cmd_trainerslideout(void);" doesn't exist for me, so I inserted the 3rd step below "static void Cmd_finishturn(void);"

I'm not sure what the issue might be, was anyone here in a similar situation and found the problem?
Much obliged, Jan.
 
Back
Top