Skip to content

sc-workshop/SupercellSWF-Animate

Repository files navigation

Supercell Animate

Supercell Animate is a custom platform addon and extension for Adobe Animate. This extension will allow you to create custom documents and export content of your library directly to a .sc file.


Disclaimer

This repository does not provide any instructions on how to modify any Supercell game or their assets. All information and all Assets were taken from public sources. You assume all risks from the use of this tool.

Table Of Content


Support

This project was created with the goal of exploring various interesting tools and to support a small but quite creative community of modders. I put a lot of heart and time into this creation, so if you want to support me, you can buy me a coffee right here :3
"Buy Me A Coffee"


Export features

  • Stroke / Fills / Brushes ✅
    Full support. It can be unstable sometimes especially with big fills and curves so try to work more with sprites

    • Fill styles ❌
      Now only solid color works and there are no plans for other styles.
  • Filters ❌
    There will be no support for filters for Symbols

  • Scripts (ActionScript, JavaScript) ❌
    .sc file does not support any scripts

  • Sounds ❌
    .sc file does not support sounds

  • Parenting / Camera / Advanced Layers ❌
    There are currently no plans for support.

  • Text ✅
    Partial support

  • Symbols (Graphic, MovieClip) ✅
    Full support except for "Button" type

    • Blending modes ✅
      Full support. But note that some modes may not work or crash.

    • Transform ✅ 2D Transforms are fully supported. 3D transformations have a potentially small range of uses and a small chance of being supported.

  • Layers ✅
    All types of layers are supported: Normal, Masks, Folders, Guides Also note that all symbols from guide layer will be ignored and will only be used for animation if necessary.

  • Classic / Animation tweens ✅
    Absolutely all types of animation tweens and their types of interpolation are supported.

  • Shape animation ✅
    Full support. Be careful when using it, the result can be very unstable.

  • Nine-slice ✅
    Full support. But keep in mind that on Animate 2024 and above this may not work correctly.


How to use

  • Check requirements, make sure everything is satisfied
  • Install or build extension
  • Open your Adobe Animate and go to New Document panel
  • Create new "SupercellSWF" document:

  • Create something!
    In examples you can find good and different use cases for extension in different games!
    Also, before creating something, do not forget to read information about "limitations" that will help you not to create any problems.

  • To set export options you need to click "File -> Publish Settings.."
    You can set all options here for the first time only once and then just press "Publish" button. You can also find a description of all options in "Publisher options"

  • After setting all options, you can click on publish button. You are great!
    Then you just need to wait until file is saved. Please note that in some rare cases this may take up to 10 minutes!

Limitations

Color transforms

Be careful when transforming colors. Color values can only be positive, otherwise these values will be set to zero and the result will be undesirable.

Text Fields

Text fields are covered with a large layer of mystique.
But there is also support for basic things here. Also be careful, not all settings can somehow affect text in final file (because they cannot be disabled, Animate just crashes)
Also, text must have no more than 255 characters, otherwise text will not be written to file. To enable text outline you need to add "Glow" filter to text field


Requirements

For extension to work correctly, you need:

  • Adobe Animate 2020 or higher
  • Windows 10 x64 or Windows 11

Please note that support for a macOS devices is possible, but not implemented simply due to the fact that I do not have a device for this on which I can develop this project


Installing

First of all, download .zip package from Releases
Unpack zip to any place convenient for you.
Inside archive there is a file install.jsfl. You need to run it in Adobe Animate.
By default, .jsfl is associated with Animate, so you can double-click on it and run it as a command, but if something is wrong, you can open it in Animate itself as a script and click on run button.
After installation is complete, be sure to restart Animate. If you want to remove plugin, run install.jsfl again, and this time you will see a confirmation button.


Update

If you have an already installed plugin and want to update, run installation file and remove plugin, restart Animate and install plugin as usual.

IMPORTANT

If you are using version 1.2.0 and lower, you MUST remove extension files MANUALLY. If you do not do this, then installation may not be successful.


Dependecies

There will be a list of other people's projects that have been used here:


Building

Before starting you need to have:

Instruction will be divided into 3 parts, instructions for building Plugin and Publish settings

  • Installer
    Install node modules inside the installer folder with command:
    npm install

  • Publish Settings
    Open console in publisher folder and enter following command to install all dependencies needed for build:
    npm install --save-dev
    After installation, try to start local server with command:
    npm run start
    Try opening localhost:8080 in your browser. If page works and you see the publisher interface, then everything is OK!

  • Plugin
    Install node modules inside the plugin folder with command: npm install
    And make sure you have installed Visual Studio with C++ build tools and also cmake which should be in system variables or PATH. That's all!

Next, after preparing all modules, you need to open console in root of repository.

  • Debug
    If you want to use a debug build you need to use this command:
    npm run build:dev
    After that, extension should load into Adobe Animate.
  • Release
    To build a zxp package, you need to fill in certificate details in scripts/cert.ts and then run following command:
    npm run package After the command completes, installer files will be available in dist/package folder.
    You can run it or zip and share.

Examples

You can find a list of all available examples in "examples" folder.


Issues

If you find any problem with the export process, please report it in Issues or join our Discord Server
Also, native part of plugin saves logs in "%temp%/org.scWorkshop.SupercellSWF_export_log.txt", please provide them along with a description for a faster solution to the problem.


Changelog

v 1.2.1

  • Added experimental installer

v 1.2.0

  • Complete refactoring of code
  • Changed and improved design of Publisher Settings
  • More animations for Publisher progress window
  • Improved support for Fills and Strokes. Added rasterization to sprites
  • Added new algorithm to reduce shape object count
  • Added support for 9slice scaling
  • More bugs

v 1.1.0

  • Added support for blend modes
  • Added basic support for solid fills and stroke
  • Added experimental shape animation
  • Added support for group

v 1.0.1

  • Fixed sprite transformation
  • Updated localization

v 1.0

  • First release. Basic export to .sc file

Authors

The idea of this project was created in my head for a year and code for the first version was written in a few months and during this time a lot of people became "authors". Without their support or some information at this time, this project simply would not exist and people would continue to edit sc in json files (People who do this are very patient and strong people. If you see them on the street, run).
And even at the time of writing this text, this is already a very big and interesting adventure for me, where for the first time I was able to "prove" myself in so many areas such as creating html "web sites" (A publisher is literally a very simple web site), creating libraries and programs with an UI in C++.
I hope that in the future I can continue in the same mood and continue to do programming, improving my skills as a programmer.

And let's say thanks to those who somehow helped this project:


Thanks to Fred for listening to my crazy Illuminati theories all this time and still not blocking my messages. Also, thanks for a lot of things like SWF module, sc2json converters, etc...


Danila Schelkov (Also known as Vorono4ka)

Famous author of the most unoptimized and most used tool for _tex.sc files - XCoder
Also known a bit for SC-editor (I think it's because it can't edit or even export movie clips :) ).
Also thanks for support during this time and many other things that helped write Supercell SWF library.


A cool author of some scripts and modules from which some implementations for plugin code were taken.


And me, DaniilSV

Dude who created this, and writes this text. Yes.