Quick Modding/Hacking Answers Thread

Aug 13, 2009 at 10:01 PM
Been here way too long...
"Life begins and ends with Nu."
Join Date: Jan 4, 2008
Location: Lingerie, but also, like, fancy curtains
Posts: 3052
... try ce ...
D=
 
Aug 13, 2009 at 10:53 PM
graters gonna grate
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: Jul 2, 2008
Location: &
Posts: 1886
Age: 32
Pronouns: he/him
Had you made any modifications to the *.exe prior to attempting to edit it in Sue's Workshop (i.e. imported custom org music, opened it in a different editor)? If so, that might be the problem and you might want to revert back to the original Doukutsu.exe. Sue's Workshop seems to be fairly picky about the *.exe files it edits.
 
Aug 13, 2009 at 11:37 PM
Been here way too long...
"Life begins and ends with Nu."
Join Date: Jan 4, 2008
Location: Lingerie, but also, like, fancy curtains
Posts: 3052
imported org music just "corrupts" the exe once edited w/ sw. it doesn't give that error.
 
Aug 14, 2009 at 3:02 AM
Junior Member
"Fresh from the Bakery"
Join Date: Aug 13, 2009
Location:
Posts: 18
Downloaded a new file and it worked. Thanks!
 
Aug 19, 2009 at 11:23 PM
Been here way too long...
"Life begins and ends with Nu."
Join Date: Jan 4, 2008
Location: Lingerie, but also, like, fancy curtains
Posts: 3052
anyone know why the top of the stack is made the base at the beginning of every function, then is made the base again at the end?
 
Aug 19, 2009 at 11:38 PM
Been here way too long...
"Ha! Ha! Ha! Mega Man is no match for my Mimiga Man!"
Join Date: Jun 22, 2008
Location:
Posts: 251
It basically means that each function has its own stack to use, and can't accidentally fuck things up, so if you push more things to the stack then you pop off it, when the function returns to the caller the caller goes back to using its own stack, and won't get confused by the leftover bits from the last stack. I wouldn't recommend randomly pushing and popping too much anyway, though, I had to give up the Weapon Hax because of some strange bug that I think was caused by messing with the stack.
 
Aug 19, 2009 at 11:43 PM
Been here way too long...
"Life begins and ends with Nu."
Join Date: Jan 4, 2008
Location: Lingerie, but also, like, fancy curtains
Posts: 3052
that's interesting, stinks about your hack tho...
 
Aug 20, 2009 at 12:50 AM
Been here way too long...
"Life begins and ends with Nu."
Join Date: Jan 4, 2008
Location: Lingerie, but also, like, fancy curtains
Posts: 3052
okay, problem, this
Code:
MOV EAX,DWORD PTR DS:[49E6D0]
MOV DWORD PTR SS:[EBP-1C],EAX
only moves the first byte, nawt the whole word. any ideas why?
 
Aug 20, 2009 at 3:17 AM
Been here way too long...
"Ha! Ha! Ha! Mega Man is no match for my Mimiga Man!"
Join Date: Jun 22, 2008
Location:
Posts: 251
No idea. They should both be moving dwords. This is using OllyDbg? It looks that way, at any rate. What method are you using to confirm that it is only moving the first byte? If you aren't using breakpoints + step through I would try that. Testing it by observing the effects in game doesn't always work as expected.
 
Aug 20, 2009 at 3:40 AM
Been here way too long...
"Life begins and ends with Nu."
Join Date: Jan 4, 2008
Location: Lingerie, but also, like, fancy curtains
Posts: 3052
yep, olly.
I'm just testing the game (no fancy shmancy breakpoints), but the effects are pretty clear. this code sets the max moving speed to your health, and with a health of 812, which is the normal moving speed, you move much, much slower. if ya wanna see what I mean, jut inject this code at 41571F. it overwrites some stuff, but that doesn't matter.

I guess I could mov [49E6D1] to [EBP-1B] afterwords, but that seems like a waste.

in other news, I'm still trying to get jumps to work. you gotten it yet? I found a new method, but haven't had time to test it yet.
Code:
push destination segment
push destination offset
retf
 
Aug 20, 2009 at 5:28 AM
Been here way too long...
"Ha! Ha! Ha! Mega Man is no match for my Mimiga Man!"
Join Date: Jun 22, 2008
Location:
Posts: 251
Just tried it, and when I put a breakpoint on that command after setting my health to 803, E8 was put into EAX after that line instead of 32C. But, isn't there something that limits your health to 128 or 256? I'm guessing that whatever is doing that limiting is also causing the problem.

I'm assuming you want to make your mod have speed boosts instead of health boosts, and I think the simplest way to do that would be to do a SHL on EAX by about 6 before making your speed equal to it. Your method even leaves a few NOP's left over that might be enough to fit it in.

As for the jumps, no I haven't got it to work yet, whenever I needed some space either the weapon or npc that I was hacking I was removing some functionality so I could use that space instead, so there was enough pipelining I could remove that there was enough space left over. Also things like replacing ADD EAX,1 with INC EAX saves I think 5 bytes, so I never needed space outside of the function I was changing.
 
Aug 22, 2009 at 11:27 PM
Senior Member
"This is the greatest handgun ever made! You have to ask yourself, do I feel lucky?"
Join Date: Jul 29, 2009
Location: California
Posts: 111
Age: 28
I put in a chest for the fireball but its not working it just shows an empty chest floating one tile above where the chest is supposed to be here the script
#0100
<KEY<FLJ0100:0101<MSG
Opened the chest...<NOD<CLR<CNP0100:0021:0000<SOU0022
<CMU0010<GIT1007<AM+0003:0000You got =Fire Ball=!<WAI0160<NOD<GIT0001<CLO<FL+0100<END
#0103
<KEY<MSG
Empty...<NOD<CLO<END
#0113
<CMU0001<SMC<FAI0004<MNA<END
 
Aug 22, 2009 at 11:59 PM
Level 73 Procrastinator
"Life begins and ends with Nu."
Join Date: Apr 6, 2009
Location: Forgotten Tower
Posts: 2052
Hmm...

Did you use the "Closed chest", NPC 15", to start with? It shouldn't be placed above the ground, only NPC 21 "Opened chest" needs that.
Also, your flag jump seems to have an error, shouldn't it jump to event 0103 instead of 0101?
 
Aug 23, 2009 at 12:02 AM
Senior Member
"This is the greatest handgun ever made! You have to ask yourself, do I feel lucky?"
Join Date: Jul 29, 2009
Location: California
Posts: 111
Age: 28
I did everything except the flag jump part but i already fixed the problem by having santa there and changing the text to fit the mod

I have another question though how do i make a boss fight with the first balrog I found the entities for the cutscene balrog and the running balrog but how exactly can i make him talk then attack??
 
Aug 23, 2009 at 12:29 AM
Level 73 Procrastinator
"Life begins and ends with Nu."
Join Date: Apr 6, 2009
Location: Forgotten Tower
Posts: 2052
Have you been looking through the original script? You can learn a lot from that...
Just for an example, let's pull out Balrog's first boss scene....

Code:
[FONT="Comic Sans MS"]{Original code dumbed down for space}[/FONT]
#1000
<KEY<FL+0360<FL+0361<FL+0440<FL-0326
Toroko and Quote {Mostly Toroko} talk.
<MSGHuzzah!
[FONT="Comic Sans MS"]{Balrog shows up}
{Misery steals Toroko}[/FONT]
FIRST!<NOD<CLR.....<NOD<CLRSo what's your deal?<NOD
You gonna fight me with
that thing?<YNJ1001<ANP0400:0030:0002<CLR
[FONT="Comic Sans MS"]{Here, saying Yes will continue to the boss fight, which is what you're wanting to see}[/FONT]
<FAC0014I knew it!<NOD<CLO
<FL+0361<CMU0004<CNP0400:0068:0002<BSL0400<END
[FONT="Comic Sans MS"]{So, he's just finished talking and now the boss fight's about to start.}
{<CMU0004 changes the music to the song "Gravity}
{<CNP changes Balrog to his Running NPC}
{<BSL makes 0400 a boss. That means he gets a big life bar saying "Boss", and a few other things. 0400 is Balrog.}[/FONT]
Now, you're probably going to come back and ask how to make him talk after beating him.
If you'd continue looking at the original stuff, you'll see that entity 0400, Balrog, has flag bit 0x0200 set. That's the "Run event upon death" flag. When Balrog is killed, event 0400 will run.

Code:
#0400
<KEY<FL-0361<FL-0362
<SMC<CNP0400:0012:0000<ANP0400:0020:0004<WAI0140
<PRI<MSG<FAC0005Just you wait!<NOD<FAC0000<KEY<CLO
<WAI0100<CMU0015
<MSG
Fought off Balrog!<WAI0140<NOD
<SOU0045<CNP0150:0001:0000<WAI0004
<SOU0045<CNP0151:0001:0000<WAI0004
<SOU0045<CNP0152:0001:0000<WAI0004
<SOU0045<CNP0153:0001:0000<WAI0004
<SOU0045<CNP0154:0001:0000
<CMU0008<END
See?
Note that the usual death things will not happen when this flag's turned on. {As in, the enemy won't die, and he won't give off Exp triangles; you've gotta do that yourself}
 
Aug 23, 2009 at 12:54 AM
Senior Member
"This is the greatest handgun ever made! You have to ask yourself, do I feel lucky?"
Join Date: Jul 29, 2009
Location: California
Posts: 111
Age: 28
Thanks I got balrog to work a few more questions though how do i make it so some blocks appear when you step some where and how do you make them disappear?
 
Aug 23, 2009 at 1:04 AM
Cold Agony of Resolute Vacuum
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: Jan 1, 2008
Location: Elsewhere
Posts: 1973
WhosTony said:
Thanks I got balrog to work a few more questions though how do i make it so some blocks appear when you step some where and how do you make them disappear?

The CMP or CNP commands.
Read this for more details on which to use.
Also, add me on MSN - I'll be happy to answer any questions you might have. =D
 
Aug 23, 2009 at 1:20 AM
Senior Member
"This is the greatest handgun ever made! You have to ask yourself, do I feel lucky?"
Join Date: Jul 29, 2009
Location: California
Posts: 111
Age: 28
I made an H/V trigger and gave it event #0400 and Flag 1500 and when you go into the room its blank and you hear stepping noises heres the code
Code:
#0113
<CNP0003:0014:0001

#0400
<WAS<MM0<LI+0010<KEY<FLA<CMP0002:0014:0001<CNP0002:0013:0001<CNP0002:0012:0001<CNP0001:0012:0001<END
 
Aug 23, 2009 at 7:31 PM
graters gonna grate
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: Jul 2, 2008
Location: &
Posts: 1886
Age: 32
Pronouns: he/him
Maybe you need to use <FAI ??
 
Back
Top