Farm Splitter
Pixel‑perfect farmer frame exporter and NPC generator that calls ConcernedApe’s FarmerRenderer directly. Exports 16×32 PNGs for every vanilla farmer action and can generate fully‑dressed NPCs with Stardew‑style randomization or explicit outfit overrides.
OverviewTool
Farm Splitter is a C# utility for Stardew modders: it renders farmer frames using the game’s own renderer, so layering, offsets, and crops match vanilla exactly. Use it to export per‑layer action frames or to generate complete NPC sprite sets with controlled randomness.
- Frame export: per‑action, per‑frame PNGs at 16×32.
- NPC generation: randomize or explicitly override shirt/pants/hair/hat/accessory + colors.
- Deterministic runs: use --seed for repeatable output.
- Content-aware: reads Stardew Content + SDL2 runtime to match the game.
At a glanceC#
Output
16×32 PNG crops per frame + composed NPC frame sets.
Best placement
Next to Stardew Valley.exe (smoothest setup).
Inputs
input/*.png base farmer sheets + colors.
Determinism
--seed <n> for reproducible NPCs.
Heads up: placing the tool next to the game ensures it can read the game’s Content data and SDL2.dll.
If you run it elsewhere, copy SDL2.dll next to FarmSplitter.exe and use --content <path>.
Quick StartSetup
- Download the .zip from the Releases page and extract it next to your Stardew Valley.exe.
- Create an input/ folder next to FarmSplitter.exe containing the base farmer sprites:
accessories.png
farmer_base.png
farmer_base_bald.png
farmer_girl_base.png
farmer_girl_base_bald.png
hairstyles.png
hairstyles2.png
hats.png
pants.png
shirts.png
shoeColors.png
skinColors.png
Run (default)
Exports per‑action frames into output/ and generates a single random NPC.
./FarmSplitter.exe
Run (multiple NPCs)
Generate multiple NPCs with progress feedback:
./FarmSplitter.exe --random 25
If you want to run it outside the game folder, copy SDL2.dll next to the exe and use
--content <path> (or --content-dir <path>) to point at Stardew’s Content root.
CLI ReferenceCommand line
Core generation
toggle
- --random <n>: generate n NPCs (shows a console progress bar)
- --gender <male|female|both>: source pool for random gender (default both)
- --male-only / --female-only: shorthand for --gender
- --seed <n>: deterministic generation
- --content <path> or --content-dir <path>: game Content root (default: ./Content)
Hats & Accessories optional
toggle
- --hats <yes|no>: enable/disable hats when not explicitly set (disabled by default)
- --accessories <yes|no>: enable/disable accessories when not explicitly set (disabled by default)
- --p-hat <0..1>: hat probability (applied if hats are enabled and no explicit --hat)
- --p-acc <0..1>: accessory probability (applied if accessories are enabled and no explicit --accessory)
Explicit Outfit Overrides skip random
toggle
Provide any of these to lock that piece (randomization is skipped for that slot):
- --shirt <id>: shirt ID from Data/Shirts
- --pants <id>: pants ID from Data/Pants
- --hair <index>: hair index (male 0–15/108–117, female 16–40)
- --hat <index>: hat ID (or -1 to force none)
- --accessory <index>: accessory index (or -1 to force none)
- --haircolor <RRGGBB>: exact hair color hex (e.g., 191919 or #191919)
- --pantscolor <RRGGBB>: exact pants color hex
- --shoeindex <row>: row in Characters/Farmer/shoeColors palette
- --shoecolor <RRGGBB>: target shoe color; closest palette row is selected automatically
Randomization notes:
hair ranges match CharacterCustomization (male: 0–15 or 108–117, female: 16–40). Pants and hair colors use the same weighted adjustments as vanilla unless you pass explicit hex values.
Pants ID 1 are shorts; random generation avoids 1 by default, but you can force it with --pants 1.
Output LayoutFiles
Exports go under output/:
- Body/, Arms/, Pants/, Shirts/Overlays/, Accessories/, Hats/, Hairstyles/ — per‑action, per‑frame PNGs at 16×32
- NPCs/NPC_0001/<Male|Female>/<Action>/frameX.png — composed frames for each generated NPC
- Each NPC folder includes legend.json describing chosen styles (shirt, pants, hair, hat, accessory) and gender.
ExamplesCopy/paste
Random 20 NPCs (hats + accessories enabled)
./FarmSplitter.exe --random 20 --hats yes --accessories yes
Exact outfit with colors
./FarmSplitter.exe --gender male \
--shirt 1021 --pants 0 --hair 11 \
--haircolor 191919 --pantscolor 1e90ff \
--hat 4 --accessory 6 --shoecolor a0522d
Run outside the game folder (point to Content)
./FarmSplitter.exe --random 10 --content "C:\\Program Files (x86)\\Steam\\steamapps\\common\\Stardew Valley\\Content"
TipsWorkflow
- Keep FarmSplitter.exe next to Stardew Valley.exe and place the listed input/*.png there for the smoothest experience.
- Frames are pixel‑perfect 16×32 crops rendered by the vanilla renderer, so layering and offsets match the game exactly.
- Use --seed when you want “random” NPCs you can regenerate later.
CreditsThanks
ConcernedApe — for making such an amazing game.