Enemy Speed - SOLVED

Share and discuss all facets of DKC ROM hacking...

Enemy Speed - SOLVED

Postby Cyclone » November 29th, 2020, 9:55 am

edit. Never mind I got it figured out with trial and error.
I will post my code tomorrow. Getting late now.

Hi,
I would like to change the speed of the first Gnawty in Jungle Hijinxs.

Here are the first(?) object bytes found at 35BA77
00 82 81 B9 E9 13 00 02 25 0F 00 02 00 80

Total of 14 bytes for each object.

I'm not sure which object this is.

My question is which byte is the byte that sets the speed. And how do I know which object a set of 14 bytes refers to.

Thanks.
Expedition Leader
Bananas received 559
Posts: 1257
Joined: 2008

Re: Enemy Speed - SOLVED

Postby Mattrizzle » December 2nd, 2020, 3:58 am

The object block at 35BA77 can broken down into the following pieces:
00 82 81 B9: 00 82 is a control code which tells the CPU to read from the object block located at 16-bit address following it, which in this case is $B981. Applying the bank byte to this 16-bit address yields 35B981. Several of the Gnawty subtypes share this address.
E9 13 00 02: This sets the object's index in the RAM table starting at $13E9 to the value $0200.
25 0F 00 02: This sets the object's index in the RAM table starting at $0F25 to the value $0200.
00 80: 00 80 is a control code which tells the CPU it has reached the end of the object block.

I could have sworn I had posted info on the object format somewhere in these forums. I will post an update with additional info later.
Veteran Venturer
Bananas received 222
Posts: 559
Joined: 2008

Re: Enemy Speed - SOLVED

Postby Cyclone » December 2nd, 2020, 5:53 pm

Thanks Mattrizzle. I found info on the forums that you posted. Thanks to that!
Here is my logic/info on how to change the speed of an object and change its function also.

The first Gnawty in the Hijinxs object map is at 3D962A XX XX. The value for the Gnawty is 13 B4 (the bytes are reversed and are pointers).

This first Gnawty used in Jungle Hijinxs. Its value is B413, which points to the
address 0x35B413. The next byte is 82 which is followed by 7D B3 the location of the object funtions.

35B37D 0DXX - Gnawty object funtions. Change xx(4D) to 1F to make a Gnawty to act like a tire.

To change speed go to offset 35b419. Look for the 25 0F bytes.

25 0F XX XX - change to BB F7 to make the first Gnawty move fast.



I am making an object editor. Any advice on which attributes to edit? below is a list that I have come up with so far.
- X Y position
- X Y Hit Box
- Speed
- Acceleration
- Object function
- Palette
- Animation
- Sound it makes when hit
-how many hits it takes to kill a baddy
-any others?
Expedition Leader
Bananas received 559
Posts: 1257
Joined: 2008

Re: Enemy Speed - SOLVED

Postby rainbowsprinklez » December 7th, 2020, 8:09 pm

Mattrizzle wrote:I could have sworn I had posted info on the object format somewhere in these forums. I will post an update with additional info later.


You did. I have it saved on my hard drive somewhere, along with a few others.
Veteran Venturer
Bananas received 110
Posts: 604
Joined: 2016

Re: Enemy Speed - SOLVED

Postby rainbowsprinklez » December 7th, 2020, 8:22 pm

Cyclone wrote:-how many hits it takes to kill a baddy
-any others?


At address $109D is an array.
7E:109D 30 bytes Objects Knockback flag Bit 0 is knockback from stomp, bit 1 is knockback from roll RainbowSprinklez
Each index (16 bits an index) represents one object. In Kremling's Revenge, you'll notice sometimes you back boost off of Slippas. This is because Slippa's don't clear this flag on load, so the attribute was carried over from a previous baddie. I found this out while making my pacifist hack https://www.romhacking.net/hacks/5336/
Veteran Venturer
Bananas received 110
Posts: 604
Joined: 2016


Return to ROM Hacking

Who is online

Users browsing this forum: No registered users and 9 guests