Romhacking.net

Romhacking => ROM Hacking Discussion => Topic started by: JoeresioRex on March 14, 2014, 03:41:33 am

Title: Super Mario Kart CPU Items
Post by: JoeresioRex on March 14, 2014, 03:41:33 am
Hey guys I'm new to the community and this my first post  :)

REQUEST:

So I've been playing Super Mario Kart since 1992 and I've been searching FOREVER for a code/hack that allows you to use the items that the computer AI does. Is this not possible or something or am I the ONLY person to have ever wondered about this? There are so many hacks for this game and I'm boggled to why this has never been addressed anywhere on the internet and it's 2014! For example: Poison Mushroom, Fireball and Yoshi's Egg. Could someone create such a code or let me know if it can't be done? I've always thought that old school games didn't use software that wasn't that complicated and its something that's CLEARLY in the game so why hasn't this been pulled off? Thanks Guys!

March 14, 2014, 03:57:58 am - (Auto Merged - Double Posts are not allowed before 7 days.)
To add to that, I am willing to make a donation to whoever can pull this off...if its even possible. Just as a "Thank You". I'm assuming this is hard or just no one cares lol.
Title: Re: Super Mario Kart CPU Items
Post by: Jeville on March 14, 2014, 03:58:59 pm
I can't do it, but I'm interested to see this done. Battle mode can benefit from this too.

Yoshi's egg: Same as a placed Green Shell (down + B), except it can be thrown overhead like a banana peel (among other CPU items).

Poison mushroom: Shrinks the player as well as slowing them down.

Fireball: It swirls in a small radius instead of being stationary like a placed Green Shell.

With them not being completely the same in functionality to our available items, I think it's justifiable to implement them.

