-
Notifications
You must be signed in to change notification settings - Fork 43
/
NS_010045C014650000_13_Sentinels_Aegis_Rim.js
42 lines (36 loc) · 1.88 KB
/
NS_010045C014650000_13_Sentinels_Aegis_Rim.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// ==UserScript==
// @name [010045C014650000] 13 Sentinels: Aegis Rim
// @version 1.0.0
// @author Koukdw
// @description Yuzu
// * Vanillaware
// * ATLUS
// *
// ==/UserScript==
const gameVer = '1.0.0';
const { setHook } = require('./libYuzu.js');
const mainHandler = trans.send(handler, '200+'); // join 200ms
setHook({
'1.0.0': {
[0x80057d18 - 0x80004000]: mainHandler.bind_(null, 0, "cutscene text"), // cutscene text
[0x8026fec0 - 0x80004000]: mainHandler.bind_(null, 1, "prompt"), // prompt
[0x8014eab4 - 0x80004000]: mainHandler.bind_(null, 0, "name (combat)"), // name (combat)
[0x801528ec - 0x80004000]: mainHandler.bind_(null, 3, "dialogue (combat)"), // dialogue (combat)
//[0x80055b34 - 0x80004000]: mainHandler.bind_(null, 0, "name 2 (speech bubble)"), // name 2 (speech bubble)
//[0x8005ed38 - 0x80004000]: mainHandler.bind_(null, 3, "dialogue 2 (speech bubble)"), // dialogue 2 (speech bubble)
[0x80055acc - 0x80004000]: mainHandler.bind_(null, 0, "dialogue 2 (speech bubble)"),
[0x802679c8 - 0x80004000]: mainHandler.bind_(null, 1, "notification"), // notification
[0x8025e210 - 0x80004000]: mainHandler.bind_(null, 2, "scene context"), // scene context example: 数日前 咲良高校 1年B組 教室 1985年5月"
[0x8005c518 - 0x80004000]: mainHandler.bind_(null, 0, "game help"), // game help
//[0x801bc87c - 0x80004000]: mainHandler.bind_(null, 1), // attack description not working
}
}[globalThis.gameVer = globalThis.gameVer ?? gameVer]);
function handler(regs, index, hookname) {
console.log('onEnter ' + hookname);
const address = regs[index].value;
//console.log(hexdump(address, { header: false, ansi: false, length: 0x50 }));
const s = address.readUtf8String()
.replace(/(@(\/)?[a-zA-Z#](\(\d+\))?|)+|[\*<>]+/g, '')
;
return s;
}