Welcome Guest [Log In] [Register]
Welcome to Yoshi Lighthouse. We hope you enjoy your visit.


You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Help with spikes
Topic Started: Apr 17 2017, 02:34:21 PM (87 Views)
LumaNeon
Hatchling
I'm trying to add spikes to some areas in stardust fields, but I can't figure out how to make them deal damage when you hop on them. Could anyone help?
Offline Profile Quote Post Goto Top
 
Posted Image Teawater
Who are you calling an old man?

Yes. This can be done via scripting.

Spikes are done via area scripts, and each of them seem to point to the script at 08246A6B. (See attached image ... but it doesn't help much unless you have at least some idea of how scripting works.)

(Don't forget the solidity map also needs to be checked, since there's a slightly raise ground for them as well. Probably so you have to jump.)

Some repointing could be a quick way to do it, but would likely take time.

Command 0x31 = Current HP/BP

Arg 1: (0 = Mario; 1 = Luigi; 2 = Both)
Arg 2: (0 = Current HP; 1 = Current BP)
Arg 3: (0 = Add; 1 = Subtract)
Arg 4: Value to Add/Subtact

^ Will likely use this twice. (Once for Mario, and once for Luigi. ... Maybe.... Well, whatever is needed to make it apply to just the brother being hit by the spikes. Is it possible for the brother in back to be hit? I don't think so?) ...

I think I'm going to need to try this out before giving more specific instructions, though..... (So Hex Editing knowledge required until then....)



How much damage would you like them to do? I'm thinking 1 HP?


Bytes to insert:

Subtract 1 to Mario's HP:
31 00 20 00 20

Subtract 1 to Luigi's HP:
31 04 20 00 20

Subtract 1 to both of their HP:
31 08 20 00 20

Mmkay.... So the specific instructions?

For Mario when he is in front:
At position 08246A8D, put in 00 00 F0 08
At position 08F00000, put in 31 00 20 00 20 02 00 9B DF 21 08

For Luigi when he is in front:
At position 08246AED, put in 10 00 F0 08
At position 08F00010, put in 31 04 20 00 20 02 00 9B DF 21 08

OR

For both Mario and Luigi to take damage regardless of who is in front: (Could also do this with editing the ones above, but anyway.)
At position 08246A77, put in 00 00 F0 08
At position 08F00000, put in 31 08 20 00 20 02 00 82 4B 24 08
(Not tested)


Hopefully that works?? (Address positions based on VBA's memory viewer, if edited in a hex editor, just removed the 08 prefix.)
Attached to this post:
Attachments: spikesscript.png (22.05 KB)
Edited by Teawater, Apr 19 2017, 02:27:53 AM.
If you ever find an error in any of my reference materials, PLEASE let me know.
Posted ImagePosted ImagePosted ImagePosted ImagePosted ImagePosted Image

Don't mind me, I'm nothing but a spoiler.
Offline Profile Quote Post Goto Top
 
LumaNeon
Hatchling
How would I go about doing this? I have no clue how area scripting works.
Where did my tileset go?
Offline Profile Quote Post Goto Top
 
Posted Image Teawater
Who are you calling an old man?

Well... I basically already gave out what to edit and what to put there... so I am assuming you do not know how to use a hex editor?

I would say to go into VisualBoyAdvance > Memory viewer ... search for the address and insert them in (of whatever it is you want).... if they work , then you'd go to address 0x08000000, and making sure that's what's selected (Start of the ROM section).... hit the Save button, and save 0x1000000 to get a dmp file that you can rename to .gba. (Or alternately, use a hex editor, but you must remove the 08 prefixes from the address... So 08246A8D becomes 00246A8D.)

Or, if you really can't be bothered with hex editors... then here is a patch alternative that does the same changes:
This one applies to both Bros. ... So regardless of who is in front, if he jumps on the spikes, both Bros. lose one HP. (To be consistent with the animation.)
(See attachment)

(You can name your ROM the same thing (e.g. spikeskill.gba .. or rename IPS to your ROM's name.) to test before applying.... if you are using VBA's auto-patching feature.)

Not that they actually kill, though... since you can only die in battle, I think? (Unless some things are changed.)
Attached to this post:
Attachments: spikeskill.ips (32 Bytes)
Edited by Teawater, May 12 2017, 05:39:45 PM.
If you ever find an error in any of my reference materials, PLEASE let me know.
Posted ImagePosted ImagePosted ImagePosted ImagePosted ImagePosted Image

Don't mind me, I'm nothing but a spoiler.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Superstar Saga · Next Topic »
Add Reply

↓ It's not the truth (or is it?) Come back tomorrow to find out! (Joke.) ↓