News:

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

Main Menu

[SM] Enemy sharing DNA issues

Started by FullOfFail, September 15, 2013, 04:10:56 AM

Previous topic - Next topic

FullOfFail

So, uh, I didn't really want to start a new topic for this, but maybe it'll come into use for others. I've been going back and trying to balance my hack, in terms of enemy damage/HP, but since some share DNA, it's becoming more difficult than anticipated. Is there a guide on which enemies share properties, or an easy way to fix this?
I have alot of unused enemies, so I could have them steal their properties, if need-be. Just not sure how to do it.

Crashtour99

Basically the enemy DNA (those 4 or so tabs in the upper right side of the enemy editor) is all data located in the enemy header in $A0.  The enemy ID (selected from the list on the left) is the location in $A0 of the enemy header.  Each header is $40 bytes (hex).  All enemies with the same ID will share the same DNA (header), so will also share things like damage values, health, etc.   The values like Speed2, orientation, etc. are located elsewhere (room population I think) so those aren't shared between enemies of the same type.

The easiest way to have the same enemy with different health and such is to clone it by simply copying the header of the enemy to be cloned and put it in freespace in $A0, and make a new entry (.gif and .txt file if needed) in the enemy list.   If you'd like you can also go to the bank the enemy AI is located in and hex in a new palette and point the palette pointer to that to differentiate it from the original enemy.


FullOfFail

Thanks guys. I suspected it was going to come down to cloning enemies, but was just checking if there was a easier method to steal things from other enemies. Gonna make a back-up and try Grime's guide now, could end up having a much better result than I was even going for.