Lin
|
 |
« on: October 30, 2010, 09:41:30 AM » |
|
Well, I decided to take a brief 10 minutes and document the RAM that enemies take up, which is about 0x40 bytes at Dx80. Here's what I got:
Dx80 - In use byte Dx81 - Main ID Dx82 - Sub ID Dx84 - Enemy stage (For example, 09 in a stalfos is walk, 0A is prepare jump, 0B is jumping) Dx86 - Movement timer (How long to walk in a direction unless hits a collision) Dx89 - Movement direction. 00 = up, 08 - right, 10 = down, 18 = left Dx8B - Y Dx8D - X Dx9A - Not sure, but if < 80, enemy disappears Dx9B - Palette echo Dx9C - Palette DxA1 - Sprite index (current step) DxA2 - Lower byte of data DxA3 - Upper byte of data DxA4 - If bit 7 is set, the enemy is vulnerable DxA6 - Collision height radius DxA7 - Collision width radius DxA8 - Damage that gets dealt (FF - [value]) DxA9 - Health - A level 1 sword deals 2 damage DxAE - Frozen timer (boomerang hit)
Okay, so I just threw something at you that you probably have no idea about. What can we do with this? Why should you care? Because ZOSE is nearing its release, and the scripting engine can memory edit. Unless the spawning is changed, the enemies will end up placed in the same positions in RAM. Bosses take up this same space. Get where I'm going at? No? Well here's what. We can take ZOSE and using it alone, place 5 normal blue stalfos in a room and even control their movement patterns. Once you've killed 4, or all 5 and another one spawns, we can make the last one turn red. It will deal twice as much damage and require 5 times as many hits. Sounding familiar any LTTP fans? We could make it so you can't hurt it until you step on a trigger that freezes it for 3 seconds and you have that long to hit it. All this can be done with the power of ZOSE once I add a new opcode that will allow conditional jumps.
So how would we do all this? Simple. We'd take use of the spawnenemy command to firstly place the enemies, and once we killed em all by using the checkenemycount command, we spawn another one. If we want a trigger check, no problem, just use the checkmemorybit command. The enemy will be placed at D080 since it is the final one, so we know what to place in for x. Then, we can use the setmemory to set its health and how much damage it deals, only once. If we want the trigger to freeze the enemy, we set the boomerang freeze delay. With these kinds of things we can do stuff like make the monster auto heal, maybe steal Link's health, all that stuff, and simply with the power of ZOSE and a little imagination.
~Lin
|