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

Gen 6 style Exp. Share using the CFRU

12
Posts
3
Years
This tutorial will be a short one (ngl)

Hello! This is Dark Gyarados speaking/typing and welcome to my tutorial of setting up the Gen 6 style Exp. Share system using the CFRU!
This is also my first post, so I hope it goes well. :D


Step: 1- Creating the script

The first step is creating the script for your Gen 6 style Exp. Share. A sample is given below if you want reference.

#dynamic 0x800000
#org @start
checkflag 0x906
if 0x0 goto @turnon
goto @turnoff

#org @turnon
setflag 0x906
sound 0x2
msgbox @display1 0x4
closeonkeypress
release
end

#org @turnoff
clearflag 0x906
sound 0x3
msgbox @display2 0x4
closeonkeypress
release
end

#org @display1
= [red_fr]Exp. Share [black_fr]has been turned on.\pAll members of your team will receive\nExp. Points.

#org @display2
= [red_fr]Exp. Share [black_fr]has been turned off.


You can add your own dialogues if you want and customize the sounds too.


Step: 2- Some hex editing

A very useful tutorial of Darthatron's is given in the link below:
https://www.pokecommunity.com/showthread.php?t=281573

This tutorial (The second one) allows us to run a custom script from the 'Use' or 'Register' command in the game. How useful is that? (Very)

Now, what you need to do is copy the hex code given there and paste it in notepad or somehere.

I've written it below for reference:

10 B5 04 1C 78 46 13 30 0C 49 08 60 20 1C 0C 49
00 F0 10 F8 10 BC 01 BC 00 47 10 B5 04 1C 0A 48
05 49 00 F0 07 F8 20 1C 06 49 00 F0 03 F8 10 BC
01 BC 00 47 08 47 C0 46 E5 9A 06 08 98 99 03 02
3D 10 0A 08 09 75 07 08 00 00 00 00


Now, compile the script you wrote and copy down the offset. Then turn that into a pointer. Example: 0x800138 becomes 38 01 80 08. Just the numbers reversed, while adding 08 at the end.

Replace the last four bytes in the code above with the pointer to your script.
For example:
10 B5 04 1C 78 46 13 30 0C 49 08 60 20 1C 0C 49
00 F0 10 F8 10 BC 01 BC 00 47 10 B5 04 1C 0A 48
05 49 00 F0 07 F8 20 1C 06 49 00 F0 03 F8 10 BC
01 BC 00 47 08 47 C0 46 E5 9A 06 08 98 99 03 02
3D 10 0A 08 09 75 07 08 38 01 80 08


Find 76 bytes of free space in Free Space Finder and copy down that offset (Yet again).
Free Space Finder.png

Go to that offset in a hex editor (I use HMA :D) and paste the entire code there.
HMA.png

You're done with the second step!

Step: 3- Editing the item

You don't expect the Exp. Share to work without making any changes in the item, do you? Till now, we were only making the script to be called by the item. We are finally making changes to the original item now.

1. Change the pocket of the item from 'Items' to 'Key Items' and the type to 'Use of Select'.
Key Item and Select.png

2. Now, copy the offset where you pasted the code and add one to it. For example, if you pasted the code in 0x26D6F0, you have to change it to 0x26D6F1.

3. In the 'Field Script' section of the item, write the offset with one added to it.
Last Step.png

And... you're done! Try giving yourself the item to see how it works in-game!
Turn-On.png In Bag.png

P.S: You can change the description of the item if you want to and change the price to 0.
 
Last edited:
853
Posts
3
Years
  • Age 33
  • Seen Nov 9, 2023
dang I seriously thought setting up your config file was enough to do this, its so annoying that most things in cfru don't work how you expect them to.

It's a great tool, but not a lot was done as far as explaining what it actually does. Or how things work, even in the doc.
 
392
Posts
3
Years
  • Age 19
  • Seen Nov 24, 2023
Works for me!
Thank you so much for this i was struggling to find a way to make it work!
 
Last edited:
1
Posts
3
Years
  • Age 18
  • Seen Apr 20, 2024
Thank you so much! Gen 6+ EXP share worked for me on the second attempt. I was scouring the net for how to implement this feature and this sure helped me a lot.
 
2
Posts
2
Years
  • Age 26
  • Seen Nov 20, 2023
Is there any video tutorial to this, i'm still too dumb to figure it out
 
6
Posts
5
Years
  • Age 32
  • Seen Feb 1, 2024
men, i follow your steps and when used the exp share resets the game, i dont know exactly where is the mistake, maybe adding 1?
 
Back
Top