News:

Don't forget to visit the main site! There's lots of helpful docs, patches, and more!

Main Menu

[SM] Starting with Items.

Started by KT JDDD, November 04, 2010, 05:07:13 AM

Previous topic - Next topic

KT JDDD

This is for a hack I'm planning to release prior to the start of 2011.

I would like to know if it's possible to make Samus start with certain items.  For this particular hack, only 3 items will actually need to be collected during the game.  But I'm placing them all together.  My first real beta will be complete if I can figure this out.

I want Samus to start with these items.

Morph Ball
Morph Ball Bomb (optional)

Charge Beam
Ice Beam
Wave Beam
Spazer Beam (optional)

Varia Suit

(optional)=If I don't get these to come at the start, I don't care.  The rest I will need.  It's either that, or a hack where the first 30 seconds are pure picking up items.  I'm just trying to save people some real time.

Thank you in advanced.

Scyzer

You simply have to have asm run once when loading a new game which adds those item bits to your equipped AND collected items/beams

09A2 - equipped items
09A4 - collected items
09A6 - equipped beams
09A8 - collected beams

eg. if you want to give samus morph and bombs, you simply add the 2 values for the specific item bits (morph is 0004, bombs is 1000) to get 1004, then you would set that value to your current and collected items.

LDA $09A4
BNE $0F
ORA #$1004
STA $09A4
LDA $09A2
ORA #$1004
STA $09A2
RTS

this ASM would give you and equip morph and bombs, but ONLY if you had not collected any other upgrades yet, not including beams or missiles/supers/pbs. This way, the ASM would only run once, as any extra runs read you have already collected an item and do nothing

JAM

#2
Or you can just modify original game code that gives you empty inventory.

Go to 00B2FD and replace 9C A2 09 with 20 20 EF (JSR to $EF20).
If you'll notice there are the code that nullifies a lot of stuff.

Then go to 00EF20 and write this:
A9 05 10
8D A4 09
8D A2 09 [add this line if you want to equip Varia, Morph Ball and Bomb from the start]
A9 07 10
8D A8 09
8D A6 09 [add this line if you want to equip beams from the start]
60

KT JDDD

Quote from: JAM on November 05, 2010, 08:38:25 PM
Or you can just modify original game code that gives you empty inventory.

Go to 00B2FD and replace 9C A2 09 with 20 20 EF (JSR to $EF20).
If you'll notice there are the code that nullifies a lot of stuff.

Then go to 00EF20 and write this:
A9 05 10
8D A4 09
8D A2 09 [add this line if you want to equip Varia, Morph Ball and Bomb from the start]
A9 07 10
8D A8 09
8D A6 09 [add this line if you want to equip beams from the start]
60

Jam, You're a genius.  The only way to improve this now, since minds change, is if I can let them start with only charge, wave, and ice beams.  But if you can't, I have a backup plan.

Scyzer

A9 05 10 =  LDA #$1005
1005 = 1000 + 0004 + 0001
1005 = Bombs + Morph + Varia

A9 07 10 = LDA #$1007
1007 = 1000 + 0004 + 0002 + 0001
1007 = Charge + Spazer + Ice + Wave

Prime Hunter

I know this is over a year old now, but I have a related question.

I noticed in SMILE you can change Samus' starting Energy, Super Missiles, and Power Bombs without using these hex changes, but I haven't figured out a way to modify the starting Missile count. Does anyone know how I'd go about doing that? Is it possible through those hex changes and I simply haven't found the correct numbers yet?

For example, you start out in Return of Samus with 30 missiles, and I want to be able to do something similar for what I have in mind.

P.JBoy

The problem is, new SRAM is written before the intro clip, but the demo where Samus is shooting Mother Brain equips missiles for that scene, and then dequips them when the scene is finished, so you'll have to either make a routine that runs after that demo to equip missiles or find where it disables missiles and NOP it

Prime Hunter

Dang, I had a feeling it was tied to that intro movie. Thanks for the confirmation in any case.

JAM

Actually, I already did it in my patch. With support of reserve energy in this version. You can set required amount of missiles while editing ASM file.
Start with items v2
And since there are no ammo at Ceres, Samus' ship will not restore ammo and reserve energy when landing on Zebes after Ceres. So, I've fixed this too.

Prime Hunter

Wow, how did I miss this patch before now? Maybe because I hadn't figured out to how to properly apply ASM before now?

JAM, you have once again given me exactly what I was looking for! Thank you so much!

JAM

It can be my fault. I should add details to the short description. Anyway, if someone interested why you can't set missile amount and get it after intro, I'll explain. P.JBoy is right, it's because intro.

First of all, the game sets amount of energy, ammo and items. Then, during intro Missile amount is changed to 900 ($384). Then Samus fires 4 times (896 Missiles is left) and during Mother Brain explosion sequence, Missile amount is nullified.