don't click here

Sonic MAX Character Addition Tutorial

Discussion in 'Fangaming Discussion' started by Okamikurainya, Aug 15, 2017.

  1. Okamikurainya

    Okamikurainya

    Member
    220
    10
    18
    Somewhere in Africa
    Sonic: Time Attacked - MAX
    Hi all!

    Since I've gotten quite a few requests for it, I thought I'd lend a hand out and help y'all with adding characters to TruePowerOfTeamwork's Sonic MAX Engine. I may add to this when I have the time for things like Actions.

    BASIC CHARACTER ADDITION:
    [​IMG]

    The candidate for today is everyone's favourite edgy Hedgehog: Shadow, though this will be a simplistic tutorial that will work for nearly any character you want. Quick shout out to the Sonic Worlds team and Gardow, as this Shadow is being plucked right out from there and Gardow headed the original sprite creation project.

    [​IMG]

    Once you have the first sprite in, you'll want to get its’ origin aligned properly. The easiest option is to simply click on “Center”, but this won't always turn out the way you hope… A rule of thumb is to always make sure that the Y is 20 less than the sprite height, that'll make sure the very bottom of the sprite is in contact with the floor.

    [​IMG]

    Not all the origins will be the same, but don't threat! They shouldn't be! Each animation is a different size and shape and that's ok… In this case, due to Shadow leaning backwards in his Waiting animation, his feet are slightly further ahead than in the Idle animation. The Idle animation's origin was 14x19, which was a single black pixel next to the top of Shadow's chest fluff. Using that we can place the origin in the most logical position, which in this case is 2 pixels forward.

    [​IMG]

    Not all images will have the character's feet at the bottom of the image either…
    In these cases, just follow the same (image_height-20) rule of thumb from before, but take into account how many pixels separate the character's feet from the bottom of the image. In this case, Shadow is 3 pixels above the bottom of the image, but we still want to keep a bit of a hovering effect so we'll say the origin should be (image_height-22).

    [​IMG]

    Each character also has a corresponding HUD sprite for their lives. As Shadow is the fourth character, he will have to be the fourth HUD graphic with an image_index of 3.

    [​IMG]

    Ok! Now that we have all the various animations in, we'll be wanting to actually add Shadow into the game. To do so, we must first create a Macro for him, this can be done by selecting the “All Configurations” setting in the Macros folder. Once inside we must insert a Macro for him with the name “consCharacterShadow” with a value of 4, as he is the fourth character to be added into the game. Depending on who the character you're adding in is will obviously determine the name of the Macro, such as “consCharacterMammothMogul” or what not.

    [​IMG]

    Now to get his animations into the actual game! First we must look for the script titled “scrReloadAnimations”, this will ensure the correct sprite is displayed for each animation. As I didn't have a balancing animation on hand, I simply used the idle animation instead.

    [​IMG]

    At the end of a stage, a character's name will be displayed and this needs Shadow to be added as well. In the objResults Create script, just add your character to the roster at the bottom with their corresponding Macro and name.

    [​IMG]

    Each character has a unique coloured trail. While this is technically not necessary, adding it in will prevent crashes if the option to include trails is selected. Unlike Sonic and co, Shadow has a golden trail. The colour of the trail is determined by its’ RGB, in this case (252, 176, 55).

    [​IMG]

    Now to make our character selectable within the engine. For this we'll need to add Shadow like so to the objCharacterMenu Create event script.

    [​IMG]

    And like so to the RoomEnd event script of the same object. You can do the same thing for the objSideCharacterMenu if you want as well. Make sure that the Options variable is also equal to the amount of characters available.

    [​IMG]

    Now we just need three more images: The signpost…

    [​IMG]

    The Data Select image…

    [​IMG]

    And last but not least, the ExtraLife Monitor icon. The newest character will always be equal to the last image_index of this animation.

    [​IMG]

    And there you have it, your character is in the game!