- 12
- Posts
- 4
- Years
- Age 19
- India
- Seen yesterday
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/threads/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).
![[PokeCommunity.com] Gen 6 style Exp. Share using the CFRU [PokeCommunity.com] Gen 6 style Exp. Share using the CFRU](https://data.pokecommunity.com/attachments/14/14299-bce5ec32bf6792e6b5abe30a09ddc690.jpg)
Go to that offset in a hex editor (I use HMA :D) and paste the entire code there.
![[PokeCommunity.com] Gen 6 style Exp. Share using the CFRU [PokeCommunity.com] Gen 6 style Exp. Share using the CFRU](https://data.pokecommunity.com/attachments/14/14300-f8db82cb91bdeb7da7d55e5af83067b5.jpg)
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'.
![[PokeCommunity.com] Gen 6 style Exp. Share using the CFRU [PokeCommunity.com] Gen 6 style Exp. Share using the CFRU](https://data.pokecommunity.com/attachments/14/14301-fa1de39df3c4bb328a25924f2dd3c216.jpg)
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.
![[PokeCommunity.com] Gen 6 style Exp. Share using the CFRU [PokeCommunity.com] Gen 6 style Exp. Share using the CFRU](https://data.pokecommunity.com/attachments/14/14302-35581938969e0d122f6f189bc86eb68b.jpg)
And... you're done! Try giving yourself the item to see how it works in-game!
![[PokeCommunity.com] Gen 6 style Exp. Share using the CFRU [PokeCommunity.com] Gen 6 style Exp. Share using the CFRU](https://data.pokecommunity.com/attachments/14/14303-0e6fee9f0b9bc05638274bf60f1735af.jpg)
P.S: You can change the description of the item if you want to and change the price to 0.
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/threads/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).
![[PokeCommunity.com] Gen 6 style Exp. Share using the CFRU [PokeCommunity.com] Gen 6 style Exp. Share using the CFRU](https://data.pokecommunity.com/attachments/14/14299-bce5ec32bf6792e6b5abe30a09ddc690.jpg)
Go to that offset in a hex editor (I use HMA :D) and paste the entire code there.
![[PokeCommunity.com] Gen 6 style Exp. Share using the CFRU [PokeCommunity.com] Gen 6 style Exp. Share using the CFRU](https://data.pokecommunity.com/attachments/14/14300-f8db82cb91bdeb7da7d55e5af83067b5.jpg)
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'.
![[PokeCommunity.com] Gen 6 style Exp. Share using the CFRU [PokeCommunity.com] Gen 6 style Exp. Share using the CFRU](https://data.pokecommunity.com/attachments/14/14301-fa1de39df3c4bb328a25924f2dd3c216.jpg)
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.
![[PokeCommunity.com] Gen 6 style Exp. Share using the CFRU [PokeCommunity.com] Gen 6 style Exp. Share using the CFRU](https://data.pokecommunity.com/attachments/14/14302-35581938969e0d122f6f189bc86eb68b.jpg)
And... you're done! Try giving yourself the item to see how it works in-game!
![[PokeCommunity.com] Gen 6 style Exp. Share using the CFRU [PokeCommunity.com] Gen 6 style Exp. Share using the CFRU](https://data.pokecommunity.com/attachments/14/14304-85431edd96971e1f78c8759c13864572.jpg)
![[PokeCommunity.com] Gen 6 style Exp. Share using the CFRU [PokeCommunity.com] Gen 6 style Exp. Share using the CFRU](https://data.pokecommunity.com/attachments/14/14303-0e6fee9f0b9bc05638274bf60f1735af.jpg)
P.S: You can change the description of the item if you want to and change the price to 0.
Last edited: