Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions mods/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ mods/<name>/
skins/<skin>/ bodies and weapons that replace the default ones
```

**Bartz's moves from the first Dissidia:** `psprecomp/games/dissidia/tools/d1_moves.py --d1 <Dissidia (2008) ISO> --iso012 <012 ISO>` makes `mods/bartz-dff` from your own two discs: eight moves 012 dropped come back as new abilities. Settings > Mods switches them on and off (next start). Details: [docs/character-mods.md](../psprecomp/games/dissidia/docs/character-mods.md) (*New moves for a retail character*).

A folder with `"kind": "retail"` in its `mod.json` changes one of the game's own characters instead of adding one (the Move Studio's *Save as mod* makes those); its body can be swapped for your own model, and `"skin": "retail"` puts the game's back. A folder whose name starts with `_`, or whose `mod.json` has `"enabled": false`, is never built. `_template/` is the template.

## By hand
Expand Down
2 changes: 1 addition & 1 deletion psprecomp/docs/installer.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ of the fork.
of what the current stage does in the information panel. The step weights live in `setup/install.cpp`.
- **Add to Steam** (desktop only; an Options toggle, and a row on the start page of an installed game): `plan_steam` runs `games/dissidia/tools/steam_shortcut.py` (Linux, Windows; the script also serves the Steam Deck setup) to add a non-Steam shortcut to every Steam account on the machine, pointing at `DissidiaRecomp --launch` (check for an update, then play), with the game's icon and the disc's PIC1.PNG as banner. Steam is closed for a moment (`-shutdown`) and started again, because it rewrites its shortcut list on exit. The step is optional: no Steam installed only adds a note to the last page.
- **Change extras** (start page of an installed game): the Extras page again, applied without a rebuild (`plan_extras`): downloads / swaps / removes the HD texture pack, adds the Japanese voices, builds the Android version once.
- **Options** (one page in the game's Settings-screen look, without the category sidebar: HD textures on / off, then Texture pack when on, Japanese voices, Android version, Import saves, update check, install folder, Start installing): check for updates; HD textures (on / off) and, when on, Texture pack (LiinkPK's hand-retouched pack or the AI upscaled pack; the help line credits the selected pack); Japanese voices (undub; asks for the undub disc image first); Android
- **Options** (one page in the game's Settings-screen look, without the category sidebar: HD textures on / off, then Texture pack when on, Japanese voices, Android version, Import saves, update check, install folder, Start installing): check for updates; HD textures (on / off) and, when on, Texture pack (LiinkPK's hand-retouched pack or the AI upscaled pack; the help line credits the selected pack); Japanese voices (undub; asks for the undub disc image first); **Bartz: Dissidia 1 moves** (`d1_moves=1`; asks for a Dissidia Final Fantasy (2008) disc image, then `tools/d1_moves.py install --d1 <iso> --work <game>` rebuilds the mod's six files from the shipped patches in `game/d1_moves/` and the player's two discs, checks each against its SHA-256, adds the abilities to main.bin and writes `mods/retail_moves.txt`; also offered by Change extras); Android
version; **Import saves** (cycles Off / each PPSSPP or memory-stick SAVEDATA folder found with Dissidia 012 saves, found by
`psp_savemgr::detect_sources`; it adds the last install step, `DissidiaRecomp --import-saves FROM --dir WORK`, which copies the
saves under the installed game's disc ID, re-signed, and never replaces a save that already exists in the install; verified
Expand Down
212 changes: 212 additions & 0 deletions psprecomp/games/dissidia/d1_moves/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,212 @@
{
"_info": "Bartz's Dissidia 1 moves: patches that rebuild the mod's files from the player's own Dissidia 012 and Dissidia 1 discs (tools/d1_moves.py install). Made by tools/d1_moves.py patches.",
"folder": "bartz-dff",
"code": "fiv100",
"display": "Bartz: Dissidia (2008) moves",
"files": [
{
"path": "obj/p_fiv100.objx",
"size": 1983820,
"sha256": "a7a67dd29f5067ac5a9b707b5b428a652a1e53427d52e884f28414f68bdd7a15",
"patch": "p_fiv100.objx.npd",
"sources": [
"012:obj/p_fiv100.objx",
"d1conv:obj/p_fiv100.objx",
"012:obj/p_for100.objx",
"012:obj/p_six100.objx",
"012:obj/p_thr100.objx",
"012:obj/p_ten100.objx",
"012:obj/p_sev100.objx",
"012:obj/p_one100.objx",
"012:obj/p_two100.objx"
],
"sources_sha256": [
"d71567ebd9fab3a50ab725fb5db44253693e1dafc1cde7a890777953ad4e9a83",
"481a7820bcd041e3b95008e271b64e67522f8b769765195101e1cc4597242340",
"e8ed7ea7d07a526ca6ebad4f0ddc43894f8566799158e56bb34e27046ebbae0e",
"8096f57850b01f1e49d37a28655236ad238f9f6bb2784559474d38e098dccde4",
"92048f758e9b739c5ca146c6526aa5a19dcb4d8e4be58ff47f2015a35ed338a3",
"44565392e6beba42a64b27f7c4e0187068672890bdc5ad26cad0b1c4f0180dfc",
"9c296086238b09bac54d7800e24c11013146412417ae01544cc19cf244193ca1",
"3a81bfb308d32d0c3a93a07495ca9ca90d800bfaf633955e0813e974d8d668e1",
"b314530d34aac80f9e4320f0dde57997e2175e51b3db2e27cc61dfa1daef8777"
]
},
{
"path": "obj/p_fiv100_1p.gmo",
"size": 2462188,
"sha256": "9a17294ec50482f2f1293700a72d3e75f935df673494d9a95c5b7f66716eeafb",
"patch": "p_fiv100_1p.gmo.npd",
"sources": [
"012:obj/p_fiv100_1p.gmo",
"d1:obj/p_fiv100_1p.gmo"
],
"sources_sha256": [
"1b843a3e44fcc32e5ac6ac86b669cb5a14494f7121528148be3c48d60b5eaab5",
"bb524d5b68740f781df294358e3eaa7c48355747dad9ba38ebd44d851ec51ed1"
]
},
{
"path": "obj/p_fiv100_2p.gmo",
"size": 2462188,
"sha256": "c54dbeb66a6ec284aded5bed724260cc0e7aceb51a0744c6ba0232e085093c0f",
"patch": "p_fiv100_2p.gmo.npd",
"sources": [
"012:obj/p_fiv100_2p.gmo",
"d1:obj/p_fiv100_1p.gmo"
],
"sources_sha256": [
"592e67b8c6fcac7300e80ca8a32fa5cbbaa756b729782b9b1fe80ef1c4096532",
"bb524d5b68740f781df294358e3eaa7c48355747dad9ba38ebd44d851ec51ed1"
]
},
{
"path": "obj/p_fiv100_3p.gmo",
"size": 2470132,
"sha256": "b86bc46bb92bc4f4a6ad9fa5c4fa583996d4c8db970b5bc8294d14431d49dfc9",
"patch": "p_fiv100_3p.gmo.npd",
"sources": [
"012:obj/p_fiv100_3p.gmo",
"d1:obj/p_fiv100_1p.gmo"
],
"sources_sha256": [
"43da35210e9dd7e4974400cd194eb22c426f7667f1364779aec71d49057d09c7",
"bb524d5b68740f781df294358e3eaa7c48355747dad9ba38ebd44d851ec51ed1"
]
},
{
"path": "obj/p_fiv100_zako.gmo",
"size": 2443668,
"sha256": "c0dbcc2c5560b87c0b8272f837ec2d800c0605af071438acd8a35e665c239b5c",
"patch": "p_fiv100_zako.gmo.npd",
"sources": [
"012:obj/p_fiv100_zako.gmo",
"d1:obj/p_fiv100_1p.gmo"
],
"sources_sha256": [
"89422d7152374b0e49c9e5595b1364ebbdf60bbe50d392e9e78a626fbafc8cbf",
"bb524d5b68740f781df294358e3eaa7c48355747dad9ba38ebd44d851ec51ed1"
]
},
{
"path": "voice/en/battle/voice_p_fiv100_00.scd",
"size": 357600,
"sha256": "6b3709f8f3f959495e8672ed5608ecb7bd6bf95572d680b6c6c4e84fdba1a8cc",
"patch": "voice_p_fiv100_00.scd.npd",
"sources": [
"012:voice/en/battle/voice_p_fiv100_00.scd",
"d1crc:dd2e4d13"
],
"sources_sha256": [
"9f67e60176757f67a7f867d35082d0a0c464e3373deb2feb1c036c788caa7946",
"06fdeeb7c0acde5bfeb82508fb5e842f7045741a71dd7ff344da282c28ce2eec"
]
}
],
"move_names": {
"10": {
"copy": "0C",
"cmd": "0xB0",
"type": "brave",
"phase": "ground",
"learn": 6,
"name": "Ascendant Lance",
"_note": "Dissidia (2008) Bartz move, command 0x198 there (tools/d1_moves.py)",
"cp": 35,
"cp_mastered": 15,
"ap": 120,
"help_d1_cmd": 408
},
"11": {
"copy": "0C",
"cmd": "0xB1",
"type": "brave",
"phase": "ground",
"learn": 3,
"name": "Climbarrel",
"_note": "Dissidia (2008) Bartz move, command 0x19A there (tools/d1_moves.py)",
"cp": 35,
"cp_mastered": 20,
"ap": 120,
"help_d1_cmd": 410
},
"12": {
"copy": "0D",
"cmd": "0xB2",
"type": "brave",
"phase": "midair",
"learn": 12,
"name": "Storm Shot",
"_note": "Dissidia (2008) Bartz move, command 0x19E there (tools/d1_moves.py)",
"cp": 35,
"cp_mastered": 15,
"ap": 180,
"help_d1_cmd": 414
},
"13": {
"copy": "0D",
"cmd": "0xB3",
"type": "brave",
"phase": "midair",
"learn": 28,
"name": "Slidehazzard",
"_note": "Dissidia (2008) Bartz move, command 0x19F there (tools/d1_moves.py)",
"cp": 35,
"cp_mastered": 15,
"ap": 180,
"help_d1_cmd": 415
},
"14": {
"copy": "0E",
"cmd": "0xB4",
"type": "hp",
"phase": "ground",
"learn": 24,
"name": "Soul Eater",
"_note": "Dissidia (2008) Bartz move, command 0x19C there (tools/d1_moves.py)",
"cp": 45,
"cp_mastered": 25,
"ap": 180,
"help_d1_cmd": 412
},
"15": {
"copy": "0E",
"cmd": "0xB5",
"type": "hp",
"phase": "ground",
"learn": 19,
"name": "Flood",
"_note": "Dissidia (2008) Bartz move, command 0x19D there (tools/d1_moves.py)",
"cp": 45,
"cp_mastered": 25,
"ap": 180,
"help_d1_cmd": 413
},
"16": {
"copy": "0F",
"cmd": "0xB6",
"type": "hp",
"phase": "midair",
"learn": 46,
"name": "Wind Shear",
"_note": "Dissidia (2008) Bartz move, command 0x1A1 there (tools/d1_moves.py)",
"cp": 45,
"cp_mastered": 25,
"ap": 300,
"help_d1_cmd": 417
},
"17": {
"copy": "0F",
"cmd": "0xB7",
"type": "hp",
"phase": "midair",
"learn": 38,
"name": "Paladin Force",
"_note": "Dissidia (2008) Bartz move, command 0x1A2 there (tools/d1_moves.py)",
"cp": 45,
"cp_mastered": 25,
"ap": 180,
"help_d1_cmd": 418
}
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
55 changes: 55 additions & 0 deletions psprecomp/games/dissidia/docs/character-mods.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,61 @@ with the add-on 0.32+), Blender (Character mods > Model), or `charmod.py body cl
duellum`. It goes on the first costume and its assist; the other costumes keep their own bodies. Weapons are not
covered for retail characters yet.

### New moves for a retail character

A retail folder may also add abilities: `move_names` entries with `"copy"` (as an added character's, see *move_names
fields*) become new 'ablt' records of the retail charId (`roster_mainbin.retail_named`); the retail entries in the same
map are left alone. The build lists each such folder in `<mods>/retail_moves.txt`:

```
bartz-dff 9 0910,0911,0912,0913,0914,0915,0916,0917 nm=Bartz:_Dissidia_(2008)_moves
```

and the runtime (`roster.cpp`, retail moves) reads it at start:
- **on**: the abilities are taught to the character's save record whenever the game fetches it (FUN_088CB164), so a save of
any level has them at once (AP still has to be earned to master them);
- **off** (`#off# ` in front of the line; **Settings > Mods** switches it, at the next start): the records are hidden and
inert the way `"disabled"` makes them (owner 0xFE, command -2), so a save that learnt or equipped them stays valid (an
equipped slot shows empty). The folder's files stay installed: only the new commands use what they add.

A rebuild keeps a line's `#off#`. A folder deleted or set `"enabled": false` keeps its new abilities as disabled records
(from the previous `extra_abilities.json`), for the same reason. Settings > Mods shows one row per line instead of the
folder's own row.

**Bartz's Dissidia (2008) moves** (`mods/bartz-dff`, made by `tools/d1_moves.py` from your own two discs): Ascendant
Lance, Climbarrel, Storm Shot, Slidehazzard, Soul Eater, Flood, Wind Shear and Paladin Force, the eight moves 012 took
away, as abilities 0910..0917 next to his 012 kit.

```
tools/d1_moves.py --d1 "Dissidia Final Fantasy (USA).iso" --iso012 "Dissidia 012 (USA).iso" # writes mods/bartz-dff
```

Releases: the wizard's Options page has **Bartz: Dissidia 1 moves**, which asks for the Dissidia 1 disc image and runs
`d1_moves.py install`. Nothing from either disc ships: `games/dissidia/d1_moves/` holds patches (176 KB, the same
NPD1 format as the online deltas) whose sources are the player's 012 files, their Dissidia 1 files and D1's moveset
run through `d1_objx.py` there; every result is checked against `manifest.json` (SHA-256), D1's help texts are read
from their disc at install. After a change to the mod, regenerate them from a built mods dir:
`d1_moves.py patches --d1 D1.iso --mods work/mods --disc work/disc0` (and `netpack.py record` for online play). Tested 16
Nov 2026: an install into an empty game folder rebuilt all files byte for byte as the dev build (3.5 s).

It converts D1's moveset to the 012 layout (`tools/d1_objx.py`: action records 112 -> 116 bytes, the command table,
hits 60 -> 68 bytes with 012's hit-stop bytes filled in, projectile parameters from floats to the float pool, effect
placements 248 -> 260 bytes, and the six event ops whose value count grew, learnt from the moves both games share), then
runs the Move Studio's copy-a-move headless (`tools/d1_moves_studio.js`: Node.js + playwright-core + Chrome) and adds the
names, help texts, CP / AP, learn levels and D1's voice lines for the slots 012's bank left empty (same slot numbers in
both banks). Tested 16 Nov 2026 on the USA discs: every move plays with its animation, hits, effects, banner and damage
(test driver `action 3024..3039`), the Abilities screen lists them, a pressed Soul Eater plays in Quick Battle, and the
switch hides and restores them.

Online: players who don't have the mod receive it from the player who uses it, verified against a compiled-in list (see
[multiplayer.md](multiplayer.md), *Mods that change a character*).

Move Studio changes made for it (help every copy): the source's voices and face textures come along when it is the same
character (a mod folder whose `character.based_on` is the target's code); an effect placement bound to the animation it
belongs to (FEPA +0xC8, which the game plays and ends with that animation) is bound to the copied animation instead of
cleared (cleared, a looping hand effect outlived its move), and every placement of the effect id bound to a copied
animation comes along; copied animations get their whole name (`cpSetChunkName`).

## A character folder (`mods/<name>/`)

| Path | What | Edit it to |
Expand Down
38 changes: 37 additions & 1 deletion psprecomp/games/dissidia/docs/multiplayer.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ part is the frame-rate rule in `runtime/framerate.cpp`.

Open Communications mode in the menu and challenge a player as on a PSP. Nothing else needs turning on: the network
layer starts the first time the game uses it. Players need the same game version and character set (do not mix a
modded roster with an unmodded one).
modded roster with an unmodded one). Packs listed below are the exception: they are sent to players who lack them.

### Internet (the default)

Expand Down Expand Up @@ -128,6 +128,42 @@ Details worth knowing when changing it:
- Struct layouts follow PPSSPP: scan info 28 bytes, peer info 152 bytes, PDP stat 20, PTP stat 36 (the last two are
unchecked against the game).

## Mods that change a character (verified packs)

A player who uses a known pack (today: Bartz's Dissidia 1 moves, `mods/bartz-dff`) can play online with players who
never installed it: as soon as both are in the same lobby, the other game fetches what it needs from that player
(about 760 KB: the moveset, the models and the voice bank, as deltas against the retail 012 files every player has),
caches it in `<mods>/.net_cache/`, and uses it for that session. A player's own characters are not changed by it.
Only the player who wants the moves needs the Dissidia 1 disc.

Nothing a peer sends is trusted. The packs a game accepts are compiled into it (`games/dissidia/net_packs.json` ->
`runtime/net_packs.inc`, written by `tools/netpack.py record`): every file with its size and SHA-256, the SHA-256 of the
retail file the delta applies to, and the abilities. The receiving game applies the delta to its own retail file
(`runtime/net_delta.h`: every copy bounds-checked, output capped at the listed size, inflate capped; host test
`tests/run_net_delta_test.sh`, run under AddressSanitizer with corrupted and hostile deltas), keeps the result only if
size and SHA-256 match, stores it under that hash (never a name a peer sent), and builds the ability records itself
from the list. So a peer can make another game use exactly the listed files and abilities, or nothing.

Who may start a match (`net_packs.cpp` `allow_match`, through the ad-hoc layer's match filter): a player who uses a
pack this game does not know (another version, an edited mod, a build that is not the listed one) or has not been
received and verified yet is refused, and a player who uses a pack only plays with players who confirmed having it. A
refused player is not shown in the lobby. Two players without packs play as before.

Transport: a side channel of the ad-hoc layer (PDP to the reserved port 0xD1D1, `psp_adhoc_side_*`), so the party
server needs no change. Messages: a manifest every second (packs in use, packs ready), requests and 1 KB pieces of a
delta (24 in flight, resent after 0.4 s, given up after 90 s). A sender serves only the deltas `netpack.py deltas`
wrote (run by `charmod.py build`) for packs whose files it has installed byte for byte (`<mods>/.net/<sha256>.dlt`).

Tested 16 Nov 2026 with two instances in LAN mode: A with the pack and Ascendant Lance / Soul Eater equipped, B with an
empty mods folder. B fetched and verified all six files in the lobby within seconds, the match started, A picked Bartz
and B Lightning, and both screens showed the same Brave and HP values through Ascendant Lance and Soul Eater. With
one of A's deltas altered (valid format, different bytes), B threw that file away and the two players no longer saw
each other in the lobby. Not done yet: an on-screen note telling a refused player why.

Adding a pack: build the mod, `netpack.py record <mods dir> <folder> --version N` (updates the JSON and the .inc), rebuild
the game. The recorded hashes must be what `d1_moves.py` / the mod build makes on every machine (they are deterministic
for the same discs: rebuilding from scratch gave identical files).

## The party server

`tools/adhoc_relay/` ([README](../../../../tools/adhoc_relay/README.md)) is a small C++ UDP relay. A client registers into a
Expand Down
1 change: 1 addition & 0 deletions psprecomp/games/dissidia/features.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
hd_textures=1
jp_audio=1
d1_moves=1
android=0
steam=1
Loading
Loading