News:

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

Main Menu

[SM] Gravity and Varia Suit damage resistance?

Started by Draconis Kenjishiya, February 16, 2011, 01:59:45 PM

Previous topic - Next topic

Draconis Kenjishiya

My hack has you getting the Gravity Suit before the Varia Suit. As a result, I want the Gravity Suit to reduce damage Samus takes by half, and the Varia by 3/4, instead of the default. I already found how to make the Gravity Suit not protect you against heated rooms in the hex section, but the way I see it, if the Gravity Suit still reduces all damage Samus takes from enemies by 3/4, for half my hack enemies will rape you, and the other, they'll be normal to weak, instead of varied.

Hm.

Thanks for helping, and forgive me idiocy if it's right. effing. there. I did check the hex and docs section rather extensively.

Black Falcon

At 102464 change 20 00 D0 08 4A 90 02 to 01 00 D0 08 4C E0 F7
And at 1077E0 write 89 20 00 D0 03 4C 6D A4 4C 6B A4

What this code does: makes Varia devide suit damage by 4 and Gravity devide suit damage by 2.
Varia has priority over Gravity, so wearing Varia always devides suit damage by 4 (ie reduces it by 3/4),
no matter if Gravity is equipped or not.
In short: this completely swaps the suits' behaviour towards suit damages.
If there are any errors, lemme know.

Crashtour99

There is also this:
Quote from: Crashtour99 on September 14, 2010, 01:02:51 PM
Something I found while bug chasing that may/maynot come in handy for someone...
$90/E9DC      89 20 00    BIT #$0020
Near as I can tell, this bit identifies the Gravity suit for the damage divisor.  By changing this bit to something else, Gravity suit no longer has any damage protection value against spikes, enemies, etc. and that is instead transferred to whatever you set the bit to.  Could be useful for an armor only upgrade or something.
If there's another instance of this, but for Varia instead, it might just be easier to do a little hex tweaking.   :wink:

Draconis Kenjishiya

Thank you so much, it worked perfectly. :^_^:

Thread no longer serves a purpose

Zhs2

Sure it does! It can remain here for the next clueless person :D

Draconis Kenjishiya

Well, it was more of a "this thread could be closed, I s'pose" more than a "this thread should be blasted off into the sun" lol

JAM

#6
Quote from: Draconis Kenjishiya on February 16, 2011, 11:02:30 PM
Thread no longer serves a purpose

Quote from: Zhs2 on February 16, 2011, 11:30:46 PM
Sure it does!

Because of this:
Quote from: Crashtour99 on February 16, 2011, 06:41:49 PM
There is also this:
Quote from: Crashtour99 on September 14, 2010, 01:02:51 PM
Something I found while bug chasing that may/maynot come in handy for someone...
$90/E9DC      89 20 00    BIT #$0020
Near as I can tell, this bit identifies the Gravity suit for the damage divisor.  By changing this bit to something else, Gravity suit no longer has any damage protection value against spikes, enemies, etc. and that is instead transferred to whatever you set the bit to.  Could be useful for an armor only upgrade or something.
If there's another instance of this, but for Varia instead, it might just be easier to do a little hex tweaking.   :wink:
There are subroutine that alters misc damage, such as projectile damage, spike damage, heat and liquid damage etc. Try to get hit by spike and you'll see that Gravity is still gives twice more protection than Varia. To fix it, change 20 to 01 at 869DD
and 01 to 20 at 869E2.

It's very valuable info for me and I used it in my hacks to increase damage of all projectiles at once (instead of increasing damage of each one)

And at address 102464 there are subroutine that reduces damage only when having direct contact with enemies. Also very valuable to me





Quote from: Black Falcon on February 16, 2011, 04:07:55 PM
At 102464 change 20 00 D0 08 4A 90 02 to 01 00 D0 08 4C E0 F7
And at 1077E0 write 89 20 00 D0 03 4C 6D A4 4C 6B A4

What this code does: makes Varia devide suit damage by 4 and Gravity devide suit damage by 2.
Varia has priority over Gravity, so wearing Varia always devides suit damage by 4 (ie reduces it by 3/4),
no matter if Gravity is equipped or not.
In short: this completely swaps the suits' behaviour towards suit damages.
If there are any errors, lemme know.
It can also be done without using free space. I've just tested it.

Go to 102463 and change
89 20 00 D0 08 4A 90
to
4A B0 0A 89 10 00 F0

At 10246A should be 02 as in original ROM. Code at 1077E0 is no longer need. It's better to use the rest of bank $A0 to adding new enemies (except for the last $2D bytes which can't be used for this)

[spoiler=ASM info]
It might be a bit confusing, but operators like [4A] [90 XX] are working the same way as [89 01 00] [D0 XX], it's just shorter. But of course, in first case A will be shifted to the right and it willn't in second. Combinations like [4A] [90 XX] or [4A] [B0 XX] are used several times in Super Metroid to check is Varia equipped or not (and thus, it's harder to find).

Looks like, shifting A to the right alters the Carry flag.
If the there was 0 in the lowest bit, Carry is clear.
If the there was 1 in the lowest bit, Carry is set.

And because A was shifted to the right, next check is for $0010, not for $0020
[/spoiler]

begrimed

You'll need to swap the palette priority too so gravity isn't keeping varia's colors from displaying when it's collected later.

Draconis Kenjishiya

Oh, damn. Okay, thanks guys. *writes stuff down*


begrimed

Wish I knew. It was done for the Temporus hack I made some time back, but wasn't 'complete' as the suit would switch back when entering heated rooms. And I was a 'tard and didn't save the values I edited to make that happen either, but there're people here who could probably find a better way of going about it.

Draconis Kenjishiya

Well it's not the most important thing at all and isn't necessary to get my hack under full-scale production, so I'll make a test file and mess around with some palette values and such.

begrimed

For a second I thought you meant not important enough to bother with, which I was gonna smack you for. But yeah, it's one of those things that doesn't immediately have to be done, but needs to eventually. I'd like to ask any experienced ASMers reading this to look into that so it can also be applied to future hacks that give gravity suit first in addition to yours.

Draconis Kenjishiya

Quote from: Grime on February 25, 2011, 11:06:47 PM
For a second I thought you meant not important enough to bother with, which I was gonna smack you for. But yeah, it's one of those things that doesn't immediately have to be done, but needs to eventually. I'd like to ask any experienced ASMers reading this to look into that so it can also be applied to future hacks that give gravity suit first in addition to yours.

What? No, no, my hack is aesthetics and level design before all else; trust me, palette precision is very necessary, but not until I'm ready to release the completed project, is all I was saying. Ahem. Yeah, knowing that would be useful. I've no experience with ASM, but hell, if there's ever a time to learn *shrugs and trudges off to learn stuff*

JAM

Quote from: Grime on February 25, 2011, 11:06:47 PM
I'd like to ask any experienced ASMers reading this to look into that so it can also be applied to future hacks that give gravity suit first in addition to yours.
I've found it. Not so hard if know where to search. All I need is to search for checking for testing against 0020 and 0001 in the same place in certain banks. $91 in genetal case, $90 for charging, $8D for glows.

I've got a lot of tweaks, about 20 of them. So, it's better to make a patch later. But, I'll post what to change here right now.


General case
$08DE6E
$08DEC4
$08DEF0
Change 20 to 01

$08DE71
$08DEC7
$08DEF3
Change 15 to 0D

$08DE73
$08DEC9
$08DEF5
Change 01 to 20

$08DE76
$08DECC
$08DEF8
Change 08 to 10



While charging
$086CBA
Change 20 to 01

$086CBD
Change 10 to 09

$086CBF
Change 01 to 20

$086CC2
Change 04 to 0B



Glow in heated rooms
$06E3C2
$06E444
Change 20 to 01

$06E3C7
Change E0 E3 to 00 E4

$06E3D1
Change 00 E4 to E0 E3

$06E3CC
$06E44E
Change 01 to 20

$06E449
Change B6 E8 to 8A E6

$06E453
Change 8A E6 to B6 E8




There is still might be things to do, like palette changing when loading a game. Need to check it.

P.S. Ask more questions to motivate more hackers to search how to do certain things. It helps.

Zknight7126

What about lava resistance? Shouldn't you make it so you need both suits, or are you using the lava resistance to your advantage?

begrimed

ZKnight has a good point. Making gravity suit not immune to heated rooms can be done with a single byte edit. What about making it so varia suit protects against lava instead, or as he said, both suits?

Although protection against lava sounds like it would work best as its own item.

Quietus

Essentially, the Gravity Suit acquisition needs to provide you with normal movement in all environments, but nothing temperature related, and the Varia Suit needs to provide every protection from temperature variation (see what I did there?), but nothing raleted to movement.  This way, they can be acquired in any order in any hack, and the desired effect will be accurate.

Zknight7126

Quote from: Quietus on March 04, 2011, 10:34:57 AM
Essentially, the Gravity Suit acquisition needs to provide you with normal movement in all environments, but nothing temperature related, and the Varia Suit needs to provide every protection from temperature variation (see what I did there?), but nothing raleted to movement.  This way, they can be acquired in any order in any hack, and the desired effect will be accurate.

If someone could make a patch for that, that would be REALLY helpful for future hacks.

uzqap

#19
i tested the Suit Palette Priority Change
works well
then suddenly side effect

after applying those 24 hex tweaks Samus isn't able to perform space jumps in any liquid
if both suits are equipped



and now something (not) totally unrelated
sure everybody knows that the Varia suit (and only Varia) changes the gfx in the equipment screen
but both suits change the in game sprites for samus "facing forward"


Added the .ips
dont forget all glory to JAM



Draconis Kenjishiya

Originally I was going to have the Gravity Suit grant you free movement in lava and the Varia Suit grants you protection from it, but for future hacks I'll look into a new item that gives you immunity to lava. This current hack is far from Norfair-centric. *ahem* I am going to go try the palette .ips now. You guys are awesome.

JAM

Quote from: uzqap on March 07, 2011, 12:08:48 PM
i tested the Suit Palette Priority Change
works well
then suddenly side effect

after applying those 24 hex tweaks Samus isn't able to perform space jumps in any liquid
if both suits are equipped
Will look into. I guess, only 4 tweaks are causing that, not all 24

uzqap

Probably some of the routines from the space jump crossing those changes, because it has to check if gravity is equipped when underwater. Rewriting these routines to make a bit compare with $7E:09A2 could make it work again, but i don't know where to search nor if my guess is right.