As was foretold, we've added advertisements to the forums! If you have questions, or if you encounter any bugs, please visit this thread: https://forums.penny-arcade.com/discussion/240191/forum-advertisement-faq-and-reports-thread/
Options

Removed

CaedwyrCaedwyr Registered User regular
edited June 2023 in Help / Advice Forum
Removed

Caedwyr on

Posts

  • Options
    RiemannLivesRiemannLives Registered User regular
    edited February 2019
    one thing to note is that a SWF does not contain the original actionScript. It contains compiled bytecode. Any tool that gives you actionscript from just a SWF is a decompiler. That is, it is reconstructing what it thinks the original code was based on the compiled code. This is not an exact process. If your friend can get you the original source code that will make your work much, much easier (well, hopefully, depending on how well organized his code was).

    edit: also the exe version will just be the flash player bundled together with the SWF.

    RiemannLives on
    Attacked by tweeeeeeees!
  • Options
    CaedwyrCaedwyr Registered User regular
    That explains a lot of things actually. I think the original source code is long gone, so it looks like I'm stuck with what I've got. It's a real shame, since a good 30% of the roleplaying dialogue options will basically never trigger due to this simple to fix bug.

    Thanks for the response.



    This thread can be closed now.

  • Options
    BlindZenDriverBlindZenDriver Registered User regular
    edited February 2019
    Caedwyr wrote: »
    That explains a lot of things actually. I think the original source code is long gone, so it looks like I'm stuck with what I've got. It's a real shame, since a good 30% of the roleplaying dialogue options will basically never trigger due to this simple to fix bug.

    Thanks for the response.



    This thread can be closed now.

    I'm late to this, but just maybe there is a chance you can fix things with a more direct approach. It is a long shot, but you mention how you think a misspelling is part of the issue with the code. Since it would be fixed replacing one letter with a different letter, this might make it so that you can just do that directly in the SWF file using pretty much any editor which lets you edit the file directly without decompiling/recompiling ie. essentially doing a search-replace to correct the error. Now whether or not such a crude method would work I can't say, but trying it out would take almost no effort so why not give it a go.

    For doing so I would use one of those text editors which are for editing raw text, my personal preference is Textpad there is however many such tools around and an another example would be Notepad++ (I think). The main point it the editor must let you edit the file without it doing any formatting to it.

    BlindZenDriver on
    Bones heal, glory is forever.
  • Options
    HevachHevach Registered User regular
    edited February 2019
    Depends on how swf bytecode works. I used to do that with DOS exe files often enough. You'd most likely want a hex editor if you want to try, which is one of the tools people use to modify game ROMs, mobile apps, and the like, so there's no unicode weirdnees to get in your way and everything stays exactly where it belongs except the opcodes you need to change. Accidentally inserting a byte somewhere in a compiled file at best breaks everything in it, and at worst breaks everything else around it in memory too.


    There used to be a saying in programming about this kind of thing, though. He who never tries it as a boy has no heart, he who does as a man has no brain. It's difficult to impossible, has catastrophic potential if done wrong, and if you're to the point that it's your only option you're so far up shit creek that it's time to ask how and why. But if the source is gone it's probably easier than extracting the assets and trying to recreate the game from scratch.

    Hevach on
  • Options
    CaedwyrCaedwyr Registered User regular
    I tried the suggested methods, but they still corrupted the .swf file. Too bad. Thanks for the suggestions.

  • Options
    ArbitraryDescriptorArbitraryDescriptor changed Registered User regular
    it causes the program to display all the embedded animations and graphics simultaneously when it loads, so something is obviously corrupting the file

    This is not a corrupted SWF. This is likely just an unhandled script error. When AS breaks it stops executing. Leaving all the movieclips on the stage unstopped and unhidden is a pretty common result. The most common.

    JSPEX has a few decompiler errors, like not always declaring the __loc#__ variables. I wouldn't trust it to successfully live edit code, you'll need to get that script into a proper debugger rather than editing within the decompiler. JSPEX will export an FLA. SWFDecompiler will ALLEGEDLY export a Flex, but I've never seen it happen.

Sign In or Register to comment.