Users browsing this thread: 3 Guest(s)
Changing physical damage calculations?

#10
Posts: 290
Threads: 3
Thanks Received: 40
Thanks Given: 1
Joined: Apr 2012
Reputation: 9
Status
None
Quote:The idea is grand: I custom-made a new earth-elemental spell, called Megathrust. I could have the weapon in question cast Magnitude8 75% of the time the effect is activated, and 25% of the time, the stronger Megathrust. All I would have to do is replace the spells in the code?

That's right, just replace the spell IDs as desired.

Quote:There is a large block of unused space starting at 6469 (6669 for me, since I'm using a headered ROM), and I believe its the only amount of space in C2 bank that would be sufficient for the above code.

There are three blocks of free space in C2, any of which would be sufficient for this sort of thing. C2/6469 is the earliest; the other two are at C2/A65A and C2/FAA4.

Those addresses are for unheadered ROMs, so adjust as necessary.

Quote:I believe I've figured out how to re-adjust pointers (if I started the new code at C2:6669, then the Soul Sabre effect's new pointer should be 69 64, replacing 6E 3F, correct?).

That's right.

There are two things you could do here. You can adjust the pointer directly, or leave it as it is and overwrite the existing Soul Sabre code, jumping to C2/6469 when you run out of space. One method isn't any more efficient than the other, but you do save roughly 13 bytes of free space. Not a big deal in the long run.

Quote:I think I'm a lot greener at this than I thought, so I guess the big question I have must seem ridiculously basic: what should the two "??" bytes you listed be?

The operands for the various branch instructions are relative to the current location rather than absolute (like JMP/JSR/JSL). Branching will pass over a certain number of bytes instead of going directly to an address; those bytes being bypassed are what the ?? above represent. The assembler should fill in those values itself.

These single-byte operands are also why you can only branch 127 bytes forward or 128 bytes backward.


GET A SILK BAG FROM THE GRAVEYARD DUCK TO LIVE LONGER.

Brave New World
  Find
Quote  



Messages In This Thread
RE: Changing physical damage calculations? - by Synchysi - 04-21-2012, 09:51 AM

Forum Jump:

Users browsing this thread: 3 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite