docs(skill): record round-2/3 client-test lessons in AI TOOLBOX

This commit is contained in:
CAtlas0784 committed 2026-10-07 02:22:52 +07:00
1 parent 5cc172239d
commit eb58b2e464
2 files changed
+36

No files matched your search

+16
View File
@@ -63,3 +63,19 @@
- loadScene: ใช้ตำแหน่ง teleport จาก teleports.json ตรงๆ ถ้า res ไม่มี id นั้น
**บทเรียน:** data index บางตัวใน res.json ไม่ครอบคลุมทุกแมพ — ต้องมี fallback ค้นจากชื่อ config / teleports.json เสมอ
## รอบ 3 (จากการทดสอบ 10 ข้อของ user — commits 876f20d, 5cc1722)
1. **StartChallengeCsReq (1731) decode ได้ challenge_id=0** (MoC/PF/AS โหมดธรรมดากดไม่เจออะไร)
→ เพิ่ม `detectChallengeID` (สแกน varint ทุก field หา id ที่เข้า range/มีใน challenge_data)
+ 1787 เพิ่ม `stage_info` (tag 13, boss node buff echo) ตาม proto 4.6.51
2. **GetSwitchHandDataScRsp = 8108** — บันทึกของ Rust บอก 8104 ผิด! (8104 = SwitchHandStartCsReq)
3. **GetSceneMapInfo (1461) decode FAIL บาง payload** (layout drift) → ย้ายเป็น raw handler + lenient
wire-walk fallback (map UI ค้าง "Navigation กำลังโหลด" / ไม่เห็นเสา อาจมาจากจุดนี้)
4. **บัควาปผิดจังหวัด (AA→AP)**: teleport id (1001, 1002...) ซ้ำกันทุกแมพ และโค้ดค้น teleports.json
ทั่วโลกแบบสุ่มลำดับ → แก้เป็น resolve จาก floor ใน scene_identifier ก่อนเสมอ ห้าม scan ทั่วโลก
5. **Tierce arena 3014101 → 3000101** (client 4.6.51 ไม่มี MapEntrance 3014101 ตามบทเรียน Rust)
6. **Event/Travel Log**: เจอ `tools/march7_dump/Config/Custom/ActivityConfig.json` — activity จริง
147 รายการจาก client 4.6.51 → แทน synthetic ranges เดิม (content packages ตรงกัน 51=51)
7. ค้างอี้อื่น (Herta ตัวลอย, ห้อง Trailblazer ค้าง, MapRotation) — รอ log หลัง retest (hexdump +
decode-error log ครบแล้ว)
+20
View File
@@ -129,3 +129,23 @@ commit สุดท้ายของ Rust (`ebc27a1`) อ้างชื่อ
- **ใช้ data files Rust PS ได้ทันที** (freesr-data.json / persistent / res.json / teleports.json / challenge_data.json / mission_unlocks.json / versions.json) — ฟอร์แมต JSON ตรงกัน รวม enum string อย่าง `main_character: "FemaleHarmony"`
- **Build**: `go build -o gameserver-go.exe ./cmd/gameserver` + `./cmd/sdkserver`; ทดสอบ: `go test ./...`; เปิดด้วย `run_go.bat` (UDP 23301 + HTTP 21000 เหมือนเดิม)
- **ที่ตั้ง skill library**: `tools/AI TOOLBOX/` (ทั้งสองโปรเจกต์มี copy — อัปเดตต้นฉบับที่เดียวแล้วก็อป)
## 13. บทเรียนรอบทดสอบ client จริง (2026-10-07 01:00-01:53)
- **Req id ≠ ScRsp id — เช็ค reply จาก Cmd enum เสมอ**: บันทึกเดิมบอกตอบ
`GetSwitchHandDataScRsp = 8104` แต่ 8104 คือ `SwitchHandStartCsReq` (Req!)
ของจริงคือ **8108** — ส่ง id ผิดฝั่งไปหา client = client มองไม่เห็นคำตอบ
- **teleport id ซ้ำกันทุกแมพ** (1001, 1002, ...): ห้ามค้น teleports.json ทั่วโลกด้วย id เดียว —
วาปแล้วอาจไปผิดภูมิภาค (AA → AP) — ใช้ floor จาก `scene_identifier` กำหนดขอบเขตเสมอ
(`findEntryByTeleportInFloor`)
- **client layout drift**: payload ของ cmd เดียวกันอาจ parse ไม่ผ่าน proto ที่ถืออยู่
(GetSceneMapInfo 1461) → raw handler + lenient wire-walk fallback + log hexdump
เพื่อแกะ layout จริงจาก log
- **challenge_id=0**: เมื่อ decoder ตาม tag ไม่เจอ ให้สแกน varint ทุก field หาค่าที่
"หน้าตาเป็น challenge id" (`detectChallengeID` — range ต่อโหมด + เช็ค challenge_data)
- **StartChallengeScRsp 4.6.51 ต้องมี stage_info (tag 13)** — boss node buff echo
- **arena 3014101 client ไม่มี** แม้ res.json จะมี — fallback 3000101 ทั้ง StartChallenge และ Tierce
- **GetUnreleasedBlockInfo 4.6.51 = CsReq 4190 → ScRsp 4112** (retcode tag 14) —
Endgame entry รอ response นี้ก่อนเปิด UI (บันทึก Rust บอก 4130 ผิด)
- **Activity schedule จริง**: `tools/march7_dump/Config/Custom/ActivityConfig.json`
(147 activities จาก client 4.6.51) — อย่าส่ง synthetic id เพราะ Travel Log จะว่าง