Basic Questions and Answers Thread

Discussion in 'Discussion & Q&A' started by Malevolence, Jul 7, 2009.

  1. rika_chou

    rika_chou Adopt Member

    Joined:
    Aug 11, 2007
    Messages:
    689
    SonMapEd is not for level art. SonED2 is the best thing for level art/mappings, and it has full documentation included on how to use it.
     
  2. FinkMac

    FinkMac Swëdish Chef Member

    Joined:
    Jan 14, 2012
    Messages:
    54
    Location:
    Walk down the street. You will see a car. Tell the
    Included with it?
     
  3. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    Try here:


    http://stealth.hapisan.com/SonED/
     
  4. Captain British

    Captain British Newcomer Trialist

    Joined:
    May 23, 2012
    Messages:
    17
    Location:
    England
    Another scrubby question which is probably incredibly simple... How would I go about changing the level names in the Title Cards/Level Select menu in Sonic 2 (HG Disassembly)?
     
  5. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    For the level select, you want to use PlaneED. For the title cards, I think Selbi's Sonic 2 - Text Code Generator should work for the Hg disassembly, but it might have slightly different labels/files to edit.
     
  6. Captain British

    Captain British Newcomer Trialist

    Joined:
    May 23, 2012
    Messages:
    17
    Location:
    England
    Hrm, okay I had to do some things different (IE disregarding the entire "TitleCards_Setup.asm" stage of the setup program's setup, instead modifying the line "TitleCardLetters_EHZ:" to read "Bright Bridge" manually but I got it c: Thanks MM.
     
  7. brickrick

    brickrick Active Member Member

    Joined:
    Apr 30, 2012
    Messages:
    33
    Hi. This is probably an easy answer, but I researched a lot for it and could not find data on the subject:


    - How can I change the ring limits that state what bonus stage will appear upon passing a checkpoint in Sonic 3 & Knuckles?


    I am looking for the Hex address, but I did not find the information anywhere. (I am open to ASM edits too.) I do know there in a hack called Sonic 3 Customizable those values were changed, but aside that, I only know that the values are 20-34 rings = slot machine, 35-49 rings = glowing spheres and 50-64 = gumball, and so on...


    So, can anyone point me to the Hex address with the expression?


    (I hope this one of those questions with a "facepalm", but knowing it will really help me. I have been editing that bonus stage lately using Hex for tile layout, object placement and palette editing and I want to contribute with my research results in the future too.)
     
    Last edited by a moderator: Jun 22, 2012
  8. Animemaster

    Animemaster Lets get to work! Member

    Joined:
    Mar 20, 2009
    Messages:
    1,229
    Location:
    UK
    Well hello people, I believe its been awhile since I have asked a question.(Well at least I think ha ha) Its an annoying one for me, because I have proberly gone past it several times in my search or looked at the wrong peice of code etc. However rather than waste another hour or 2 trying to find something that should be already there but failing to find, I figured someone here may find it quicker or know instantly almost where it is.


    Anywho I'll get to the point: All I require is the location of code that allows sonic to be launched off of chunks/ramps etc.(so he doesn't stick to the ground constantly) Not just walking off a chunk and falling, but also when sonic picks up enough speed and he flies of a ramp for a bit and then falls or looses y-velocity if you like. Yup, I know your proberly thinking I should have found this by now,and maybe I have but have gone past it, who knows I am at a loss. So if anyone does know the location I would appreciate it. (Of course I will continue to search while this post is here so If I do find before hand I will edit this post)
     
    Last edited by a moderator: Jun 19, 2012
  9. vladikcomper

    vladikcomper Well-Known Member Member

    Joined:
    Dec 2, 2009
    Messages:
    415
    I had some time and interest to look into S3K's code today, so here we go...


    It would be ultimately hard to do this in HEX since Starpost object in S3K doesn't store ring values in data arrays, it is calculated with the code.


    Here is the full Startpost object code from SK disassembly:


    http://pastebin.com/Tr3LhHwK


    I annotated the code slightly, especially in the places you are looking for (the original code wasn't annotated at all). There are two related places:


    sub_2D3C8 - This subroutine loads starpost stars and their art. Art is chosen according to the special stage you're going to (scroll down till loc_2D436 for this code). I can't say more about art, frankly, I didn't even know it was different, I know S3K very bad.


    loc_2D47E - Starpost stars code. First part of code checks if player has touched the stars and sends him to the Special stage based on number of rings. Second part, starting from loc_2D50A processes stars movement.


    Both of routines I mentioned use the following logic to choose Special stage:


    1. Get rings number


    2. Subtract 20 from it


    3. Divide it by 15


    4. Also divide it by 3 (for S3K, for SK-alone divisor is 2)


    5. Get remainder from that division


    Remainder after division by 3 can be 0, 1 or 2. By checking this value, game will choose between 3 types of Special stages (for S3K).
     
  10. Captain British

    Captain British Newcomer Trialist

    Joined:
    May 23, 2012
    Messages:
    17
    Location:
    England
    Two questions, woo~


    I'm trying to use the EHZ Waterfall object however I've noticed that it has an INCREDIBLY small draw distance. I'm fairly sure this isn't an issue similar to my bridge issue in which too many objects are being drawn, the object is just programmed to vanish at a certain distance due to the way it's used in EHZ (blending in with the waterfall in the background so you wouldn't notice.) What would I need to change in order to remove the draw distance limitation on the object?


    Second, following Markyjester's guide earlier in the thread and adapting it for use on the HG Sonic 2 disassembly as best I could I managed to get the sprites for the orbinaut and the see-saw from HTZ to load in EHZ, however now my Buzzer badnik is loading the sprites for both the Orbinaut and the See-Saw instead of his own sprites. This is obviously because I haven't changed where in the VRAM the objects are loading to, however I can't seem to find where in my disassembly I am supposed to change that sort of thing. In MJ's guide it's in the same place as you add a new PLC but in my disassembly it is somewhere else. Could someone please point me to where in the disassembly I should be looking and kindly give me a few available VRAM addresses in EHZ?
     
  11. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    The Hg disassembly uses constants for VRAM locations, named as ArtTile_ArtNem_Buzzer near the bottom of s2.constants.asm. If you want to change something's art location every time it's loaded, you only have to change the value once. Otherwise you should add a new constant for that level, and add a check in the object's code. Keep in mind that these are using art tiles, not VRAM addresses, so you have to multiply by $20 to get the actual address.
     
  12. Captain British

    Captain British Newcomer Trialist

    Joined:
    May 23, 2012
    Messages:
    17
    Location:
    England
    Awesome, thanks again MM c:
     
  13. Animemaster

    Animemaster Lets get to work! Member

    Joined:
    Mar 20, 2009
    Messages:
    1,229
    Location:
    UK
    No go so far, anyone else?. I shall be kicking myself for this I bet.
     
  14. FinkMac

    FinkMac Swëdish Chef Member

    Joined:
    Jan 14, 2012
    Messages:
    54
    Location:
    Walk down the street. You will see a car. Tell the
    From what I can tell, SonEd exports the artwork to a .pcx/.tga file... What is a good image editor for these files?
     
  15. Animemaster

    Animemaster Lets get to work! Member

    Joined:
    Mar 20, 2009
    Messages:
    1,229
    Location:
    UK
    Photoshop elements, paint shop pro, you can get a free copy of PSP 7. It might also be worth getting the program irfan view, its a great image program as you can open pretty much any image file, resize it, save it in a different image format, edit the palette with in the image, decrease/increase the colour bit etc.
     
  16. brickrick

    brickrick Active Member Member

    Joined:
    Apr 30, 2012
    Messages:
    33
    This is a little late, but I feel I should thank the help that was given and share the results.

    Well, I have to thank you a lot, because you just made the Hex edit really simple after the following:

    After looking the above info, I started to compare it with the Hex code, looking in the offsets that were in the code you shared. And after some time testing, turns out it is possible to change a lot more than what I was expecting. By changing about a dozen of bytes it is possible to, not only change the minimum rings required to enter the bonus stage but also: change the colors of the stars, regardless of what bonus you get, change the order of the bonus (which bonus will appear first) and change the expression that states how many rings will be needed before the starpost gives the next bonus.


    Really, thank you, vladikcomper. Thanks to you I am now able to make a tutorial on this (if anyone requests it) using Hex. And it is really simple. Of course, credit would go to you since, afterall, you did practically everything. S3K Hacks can now have crazy things like "pseudo-random" bonuses or just one bonus stage. I am just sorry for the late reply, but being busy makes free time just... well, I am sure the people here know what I mean. Enough derailing now. Here are some offsets:


    $2D0C6 = Number of rings needed. It is originally "00_14" (20). Changing this will not affect the "equation" you explained, that determines (the remainder, that is) which bonus stage you will get, so, for instance, since 20-34 rings gives Slot Machine and 35-49 gives Glowing Spheres, by changing the "00_14" to "00_28" (40 rings) the first bonus one can get will be the "Glowing Spheres" one. (technically turning the rings needed to 40-49)


    $2D442 and $2D446 affect the equation but only for star colors. $2D442 = A / $SD446 = B


    (The equation you explained, which is A (20) minus B (15) and then, the remainder of the division of B with 3 will be the determinant value.)


    $2D49C and $2D4A0 are the same as the above, but these will determine the bonus to get. So the "equation" is actually two. One for star colors and one for the bonus getting, therefore, being really simple to insert "randomness".


    There are some other two or three offsets, but I would have to check them in my offline PC, where I did the research, but I plan to share then in the future too.


    Once again, thanks.
     
  17. rika_chou

    rika_chou Adopt Member

    Joined:
    Aug 11, 2007
    Messages:
    689
    GraphicsGale. It's the best (my favorite) pixel art editor out there, and can open tga files.
     
    Last edited by a moderator: Jun 23, 2012
  18. JP Doctor

    JP Doctor Active Member Member

    Joined:
    Jun 13, 2012
    Messages:
    33
    Hello guys. Forgive me if this has been asked already, (I had a good look through this thread but couldn't find it), I'm trying to edit the sprites for Robotnik in Sonic 1. I'm using the 2005 disassembly and SonMapEd. I'm just wondering what I have to load exactly for the tile graphics, sprite mappings etc? Btw it's the Green Hill boss i'm looking to edit first.
     
  19. redhotsonic

    redhotsonic Also known as RHS Member

    Joined:
    Aug 10, 2007
    Messages:
    2,969
    Location:
    England

    You have to decompress Eggman's art first to edit it. I don't know where they are located as I don't hack Sonic 1, but your disassembly will tell you where the art file is located. Then decompress that file so you have a new file with Eggman's art uncompressed. Edit all you like. Once done, re-compress the art back to it's original file.
     
  20. JP Doctor

    JP Doctor Active Member Member

    Joined:
    Jun 13, 2012
    Messages:
    33
    Cheers for the reply mate. I've found most of what I need. Just the pattern load cues I can't seem to find. Almost there though so thanks for pointing me in the right direction!