Sonic 1 Animations Problem

Discussion in 'Discussion and Q&A Archive' started by ProjectFM, Oct 16, 2014.

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

    ProjectFM Optimistic and self-dependent Member

    Joined:
    Oct 4, 2014
    Messages:
    912
    Location:
    Orono, Maine
    I'm adding a new character to make hack but my new character's animations are in a different file than Sonic's animations. I made it so it switches to the new character's animation file when it is picked but I get the "Label Multiplied" error when I try to build it. The problem is that the new character's file uses the sonani_... labels like Sonic's animations but I can't change the labels because the Sonic1.asm file uses it and I can't make it have to switch to my new characters animation label everytime it is used. How can I fix this? I use the Hivebrain 2005 disassembly.
     
  2. Guest

    Looking from what you have posted about how your character uses animations different from sonic's but still uses the sonani_ Loading routine, your best bet is to try and make another seperate set of the sonani_ loading routine but instead have them set to load your characters animations instead of sonic's. this would also require that you make lines that searches for your character's animation files, as well as possibly having to edit the LoadSonicDynPLC routine too. these are only bit's of the other things that you may have to edit but these are some of the basics when it come's to doing animations.
     
    Last edited: Oct 16, 2014
  3. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    417
    Location:
    Town Creek, AL
    You need to copy the entire SonicAnimate & make another .asm for animations. Change every "Sonic" to whatever your character's name is, every "loc" to "Location" and in the copy of the animation's .asm file, change every "sonani" to whatever your character name is "ani" & every "SonicAniData" To whatever your character name is "aniData"
     
  4. ProjectFM

    ProjectFM Optimistic and self-dependent Member

    Joined:
    Oct 4, 2014
    Messages:
    912
    Location:
    Orono, Maine
    Okay, I'll try. Also, it's funny that you commented to my post because the character I'm adding is Richter Belmont from Castlevania Rondo of Blood although I didn't know that you were doing it until I already finished with adding most of the art.
     
    Last edited by a moderator: Oct 16, 2014
  5. warr1or2

    warr1or2 I AM CLG Member

    Joined:
    Apr 7, 2008
    Messages:
    417
    Location:
    Town Creek, AL
    I've been working on him for a while, I'm in needing of redoing him. I'm using his SOTN sprites.

    http://spritedatabase.net/files/ps1/871/Sprite/RichterBelmontPSX.PNG

    this is the sprite sheet i'm using. The SOTN sprite sheet. the only trouble i'm having the loops. I already have 2 moves done.

    Maybe we can assist one another with this character.
     
  6. ProjectFM

    ProjectFM Optimistic and self-dependent Member

    Joined:
    Oct 4, 2014
    Messages:
    912
    Location:
    Orono, Maine
    It worked! Does anyone know where I can add the code to change the pallet when the new character is selected?

    I just started over a month ago so I don't know much although many tutorials have been helpful and my hack is coming together really well. So far, Richter is just a Sonic clone.
     
    Last edited by a moderator: Oct 17, 2014
  7. Clownacy

    Clownacy Retired Staff lolololo Member

    Joined:
    Aug 15, 2014
    Messages:
    1,020
    It's "palette". Ignore what that disasm says.


    It's best you don't ask questions on specifics, and gather the resources to effectively answer your queries, said knowledge can then be used to answer future questions. Case in point, palette loading. The standard process is that the ID value of a palette is moved to d0, then a subroutine labelled 'PalLoad1' (the number can vary) is branch/jumped to.


    Finding the code used to load Sonic's palette is as simple as searching 'Sonic's pallet' in sonic1.asm. Tada.


    From that we learn that the ID of Sonic's palette is 3. So, look for branches to PalLoad, and if the ID is 3, you've got yourself the code you're looking for.


    To explore this on a deeper level, the ID is defined by the pointers and data within the PalPointers array(?). As you can see, counting from 0, Sonic's palette is the fourth entry. You can apply this logic to adding your own palettes. So, if your new palette is the $14th entry in the array, its ID will be $14.
     
    Last edited by a moderator: Oct 17, 2014
  8. Pacca

    Pacca Having an online identity crisis since 2019 Member

    Joined:
    Jul 5, 2014
    Messages:
    1,175
    Location:
    Limbo
    The code could be simplified if a check to see if palette line 3 was being loaded right at the start of PalLoad1. From there, you could have it switch the value to the pallet line of the alternate character, by simply changing the ID to the value you wish (skipping that if your playing as sonic, of course).
     
  9. ProjectFM

    ProjectFM Optimistic and self-dependent Member

    Joined:
    Oct 4, 2014
    Messages:
    912
    Location:
    Orono, Maine
    Thank you for helping. I can't believe that I tried everything but search "Sonic's Pallet."
     
Thread Status:
Not open for further replies.