Smashline 2 is a Rust-based toolkit for modding SSBU, including editing fighters, movesets, and more.
It offers an API and CLI tools to create, clone, and modify fighters.
The file fighters.rs contains fighter cloning logic.
Fighter cloning here means creating a new fighter by copying or inheriting from an existing fighter’s files and data, then modifying it as desired (e.g., moveset changes).
Step-by-step guide to fighter cloning (officially with Smashline 2)
1. Setup and prerequisites
Install Rust and build Smashline tools if you want to build from source.
Or use precompiled or released binaries if available.
Ensure you have the UOS/extracted files from SSBU ISO or your mod folder, with the original fighter’s files.
2. Understand the fighter cloning flow in fighters.rs
From fighters.rs, the cloning is done by taking a source fighter index, copying its assets and data, and assigning a target fighter index.
For example, the function signature looks like:
rust
pub fn clone_fighter(
src_fighter: usize,
dst_fighter: usize,
asset_pak_path: &Path,
override_moveset: Option<&Moveset>,
...
) -> Result<()> {
// 1. Copy the asset pak files
// 2. Modify the fighter info to reflect new fighter ID
// 3. Update data inside the pak if needed (fighter_animation, config, etc)
// 4. Apply moveset override if provided
}
The logic involves:
Copy all pak files (e.g., fighter.uatk, fighter.bch, fighter.json, etc) from source fighter folder to destination fighter folder.
Clone fighter 0 (Mario) to fighter 60 (custom fighter)
Override moveset files with the modded ones from /path/to/moveset_mod
4. Important details
The clone_fighter function from source will parse and update these internal references:
Owner fighter ID fields inside .pak files
Actor IDs
Model references
Animation references
Moveset override is applied by replacing or merging encountered moveset data (often residing in .uatk files and .json configuration).
Ensure that dst_fighter ID does not conflict with existing fighters or reserved IDs.
5. Example pseudo-Rust snippet call pattern
rust
use smashline::cloning::fighters;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let src_fighter_id = 0; // e.g. Mario
let dst_fighter_id = 60; // custom fighter ID
let asset_pak = Path::new("/path/to/asset/pak");
let moveset_mod = Some(Path::new("/path/to/moveset_mod"));
fighters::clone_fighter(src_fighter_id, dst_fighter_id, asset_pak, moveset_mod)?;
Ok(())
}
Summary
Use clone_fighter function in Smashline 2 fighters module.
Provide source fighter ID, destination fighter ID, asset pak path.
Optionally provide moveset mod override files.
The function copies and modifies fighter data files accordingly, setting up a cloned fighter with customized moveset.
Use Smashline CLI for easy command-based cloning.
If you want me to generate a ready-to-use CLI example or Rust code for your specific scenario, let me know!