Sorry to disturb again
Since 2016 (when I finished the original game for the first time) I see something that seems unfair to me:
•The prince strikes shadow and loses a life •The shadow strikes prince and nothing happens
•If one dies, the other will die too
What I want is that the shadow lose a life if he strikes the prince, like what happens by default but reversed; keeping the first and third point, of course
Re: I need help with custom hacks
Posted: August 14th, 2020, 7:41 pm
by atrueprincefanfrom18
In SNES version, if one hit another, both lost their points. I don't know if that's possible in DOSBox, but maybe possible in SDLPoP, but you will have to write the code yourself. I don't think there is any hex code available to change.
I think David is the right person whoc can help you in both of your questions.
Re: I need help with custom hacks
Posted: August 14th, 2020, 7:51 pm
by Emiliano
atrueprincefanfrom18 wrote: ↑August 14th, 2020, 7:41 pm
You will have to write the code yourself. I don't think there is any hex code available to change.
That's the big problem, some programs stop working if you add just a byte between two bytes set correctly
However Hexit has the option to add and remove bytes
Re: I need help with custom hacks
Posted: August 14th, 2020, 8:11 pm
by Emiliano
atrueprincefanfrom18 wrote: ↑August 14th, 2020, 5:22 am
And don't use Jaffar in Room 3 or Room 1 (I don't know really remember what's the condition,
I tested this part and nothing special or interesting happened, it works normally, Jaffar dies and stops time countdown
atrueprincefanfrom18 wrote: ↑August 14th, 2020, 5:22 am
Check the special events on PoPOT).
Believe me, I downloaded the latest file and read it completely, it does not say anything about this
Re: I need help with custom hacks
Posted: August 15th, 2020, 7:37 pm
by David
Emiliano Fierro wrote: ↑August 14th, 2020, 1:41 am
Is it possible to listen the ENDING LEVEL MUSIC at the end of level 13 after killing Jaffar?
Watch the video to understand, I just want to enable the music at the end of level 12b (These hacks are not only removing and disabling)
Enable level ending music on level 13:
Search: 83 3E 9E 0F 0D 74 23
Change: 0D to CC
(offset in unpacked 1.0: 0x88CA)
seg006:0366 not_alt_level_music:
seg006:0366 83 3E 9E 0F 0D cmp current_level, 13 ; level 13 has no ending music ; <-- change 13 to 0xCC (invalid level number)
seg006:036B 74 23 jz seq_f6_nop
seg006:036D 83 3E 9E 0F 0F cmp current_level, 15 ; level 15 has no ending music
seg006:0372 74 1C jz seq_f6_nop
Emiliano Fierro wrote: ↑August 14th, 2020, 7:20 pm
Since 2016 (when I finished the original game for the first time) I see something that seems unfair to me:
•The prince strikes shadow and loses a life •The shadow strikes prince and nothing happens
•If one dies, the other will die too
What I want is that the shadow lose a life if he strikes the prince, like what happens by default but reversed; keeping the first and third point, of course
Make both the prince and the shadow lose a HP when either is hurt:
Search: 80 3E 8B 4D 01 75 14 83 3E 9E 0F 0C 75 0D 83 3E 4A 4C 00 74 06 A1 4A 4C A3 F0 5F
Change to: 80 3E 9E 0F 0C 75 14 A1 4A 4C 0B 06 F0 5F 79 0B A3 4A 4C A3 F0 5F 90 90 90 90 90
(offset in unpacked 1.0: 0x2B2B)
This part:
seg000:127B do_delta_hp proc far
seg000:127B 80 3E 8B 4D 01 cmp opp.charid, charid_1_shadow
seg000:1280 75 14 jnz loc_1296
seg000:1282 83 3E 9E 0F 0C cmp current_level, 12 ; level 12: if the shadow is hurt, kid is also hurt
seg000:1287 75 0D jnz loc_1296
seg000:1289 83 3E 4A 4C 00 cmp guardhp_delta, 0
seg000:128E 74 06 jz loc_1296
seg000:1290 A1 4A 4C mov ax, guardhp_delta
seg000:1293 A3 F0 5F mov hitp_delta, ax
seg000:1296 loc_1296:
is changed to this:
(assembled using NASM)
1 current_level equ 0F9Eh
2 guardhp_delta equ 4C4Ah
3 hitp_delta equ 5FF0h
4
5 org 0
6
7 00000000 90<rept> times 127Bh nop
8
9 0000127B 803E9E0F0C cmp byte [current_level], 12 ; Only on level 12.
10 00001280 7514 jne skip ; (To free some bytes, I removed the opp.charid check, because it's unnecessary: the only opponent on level 12 is the shadow.)
11
12 00001282 A14A4C mov ax, [guardhp_delta] ; If either the shadow or the prince lost HP:
13 00001285 0B06F05F or ax, [hitp_delta]
14
15 00001289 790B jns skip ; Skip if the someone got *more* HP, for example the prince drank a potion (not strictly necessary).
16
17 0000128B A34A4C mov [guardhp_delta], ax ; Apply the same HP change to both the shadow and the prince.
18 0000128E A3F05F mov [hitp_delta], ax
19
20 00001291 90<rept> times ($$+1296h-$) nop
21 skip:
Re: I need help with custom hacks
Posted: August 15th, 2020, 8:05 pm
by Emiliano
Thanks David that's all for now, with level 13 finished I will need another hack
Re: I need help with custom hacks
Posted: August 16th, 2020, 6:20 am
by atrueprincefanfrom18
Seriously David, you are an expert in hex editing!
Re: I need help with custom hacks
Posted: August 16th, 2020, 6:24 am
by Emiliano
David uses CusAsm to get the Hex codes, it is for reverse engineers and expert users, just look at the BBCodes he gives in most Hex modifications
Re: I need help with custom hacks
Posted: August 16th, 2020, 6:25 am
by atrueprincefanfrom18
Hmm, need to look into it
Thanks!
Re: I need help with custom hacks
Posted: August 19th, 2020, 3:37 am
by Emiliano
Hi again, recently I had a crazy idea which I don't know if it is hard or impossible to do.
Chompers cut from left to right, but how about if they cut from right to left, like in my reversed video.
Is it impossible or is it just hard?
Thanks
This started like a crazy idea, but it would be useful if possible.
Re: I need help with custom hacks
Posted: August 19th, 2020, 6:34 am
by atrueprincefanfrom18
Wow! Actually, even I had an idea. Why is it that the chomper is on the left of the tile and the gate is on the right, can we shift them both? Somehow?
Re: I need help with custom hacks
Posted: August 19th, 2020, 6:40 am
by Emiliano
atrueprincefanfrom18 wrote: ↑August 19th, 2020, 6:34 am
Wow! Actually, even I had an idea. Why is it that the chomper is on the left of the tile and the gate is on the right, can we shift them both? Somehow?
But it won't work like that. It should work like it, not so important to display.
Re: I need help with custom hacks
Posted: August 22nd, 2020, 4:36 am
by Emiliano
David, Norbert
Do you think this topic and probalby this other one should be merged with the current to get a large topic? Because I posted them separatedly but both with the same purpose as here (customizations), in addition, posts are not very different.
Do what you think better.
Thanks.
Re: I need help with custom hacks
Posted: August 22nd, 2020, 7:17 pm
by David
Emiliano Fierro wrote: ↑August 19th, 2020, 3:37 am
Hi again, recently I had a crazy idea which I don't know if it is hard or impossible to do.
Chompers cut from left to right, but how about if they cut from right to left, like in my reversed video.
Is it impossible or is it just hard?
Thanks
This started like a crazy idea, but it would be useful if possible.
Time taken: about 1 hour.
Search: C7 46 F6 00 00 A0 27 3D 98 8B D8 D1 E3 8B 87 74 22 89 46 F8
Change: BE 00 00 8A 1E 27 3D 30 FF D1 E3 8B 87 74 22 04 09 89 46 F8
(offset in unpacked v1.0: 0xAD2E)
Search: FF 46 F6 FF 46 F8 83 7E F6 0A 7C AE
Change: 46 FF 4E F8 90 90 81 FE 0A 00 7C AE
(offset in unpacked v1.0: 0xAD8A)