I'm trying to make something akin to aSwedishMagyar's Damage Multiplier viewtopic.php?f=4&t=14392
in where it multiplies Stun Damage instead. First I set my damage multiplier in his table to 0 that way I could keep my target from dying. I was using a boss enemy with a large amount of Defense as to give myself the most amount of time. Using unknown initial value and subsequent decreased value scans with some unchanged value scans thrown in to widdle it down, I finally found the enemy's Defense address and through that found the opcode, via the debugger for what accesses the address, that handles how much damage is being dealt to it per hit.
This is what I have so far.
![Image](https://i.imgur.com/FGcgY17.png)
I'm multiplying the amount subtracted from the enemy's Defense by an integer value and it works. My stun damage is multiplied according to whatever I change the attached value to. r8d is storing it as an integer but what I want to do is convert that integer to a float with fild, use fmul to multiply it by my variable, then fist it back into an integer before it goes through the normal process. It is not letting me do this as it says unable to compile when attempting and my assumption here is that I cannot convert values stored in any of the r# areas. That's just my immediate assumption though.
Here is the memory view location:
![Image](https://i.imgur.com/5glQ5hP.png)
The "mov r8d,edx" opcode near the top is storing my stun damage as well so I tried making my script there instead and it did allow me to compile the script via converting to float, multiply, convert to integer but it would crash the moment I hit anything in testing.
Here is the test script:
![Image](https://i.imgur.com/CEBgrtv.png)
Now am I just missing something incredibly simple here? Any help would be greatly appreciated.