自动恢复自选补丁:
1、从0x42A6E2开始修改:
...
0042A6E2 74 05 JE SHORT 0042A6E9
0042A6E4 E9 AB040000 JMP 0042AB94
0042A6E9 8B45 C4 MOV EAX,DWORD PTR SS:[EBP-3C]
0042A6EC 83C0 05 ADD EAX,5
0042A6EF 50 PUSH EAX
0042A6F0 E8 E5EEFEFF CALL 004195DA
0042A6F5 83C4 04 ADD ESP,4
0042A6F8 8845 F4 MOV BYTE PTR SS:[EBP-C],AL
0042A6FB C745 F0 00000>MOV DWORD PTR SS:[EBP-10],0
0042A702 8B45 C4 MOV EAX,DWORD PTR SS:[EBP-3C]
0042A705 83C0 05 ADD EAX,5
0042A708 50 PUSH EAX
0042A709 E8 A0EAFEFF CALL 004191AE
0042A70E 83C4 04 ADD ESP,4
0042A711 85C0 TEST EAX,EAX
0042A713 74 36 JE SHORT 0042A74B
0042A715 C745 F0 01000>MOV DWORD PTR SS:[EBP-10],1
0042A71C 8B4D EC MOV ECX,DWORD PTR SS:[EBP-14]
0042A71F E8 6CF0FDFF CALL 00409790
0042A724 8BD8 MOV EBX,EAX
0042A726 8B45 EC MOV EAX,DWORD PTR SS:[EBP-14]
0042A729 50 PUSH EAX
0042A72A 33C0 XOR EAX,EAX
0042A72C 8A45 F4 MOV AL,BYTE PTR SS:[EBP-C]
0042A72F 90 NOP
0042A730 90 NOP
...
2、重写函数0x42AB99(计算自动恢复百分比的函数)
0042AB99 /$ 55 PUSH EBP
0042AB9A |. 8BEC MOV EBP,ESP
0042AB9C |. 83EC 04 SUB ESP,4
0042AB9F |. 53 PUSH EBX
0042ABA0 |. 56 PUSH ESI
0042ABA1 |. 57 PUSH EDI
0042ABA2 |. 8B55 08 MOV EDX,DWORD PTR SS:[EBP+8]
0042ABA5 |. 8B0485 683245>MOV EAX,DWORD PTR DS:[EAX*4+453268]
0042ABAC |. 50 PUSH EAX
0042ABAD |. 8B45 0C MOV EAX,DWORD PTR SS:[EBP+C]
0042ABB0 |. 83C0 06 ADD EAX,6
0042ABB3 |. 50 PUSH EAX
0042ABB4 |. 68 E0004800 PUSH 恢复自选.004800E0
0042ABB9 |. 6A 00 PUSH 0
0042ABBB |. E8 75E30000 CALL 恢复自选.00438F35
0042ABC0 |. 83C4 10 ADD ESP,10
0042ABC3 |. 8B45 08 MOV EAX,DWORD PTR SS:[EBP+8]
0042ABC6 |. 83E8 07 SUB EAX,7
0042ABC9 |. 83F8 07 CMP EAX,7
0042ABCC |. 7D 34 JGE SHORT 恢复自选.0042AC02
0042ABCE |. FF2485 C00048>JMP DWORD PTR DS:[EAX*4+4800C0]
0042ABD5 |> C745 FC 0A000>MOV DWORD PTR SS:[EBP-4],0A
0042ABDC |. EB 28 JMP SHORT 恢复自选.0042AC06
0042ABDE |> C745 FC 0F000>MOV DWORD PTR SS:[EBP-4],0F
0042ABE5 |. EB 1F JMP SHORT 恢复自选.0042AC06
0042ABE7 |> C745 FC 05000>MOV DWORD PTR SS:[EBP-4],5
0042ABEE |. EB 16 JMP SHORT 恢复自选.0042AC06
0042ABF0 |> C745 FC 19000>MOV DWORD PTR SS:[EBP-4],19
0042ABF7 |. EB 0D JMP SHORT 恢复自选.0042AC06
0042ABF9 |> C745 FC 14000>MOV DWORD PTR SS:[EBP-4],14
0042AC00 |. EB 04 JMP SHORT 恢复自选.0042AC06
0042AC02 |> 33C0 XOR EAX,EAX
0042AC04 |. EB 2B JMP SHORT 恢复自选.0042AC31
0042AC06 |> 6A 00 PUSH 0
0042AC08 |. 6A 00 PUSH 0
0042AC0A |. 6A 00 PUSH 0
0042AC0C |. 6A 01 PUSH 1
0042AC0E |. 6A 05 PUSH 5
0042AC10 |. 8B45 FC MOV EAX,DWORD PTR SS:[EBP-4]
0042AC13 |. C1E0 02 SHL EAX,2
0042AC16 |. 05 00004800 ADD EAX,恢复自选.00480000
0042AC1B |. 50 PUSH EAX
0042AC1C |. 68 80000000 PUSH 80
0042AC21 |. 68 E0000000 PUSH 0E0
0042AC26 |. E8 C9D10000 CALL 恢复自选.00437DF4
0042AC2B |. 83C4 20 ADD ESP,20
0042AC2E |. 25 FF000000 AND EAX,0FF
0042AC33 |. 0345 FC ADD EAX,DWORD PTR SS:[EBP-4]
0042AC36 |. EB 00 JMP SHORT 恢复自选.0042AC38
0042AC38 |> 5F POP EDI
0042AC39 |. 5E POP ESI
0042AC3A |. 5B POP EBX
0042AC3B |. C9 LEAVE
0042AC3C \. C3 RETN
3、打开UE,从0x80000(程序运行时为内存偏移0x480000)开始修改:
0x80000:
04 E8 44 00 08 E8 44 00 0C E8 44 00 10 E8 44 00
14 E8 44 00 18 E8 44 00 1C E8 44 00 20 E8 44 00
24 E8 44 00 28 E8 44 00 2C E8 44 00 30 E8 44 00
34 E8 44 00 38 E8 44 00 3C E8 44 00 40 E8 44 00
44 E8 44 00 48 E8 44 00 4C E8 44 00 50 E8 44 00
54 E8 44 00 58 E8 44 00 5C E8 44 00 60 E8 44 00
64 E8 44 00 68 E8 44 00 6C E8 44 00 70 E8 44 00
74 E8 44 00 78 E8 44 00 7C E8 44 00 80 E8 44 00
84 E8 44 00 88 E8 44 00 8C E8 44 00 90 E8 44 00
94 E8 44 00 98 E8 44 00 9C E8 44 00 A0 E8 44 00
A4 E8 44 00 A8 E8 44 00 AC E8 44 00 B0 E8 44 00
B4 E8 44 00 B8 E8 44 00 BC E8 44 00 00 00 00 00
D5 AB 42 00 DE AB 42 00 E7 AB 42 00 02 AC 42 00
02 AC 42 00 F0 AB 42 00 F9 AB 42 00 00 00 00 00
C7 EB D1 A1 D4 F1 25 73 D4 DA 25 73 B5 D8 D0 CE
B5 C4 BB D6 B8 B4 B0 D9 B7 D6 B1 C8 A1 A3 00 00
补丁效果:当回合开始时,有部队处于村庄、鹿砦等恢复地形中时,会弹出一个菜单,提示玩家选择恢复最大耐久力的百分比,如图,如果点击“18”则表示恢复量为最大耐久力的18%。
补丁缺点:即使处于恢复地形的部队是满血状态,也会跳出提示,让玩家选择恢复最大耐久力的百分比。此时,无论选择哪一项都不会再恢复。
[ 本帖最后由 阿尔法孝直 于 2010-9-13 13:07 编辑 ]