What I mean is I will load up the files and import a new sprite. When I do that it's already garbles, so I manually fix it and save it. When unloading then reloading the files, the sprite loads up with the correct size mappings, but the tiles will be from another sprite in the set.
Basic Questions & Answers thread NEWBIES: Start here!
#4111
Posted 05 April 2012 - 05:27 PM
Im referring to working with Sonic 2, so the tiles for normal and super/hyper are in the same files.
What I mean is I will load up the files and import a new sprite. When I do that it's already garbles, so I manually fix it and save it. When unloading then reloading the files, the sprite loads up with the correct size mappings, but the tiles will be from another sprite in the set.
What I mean is I will load up the files and import a new sprite. When I do that it's already garbles, so I manually fix it and save it. When unloading then reloading the files, the sprite loads up with the correct size mappings, but the tiles will be from another sprite in the set.
#4112
Posted 05 April 2012 - 05:54 PM
Can anyone please tell me what editor I need to import SADX level models? I found out the hard way that SADXMDL only really works for object models... (I tried going to a level location and it crashes, but when I edited Knuckles' model it worked perfect...)
EDIT: ...and its part of SonicLVL...wow...I am such an idiot sometimes...well, at least I can finally have fun screwing around with Sonic Adventure...
EDIT2:
Yeah, I've been trying to get the wrong program to work all this time...that must have been why I had so much trouble...
EDIT: ...and its part of SonicLVL...wow...I am such an idiot sometimes...well, at least I can finally have fun screwing around with Sonic Adventure...
EDIT2:
MainMemory, on 05 April 2012 - 06:47 PM, said:
...SonicLVL? Do you mean SADXLVL?
Yeah, I've been trying to get the wrong program to work all this time...that must have been why I had so much trouble...
This post has been edited by DarkBones: 05 April 2012 - 08:06 PM
#4114
Posted 08 April 2012 - 07:55 PM
More S3+K questions:
1. I've tried to code in my hammer move into Sonic 3 like so:
It works okay except for one problem, it 'nudges' the player forward, however it doesn't always direct properly to where the player is facing (eg. if facing right you're pulled backwards).
2. Anyone know how to turn off the shield moves for Sonic and have him use the insta shield all the time?
1. I've tried to code in my hammer move into Sonic 3 like so:
Sonic_Hammer: cmp.b #$24,$20(a0) bne.s lol7 bset #1,(Ctrl_1_locked).w move.w $1C(a0),d0 move.w d0,d1 asr.w #3,d1 sub.w d1,d0 move.w d0,$1C(a0) rts lol7: btst #1,(Ctrl_1_logical).w ; is Down button pressed? bne.s JmpTo_SonicHammerreturn ; if yes, return btst #6,(Ctrl_1_pressed_Logical).w ; is A button pressed? beq lol ; if not branch tst.b ($FFFFFFA4).w ; was jumpdash flag set? bne.w JmpTo_SonicHammerreturn ; if yes, branch move.b #1,($FFFFFFA4).w ; if not, set jumpdash flag move.b #$24,$20(a0) ; show hammer animation jmp Hammer_Cont JmpTo_SonicHammerreturn: jmp Sonic_Hammer_return Hammer_Cont: move.w (a0),d0 btst #0,$22(a0) beq lol8 neg.w d0 lol8: cmp.w #$400,d0 bgt lol move.w #$400,d0 btst #0,$22(a0) beq lol9 neg.w d0 lol9: move.w d0,$1C(a0) lol: move.w $18(a0),d0 tst.w d0 bpl label neg.w d0 label: cmpi.w #$600,d0 bgt Sonic_Hammer_Return btst #6,(Ctrl_1_pressed_logical).w ; is A button pressed? beq.b Sonic_Hammer_return ; if not, return move.b #$24,$20(a0) ; show animation $20 move.w #$47,d0 ; play sound jsr (Play_Sound_2).l Sonic_Hammer_return: bclr #1,(Ctrl_1_locked).w ; unlock controls rts ; End of function Sonic_Hammer
It works okay except for one problem, it 'nudges' the player forward, however it doesn't always direct properly to where the player is facing (eg. if facing right you're pulled backwards).
2. Anyone know how to turn off the shield moves for Sonic and have him use the insta shield all the time?
#4115
Posted 11 April 2012 - 01:03 AM
1. Looking through your code, it seems that it's missing a check to see if the player is facing a certain direction, which is possibly the cause of this. The same thing happened to me when I first coded Knuckles' Slide Punch (see the General Video/Screenshot thread for my S3K hack) and testing if Knuckles is facing left, then negating his inertia fixed the problem. (Address $2A is the player's current direction.
2. The shields graphics override Sonic's Insta-shield, so once he collects a shield until that bitfield is cleared (if it's destroyed) the insta-shield can't load. So I'm not sure if that's possible. :\
2. The shields graphics override Sonic's Insta-shield, so once he collects a shield until that bitfield is cleared (if it's destroyed) the insta-shield can't load. So I'm not sure if that's possible. :\
#4116
Posted 11 April 2012 - 09:57 AM
Quick question.
I have been twisting my mind for hours trying to figure this out.
I am using the S1 (Megadrive) merc version and am trying to initiate a palette change within gameplay.
I have tried copying small samples of code from various places within the main code but I either get illegal errors or non-compiling.
I am trying to implement it into an object code, Imagine that you collect a ring and it makes the palette a shade darker - or something along those lines.
Thanks
I have been twisting my mind for hours trying to figure this out.
I am using the S1 (Megadrive) merc version and am trying to initiate a palette change within gameplay.
I have tried copying small samples of code from various places within the main code but I either get illegal errors or non-compiling.
I am trying to implement it into an object code, Imagine that you collect a ring and it makes the palette a shade darker - or something along those lines.
Thanks
#4117
Posted 11 April 2012 - 03:39 PM
E-122-Psi, on 08 April 2012 - 07:55 PM, said:
2. Anyone know how to turn off the shield moves for Sonic and have him use the insta shield all the time?
You can get this behaviour by commenting out everything from loc_1192C down to, and including, the first two lines under loc_119F6. That will mean you can instashield during invincibility too, and it will even prevent super transformation in favour of instashield. (I'd recommend just commenting everything except for the label lines themselves in case you find other code jumps in here.)
If you want the invincibility block back, uncomment the first two lines under loc_1192C again. If you want Super transformation back, uncomment from loc_119D2 to right before the loc_119F6 label. (You still want to keep those first two lines of loc_119F6 commented as they will forcibly block use of instashield when any other shield is present.)
Ravenfreak is quite correct in saying that the instashield will look completely wrong if you have a shield, invincibility, super transformation etc. If you wanted to fix that, you can do so with some trickery within the shields themselves to swap their map/DPLC dynamically, but that can get interesting, based on my experience of doing this with the classic shield. I'm guessing your goal is to make the hammer move for Amy not get overridden by a shield move, though, in which case this should more or less do the trick.
#4118
Posted 11 April 2012 - 09:18 PM
What I was thinking was that I could edit the insta shield animation to use the hammer's hearts which may at least mean Amy's sprite uses less tiles by itself. What exactly are the insta shield's properties? Does it only make Sonic invincible or does it increase his attack radius? Could it be possible to attach to another non jumping animation or action?
Thanx for all the help from both of you. I'll give these a shot.
Thanx for all the help from both of you. I'll give these a shot.
#4120
Posted 11 April 2012 - 10:36 PM
Hmm, could be useful to me. Might take a gander at the insta shield's coding and see what else I can edit.
#4121
Posted 12 April 2012 - 06:22 AM
The insta-shield makes Sonic's radius a bit bigger and makes Sonic invincible for collisions with badniks and projectiles.
#4122
Posted 13 April 2012 - 07:44 AM
Okay tried out the fixes.
1. The hammer fix works just fine, thanks. :D
2. The shield edit works, however the animations for double jump moves still play when double tapping. I'm guessing these play instead of the insta shield due to the elemental ones overwriting it, something I really should have thought of in hindsight. Would it maybe be more ethical to just uncomment the shield coding's bsr completely so as to work like Tails and Knuckles, and make a radius change from scratch like I did for the previous games?
3. I've been getting an odd asm error. I've been trying to edit the ICZIceCube data to react to other animations and flags however I keep getting this error whenever I try it:
>>>sonic3k.asm(198479): error: addressing mode not allowed on 68000
>>> jmp Child_DrawTouch_Sprite(pc)
>>>sonic3k.asm(198479): error: addressing mode not allowed here
>>> jmp Child_DrawTouch_Sprite(pc)
4. Does anyone know where the coding for the upside down Egg Capsules are, unlike the normal ones they can only be activated in spin animations so I'll need to edit that, but I can't find the obj data anywhere.
1. The hammer fix works just fine, thanks. :D
2. The shield edit works, however the animations for double jump moves still play when double tapping. I'm guessing these play instead of the insta shield due to the elemental ones overwriting it, something I really should have thought of in hindsight. Would it maybe be more ethical to just uncomment the shield coding's bsr completely so as to work like Tails and Knuckles, and make a radius change from scratch like I did for the previous games?
3. I've been getting an odd asm error. I've been trying to edit the ICZIceCube data to react to other animations and flags however I keep getting this error whenever I try it:
>>>sonic3k.asm(198479): error: addressing mode not allowed on 68000
>>> jmp Child_DrawTouch_Sprite(pc)
>>>sonic3k.asm(198479): error: addressing mode not allowed here
>>> jmp Child_DrawTouch_Sprite(pc)
4. Does anyone know where the coding for the upside down Egg Capsules are, unlike the normal ones they can only be activated in spin animations so I'll need to edit that, but I can't find the obj data anywhere.
This post has been edited by E-122-Psi: 13 April 2012 - 09:11 AM
#4124
Posted 14 April 2012 - 02:09 AM
E-122-Psi, on 13 April 2012 - 07:44 AM, said:
2. The shield edit works, however the animations for double jump moves still play when double tapping. I'm guessing these play instead of the insta shield due to the elemental ones overwriting it, something I really should have thought of in hindsight. Would it maybe be more ethical to just uncomment the shield coding's bsr completely so as to work like Tails and Knuckles, and make a radius change from scratch like I did for the previous games?
My solution for the classic shield was to override its call to Animate_Sprite and set up some custom code to swap in the instashield anim/DPLC when necessary, and then swap back. The solution ended up looking particularly ugly though.
E-122-Psi, on 13 April 2012 - 07:44 AM, said:
4. Does anyone know where the coding for the upside down Egg Capsules are, unlike the normal ones they can only be activated in spin animations so I'll need to edit that, but I can't find the obj data anywhere.
#4125
Posted 14 April 2012 - 05:45 AM
Yeah that doesn't sound the most effecient. Okay, screw it then. Is there a way to turn off the double jump shield stuff altogether to work like Tails and Knuckles? I tried uncommenting the bsrs of the insta shield coding but for some reason it took away the press sensitivity to the player's jump height.
By the way, as I've been programming I've came to this strange glitch. When I enter Mushroom Hill or Carnival Night as Sonic alone, there is no Tails, he just falls into the level. Even stranger, when I select Tails, he appears with a second version of himself flying him in. This doesn't occur for Sonic and Tails mode nor do problems occur it for other Tails appearances like the Marble Garden boss. My guess is I've edited a bit of coding for player recognition for the intros, but I can't backtrack what I've done anywhere. Any idea where the coding is for player recognition for the level intros is so I can try find it? (If it exists for other levels too this would be useful as I want Amy to load with Tails route in some other levels like Angel Island and Icecap).
By the way, as I've been programming I've came to this strange glitch. When I enter Mushroom Hill or Carnival Night as Sonic alone, there is no Tails, he just falls into the level. Even stranger, when I select Tails, he appears with a second version of himself flying him in. This doesn't occur for Sonic and Tails mode nor do problems occur it for other Tails appearances like the Marble Garden boss. My guess is I've edited a bit of coding for player recognition for the intros, but I can't backtrack what I've done anywhere. Any idea where the coding is for player recognition for the level intros is so I can try find it? (If it exists for other levels too this would be useful as I want Amy to load with Tails route in some other levels like Angel Island and Icecap).
This post has been edited by E-122-Psi: 14 April 2012 - 05:52 AM
