Users browsing this thread: 1 Guest(s)
Changing and Replacing Combat Functions via Special Effects

#6
Posts: 149
Threads: 21
Thanks Received: 40
Thanks Given: 3
Joined: Dec 2013
Reputation: 9
Status
Auto-life
Quote:I'm working on some new formulas and when I look at the original game formulas, it seems to store values in a low range of addresses.  I'm looking to use 2-3 byte calculations for changing and replacing damage functions.  Is there any range in particular I would need to store this extra data?  There are at least two spots where damage is stored, for example -- $F0 and $11B0.  I'm guessing the low address values are due to development planning rather than system mechanics---anyone know about that?

$11B0 (low) and $11B1 (high) are the two-byte damage value. $F0 generally is used as a temporary buffer or variable to calculate damage. For special effects, to setup $11B0 AND $11B1 are the correct way to setup a custom formula damage.

Quote:Special effects are called in a lot of different places--it looks like there's two tables and only one of them works for my spell sfx.  Has anyone found any surprising problems with editing special effects in general?  They're called in reflect and launcher too, IIRC.

Some special effects have hard coded features and are manually setup in code instead of a weapon or spell data. Examples are sketch, control, steal, etc. If they are modified, whatever code that setups them must be nullified as well to avoid undesired surprises.

Quote:It seems like the combat --> damage --> result function never ends.  Any caveats and wisdom would be much appreciated before I wreck my hack for good.  I'm surprised at how little it seems the modify damage routine is referenced, but I'm worried there are so many references upstream I'm not seeing, that changing damage is too risky when added via special effects into $11B0 and $F0.

The special effects that changes damage only overwrites the calculated default damage setup in $11B0 and $11B1. If the special effects don't change damage, the default damage is left as it was calculated.

Quote:I should also mention that in this code, Y seems to be the attacker and X the target, but it seems extremely difficult to track the source of what's in the X or Y registers.

I believe X or Y are the fighters index. 0, 2, 4 and 6 are the party side and above it are the opposition (monsters). As example, $3BF4,0 should be the actual hp of the first party member. $3BF4,2 should be the actual hp of the second party member, etc. The data stored in similar two bytes structures are always two bytes to accommodate all fighter indexes, party and opposition alike.

About the wrong text display in the posts, probably you used tabs instead of white space characters. The tab characters will try to setup the column text in a different position in the forum instead of the position of your text editor. You can try to check if your text editor has the option to automatically convert tab spaces in white spaces.
  Find
Quote  
[-] The following 2 users say Thank You to HatZen08 for this post:
  • madsiur (07-30-2018), ReturnerScum (07-30-2018)



Messages In This Thread
RE: Changing and Replacing Combat Functions via Special Effects - by HatZen08 - 07-30-2018, 04:05 AM

Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite