From f4e14e0c041db38f083ff0844bfb2b56285e4e40 Mon Sep 17 00:00:00 2001 From: iamsub <294696795+iamiamsub@users.noreply.github.com> Date: Tue, 29 Sep 2026 23:18:25 +0900 Subject: [PATCH] otoca: end the letters with the 8th and give the wallpaper then A full pass over the mission code showed the previous analysis read the achievement check one slot off: mission k (2-9) is checked against the flag recorded for k-1 (FUN_100219c0's jump table), so mission 1 is the first play and Nyandora's 8 letters are missions 2-9. SELECTCARD plays the "wallpaper complete" animation when mission 9 is done. The plugin stopped at 9 and gave the wallpaper when reaching it, one letter early, then ignored the report of 9, so the 8th letter came back every play. Now reporting 9 adds wallpaper 29 and moves to 10, which the game treats as no mission. Wallpaper 29 is confirmed by afp_letter.ifs, which completes card_bg 0018. --- otoca@asphyxia/README.md | 3 ++- otoca@asphyxia/data.ts | 5 ++++- otoca@asphyxia/handlers/play.ts | 13 ++++++++----- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/otoca@asphyxia/README.md b/otoca@asphyxia/README.md index 7ae78f8..62cc503 100644 --- a/otoca@asphyxia/README.md +++ b/otoca@asphyxia/README.md @@ -50,7 +50,8 @@ Server-side rules (from the arcade as documented by the fan wiki and the officia - One stamp per play; a full card of 10 gives one star powder. New players start with one powder and the first rival card ticket. The first key card comes with the Pink March Ribbon. - "New doll" unlocks once any doll reaches level 5. - - All 8 letters from Nyandora give a wallpaper (which one is inferred from the data). + - Nyandora's 8 letters are missions 2-9 (mission 1 is the first play). The 8th letter completes the + wallpaper (card_bg 0018, the one the game's letter data shows), and then the missions end. - No questionnaires, and old campaign gift cards answer "expired". The game's own offline card (printed when setCardInfo fails) gives its apology gift and a stamp once. diff --git a/otoca@asphyxia/data.ts b/otoca@asphyxia/data.ts index 2cbfdd4..b39d6c5 100644 --- a/otoca@asphyxia/data.ts +++ b/otoca@asphyxia/data.ts @@ -30,6 +30,9 @@ export const ACCESSORY_OFFSET = [ [[80, 100], [100, 100], [100, 100], [80, 100]], ]; export const FIRST_KEY_ACCESSORY = 144; // ピンクマーチリボン, made in the tailor tutorial when the first key is made -export const LETTER_WALLPAPER = 29; // guess: card_bg_0018 (nyandora night sky), the reward for all 8 letters +// cardbg.csv 29 = card_bg 0018 (Nyandora's night sky), the wallpaper afp_letter.ifs completes; no release table +// unlocks it, so it only comes through closet/cardbg. +export const LETTER_WALLPAPER = 29; +export const LAST_MISSION = 9; // the 8th letter export const TEMP_ASEQ = 1000000000; // the game's own placeholder seqs for this play's drops (sell scene) export const MAX_BALANCE = 9999999; diff --git a/otoca@asphyxia/handlers/play.ts b/otoca@asphyxia/handlers/play.ts index 735c846..39e1a44 100644 --- a/otoca@asphyxia/handlers/play.ts +++ b/otoca@asphyxia/handlers/play.ts @@ -1,5 +1,5 @@ // What a play reports: battle results, gold and friend points, stamps, letters and questionnaires. -import { LETTER_WALLPAPER, MAX_BALANCE } from '../data'; +import { LAST_MISSION, LETTER_WALLPAPER, MAX_BALANCE } from '../data'; import { getDoll, getUser, saveDoll, saveUser } from '../db'; import { updateRelease } from '../player'; import { now, u32 } from '../utils'; @@ -63,13 +63,16 @@ export const addStamp: EPR = async (info, data, send) => { }); }; +// Missions: 1 is the first play (always done, no letter); 2-9 are Nyandora's 8 letters, each checked against the +// flag the previous number records (game.dll FUN_100219c0); finishing 9 completes the wallpaper. The game only +// reports and never advances mission_no itself, and anything above 9 means no mission. export const reportMission: EPR = async (info, data, send) => { const u = await getUser($(data).number('user_seq')); const n = $(data).number('mission_no', 0); - if (u && u.mission_no === n) { - u.mission_no = Math.min(n + 1, 9); // the game treats every mission below mission_no as done - // all 8 letters: the original wallpaper (closet/cardbg adds to the wallpapers the game offers) - if (u.mission_no === 9 && !u.cardbg.includes(LETTER_WALLPAPER) && u.cardbg.length < 4) u.cardbg.push(LETTER_WALLPAPER); + if (u && n >= 1 && n <= LAST_MISSION && u.mission_no === n) { + u.mission_no = n + 1; + // the 8th letter: the original wallpaper (closet/cardbg adds to the wallpapers the game offers) + if (n === LAST_MISSION && !u.cardbg.includes(LETTER_WALLPAPER) && u.cardbg.length < 4) u.cardbg.push(LETTER_WALLPAPER); await saveUser(u); } send.success();