Patch:Skipgame

From Touhou Patch Center
Jump to: navigation, search

Skip gameplay sections (skipgame)

Depends on

nmlgc/base_tsa, nmlgc/base_tasofro

This patch removes all stage portions and sets a 1-2 second timer on every boss spell card. It is intended to allow for rapid proofreading of in-game translations and endings.

For some games, it also includes "cheats" to achieve e.g. better endings without any gameplay effort.

Replacement ECLs

Icon th06.png Embodiment of Scarlet Devil (th06)

Icon th07.png Perfect Cherry Blossom (th07)

Icon th08.png Imperishable Night (th08)

Icon th10.png Mountain of Faith (th10)

Icon alcostg.png Uwabami Breakers (alcostg)

Icon th11.png Subterranean Animism (th11)

Icon th12.png Undefined Fantastic Object (th12)

Icon th128.png Fairy Wars (th128)

Icon th13.png Ten Desires (th13)

Icon th135.png Hopeless Masquerade (th135)

Skipgame-th145-Nphase.csv.jdiff also work for HM, so we'll reuse them.

Icon th14.png Double Dealing Character (th14)

Icon th143.png Impossible Spell Card (th143)

Icon th145.png Urban Legend in Limbo (th145)

Icon th15.png Legacy of Lunatic Kingdom (th15)

Icon th16.png Hidden Star in Four Seasons (th16)

Icon th165.png Violet Detector (th165)

These only reduce certain delays, the actual functionality is implemented through binary hacks.

Icon th17.png Wily Beast and Weakest Creature (th17)


Binary hacks

Icon th08.png Imperishable Night (th08)

Increase value of small time items to 127
(time_factor)
Description Helps unlocking Last Spells and the good ending.
Address
v1.00d0x441373
Code
  1. 6a79
  1. push 0x79

Icon th09.png Phantasmagoria of Flower View (th09)

Reduce player lives by 2
(player_life_summand)
Description The player life setting (3, 4 or 5) is actually saved as 1, 2 or 3, the remaining two lives are "added" at the start of a run. This hack removes the addition.

Thus, setting your life count to 3 in the option menu reduces your actual lives in-game to 1.

First address is at game start, second at the continue prompt.
Address
v1.50a0x41b0b8, 0x4352fb
Code
  1. 909090909090
  1. nop (*6)
Infinite continues
(infinite_continues)
Address
v1.50a0x435265
Code
  1. 909090
  1. nop (*3)
Start with Level 2 gauge
(level_2_gauge)
Address
v1.50a0x41ef78
Code
  1. 00004843
  1. 200.0f
Larger enemy hitboxes
(larger_enemy_hitboxes)
Description I have forgotten how this exactly works, but it causes many an erratically moving enemy to die within 10 seconds.
Address
v1.50a0x41ef28
Code
  1. B9  0000A040
  2. 898F B01C0000
  3. 8B50 04
  4. 3E 807D FC 00
  5. 74 05
  6. BA 0000C841
  7. 8997 A81C0000
  1. mov ecx, 40a00000
  2. mov dword ptr ds:[edi+1cb0], ecx
  3. mov edx, dword ptr ds:[eax+4]
  4. cmp byte ptr ds:[ebp-4],0
  5. je +5
  6. mov edx, 41c80000
  7. mov dword ptr ds:[edi+1ca8], edx
Start on player's last sub-life (story mode)
(last_sublife_story)
Description i.e. "Run into a bullet to see the losing dialog".
Address
v1.50a0x425a42
Code
  1. 6a 01
  1. push 1
Start on player's last sub-life (match mode)
(last_sublife_match)
Description i.e. "Run into a bullet to see the losing dialog".
Address
v1.50a0x41ed43
Code
  1. b9 01000000
  2. 90 90
  1. mov ecx, 1
  2. nop (*2)
Enemy starts with 2 lost rounds
(enemy_fail_count)
Description Because this is supposed to reduce the AI skills a bit. And 2 just happened to be in ESI on that call.
Address
v1.50a0x41afc6
Code
  1. 8935 9c734a00
  1. mov dword ptr ds:[4a7e9c],esi

Icon th105.png Scarlet Weather Rhapsody (th105)

Set enemy HP to 1
(hpcheat)
Address
v1.06aRx605ee, Rx5d2fa
Code
  1. 66b80100
  1. mov ax, 1

Icon th123.png Touhou Hisoutensoku (th123)

Set enemy HP to 1
(hpcheat)
Address
v1.10aRx6be6e, Rx68fda
Code
  1. 66b80100
  1. mov ax, 1

Icon th165.png Violet Detector (th165)

Set enemy HP to 1 (ECL ins_511)
(hpcheat_511)
Address
v1.00aRx1d153
Code
  1. b8 01000000
  2. 90909090
  1. mov eax, 1
  2. nop (*4)
Remove invincibility frames (ECL ins_515)
(hpcheat_515)
Address
v1.00aRx1d22a
Code
  1. 31c0
  2. 90909090909090
  1. xor eax, eax
  2. nop (*7)
Set enemy HP to 1 (Enemy spawns)
(hpcheat_spawns)
Description Required for the Nightmare Week pairs that don't use ECL ins_511 to set their HP.
Address
v1.00aRx1fe6c
Code
  1. 6a 01
  2. 9090
  1. push 1
  2. nop (*2)
Don't require photos for clearing stages
(nophoto_clear)
Description [edi+0xd0] contains the number of photos taken.
Address
v1.00aRx46fc6
Code
  1. 31c0
  2. 8987 84000000
  3. 8987 88000000
  4. 40
  5. 8987 d0000000
  6. 48
  7. 48
  8. 8987 80000000
  9. 90
  1. xor eax, eax
  2. mov [edi+0x84], eax
  3. mov [edi+0x88], eax
  4. inc eax
  5. mov [edi+0xd0], eax
  6. dec eax
  7. dec eax
  8. mov [edi+0x80], eax
  9. nop
Always unlock the trophy with the current stage ID after clearing a stage
(trophy_unlock_stagenumber)
Address
v1.00aRx2a5a3
Code
  1. 33ff
  2. a1 
    v1.00adc3a4b00
  3. b1 32
  4. f6f1 0fb6cc
  5. a1 
    v1.00a60564b00
  6. 88ac08 91e30000
  7. 909090
  1. ; EDI is read by the code below, to unlock other trophies
  2. ; depending on the number of stages cleared. Which we
  3. ; don't need, since our method is a lot more convenient.
  4. xor edi, edi
  5. ; ecx = stage_selected_in_menu % 50
  6. mov eax, [stage_selected_in_menu]
  7. mov cl, 0x32
  8. div cl
  9. movzx ecx, ah ; CH = 0
  10.  
  11. ; Reset the flag for having this trophy to force the popup
  12. mov eax, [some_huge_structure]
  13. mov [eax+ecx+0xe391], ch
  14. ; Fall through to the original call of the trophy_add(ecx) function
Use a custom scorefile name
(score_fn)
Address
v1.00aRx9d138, Rx9d148
Code
  1. 736b69705f
  1. "skip_"