Binary Hack Research & DevelopmentGot a well-founded knack with your binary Pokémon hacks? Love reverse-engineering them? For the traditional Pokémon ROM hacker, this is the spot for polling and gathering your ideas, and then implementing them! Share your hypothesis, get ideas from others, and collaborate to create!
It's only one bit difference, but if I am correct, then you should probably edit your post to fix this typo since most people who don't know how to compile will use your code with the typo. But I'm most likely wrong. :)
I would like to request a modified Flash Fire which can be activated by another type as well as Fire. I didn't know where else to put this request since the Ability Resource Thread is for porting official ability effects and vanilla Flash Fire doesn't do this. The reason being my hack has an Oil type (0x18) which I'd like to activate Flash Fire, since we know what happens when you squirt oils onto a fire, but alas my brain refuses to comprehend ASM. It's worth noting that by default Fire is immune to Oil, so the ability would have to override that.
I would like to request a modified Flash Fire which can be activated by another type as well as Fire. I didn't know where else to put this request since the Ability Resource Thread is for porting official ability effects and vanilla Flash Fire doesn't do this. The reason being my hack has an Oil type (0x18) which I'd like to activate Flash Fire, since we know what happens when you squirt oils onto a fire, but alas my brain refuses to comprehend ASM. It's worth noting that by default Fire is immune to Oil, so the ability would have to override that.
If you look at the Ability Resource Thread, my most recent post deals with the Type Absorb abilities. Once I've posted the Fire Red ones you could either write a new routine that activates on both Fire and Oil and replace the pointer in the table.
Alternatively you can navigate to the offsets of the routine and add a branch at the beginning of the routine and check for Oil there. You are right though, the immunity may prevent it from happening.
If you look at the Ability Resource Thread, my most recent post deals with the Type Absorb abilities. Once I've posted the Fire Red ones you could either write a new routine that activates on both Fire and Oil and replace the pointer in the table.
Alternatively you can navigate to the offsets of the routine and add a branch at the beginning of the routine and check for Oil there. You are right though, the immunity may prevent it from happening.
Flash Fire behaves differently than the other absorb abilities in that it strengthens moves of a specific type rather than just boosting an offensive stat. I have next to no ASM capabilities to begin with and I don't think I'd have any idea how to do that. I figured it could be grouped with the other absorb abilities though.
oh i need you are help.i am do the"Preventing TMs from being consumed on use "for EM rom.And i have a trouble.
I change 1B6EE0 to 90 make we "can use TM but can not to reduce number"
but I can not remove the quantities showing up in thebag so I need help.Thanks
oh i need you are help.i am do the"Preventing TMs from being consumed on use "for EM rom.And i have a trouble.
I change 1B6EE0 to 90 make we "can use TM but can not to reduce number"
but I can not remove the quantities showing up in thebag so I need help.Thanks
- Open the ROM com o with HxD. Go to 0x124F78 and insert 00 00 00 00. Go to 0x125C80 and insert 00 00 00 00. This makes TMs not be consumed.
- Go to 0x1326B8 and insert 00 00 17 E0. This makes TMs ungivable.
- Go to some free space (I used 0x1BA540), select 36 FF e change them for (simply Ctrl + B in the first):
00 2D 01 D1 05 4B 18 47 38 1C 08 21 22 1C 04 4E 00 F0 02 F8 01 4B 18 47 30 47 C0 46 FF 1E 13 08 B1 35 13 08
- Go to 0x131EF4 and insert: 00 48 00 47 41 A5 1B 08
- Insert E0 at 0x131EA5.
- Open the ROM com o with HxD. Go to 0x124F78 and insert 00 00 00 00. Go to 0x125C80 and insert 00 00 00 00. This makes TMs not be consumed.
- Go to 0x1326B8 and insert 00 00 17 E0. This makes TMs ungivable.
- Go to some free space (I used 0x1BA540), select 36 FF e change them for (simply Ctrl + B in the first):
00 2D 01 D1 05 4B 18 47 38 1C 08 21 22 1C 04 4E 00 F0 02 F8 01 4B 18 47 30 47 C0 46 FF 1E 13 08 B1 35 13 08
- Go to 0x131EF4 and insert: 00 48 00 47 41 A5 1B 08
- Insert E0 at 0x131EA5.
#635Link to this post, but load the entire thread.
July 17th, 2015 (1:02 AM).
Trainer 781
Guest
Posts: n/a
Quote:
Originally Posted by DizzyEgg
I don't get that part, could you explain what and how exactly I should go about it?
There is a Battle Script command table at x25011c in FR. If you have repointed this to include Jambo's callasm and/or setword commands then you have to check it yourself.
It is a table of pointers. Goto entry no. x3D (table starts from x0) and overwrite the pointer there with pointer to routine at YYYYYY.
This only includes the Life Orb Recoil not the Life Orb Boost.
Credits to MrDollsteak for the Sheer Force Routine which I ripped from his Rombase.
Life Orb recoil is disabled for Volt Switch and U-turn in order to prevent damage to switched ally. (Special callasm in Battle Scripts of these Moves should be made in order to process Life Orb Recoil for them. Preferably before switching happens).
If you don't have Sheer Force, Magic Guard, U-turn or Volt Switch remove the bolded lines.
Replace KK with Held Effect Item Byte of Life Orb.
Bug/Oddity: It can trigger multiple times for multi-hit moves like Life Orb and multiple target moves like Earthquake in doubles. Fixed
39 20 00 FA 20 C0 03 02 SS SS SS 08 10 84 01 12 40 00 35 D0 3D 02 02 00 01 00 00 0B 01 0C 01 19 01 00 00 00 00 00 3C
String at SSSSSS:
Code:
FD 0F 00 E0 E3 E7 E8 00 E7 E3 E1 D9 00 E3 DA 00 DD E8 E7 00 C2 CA AB FF
I'm having troubles implementing it. I replaced the end command, placed a hook, inserted all routines and a battle script but...nothing happens. No resets, no freezing, the game just continues without recoil damage. I'm sure my item effect byte is correct. Do you know why it would happen? Also, I'm using DollSteak's Patch.
Quote:
Originally Posted by KDS
Damage Reduction Berries
2. Assemble this routine and make bytes changes mentioned in the code
TTTTTT is the pointer to the table created above.
YYY is the index of Chilan Berry
I can't get this routine to compile. I get the following errors:
48: Error: invalid offset, target not word aligned <0x000000E2>
48: Error: invalid offset, value too big <0x0000009E>
My index number of Chilian Berry is 0x00A0 but it doesn't matter as I've tried changing the value many times and I still got the errors.
I've been having some trouble getting the Berry System to work. For some reason, the script crashes when it gets to the first instance of the Get Tree Data routine. I know this is where the problem is because if I remove it from the script, it doesn't crash until it gets to the Berry Bag Selection routine, which for some reason crashes the game if I have a berry in the bag, but that could be a result of removing the Get Tree Ddata routine. I thought that maybe the problem was I installed JPAN's Save Block hack wrong (instructions seemed a little confusing at first, but I'm pretty sure I did it right), so I found this patch with the hack, applied it a clean FireRed 1.0 ROM, and then put all the other routines in, and had the same problem.
My script was a simple copy/paste from this thread, which the offsets filled in properly of course. All the ASM rotuines were also unmodified, and copied directly from this thread, I also tried compiling them myself and inserting them that way, but nothing seems to work.
I've been having some trouble getting the Berry System to work. For some reason, the script crashes when it gets to the first instance of the Get Tree Data routine. I know this is where the problem is because if I remove it from the script, it doesn't crash until it gets to the Berry Bag Selection routine, which for some reason crashes the game if I have a berry in the bag, but that could be a result of removing the Get Tree Ddata routine. I thought that maybe the problem was I installed JPAN's Save Block hack wrong (instructions seemed a little confusing at first, but I'm pretty sure I did it right), so I found this patch with the hack, applied it a clean FireRed 1.0 ROM, and then put all the other routines in, and had the same problem.
My script was a simple copy/paste from this thread, which the offsets filled in properly of course. All the ASM rotuines were also unmodified, and copied directly from this thread, I also tried compiling them myself and inserting them that way, but nothing seems to work.
The berry tree routine is bugged. I will go ahead and redo it sometime in the future. Sorry.
Hi FBI, first of all thanks for your work! You've been really helpful.
My question regards your battle routine http://www.pokecommunity.com/showthread.php?p=8527650#8527650 .
I've been trying it without success in my Ruby rom hack hoping it would work just like in Fire Red.
Is there any way to remove the whiteout after losing a battle in a Ruby hack rom?
No clue. I have not even looked at a Ruby ROM since 2008.
Quote:
Originally Posted by Mr.Pkmn
Can we have run-like speed for surf and mach bike speed in FR? Even better would be an arbitrary speed value!
That's actually very easy. There's a bit in RAM somewhere which controls this. I vaguely remember posting about it here, but I'll get back to you with more content.
Quote:
Originally Posted by BluRose
I'd like to say that this thread has been really helpful for me as my ASM skills are far worse than sub-par and, also, the Chain-Fishing one in particular is really cool to me. (◕‿◕✿)
I'd also like to request something for Fire Red BPRE v1.0 (adding to the infinite list of requests...):
Stance Change.
Basically, where a Pokémon uses an offensive move and changes its form to a more offensive Pokémon (or, rather, just a different index-number Pokémon entirely). However, when it uses a certain move (or just a status move would be fine, too), it reverts back to the old form.
EDIT: Oh, and it would also have to revert to the other form outside of battle.
What I was thinking was two separate abilities in order to accomplish this, but if one is possible, then that's great too!
Thanks in advance!
God I sound so rude I am so sorry
EDIT: Also, should I go to DaniilS with this? I noticed that he had his own thread for form(e)s...
EDIT EDIT: Okay, I just noticed something while I was trying to get the Male-only and Female-only evolution methods working on Burmy.
But ALL of the Pokémon generated by your routine are Male unless if they have more of an 82 percent chance of being female, in which case they are, and the Pokémon already caught turn into females. This is also shown in you post showcasing it, as the Tyranitar are also all Male.
Just wanted to say this, haha...
Yes, go to daniilS with this. He should be done by now, 4 or so months ago he said he was working on forms and mega evolutions. He should have everything worked out now if he isn't slacking ;D
Quote:
Originally Posted by FamiliaWerneck
Few simple questions on breeding, egg groups and all that. You said it's all doable via a Pokémon Editor. What I want, actually is that Charizard evolutionary line breeds only with its line and/or Ditto. No Dragon/Monster egg groups. Will I have to make an egg group for each evolutionary family?
Also, how can I make Ditto breeds with himself too, not only all other Pokémon? And genderless Pokémon, like Magnemite? How can I make them breed?
Finally, for Nidorans and Volbeat/Illumise, I wanna make the male breed with the female, but not breedable with Ditto. How can I do it?
Here, I just want to know if I can make all Pokémon to be Docile as default or if I can change all natures' data, so all natures behave like Docile. Is either of these possible?
Thanks in advance!
For something specific like this it's better to just add in the exceptions yourself. The game will at some point check species for Ditto :)
If you give up, I can give you hints. My policy about strictly specific routines still stand however.
39 20 00 FA 20 E3 03 02 SS SS SS 08 10 84 01 12 40 00 35 80 42 02 02 00 01 00
00 0B 01 0C 01 19 01 00 00 00 00 00 3C
String at SSSSSS:
Code:
FD 0F 00 E0 E3 E7 E8 00 E7 E3 E1 D9 00 E3 DA 00 DD E8 E7 00 C2 CA AB FF
Bonus, Life Orb boost (lightball updated included). UPDATE for Emerald : I added a routine to make a new item that boost a certain type of attack. If you have a fairy type in your hack rom, you can now have an item that boost that type. You can adjust the boost the same way than miracle seed and such in G3T. I also implemented the TimeSpace orb in the routine :
Spoiler:
Emerald:
Code:
CheckLifeOrb:
cmp r2, #0x43 /*Held item effect of life orb, I chose 0x43 (= 67 in decimal) because it's unused*/
beq Lifeorb
CheckNewItem:
cmp r2, #0x44 /*Held item effect of the boost item, I chose 0x44 (= 68 in decimal) because it's unused*/
beq NewItem
CheckAdamantOrb:
cmp r2, #0x45 /*Unused held item effect*/
bne CheckLustreous
ldrh r0, [r6]
mov r3, #0xFF /*0xFF + 0xE4 = 0x1E3 = 483 = index number of Dialga*/
add r3, #0xE4
cmp r0, r3
beq AdamantOrb
CheckLustreous:
cmp r2, #0x46 /*Unused held item effect*/
bne CheckGriseous
ldrh r0, [r6]
mov r3, #0xFF /*0xFF + 0xE5 = 0x1E4 = 484 = index number of Palkia*/
add r3, #0xE5
cmp r0, r3
beq LustreousOrb
CheckGriseous:
cmp r2, #0x47 /*Unused held item effect*/
bne CheckLightBall
ldrh r0, [r6]
mov r3, #0xFF /*0xFF + 0xE8 = 0x1E7 = 487 = index number of Giratina*/
add r3, #0xE8
cmp r0, r3
beq GriseousOrb
b Back
AdamantOrb:
push {r0-r5}
mov r1, #8 /*Steel type*/
mov r2, #0x10 /*Dragon type*/
b CheckExceptionTypeAttack
LustreousOrb:
push {r0-r5}
mov r1, #0xB /*Water type*/
mov r2, #0x10 /*Dragon type*/
b CheckExceptionTypeAttack
GriseousOrb:
push {r0-r5}
mov r1, #7 /*Ghost type*/
mov r2, #0x10 /*Dragon type*/
b CheckExceptionTypeAttack
NewItem:
push {r0-r5}
mov r1, #9 /*New type you want to boost*/
mov r2, #9 /*New type you want to boost, here I choose the same because I want it boost only one type*/
CheckExceptionTypeAttack:
ldr r4, CheckTypeLoc
ldr r4, [r4]
ldrb r4, [r4, #0x13]
cmp r4, #0
beq GetMoveType
mov r5, #0x3F
and r4, r5
cmp r4, r1
beq Boost
cmp r4, r2
beq Boost
b PopAndBack
Back:
ldr r0, Return
bx r0
PopAndBack:
pop {r0-r5}
b Back
CheckLightBall:
cmp r2, #0x2D
bne Back
ldrh r0, [r6]
cmp r0, #0x19
beq Lightball
b Back
GetMoveType:
ldr r3, CurMoveIndex
ldrh r3, [r3]
ldr r4, MoveData
mov r5, #0xC
mul r5, r3
add r4, r5
ldrb r4, [r4, #2]
cmp r4, r1
beq Boost
cmp r4, r2
bne PopAndBack
Boost:
pop {r0-r5}
ldrh r3, [r6, #0x2E]
lsl r0, r3, #4
push {r1}
mov r1, #6
mul r3, r1
pop {r1}
add r3, r0
lsl r3, #1
ldr r0, LocItems
add r3, r0
add r3, #0x13
ldrb r0, [r3]
mov r3, #0x52
mul r0, r3
lsr r0, #6
add r0, #0x7B
mul r7, r0
lsr r7, #7
mov r3, r8
mul r3, r0
lsr r3, #7
mov r8, r3
b Back
Lifeorb:
mov r0, r8
mov r3, #0xA7
mul r0, r3
lsr r0, #7
mov r8, r0
mul r7, r3
lsr r7, #7
b Back
Lightball:
mov r0, r8
lsl r0, r0, #0x1
mov r8, r0
lsl r7, r7, #0x1
b Back
.align 2
Return: .word 0x0806983E+1
LocItems: .word 0x085839A0 /*Location of your items Data*/
CurMoveIndex: .word 0x020241EA
MoveData: .word 0x0831C898 /*Location of your move data*/
CheckTypeLoc: .word 0x0202449C
/*00 48 00 47 XX XX XX 08 00 00 00 at 0x6982C*/
Fire Red:
Code:
cmp r2, #0x43 /*Held item effect, I chose 0x43 (=67 in dec) because it is unused in the game*/
beq Lifeorb
cmp r2, #0x2D
bne Back
ldrh r0, [r6]
cmp r0, #0x19
beq Lightball
b Back
Lifeorb:
mov r0, r8
mov r3, #0xA7
mul r0, r3
lsr r0, #7
mov r8, r0
mul r7, r3
lsr r7, #7
b Back
Lightball:
mov r0, r8
lsl r0, r0, #0x1
mov r8, r0
lsl r7, r7, #0x1
Back:
ldr r0, Return
bx r0
.align 2
Return: .word 0x0803F00A+1
/*00 48 00 47 XX XX XX 08 00 00 00 at 0803EFF8*/
Yep, it is now updated
How should I use both the recoil and boost effect? Should it be separately compiled and just put the same held item byte effect in each routines?
How should I use both the recoil and boost effect? Should it be separately compiled and just put the same held item byte effect in each routines?
Recoil and boost work indeed seperatly, as you can see the branch aren't done at the same places. So yeah you have to give the same effect in both routine as well as assembling them to have both recoil/boost effects.
The first hackathon was probably the worst thing that could have happened for this thread. It completely killed my motivation for hacking and made me quit for a few months. There are some good things that came out of it, I was able to do a lot of research on things I hadn't before including field moves, OAM, trainer generation and such. I was looking around my older routines for OAM manipulation, and I had trouble understanding and ripping my own code! I had lost the source code, so I decided to rip as much as I can and redo the jibberish including some clean up.
Similar routines to these ones I'm presenting were used for the custom intro in team 4's hackoff ROM :)
Generating OAMs
This routine is only to generate OAMs which are trainer or Pokemon sprites. I've modified it to be usable with a script, but honestly, setting the values yourself via ASM would've been faster (not that this is noticeably slow, just comparatively). I will have to do more research on making it portray an arbitrary image, but with the expansion work on the Pokedex and such, I don't see it as very necessary anymore.
How to insert:
Compile and insert the following routine into a free word aligned offset.
Usage:
The usage is quite simple, but it takes up a lot of temporary variables :P
Code:
@var 0x8000 - Slot #. Set 0x6 for shiny.
@var 0x8001 - X-pos
@var 0x8002 - Y-pos
@var 0x8003 - Unoccupied Pal ID number. See OAM viewer.
@var 0x8004 - Occupacity silluette set 1
@var 0x8005 - species/trainer sprite ID
@var 0x8006 - Front (1) or Back (0)
@var 0x8007 - Toggle trainer or Pokemon
Some quick notes about these variables.
Variable 0x8000 is to determine the Pokemon's shinyness. If you're showing a Pokemon in your party just use that Pokemon's party slot. If you're showing a shiny Pokemon go ahead and use 0x6. Basically 0x6 = shiny, anything else (must be lower) depends on party slot.
Variable 0x8003 plays a key role. Make sure in the OAM viewer the sprite ID is free.
Here sprite number 0 is taken by Oak's OAM. Click the Arrow until you find something not occupied, and set this variable to that value!
Variable 0x8007 is a switch of sorts. It determines whether to show a trainer sprite or a Pokemon sprite.
I think the rest of the variables are self explanatory. Mess around with them a little :)
OAM tracking
So I'm sure you can imagine, that at some point in time you want your OAM to disappear. You can't have it on the screen forever, maybe even make it disappear temporarily and reshow it without having to do the painfully expensive creation call again. I made a routine which will take into account the last OAM ID which you created and stores it in var 0x8008. Note that this is an ID assigned by the game code, not the same ID as the one we assigned on creation. Therefore it's important to track this.
How to insert
Compile and insert the following routine into free space.
Spoiler:
.text
.align 2
.thumb
.thumb_func
@ID of last OAM created - 0x8008
@Hook at 0x80070B0 via r1
Navigate to 080070B0 and insert the following byte changes:
Code:
00 49 08 47 XX XX XX 08
Where XX XX XX is the location your inserted your routine in reverse hex +1. The trailing "08" may change to 09 or something depending on where you inserted it. Remember to stay word aligned!
Usage:
This routine doesn't really do anything by itself. It's more of a routine which works in the background. It just writes to variable 0x8008 the last displayed OAM's ID. Basically, just insert it and do nothing :3
A quick explanation of how OAMs are shown/hidden in FireRed.
There's a neat RAM structure in FireRed which controls whether or not to show or unshow an OAM on the screen. This OAM's ID needs to be present in said structure. The structure, for some unknown reason, is 40 bytes in size. It looks like this:
[OAM ID (1 byte)] [OAM ID (1 byte)] [OAM ID (1 byte)] ... [Byte 0x3F] [Filler bytes] ...[40th filler byte]
In case you don't understand by now, it's basically a table of X entries where each entry is an OAM's ID to display. Every entry after the byte 0x3F is not read by game code, and is therefore nothing more than filler bytes!
The reason as to why I'm confused the structure is 40 bytes is because the routines which use this structure restrict themselves by using another structure. This second structure only holds 13 OAMs at a time, which is why we can only have 13 OAMs present in FR on screen at once WITHOUT fully customized code. For the most part you'll never go over 13 anyways. I used 9 in total for the custom intro and the screen was cluttered :X
My guess as to why it's 40 bytes is because it's used for animation frames as well. I'm not sure, I haven't researched that.
This structure is located at 0x2021800.
Hiding OAMs created
Now that you understood the data structure, you need to remove your OAM's byte ID from the table. But how do you know which byte is your OAM's byte? That was what the previous tracker routine was for. Right after you create your OAM the corresponding table ID will be in var 0x8008. Copy this value into somewhere you won't lose it (i,e a non-temporary variable), from there you can callasm this routine with the appropriate parameters :)
How to insert:
Compile and insert the following routine to free space:
loop:
ldrb r1, [r0]
cmp r1, r2
beq set
add r0, r0, #0x1
b loop
set:
mov r1, #0x3F
strb r1, [r0]
done:
pop {r0-r2, pc}
.align 2
Usage:
In a script, set variable 0x8000 to the OAM ID you want to vanish, then simply callasm this routine. This data structure is updated every frame from what I was able to see, so the results should be immediate.
Show OAM
Sometimes you want to hide an OAM but only temporary. This routine will show an OAM which has already been loaded, but flagged as hidden or similar.
How to insert:
Compile and insert into free space the following routine:
Spoiler:
.text
.align 2
.thumb
.thumb_func
@OAM ID to set - 0x8000
main:
push {r0-r2, lr}
ldr r0, =(0x2021800)
loop:
ldrb r1, [r0]
cmp r1, #0x3F
beq set
add r0, r0, #0x1
b loop
In a script, set variable 0x8000 to the OAM ID you want to reappear, then simply callasm this routine. This data structure is updated every frame from what I was able to see, so the results should be immediate.
Closing notes:
I may or may not update these with animations as well. One I'm particularly interested in doing is a slow fade. The biggest thing I want to address is how to use these in a script. I think it's fairly intuitive, but a quick example may help :)
Play around with it. It can be fun, and hopefully this will open more doors for hackers. I've made it as friendly as possible even opening up the potential to use it in scripts, but if you have any questions you can direct them to me at the ASM help thread or something :D
Quick research:
TMs are deleted in two places. The first place is in their own function. When called from the bag, after use the TM has it's own deletion mechanism. The second way is from the bag, after you use a TM the bag attempts to delete it as well. Well, the solution is quite simple. There's two ways to do this, either go to 0809A1D8 call your own function there which checks if the item is a TM, and if it is, just jump to the end. Or much more simply you just remove the parts from the bag and tm function that deletes the TM (Which is what I did). The former way is a way you can make another item you have unconsumable.
To insert:
Do the byte changes below
0x124F78: 00 00 00 00
0x125C80: 00 00 00 00
Make it Ungivable:
insert that at 0x1326B8: 00 00 17 E0
Make it consumable after animation:
Insert: 00 00 00 00 at 0x124F78
Where XX XX XX is the pointer to where you assembled the routine +1
Now navigate to 0x131EA5 and change the byte to E0
Unsellable:
Basically for the TMs, you can still sell them to vendors. To change this, you need to modify each TM individually. It's unfortunate, but the game checks if an item can be sold my comparing it's market price to zero. If it's strictly greater than zero, then you can sell it to a vendor, seems to be the rule. So to make TMs unsellable you need to set their market prices individually to zero.
I can't use my own checks to disguise the TMs as unique because the sell routine in shops are used for ALL items including potions, berries, TMs, and other items like nuggets.
Present :3
I've got a HUGE problem with this!!!!
I was playing and normally using TMs for 20k Pokémon (not a number, I'm exaggerating). I'm after the league now, and I was giving Toxic to some Pokémon, to help me catch others, so I could get the 60 Pokémon to get National Dex and be able to go to Four Island.
Problem is, when I was going to give Toxic to my Chansey, it was gone! Then I looked for the Psychic TM (other move I give to her, I took it out briefly for Rock Smash), and it was gone too. What the hell happened?
Is there a limit for this?
I got my save back, from the GBA in-game save, and I had Toxic yet. I tested giving it to one Pokémon and it didn't disappear. Then I gave it to other and then it wasn't there anymore. Is there a limited amout of times I can use a TM? Or there's something incomplete about this hack?