If you are looking for the decompiler itself, visit https://github.com/jindrapetrik/jpexs-decompiler
NEW : We have got a new blog where we post some interesting SWF internals info.
![List of issues](/flash/images/issue_list.png)
#2088 game crashes just on adding a line break
Author:
edynce
![user user](/flash/images/user.png)
Date created:
Type: question
Visibility: Everybody
Assigned to:
Labels: AS3Direct Editation
State: closed ![Help](/flash/images/help.png)
![Help](/flash/images/help.png)
Hello,
I'm writing this because I currently want to hack Raze 2 (the armorgames version), however
I'm running into a strange problem that I haven't encountered before.
I've hacked numerous .swf files in the past using JPEXS and this is the only .swf that
acts like this.
When I open the raze 2.swf file, and I make any changes, and recompile it back and try to
play, the swf crashes.
Even if I restart from scratch, I would just add a line break (not changing any code, just
hitting enter), and saving it, and compile it back as an swf, the .swf would still crash
even though the code should work just the same.
I've looked not the swf potentially being compressed, but I loaded onto hex editor, it
showed first 3 bytes as FWS, to which according to a StackOverflow post, means that its
okay.
I've also tried enabling Automatic deobfuscation in the settings, but to no avail either.
I'm really stumped on where to go from here.
How would I go about solving this?
This is the original Raze 2 armorgames version I'm using. The original works, I can play
it just fine. But any time I make an edit, and then recompile back, it doesn't work.
![Download](/flash/images/disk.png)
Are you direct editing ActionScript 3 code or editing pcode? If you're directly editing
AS3 Code. you may be stuck with learning Pcode for this one. I suggest you run P-Code
deobfuscation in Tools on the "remove traps" setting. I expect you have already made
backups and/or selected the filepath to your flash projector. I think it would be a good
idea to check if it still functions correctly after the deobfuscation process. If it does,
you should be good to go and can go right ahead learning and modifying Pcode.
Which class are you trying to edit?
Is it ActionScript editation or P-code editation?
Which version of FFDec do you use?
Also please try nighly version, we made a lot of changes since last stable.
I'm editing AS3 code, and I'm in the Status class.
I have version 18.5.0. Yes, okay I will try the nighly version. I'm on the github right
now, but I don't see it. Do you have a link or a place I can go to for that?
Basically I'm trying to have infinite health. I figured out how it works. the function
damage in the Status class (in line 151) is the one that gives damage to units (the
player, the ally team or enemies). The boolean unit.human is to check if it's referring to
the current player.
So what it does is it calculates damage in variable "param1". After all calculations, it
would subtract the value from hpCur (current health of the unit). I would add something
beforehand like: if(unit.human) {param1 = 0}, to set the damage taken to 0.
Nighly can be dowloaded on all releases page on github - here is the link:
https://github.com/jindrapetrik/jpexs-decompiler/releases
Ok yeah I tried the nightly version and it worked just fine. I can make edits and my hack
worked too to have infinite health.
Thank you
State: new→closed