Is it possible to change Spike Behavior to kill you automatically, Rings or No Rings?

Discussion in 'Discussion and Q&A Archive' started by BlueStarReturns, Feb 23, 2011.

Thread Status:
Not open for further replies.
  1. BlueStarReturns

    BlueStarReturns Newcomer Member

    Joined:
    Feb 23, 2011
    Messages:
    2
    Location:
    Minnesota
    Hello! I'm new to the hacking scene, as well as to these forums, so if there's somewhere else I was supposed to post first... I apologize. :)


    Anyways, I had this idea pop into my head the other day. Lately, I've been wanting a challenge in the classic Sonic Genesis games (mainly S2) and I thought "What if the Spike Behavior could be changed to kill you instantly, whether you have Rings or not (a la Mega Man style)?"


    That being said, my question is: Can it be done and how so? I'd make a hack with the code changed myself, but I'm not that tech-savvy yet with hacking. Also, if there's a hack that already does this, I'd like to check it out!


    Thanks for taking the time to read my question and hopefully there's other people out there who'd want to see a hack like this.
     
  2. DanielHall

    DanielHall Well-Known Member Member

    Joined:
    Jan 18, 2010
    Messages:
    860
    Location:
    North Wales
    Yes.


    All glory to me plz.
     
  3. bareirito

    bareirito Well-Known Member Member

    Joined:
    Nov 17, 2008
    Messages:
    87
    Location:
    Argentina
    Yes, you can, but I don't know how to do it in Sonic 2, because I hack Sonic 1, but this is pretty easy to do. All you have to do is changing the line that tells the engine to hurt Sonic so it tells to kill him. I don't know how the labels are named in the Sonic 2 disassembly, but in Sonic 1 are called HurtSonic (to hurt him) and KillSonic (to kill him).


    Once again take into account that I know nothing about Sonic 2, but as the game is built from Sonic 1 I don't think it differs so much.


    EDIT: I'm meaning about the lines in the spikes routine, this should be pretty obvious but perhaps I wasn't really clear while explaining.
     
    Last edited by a moderator: Feb 23, 2011
  4. BlueStarReturns

    BlueStarReturns Newcomer Member

    Joined:
    Feb 23, 2011
    Messages:
    2
    Location:
    Minnesota
    And will doing this allow spikes to kill Sonic even if he has Rings, as well? Interesting... thanks for the info!
     
  5. bareirito

    bareirito Well-Known Member Member

    Joined:
    Nov 17, 2008
    Messages:
    87
    Location:
    Argentina
    Yes, yet again speaking of Sonic 1, with some basic ASM tweaking and research I got to kill Sonic even if he has rings, like when he gets crushed... I'll show you the example in Sonic 1:



    Code:
    Obj36_Hurt:		&#59; XREF: Obj36_SideWays; Obj36_Upright
    
    		tst.b	($FFFFFE2D).w; is Sonic invincible?
    
    		bne.s	Obj36_Display; if yes, branch
    
    		move.l	a0,-(sp)
    
    		movea.l	a0,a2
    
    		lea	($FFFFD000).w,a0
    
    		cmpi.b	#4,$24(a0)
    
    		bcc.s	loc_CF20
    
    		move.l	$C(a0),d3
    
    		move.w	$12(a0),d0
    
    		ext.l	d0
    
    		asl.l	#8,d0
    
    		sub.l	d0,d3
    
    		move.l	d3,$C(a0)
    
    		jsr	KillSonic

    The last line which says 'KillSonic' actually says 'HurtSonic' in the original code, it's a matter of just renaming it so it jumps to the KillSonic routine and it does kill Sonic. This is a really basic stuff, but with this example you can do plenty of things at least on Sonic 1 until you get more knowledge and you can do more complex things. :)
     
    Last edited by a moderator: Feb 25, 2011
  6. GT Koopa

    GT Koopa Well-Known Member Member

    Joined:
    Mar 9, 2011
    Messages:
    83
    Location:
    Elgin. IL
    Flicky Turncoat DX


    Sonic 2 FT Edition


    Of course I had the idea before you. But like what was said before, it is just replacing Hurtsonic with Killsonic. It isn't that big of deal. Not a lot of people LIKE the feature, mind you.
     
Thread Status:
Not open for further replies.