Skip to content

Java console application for extending and modifying extracted Sims 4 swf files

License

Notifications You must be signed in to change notification settings

CPritch/ts4-swf-compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sims SWF Compiler

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.

Features

  • 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

Prerequisites

  • Java 8 or later
  • Maven (for building the project)

Installation

  1. Download the Jar from Releases
  2. Use it

Building

  1. Clone the repository:
git clone https://github.com/cpritch/sims-swf-compiler.git
  1. Build the project:
cd sims-swf-compiler
mvn clean package

Usage

java -jar target/sims-swf-compiler.jar -src /path/to/src -dst /path/to/input.swf -out /path/to/output.swf

Command-line Options

  • -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.

Configuration

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.

Tag Configuration

The tag configuration files must follow a specific JSON schema. See the Tag Configuration Schema for more details.

Contributing

Contributions are welcome! Please follow the contributing guidelines(Coming Soon!) for more information.

License

This project is licensed under the MIT License.

About

Java console application for extending and modifying extracted Sims 4 swf files

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages