how to add extra characters in sonic 2?

Discussion in 'Discussion and Q&A Archive' started by Olivier, Jul 9, 2013.

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

    Olivier Newcomer In Limbo

    Joined:
    Mar 31, 2013
    Messages:
    20
    Hello, I need to add 3 characters but I do not know how to put it in my hack. I read a tutorial on sonic retro but I lack the palette ...
     
  2. JoenickROS

    JoenickROS ROS (bug fixing in progress) Member

    Joined:
    Feb 5, 2012
    Messages:
    929
    It would help if you supplied the link to the guide, or copy and paste it here, it will make it easier for us to help you. I cant quiet remember what they had wrong in their code, but I had to edit it a little to get it to work.

    Edit: Here ill give you a hint,


    bne.s InitPlayers_KnuxAlone

    This is placed in the Tails Alone routine, it will branch if its a Knuckles alone game. Its up to you to find out for yourself where it goes. then will be the main coding for the character option. Ill give you a hint for that too,


    move.b #$4C,($FFFFB000).w

    This is the corresponding character object number, this loads the Knuckles object, (or whatever character you chose to have as object 4C) as player one. It should be self explanatory from here.
     
    Last edited by a moderator: Jul 9, 2013
  3. Olivier

    Olivier Newcomer In Limbo

    Joined:
    Mar 31, 2013
    Messages:
    20
  4. JoenickROS

    JoenickROS ROS (bug fixing in progress) Member

    Joined:
    Feb 5, 2012
    Messages:
    929
    Oh yeah the only thing that is wrong with the code is the main character option routine.


    bne.s InitPlayers_KnuxAlone
    bne.s InitPlayers_AmyAlone

    put the Amy alone in the Knuckles alone character routine. You cant have two branch's next to each other like that.
     
    Last edited by a moderator: Jul 9, 2013
  5. Olivier

    Olivier Newcomer In Limbo

    Joined:
    Mar 31, 2013
    Messages:
    20
    I do not understand all ... I have those lines, what do I do?


    Code:
    InitPlayers_TailsAlone:
    bne.s InitPlayers_Lara-suAlone
    bne.s InitPlayers_ManicAlone
    bne.s InitPlayers_SkyeAlone
    move.b #2,(MainCharacter).w ; load Obj02 Tails object at $FFFFB000
    move.b #8,(Tails_Dust).w ; load Obj08 Tails' spindash dust/splash object at $FFFFD100
    addi.w #4,(MainCharacter+y_pos).w
    rts
    InitPlayers_Lara-suAlone:
    move.b #$4C,($FFFFB000).w
    move.b #8,($FFFFD100).w
    rts
    
    InitPlayers_ManicAlone:
    move.b #$4D,($FFFFB000).w
    move.b #8,($FFFFD100).w
    rts
    InitPlayers_SkyeAlone:
    move.b #$4E,($FFFFB000).w
    move.b #8,($FFFFD100).w
    rts
    ; End of function InitPlayers
    
    (Lara-su=knuckles and Manic=Amy)
     
  6. JoenickROS

    JoenickROS ROS (bug fixing in progress) Member

    Joined:
    Feb 5, 2012
    Messages:
    929
    I've already explained what to do in the above post. If your not going to listen then I'm not going to help you anymore.
     
  7. redhotsonic

    redhotsonic Also known as RHS Member

    Joined:
    Aug 10, 2007
    Messages:
    2,969
    Location:
    England
    If you want new characters, you have to also put this:

    Code:
    	subq.w	#1,d0
    Then you can have them branch routines. So, at "InitPlayers_TailsAlone:", put this:

    Code:
    	subq.w	#1,d0
    	bne.s	InitPlayers_Lara-suAlone
    Then leave the rest of Tails' code alone. Then, at you're new label "InitPlayers_Lara-suAlone", do the same:


    Code:
    InitPlayers_Lara-suAlone:
    	subq.w	#1,d0
    	bne.s	InitPlayers_ManicAlone
    etc, etc.
     
  8. Olivier

    Olivier Newcomer In Limbo

    Joined:
    Mar 31, 2013
    Messages:
    20
     





    this still does not work. I've made ​​a mistake?

     


    Code:
    InitPlayers_TailsAlone:
    subq.w #1,d0
    bne.s InitPlayers_Lara-suAlone
    move.b #2,(MainCharacter).w ; load Obj02 Tails object at $FFFFB000
    move.b #8,(Tails_Dust).w ; load Obj08 Tails' spindash dust/splash object at $FFFFD100
    addi.w #4,(MainCharacter+y_pos).w
    rts
    InitPlayers_Lara-suAlone:
    subq.w #1,d0
    bne.s InitPlayers_ManicAlone
    move.b #$4C,($FFFFB000).w
    move.b #8,($FFFFD100).w
    rts
    
    InitPlayers_ManicAlone:
    subq.w #1,d0
    bne.s InitPlayers_SkyeAlone
    move.b #$4D,($FFFFB000).w
    move.b #8,($FFFFD100).w
    rts
    InitPlayers_SkyeAlone:
    move.b #$4E,($FFFFB000).w
    move.b #8,($FFFFD100).w
    rts
    ; End of function InitPlayers
    

     

     

    I had already done SuperEgg...
     
    Last edited by a moderator: Jul 27, 2013
  9. SuperEgg

    SuperEgg I'm a guy that knows that you know that I know Member

    Joined:
    Oct 17, 2009
    Messages:
    Location:
    THE BEST GOD DAMN STATE OF TEXAS
    Did you modify the menu system? If not, that's probably the issue. 

    I'll just safely assume you're using the Xenowhirl disasm.

    Go to "word_917A:"

    and change 


    dc.w $2FF
    dc.w Player_option ; 1

    to this


    dc.w $5FF
    dc.w Player_option ; 1

    I'll just assume that's how many options you want. You can subtract or add 1 if needed.
     
  10. Olivier

    Olivier Newcomer In Limbo

    Joined:
    Mar 31, 2013
    Messages:
    20
    it's good I found what was wrong thank you to you!

    I had to delete these lines:

    objC4
    objD4
    objE4

     

    but I do not know how to load the ART of characters...
     
    Last edited by a moderator: Aug 1, 2013
  11. fdswerty

    fdswerty Well-Known Member Member

    Joined:
    Apr 10, 2013
    Messages:
    138
  12. Olivier

    Olivier Newcomer In Limbo

    Joined:
    Mar 31, 2013
    Messages:
    20
    I was wrong, it is a problem with the art, I choose a character and it looks like this:clip0031.zip

    you see what is my problem?
     

    Attached Files:

Thread Status:
Not open for further replies.