Jul 25, 2014 at 3:13 PM
Senior Member
"Fly, Fly, Fly!"
Join Date: Jul 5, 2014
Location: The Cross-Dimensional Void
Posts: 147
Age: 25
Then is there a way to change the names in all caps?
I can't figure those ones out...
 
Jul 25, 2014 at 6:12 PM
Senior Member
"Fly, Fly, Fly!"
Join Date: Jul 5, 2014
Location: The Cross-Dimensional Void
Posts: 147
Age: 25
Ah.
Thank you, this clears some things up.
 
Jul 26, 2014 at 7:28 PM
Been here way too long...
"Big Joe Tire and Battery Restaurant! Opening Soon! Eat at Big Joes!"
Join Date: Oct 7, 2013
Location: India
Posts: 505
Um, sorry if this sounds weird, but is there any way to make the air tank sprite flash around Quote whenever he takes a hit?
 
Jul 27, 2014 at 4:33 PM
scrungy
Bobomb says: "I need a hug!"
Join Date: Oct 7, 2011
Location: PrtWeed
Posts: 777
Age: 24
Funny how he quit soon after I posted that.
Seriously though, you could learn asm or ask someone else
 
Jul 27, 2014 at 6:43 PM
scrungy
Bobomb says: "I need a hug!"
Join Date: Oct 7, 2011
Location: PrtWeed
Posts: 777
Age: 24
I was thinking that it may be related in some way
I'm not good with ASM so I may be wrong
 
Jul 27, 2014 at 7:17 PM
Been here way too long...
"Big Joe Tire and Battery Restaurant! Opening Soon! Eat at Big Joes!"
Join Date: Oct 7, 2013
Location: India
Posts: 505
Jul 27, 2014 at 10:17 PM
The TideWalker
Modding Community Discord Founder
"That dog!"
Join Date: Apr 5, 2013
Location: In my mind and of my body.
Posts: 1640
Age: 26
IdioticBaka1824 said:
Well, I had tried, and...
if you need some help I am available.

just send me a PM or whatever. (also not my work area is very small, so if you are looking to become versatile, then good luck.)
 
Jul 28, 2014 at 3:16 AM
scrungy
Bobomb says: "I need a hug!"
Join Date: Oct 7, 2011
Location: PrtWeed
Posts: 777
Age: 24
IdioticBaka1824 said:
Well, I had tried, and...

I tried to learn ASM too, I failed miserably.
I don't think I'll ever be able to fully use it. The most I can do is small things (such as the title screen bg color)
 
Jul 28, 2014 at 4:05 AM
The TideWalker
Modding Community Discord Founder
"That dog!"
Join Date: Apr 5, 2013
Location: In my mind and of my body.
Posts: 1640
Age: 26
Aar said:
I tried to learn ASM too, I failed miserably.
I don't think I'll ever be able to fully use it. The most I can do is small things (such as the title screen bg color)
To be perfectly honest, I failed miserably as well.... the first three times.

I just didn't give up, and made it through.
 
Jul 28, 2014 at 5:46 AM
Been here way too long...
"Big Joe Tire and Battery Restaurant! Opening Soon! Eat at Big Joes!"
Join Date: Oct 7, 2013
Location: India
Posts: 505
BLink said:
(also not my work area is very small, so if you are looking to become versatile, then good luck.)
Sorry, but I didn't really understand. What exactly did you mean by this?
 
Jul 28, 2014 at 2:09 PM
hi hi
"What're YOU lookin' at?"
Join Date: Oct 17, 2011
Location: probably somewhere else
Posts: 1099
Age: 26
The great return of Bombchu. Yeah, throw up a party or something.

Anyway, learning ASM is pretty hard. I spent over a year to be able to do small things... then another, to reach the higher level... and now, I guess I'm quite good. Maybe as good as Bombchu...
 
Jul 29, 2014 at 12:18 AM
The TideWalker
Modding Community Discord Founder
"That dog!"
Join Date: Apr 5, 2013
Location: In my mind and of my body.
Posts: 1640
Age: 26
IdioticBaka1824 said:
Sorry, but I didn't really understand. What exactly did you mean by this?

I can do NPC's and basic TSC hacking and not much more, (like say, making the air tank shield flash when you get hit) but what I can do I do well.

Randolf said:
The great return of Bombchu. Yeah, throw up a party or something.
Anyway, learning ASM is pretty hard. I spent over a year to be able to do small things... then another, to reach the higher level... and now, I guess I'm quite good. Maybe as good as Bombchu...
Is that a challenge?
 
Jul 29, 2014 at 5:13 AM
Junior Member
"Fresh from the Bakery"
Join Date: Jan 19, 2014
Location:
Posts: 16
So.
I was in the neighborhood and nobody seems to have provided an answer to poor mister idiotbaka, so let's see if I can help.
(and I'm going to give you a step-by-step so maybe one of you guys might eventually learn reverse-engineering rather than just how to write new code)

***

I haven't done this in a while, and don't have the offsets memorized anymore. Bummer! Let's start by going to the compendium....

Okay, so nothing's there which is particularly useful. I was looking for a reference to player physics, because everything having to do with the main character is going to be in approximately the same place. Kinda surprised it wasn't there, honestly.

Another obvious way to find the proper place would be by going to every callsite of the rendering function, and looking for a reference to playerX or something. I could also search for all occurrences of the invincibility timer. Both of those are a little bit intensive, so let's think to see if there's a better way.

OK. I'm remembering the infinite mimiga mask hack, which is amazing in that it is one of the better documented hacks on these forums. It also deals directly with the player rendering function, so that saves us pretty much all effort outside of a forum search.

Here.

The second bit looks like it's defining a TSC function, which means the offset we want is 0x4154b8. Let's go there.

We're looking for something to do with [0x49e6c8], the invincibility timer. As it's gonna skip the drawing phase for certain values, the reference will be before the drawing function starts (0x4154d1 or earlier).

There it is at 0x415474.

What follows basically just looks like some arithmetic to determine which frames to skip and which frames to draw. 0x41548e is the code which actually skips the player drawing function. If I'm understanding you right, we want to always show the player, and instead flicker the water bubble around her. To do that, we're gonna need some more space.

I'm noticing that there are two really large, identical pieces of code here. One draws the water bubble if we're underwater and have the airtank equipped, and one draws it if we're in the ironhead fight. (the second case exists because it's not techinically underwater, per se). What I'm going to do is take the ironhead bubbledraw code, and make it into its own function. Then, we can call that in the cases of
a) underwater, item equipped
b) ironhead battle
c) damaged and flickering


and here's what the code looks like.

0x415474:
Code:
mov eax,dword ptr ds:[49E650]
and eax,00000010					; airtank equipped?
je short 004155A3						; nope. go to ironhead case.
mov ecx,dword ptr ds:[49E63C]					; yes!
and ecx,00000100						; underwater?
je short 004155A3							; nope. go to ironhead case.
call 00415631								; yes! draw bubble
jmp short 004155B1								; escape
cmp dword ptr ds:[49E64C],1				; ironhead?
jne short 004155B3						; nope. go to damage case.
call 00415631							; yes! draw bubble
jmp short 004155C5							; escape
mov eax,dword ptr ds:[49E6C8]				; damage counter
shr eax,2						; divide by four
and eax,00000001					; even?
je short 004155C5						; yes. dont draw
call 00415631							; nope. do draw.
mov esp,ebp						; wrap it up.
pop ebp
ret
0x4156b0
Code:
ret
 
Jul 29, 2014 at 10:22 AM
Been here way too long...
"Big Joe Tire and Battery Restaurant! Opening Soon! Eat at Big Joes!"
Join Date: Oct 7, 2013
Location: India
Posts: 505
When I used the lone 'ret' at the bottom it made the game crash when I load. I tried reverting it to the original 'mov esp,ebp' and when I loaded, the air tank didn't show up at all even in water, and the character isn't showing up, just a little gun floating around. What did I do wrong?
I also had a (somewhat related) hack requested earlier which involved having all damage received halved when the air tank is equipped. It took up extra space and was done in the free space of the homing flame NPC. Maybe that was interfering with this?
 
Jul 29, 2014 at 4:16 PM
Professional Whatever
"Life begins and ends with Nu."
Join Date: Jan 13, 2011
Location: Lasagna
Posts: 4481
Try retn
 
Jul 29, 2014 at 10:01 PM
Been here way too long...
"Big Joe Tire and Battery Restaurant! Opening Soon! Eat at Big Joes!"
Join Date: Oct 7, 2013
Location: India
Posts: 505
It automatically turned into retn when I clicked on assemble. Ollydbg is pretty smart, right?
Edit: BigBad(?)Woof, do you think you could provide a patched copy of the original executable?
 
Top