Sonic and Sega Retro Message Board: Basic Questions & Answers thread - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
Loading News Feed...
 

Basic Questions & Answers thread NEWBIES: Start here!

#4111 User is offline Hitaxas 

Posted 05 April 2012 - 05:27 PM

  • SEGA: Sorry Classic Sonic, we are sending you back to 1994
  • Posts: 1352
  • Joined: 30-September 07
  • Gender:Male
  • Location:Litchfield, CT
  • Project:Sonic: Super Deformed (head director) - Slowly working on it.
  • Wiki edits:196
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.

#4112 User is offline DarkBones 

Posted 05 April 2012 - 05:54 PM

  • Posts: 20
  • Joined: 04-February 12
  • Gender:Male
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:

View PostMainMemory, 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

#4113 User is offline MainMemory 

Posted 05 April 2012 - 06:47 PM

  • Every day's the same old thing... Same place, different day...
  • Posts: 2661
  • Joined: 14-August 09
  • Gender:Not Telling
  • Project:SonLVL
  • Wiki edits:1,339
...SonicLVL? Do you mean SADXLVL?
This post has been edited by MainMemory: 05 April 2012 - 06:48 PM

#4114 User is offline E-122-Psi 

Posted 08 April 2012 - 07:55 PM

  • Posts: 1155
  • Joined: 29-December 09
  • Gender:Male
  • Wiki edits:41
More S3+K questions:

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 User is offline Ravenfreak 

Posted 11 April 2012 - 01:03 AM

  • RavenxArgent <3
  • Posts: 1985
  • Joined: 24-November 08
  • Gender:Female
  • Location:O'Fallon Mo
  • Project:The Final Zone, various hacking projects, Rockman World
  • Wiki edits:112
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. :\

#4116 User is offline Elektro-Omega 

Posted 11 April 2012 - 09:57 AM

  • Mushroom Hill'in
  • Posts: 369
  • Joined: 23-February 10
  • Gender:Male
  • Location:UK
  • Project:-
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

#4117 User is offline Tiddles 

Posted 11 April 2012 - 03:39 PM

  • Diamond Dust
  • Posts: 313
  • Joined: 25-December 09
  • Gender:Male
  • Location:Nottingham, England
  • Project:Get in an accident and wake up in 1973
  • Wiki edits:31

View PostE-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?
Wholly untested, but based on what I know about that area...

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 User is offline E-122-Psi 

Posted 11 April 2012 - 09:18 PM

  • Posts: 1155
  • Joined: 29-December 09
  • Gender:Male
  • Wiki edits:41
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.

#4119 User is online Irixion 

Posted 11 April 2012 - 10:33 PM

  • Posts: 1320
  • Joined: 30-December 04
  • Gender:Male
  • Location:Ontario, Canada
  • Project:Life
  • Wiki edits:152
It slightly increases Sonic's attack radius

#4120 User is offline E-122-Psi 

Posted 11 April 2012 - 10:36 PM

  • Posts: 1155
  • Joined: 29-December 09
  • Gender:Male
  • Wiki edits:41
Hmm, could be useful to me. Might take a gander at the insta shield's coding and see what else I can edit.

#4121 User is offline flamewing 

Posted 12 April 2012 - 06:22 AM

  • Posts: 563
  • Joined: 11-October 10
  • Gender:Male
  • Project:Sonic Classic Heroes; Sonic 2 Special Stage Editor; Sonic 3&K Heroes (on hold)
  • Wiki edits:12
The insta-shield makes Sonic's radius a bit bigger and makes Sonic invincible for collisions with badniks and projectiles.

#4122 User is offline E-122-Psi 

Posted 13 April 2012 - 07:44 AM

  • Posts: 1155
  • Joined: 29-December 09
  • Gender:Male
  • Wiki edits:41
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.
This post has been edited by E-122-Psi: 13 April 2012 - 09:11 AM

#4123 User is online Irixion 

Posted 13 April 2012 - 07:58 AM

  • Posts: 1320
  • Joined: 30-December 04
  • Gender:Male
  • Location:Ontario, Canada
  • Project:Life
  • Wiki edits:152
Try getting rid of the (pc)

#4124 User is offline Tiddles 

Posted 14 April 2012 - 02:09 AM

  • Diamond Dust
  • Posts: 313
  • Joined: 25-December 09
  • Gender:Male
  • Location:Nottingham, England
  • Project:Get in an accident and wake up in 1973
  • Wiki edits:31

View PostE-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?
Yeah, sorry if I didn't make that clear - the shield art/map/DPLC will replace where the instashield would normally go, and just activating the animation won't switch to Insta. Sonic actually has an instashield object at all times where another shield ins't present to manage the animation and PLC.

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.

View PostE-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.
Both types are controlled by Obj_81, but I couldn't see at a glance how it decides which kind appears.

#4125 User is offline E-122-Psi 

Posted 14 April 2012 - 05:45 AM

  • Posts: 1155
  • Joined: 29-December 09
  • Gender:Male
  • Wiki edits:41
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).
This post has been edited by E-122-Psi: 14 April 2012 - 05:52 AM

  • 309 Pages +
  • ◄ First
  • 273
  • 274
  • 275
  • 276
  • 277
  • Last ►
    Locked
    Locked Forum

2 User(s) are reading this topic
0 members, 2 guests, 0 anonymous users