In the future, this is the thread to post ideas (http://www.romhacking.net/forum/index.php/topic,3282.1120.html).
Title: Re: Super Mario Kart CPU Items
Post by: JoeresioRex on March 14, 2014, 04:15:24 pm
Thanks for the reply...do you think I should go post this over there?

March 14, 2014, 04:39:38 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
I'm wondering how this have never crossed anyone's mind after all these years lol. I think a patch would make this possible. I played with PAR codes for the longest and just can't get anywhere with that. Its something that's clearly in the game so I'm not sure why this task has been so hard.
Title: Re: Super Mario Kart CPU Items
Post by: Drakon on March 15, 2014, 08:53:23 am
I'm wondering how this have never crossed anyone's mind after all these years lol. I think a patch would make this possible. I played with PAR codes for the longest and just can't get anywhere with that. Its something that's clearly in the game so I'm not sure why this task has been so hard.

Because you have no idea how to romhack and therefore no idea how difficult it is to do that and therefore have no idea why this task would be so hard.  If you really think "old games use software that isn't that complicated" then how about you go ahead and figure out how to do it?
Title: Re: Super Mario Kart CPU Items
Post by: JoeresioRex on March 15, 2014, 10:13:00 am
Drakon, if it's that hard of a task and can't be done then just say that. I never claimed to know to know how to hack and that why I'm on this site to begin with. Judging from the available hacks that I've seen online....those tasks look WAY more complicated than what I was asking for and that's why the question arose. Tracks could be altered while having the AI programmed properly to follow them and still correctly use their items? There's tons of other tweaks out there as well. THAT IS WHY I WONDERED WHAT THE HELL? If you're not giving me some legit answer or have information to contribute then you are not the person I'm looking for. Get lost....
Title: Re: Super Mario Kart CPU Items
Post by: justin3009 on March 15, 2014, 11:46:55 am
That was unnecessarily rude Drakon.

As for the hack Joe, it might be that it's only built into the CPU AI and not the characters themselves.  If they are built into them then it may be possible but really difficult to do.  Regardless, it's probably a bitch.  I haven't tackled their AI really but a lot of the stuff in general is pretty funky.

If it's not that though, it may actually be a 'hidden' item sequence.

I'd take a whack in SNES9X but that emulator doesn't run the game really at all and I'm not much of an avid user of BSNES.
Title: Re: Super Mario Kart CPU Items
Post by: Drakon on March 15, 2014, 11:48:57 am
Sorry about that post.  It just bothers me when people who have no idea what's involved with rom hacking have very strong opinions about it.  You made it sound like such a simple thing to do.
Title: Re: Super Mario Kart CPU Items
Post by: JCE3000GT on March 15, 2014, 12:51:08 pm
That was unnecessarily rude Drakon.

As for the hack Joe, it might be that it's only built into the CPU AI and not the characters themselves.  If they are built into them then it may be possible but really difficult to do.  Regardless, it's probably a bitch.  I haven't tackled their AI really but a lot of the stuff in general is pretty funky.

If it's not that though, it may actually be a 'hidden' item sequence.

I'd take a whack in SNES9X but that emulator doesn't run the game really at all and I'm not much of an avid user of BSNES.

I did take a look myself only to see the rom not run in the snes9x debugger and my laptop doesn't run BSNES.  LOL  Oh well. 

I did do a little old fashioned poking around and it seems as the game doesn't natively have the ability to allow 1P or P2 to use a CPU item.  In other words the list of items when you touch a ? block doesn't include items beyond the ones you see as a player.  This will have it definitely be added via assembly unless you replace an existing item's effects, but doing his will give the other CPU players the same ability to use them as well.  This is also considering you don't care about what graphic is used in the item box because the CPU only items do not have their own item box graphics.

So to the original poster, no, it wouldn't be easy and would take some time and intermediate assembly knowledge to "add" those CPU items to the players list of items to get.  I suggest learning the basics in hex then begin learning assembly so you can take on this project.  Make it a goal for yourself.  :)
Title: Re: Super Mario Kart CPU Items
Post by: JoeresioRex on March 15, 2014, 01:16:32 pm
I don't know what he means by "very strong opinion"...it was more of just a question. Been searching online for months before I even decided to create an account on here because it wasn't even being remotely addressed anywhere online. Almost as if it had been given no thought at all so I thought I would come to a hacker's forum and present the idea. Is that not what you do in forums? Share info with a community, ask questions and share new discoveries?? Anyways...I've been playing with PAR codes for the longest and agree that it's more than likely built into the CPU rather than being hidden. I was thinking that it would more than likely have to be achieved through a patch if even possible at all. Also, on that note, like mentioned it probably would involve some playing with the properties of the items that are existing as well. I think I have some decent ideas but just don't have any hacking knowledge or experience...
Title: Re: Super Mario Kart CPU Items
Post by: Jeville on March 15, 2014, 01:24:22 pm
Mario and Luigi's Starman is technically a CPU item considering the kart speed isn't increased like a player-accessible Starman gives, so its icon should look different if added. The CPU Starman can still has use as an accessible higher-rank item; an acceptable alternative to the red shell.

A more attainable (?) goal: Item holding. CPU AI has a delayed effect of releasing items so it sort of has it. Useful to shield yourself from an incoming shell or intimidating an incoming racer with a banana peel or green shell, like we are able to in Mario Kart 64. Holding an item also lets you generate a new item, effectively having two items at once.
Title: Re: Super Mario Kart CPU Items
Post by: JoeresioRex on March 15, 2014, 01:48:23 pm
 I've actually never thought about how Mario and Luigi's star operates. I know it's pretty much the same effect without the speed attributes but since you could access that and bananas though PAR codes, I could see why they are overlooked. Something I wondered was is the game actually looking at it as "items" being used or just an event that is triggered due to proximity to the CPU drivers and not items at all. Weird either way because their items sit on the track just as ours do so I'm a little boggled by that idea as well.

March 15, 2014, 02:06:07 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Oh and to explain my theory on the "events triggered" rather than actual items being used...On rare occasion I've seen the CPU use the wrong item. For example, it was a 2p game. I was player 1 as Bowser and player 2 was Luigi. Based on the programming because player 2 was Luigi this means that Yoshi would leading CPU driver under normal circumstances. We didn't see the item actually being thrown but passed by a fireball on lap 3 of Donut Plains 1. I'm Bowser!!! How did this happen?? We checked to see who was in third and it was CPU Yoshi. We hadn't lapped anyone yet. Things like that make me think and wonder...
Title: Re: Super Mario Kart CPU Items
Post by: Mattrizzle on March 15, 2014, 02:47:47 pm
After a few hours messing with the bsnes Debugger, I've discovered this:
Subroutine $80:F17A is called when a placeable item is used. Prior to the jump the value from direct page address $B4 is stored in X, and one of the following values is stored in Y:

00: Banana Peel (placed on ground)
01: Green Shell (thrown)
02: Red Shell
03: Chomp (acts like a thrown Green Shell)
04: AI Items (placed on ground) *$
05: AI Items (thrown) *+
06: Banana Peel (thrown)
07: Green Shell (placed on ground)

* The specific item placed depends on the character value. Mario and Luigi don't have placeable items, so they default to the Princess and Toad's Poison Mushroom. The Poison Mushroom doesn't have the desired effect in Battle Mode--while it does shrink and slow down anyone who touches it, they cannot be squished and the effect lasts until the end of the battle.

$ Bowser's fireball doesn't seem to spawn at all with this value.

+ While this is the value used when computer players throw items in front of them, it normally seems to behave the same as 04 when used by a player (there's probably an additional timer variable, because CPU AI holds onto items as Jeville mentioned in a prior post) Bowser's fireball does appear with this value. Nevertheless, it will collide with Bowser shortly after being placed if he is sitting still, as the fireball spawns at the "bottom" of its clockwise radius (6 o'clock).

Here are the relevant cheat codes:
80E93500 + 80E937?? Banana Peel replaced with another placeable item (replace ?? with one of the values in the list above)
80EEF280 + 80EEF3F4 Allows AI Items to be thrown by a player (side effect: AI will no longer hold items before throwing them)

7E0D7C03 Player 1 always gets a Banana Peel from item boxes
7E0D7E03 Player 2 always gets a Banana Peel from item boxes
Title: Re: Super Mario Kart CPU Items
Post by: Gideon Zhi on March 15, 2014, 02:54:49 pm
03: Chomp (acts like a thrown Green Shell)

Neat. Is this ever actually used in the game?
Title: Re: Super Mario Kart CPU Items
Post by: justin3009 on March 15, 2014, 03:16:50 pm
I don't recall any kind of Chomp item in SMK at all
Title: Re: Super Mario Kart CPU Items
Post by: JoeresioRex on March 15, 2014, 03:18:06 pm
Dude are you kidding me??? Freaking AMAZING work! I am shocked but more so impressed!! Mario Kart Hacking God in my eyes. Thank you so much! Thanks to everyone who replied! Enjoyed your thoughts and opinions very much so. I should've joined the community LONG ago!
Title: Re: Super Mario Kart CPU Items
Post by: Mattrizzle on March 15, 2014, 03:23:54 pm
Neat. Is this ever actually used in the game?
Yes. They are obstacles specific to Match Race.
(http://mattrizzle.pac.am/board_stuff/smk-match_race_chomps.png)
Title: Re: Super Mario Kart CPU Items
Post by: justin3009 on March 15, 2014, 03:58:46 pm
I.. don't even recall those little buggers honestly, wow.  That's actually really interesting to see.
Title: Re: Super Mario Kart CPU Items
Post by: MathUser2929 on March 15, 2014, 05:54:15 pm
It's pretty damn cool that you got the AI items to work. I wanna try those cheat codes now.
Title: Re: Super Mario Kart CPU Items
Post by: JCE3000GT on March 16, 2014, 12:45:16 am
After a few hours messing with the bsnes Debugger, I've discovered this:
Subroutine $80:F17A is called when a placeable item is used. Prior to the jump the value from direct page address $B4 is stored in X, and one of the following values is stored in Y:

00: Banana Peel (placed on ground)
01: Green Shell (thrown)
02: Red Shell
03: Chomp (acts like a thrown Green Shell)
04: AI Items (placed on ground) *$
05: AI Items (thrown) *+
06: Banana Peel (thrown)
07: Green Shell (placed on ground)

* The specific item placed depends on the character value. Mario and Luigi don't have placeable items, so they default to the Princess and Toad's Poison Mushroom. The Poison Mushroom doesn't have the desired effect in Battle Mode--while it does shrink and slow down anyone who touches it, they cannot be squished and the effect lasts until the end of the battle.

$ Bowser's fireball doesn't seem to spawn at all with this value.

+ While this is the value used when computer players throw items in front of them, it normally seems to behave the same as 04 when used by a player (there's probably an additional timer variable, because CPU AI holds onto items as Jeville mentioned in a prior post) Bowser's fireball does appear with this value. Nevertheless, it will collide with Bowser shortly after being placed if he is sitting still, as the fireball spawns at the "bottom" of its clockwise radius (6 o'clock).

Here are the relevant cheat codes:
80E93500 + 80E937?? Banana Peel replaced with another placeable item (replace ?? with one of the values in the list above)
80EEF280 + 80EEF3F4 Allows AI Items to be thrown by a player (side effect: AI will no longer hold items before throwing them)

7E0D7C03 Player 1 always gets a Banana Peel from item boxes
7E0D7E03 Player 2 always gets a Banana Peel from item boxes

Awesome, BSNES to the rescue!  Wish my laptop ran it...  :(  Glad you could get it to work, I was blind and looking in the wrong place for it.  :D
Title: Re: Super Mario Kart CPU Items
Post by: matt! on March 17, 2014, 01:48:43 pm
After a few hours messing with the bsnes Debugger, I've discovered this:
Huge props for doing what some said couldn't be done! Great work.

March 18, 2014, 07:54:20 am - (Auto Merged - Double Posts are not allowed before 7 days.)
This has hit the news: http://www.nintendolife.com/news/2014/03/super_mario_kart_action_replay_code_discovered_which_grants_access_to_cpu_weapons
Title: Re: Super Mario Kart CPU Items
Post by: Dirtbag on March 18, 2014, 08:27:10 am
Great work Mattrizzle, and wonderful timing.  I was just in the process of tweaking my graphics/ colours for the shrinking mushroom.  This has saved me a lot of time in testing it against all themes.   
Title: Re: Super Mario Kart CPU Items
Post by: ChronoMoogle on March 18, 2014, 08:38:30 am
Amazing!! Now somebody really should make a Super Mario Kart Plus with those "new" items 8)
Title: Re: Super Mario Kart CPU Items
Post by: Mattrizzle on March 18, 2014, 10:30:18 am
I'm surprised that this simple thing has created so much buzz! Thanks to JoeresioRex (the OP) for giving me the idea.

Anyway, I'm not finished with this yet. A patch is in the works which makes these items attainable by normal means.  The hardest part left is figuring out how to prevent the fireball from hitting its user shortly after dropping it behind them, unless I only allow it to be thrown.
Title: Re: Super Mario Kart CPU Items
Post by: matt! on March 18, 2014, 01:00:33 pm
Wow. Super awesome!
Title: Re: Super Mario Kart CPU Items
Post by: B.B.Link on March 18, 2014, 05:40:03 pm
This is great now all we need to do is infinite jump like the AI and we'll be equal to them ;)

Also, Mario and Luigi throws poison mushrooms instead of being invincible? Weird.
Title: Re: Super Mario Kart CPU Items
Post by: matt! on May 06, 2014, 05:57:14 pm
Anyway, I'm not finished with this yet. A patch is in the works which makes these items attainable by normal means.  The hardest part left is figuring out how to prevent the fireball from hitting its user shortly after dropping it behind them, unless I only allow it to be thrown.
Did you ever get anywhere with this?
Title: Re: Super Mario Kart CPU Items
Post by: Mattrizzle on May 07, 2014, 07:56:08 am
I'm not at my home computer at the moment, so I can't post any new media.  However, I can say that everything is finished aside from figuring out how to make a dropped fireball not hit its user, making squashed shrunken players lose a balloon in Battle Mode, and the biggest thing: modifying the subroutines for item probabilities to allow the roulette to stop on the "new" items.

Edit: A video (https://www.youtube.com/watch?v=p9OA64tkd64).
Title: Re: Super Mario Kart CPU Items
Post by: matt! on May 31, 2014, 05:05:17 am
Superb work. Thanks for the update.
Title: Re: Super Mario Kart CPU Items
Post by: MathUser2929 on August 01, 2016, 06:48:03 am
Mattrizzle, you really need to finish that patch. It'd be awesome.
Title: Re: Super Mario Kart CPU Items
Post by: dACE on August 01, 2016, 09:17:18 am
Ah - necroposting. How very constructive of you...

/dACE
Title: Re: Super Mario Kart CPU Items
Post by: Candra Software on August 02, 2016, 09:38:40 pm
When I see a bump, I hope for news on the production, not someone wanting the hack to be finished. I just asked him in the video if there's an update to be shown.
Title: Re: Super Mario Kart CPU Items
Post by: MathUser2929 on August 03, 2016, 12:42:43 am
The best way to find out if a hack is dead is to ask. We just asked in different places.
Title: Re: Super Mario Kart CPU Items
Post by: Mattrizzle on August 03, 2016, 09:12:40 pm
Have I had time to work on the hack recently? Yes, but not quite as much time as I had two years ago.
Have I felt like working on it? No.
So the hack is dead, then? No, I never said that.  ;)
Title: Re: Super Mario Kart CPU Items
Post by: MathUser2929 on August 03, 2016, 09:20:05 pm
Well, thanks for the update anyway. Your thread got bumped in gamehacking.org which made me remember this hack.
Title: Re: Super Mario Kart CPU Items
Post by: Bahamut ZERO on August 04, 2016, 01:48:34 pm
Ah - necroposting. How very constructive of you...

/dACE

I'm kinda glad this thread got necroposted, as I didn't know it existed until yesterday. Pretty awesome stuff! Whenever the patch is eventually finished I'll have a reason to play the shit out of SMK again for the first time in like 16 years.  :thumbsup: