Obviously I wouldn't use it near another branch. If I'm REPLACING a branch then it's definitely only a matter of style.
Speaking of stylish branch replacing:
Code:
//////////////////////////////
Kill Enemies in One Hit:
8102839C 1400
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Oh yeah, I went there. Version 1.0 (as per the thread) of course, though 1.2's branch might be around there somewhere.
Also:
Code:
+0x0AF Byte of health
Unsigned
+0x0B4 Word of rotation
Only lower 16 bits are used

...
D:
I can't for the life of me figure out how the game knows whether an actor is supposed to be allowed to take damage. Putting data from the Stalkid struct into Ingo's usually just freezes the game. :/
+0x144 doesn't seem to be a ROM address either; it's used to get pointers from RAM using very weird math.
Major Edit:Code:
+0x130 Pointer to damage routine to use
Code:
//////////////////////////////
;In pot room as Young Link
;Gold Skulltula is at 0x801E4EA0
;Gold Skulltula's damage routine begins at
;0x801EE204
;Guard's damage routine pointer is at
;0x801E3470 and points to 0x801E2F78
;Swapping makes the game freeze D:
800240CC
LW T9, $0130 (S0) ;
OR A0, S0, R0 ;Puts target base pointer into arg 0
OR A1, S1, R0 ;Puts S1 into arg 1
800240D8
JALR RA, T9 ;For Gold Skulltula, calls
;-------------------------------;routine containing 0x801EE224
801EC1C8
ADDIU V1, R0, $0001 ;Sets V1 to true
;-------------------------------;Nested within some branches
;-------------------------------;Shortly before check at 0x801EC1F4
801EC1F4
BEQL V1, R0, 0x801EC330
;-------------------------------;Instruction always executed
;-------------------------------;Last branch before damage routine call
;-------------------------------;NOP'ing makes enemies die over and over :P
801EC21C
JAL 0x80028390
;-------------------------------;Calls damage sub, which returns
;-------------------------------;target's health in V0
801EE224
JAL 0x801EC16C
;-------------------------------;Calls routine to check if target was hit
;Location independent
JAL 0x80025B4C
;-------------------------------;Called when a target is killed
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Kill NPCs code is pretty much out the window. :/
Also, who the FUCK uses a tab width of 4? The [code
.] tag should let you specify tab width. I and everyone else use EIGHT, not this lousy 4.
God, the code looks hideous now (even after doubling the tabs).
Pretty major edit:Of COURSE you knew I wasn't done fucking with this stuff.
Code:
;Test of making guard routine
;jump to check if hit routine of skulltula
;instead of his own sub
;801E2FB4: 0C07B05B
;801E2FB8: 8FA50024
;801E2FC4: 8E221C44
;Results:
;Doesn't let you hit guard
;"Attacking" guard by skipping branches
;that exit routine that checks if guard was
;hit will "hit" him, make him flash red,
;play the dying skulltula animation,
;make him jiggle in place quickly and
;indefinitely
(5:36:38 PM) Hector of Chad: Ha
(5:36:44 PM) Hector of Chad: I just "Killed" an NPC in Ocarina of Time
(5:36:48 PM) Mike: lulul
(5:37:02 PM) Hector of Chad: I replaced one of the subroutines of this guard with a damage check routine of an enemy nearby
(5:37:08 PM) Hector of Chad: and it wouldn't let me hit him
(5:37:17 PM) Hector of Chad: so I debugged the routine
(5:37:22 PM) Hector of Chad: and forced it to count as me hitting him
(5:37:27 PM) Hector of Chad: and he flashed red
(5:37:38 PM) Hector of Chad: and it played the noise it would have played if I had killed the actual enemy
(5:37:44 PM) Mike: lul
(5:37:47 PM) Hector of Chad: and now the guard is jiggling really fast like he's in serious pain
(5:37:53 PM) Hector of Chad: but otherwise he's functioning normally