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

Soft EXP Level Caps

Lunos

Random Uruguayan User
3,114
Posts
15
Years
  • 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.
     
    17
    Posts
    3
    Years
    • Seen May 1, 2024
    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.
     

    Jaizu

    Average rom hacker
    281
    Posts
    14
    Years
  • I do appreciate the tutorial but I do think this would fit better in a pokeemerald branch. It's easier to maintain and notice if there is any bugfix uploaded.
     

    ZekroSlice

    Prince Zekro
    15
    Posts
    347
    Days
  • Hello! Just to know. Is this possible to do with a Ruby hack ? And 2nd what application are you using to do this ?
     

    Lunos

    Random Uruguayan User
    3,114
    Posts
    15
    Years
  • 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.
     

    ZekroSlice

    Prince Zekro
    15
    Posts
    347
    Days
  • Okay so can I get some explaining to how to do this in ruby(if it's different from the others gen 3 hacks)
     

    ZekroSlice

    Prince Zekro
    15
    Posts
    347
    Days
  • 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 🙏🏾
     

    Lunos

    Random Uruguayan User
    3,114
    Posts
    15
    Years
  • 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.
     

    ZekroSlice

    Prince Zekro
    15
    Posts
    347
    Days
  • 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
     
    6
    Posts
    188
    Days
    • Seen Nov 6, 2023
    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.
     
    448
    Posts
    6
    Years
    • Seen May 6, 2024
    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.
     
    6
    Posts
    188
    Days
    • Seen Nov 6, 2023
    So if I Get this right, the function should change as follows:

    Spoiler:

    I'll try this out now.
     
    6
    Posts
    188
    Days
    • Seen Nov 6, 2023
    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:
    448
    Posts
    6
    Years
    • Seen May 6, 2024
    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:
     
    1
    Posts
    14
    Years
    • Seen Jan 31, 2024
    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:
    Back
    Top