A command-line tool for modifying and compiling SWF files used in The Sims 4 (TS4).
I've thrown this together to simplify the build process for TS4 Ultimate UX Mod. Since I've built this to do exactly what I need I'd advise against using this for your own project quite yet.
- Decompile/Recompile SWF files using FFDEC
- Replace ActionScript 3 (AS3) code based on AS3 package + classname
- Clone and modify PlaceObject tags based on a custom JSON schema
- Java 8 or later
- Maven (for building the project)
- Clone the repository:
git clone https://github.com/cpritch/sims-swf-compiler.git
- Build the project:
cd sims-swf-compiler
mvn clean package
java -jar target/sims-swf-compiler.jar -src /path/to/src -dst /path/to/input.swf -out /path/to/output.swf
-src
: The folder containing assets to import (ActionScript files and tag json definitions).-dst
: The input SWF file location.-out
: The filepath for saving the modified SWF.
The tool expects the following directory structure under the -src
folder:
src/
├── scripts/
│ ├── Class1.as
│ ├── folder1/
│ │ ├── Class2.as
│ │ └── ...
│ └── ...
└── tags/
├── tag1.json
├── tag2.json
└── ...
scripts/
: Contains ActionScript 3 (AS3) files to be replaced or added to the SWF. Correct script to replace is determined automatically from AS3 code.tags/
: Contains tag configuration files in JSON.
The tag configuration files must follow a specific JSON schema. See the Tag Configuration Schema for more details.
Contributions are welcome! Please follow the contributing guidelines(Coming Soon!) for more information.
This project is licensed under the MIT License.