I'm not really thinking of adding in the more advanced targetting of Final Fantasy 2.
It seems like more trouble than it's worth at the moment.
I'd like to stick to having just 2 new targeting values; one for enemies only, and one for allies only.
Otherwise, you'd obsolete several spells.
Spells still use a targeting byte, no?
IV- Targetting Byte ;
The Targetting byte simply denotes the Targetting system of the magic
01 = All Enemies
02 = One Enemy
04 = Spell Caster
08 = Whole Party
10 = One Party Member
Wouldn't it be simpler just to use the existing bits?
For example, if I set the 01 and 02 bits, then I can just check for 03.
I'm pretty sure the existing code doesn't handle that bit combination.
Then it's just a matter of allowing the player to switch targetting by pressing a button.
For the sake of simplicity, pressing select might be a good option.
But if there's room for it, left/right on the enemy/party is more consistent with the other games in the series.
I agree about the spell potency.
Multiplication is easier.
I think that the factor to use when multiplying the potency should be based on the number of remaining targets.
For example, for a 'Variable Enemy' targeting byte (03), the multiplier would equal the maximum party size minus the remaining number of enemies plus 1.
So let's assume the enemy party uses the '9 small enemies' formation.
Let's say there are 5 enemies on the field left alive.
The spell potency for a variable enemy target spell that is set to target the whole enemy party, in this case, would be 9 - 5 + 1 = 5x.
If all the enemies are alive the multiplier would be 1x (9-9+1).
If one enemy is left, the multiplier would be 9x (9-8+1).
There is one issue, though, maximum spell potency would vary depending on the size of the enemy formation.
The '2 large, 6 small' formation would have a maximum spell potency of x8.
It would be x1 for the major boss battles.
So instead of calculating things based on the actual formation size, we just always assume it's 8 and make sure to have an underflow check for the '9 small' formation.
That way the minimum multiplier is always 1x and the maximum is always 8x.
For 'Variable Party' targeting, we have 2 options:
Have an entirely separate subroutine that does the same thing and as the 'Variable Enemy' version, but uses a 4x multiplier instead. (That would be terribly inefficient.)
Or, have some extra code that converts the multiplier.
4 party members = 8-4+1=5x. -> 2x4=8 -> 8-8+1=1x.
3 party members = 8-3+1=6x. -> 2x3=6 -> 8-6+1=3x.
2 party members = 8-2+1=7x. -> 2x2=4 -> 8-4+1=5x.
1 party members = 8-1+1=8x. -> No Need to Convert
So this is what I would need to do:
-Add some code to the targeting subroutines to check for the two new targetting bytes.
-Add new subroutines that allow switching between single and group targeting if either of the variable target bits is used.
-Add new code to the spell logic that applies a targeting multiplier if either of the variable target bits is used.
-Recalculate the potency of all spells that will use either of the new variable target bits.
Is that about the gist of it?
Am I missing anything important?
On a side note, I believe the simplest form of multiplication and division in ASM is bit shifting.
But, by itself, it can only do doublings.
00000001 (1) -> 00000010 (2)
00000100 (4) -> 00001000 (
But the in-between values can be accomplished by taking account of remainders.
So if we want to multiply by an uneven factor; say 5.
We bit shift twice and then add the original value.
So 1 x 5 looks something like this:
00000001 (1 x2) = 00000010 (2 x2) = 00000100 (4)
00000100 (4 +1) = 00000101 (5)
If I understand it correctly, it then just becomes a matter of managing values.
Good to hear!
I think that the changes to the battle system are going to be the highlight of this work and the 3D-ish-ness of it is a great visual indicator that this is above and beyond the average.