Enemy Steal theorizing

Talk about all aspects of the gameplay of Final Fantasy 3us/6j.

Moderators: General Moderator, Game Moderator

Enemy Steal theorizing

Postby Assassin » Wed Oct 09, 2013 4:30 am

Enemy Steal will take (level * 256) + 20 gold pieces from the party, provided you have enough. the relevant code snippet is:

Code: Select all
C2/3A19: BD 18 3B     LDA $3B18,X    (enemy level)
C2/3A1C: EB           XBA
C2/3A1D: A9 14        LDA #$14       (enemy will swipe: level * 256 + 20 gold)
C2/3A1F: C2 20        REP #$20       (set 16-bit A)
C2/3A21: 20 B6 37     JSR $37B6      (subtract swiped gold from party's inventory)
C2/3A24: F0 DB        BEQ $3A01      (branch if party had zero gold before
                                      the steal)
C2/3A26: 8D 38 2F     STA $2F38      (save gold swiped for message output)


does this formula seem weird to anybody else? enemies generally have high levels compared to characters at the point of the game in which the two meet. in fact, a level of 5 is putridly low for an enemy. yet that level in the formula yields:

gold stolen = (5 * 256) + 20 = 1280 + 20 = 1300

so even when involving a foe with a teensy, weensy level (ignoring the anomaly Vomammoth here), the addition of 20 will sway the total amount by a whopping 1.6%. who designs like this, unless they were trying to mitigate the effects of Dischord? spending so much time looking at Bank C2, i can't help but envision a "JSR $4781" (16-bit A = top of A * bottom of A) after C2/3A1D. :P pure speculation, yes.

and honestly, i think the way the game works currently is better balanced than the intent i'm theorizing. Ursus swiping 8724 GP is hardly that punitive, given how readily you can pile up cash in this game.
User avatar
Assassin
Moderator
Moderator
 
Posts: 1195
Joined: Tue Sep 14, 2004 5:10 am

Re: Enemy Steal theorizing

Postby Lenophis » Wed Oct 09, 2013 1:35 pm

Well, some bug-fix code could go here regardless. I'm picturing a separate buffer for winning gold back from monsters to avoid doubling that via the Cat Hood. Here's what we did in PB:

Code: Select all
; steal - fork: monsters
F0E000:   STZ $2F3A
F0E003:   INC $3401    ; set message to "Couldn't steal!"
F0E006:   CPY #$08     ; is target a monster
F0E008:   BCS F0E060   ; steal_fail1
F0E00A:   JSR F0E107   ; determine_steal_chance
F0E00D:   BCC F0E048   ; massive_fail_steal
F0E00F:   LDA #$65
F0E011:   JSR F04B65
F0E014:   CMP $EE   ; compare it against the stealing variable
F0E016:   BCS F0E060   ; steal_fail1
F0E018:   DEC $3401    ; set message to "Doesn't have anything!"
F0E01B:   LDA $3B18,X
F0E01E:   XBA
F0E01F:   LDA #$60    ; enemy will steal level * 256 gil
F0E021:   JSR F04B65   ; A = 1-5F
F0E024:   CLC
F0E025:   ADC #$20     ; enemy will steal level * 256 + (32..128) gil
F0E027:   REP #$20
F0E029:   JSR F037B6    ; subtract gold swiped from party
F0E02C:   SEP #$20
F0E02E:   BEQ F0E060    ; steal_fail1, if party has no gil, fail to steal
F0E030:   REP #$21
F0E032:   STA $2F38    ; store as amount to steal for steal message
F0E035:   ; CLC
F0E036:   ADC $145A,X  ; add amount of gold to monsters to win back (with indexing, it'll start at $1462)
F0E039:   BCC F0E03D
F0E03B:   TDC
F0E03C:   DEC A
F0E03D:   STA $145A,X  ; store as gold to win back
F0E040:   SEP #$20
F0E042:   LDA #$3F
F0E044:   STA $3401    ; set message to "x gil was stolen!"
F0E047:   RTS


We also slightly tweaked how much GP is stolen, adding in just a little bit of variance just to keep things fresh.

And after reading this code again, I just now noticed that the stealing bonus adding upon failing can also be accessed by monsters. I don't know if I want to do anything about that or not. In any event...
Image
Lenophis
Veteran
Veteran
 
Posts: 588
Joined: Sat Mar 26, 2005 5:52 am
Location: Duluth, MN

Re: Enemy Steal theorizing

Postby Assassin » Wed Oct 09, 2013 8:30 pm

looking at Djibriel's interpretation of what the Cat Hood is actually doing:
viewtopic.php?f=2&t=325&p=3178#p3178

if some dropped GP is being overlooked unless you have a catlike one with you, then how should the stolen GP be regarded? is it merged with the rest of a monster's money, and thus as readily overlooked, or is it in its own clean pile, where no special talent should be needed to get the full amount?
User avatar
Assassin
Moderator
Moderator
 
Posts: 1195
Joined: Tue Sep 14, 2004 5:10 am

Re: Enemy Steal theorizing

Postby Lenophis » Wed Oct 09, 2013 11:56 pm

Have an Ursus steal 8724 GP from you, add it with the 2000 it already has, kill it with the Cat Hood equipped, watch it become 21,448 GP. Proper behavior should double the 2000 to 4000, then add back the 8724 to give you 12,724 GP. I would have a hard time believing that your own money can double just by being in the enemy's hands for mere moments, nevermind the concept of an enemy's money doubling from some magical item...
Image
Lenophis
Veteran
Veteran
 
Posts: 588
Joined: Sat Mar 26, 2005 5:52 am
Location: Duluth, MN

Re: Enemy Steal theorizing

Postby Assassin » Thu Oct 10, 2013 12:12 am

did you read the link? :/

Proper behavior should double the 2000 to 4000, then add back the 8724 to give you 12,724 GP.


what i'm saying is, if the Cat Hood "works" by letting the wearer discover money that was always there but normally overlooked.. then one could reason that the Ursus normally carries 4000 GP -- ROM stats be damned -- but the party doesn't detect half of it unless their senses are tuned to its faint jangling by cat ears. following this theory, would monies stolen from the party also be overlooked at battle's end by non-cat-enhanced parties? in that case, they'd amount to 4362 GP.

or would such monies be in a separate, more visible "pile" on the monster, such that all of them can be recovered without needing special talents?

i realize your patch does things the latter way, and is certainly an improvement over the initial game. i was more curious as to how you see things conceptually, in light of Djibriel's theory as to how the "magical doubling" is actually more a matter of enhanced observation.
User avatar
Assassin
Moderator
Moderator
 
Posts: 1195
Joined: Tue Sep 14, 2004 5:10 am

Re: Enemy Steal theorizing

Postby Lenophis » Thu Oct 10, 2013 12:23 am

Well, I can see it from this perspective: If the Cat Hood is a better object for observation in terms of what is found, and if that follows from what is taken from you, wouldn't it serve as a defacto infinite-money source, since it's playing the role of finding more than what is normally found? I realize this is a bit of a slippery slope. It seems it could also be taken that it would allow you to find more in general, and that just "double it" seems too easy. Programming-wise, I can understand why it was doubled.

I'm probably going in circles here.
Image
Lenophis
Veteran
Veteran
 
Posts: 588
Joined: Sat Mar 26, 2005 5:52 am
Location: Duluth, MN

Re: Enemy Steal theorizing

Postby Assassin » Thu Oct 10, 2013 1:05 am

i don't think we have to worry about an evil circle, because there's no way for an enemy to steal from you again after you've recovered money from it (i.e. won the battle).

an example of the alternate behavior would be:
- enemy has 4000 GP it normally carries.
- enemy steals 8724 GP from party.
- party (without Cat Hood) wins battle.
- party only sees half of dropped GP, thus gets 6362 GP total.

so you'd be assigning double the normal GP value to all enemies. this could be achieved by modifying the ROM values as such, or if we're worried about hacked monsters breaking the 16-bit limit (because they had 32768+ GP under "normal" mechanics), then by modifying C2/5DD0 to double it there. then in either case, one would modify later code to halve GP won if Cat Hood isn't worn by any party members.

the halving is consistent with the idea of some GP being overlooked, as opposed to a relic magically producing more.

i'll agree that always half might be a bit too tidy. one variant would be to have non-Cat-Hood parties pick up 3/8 to 5/8 of the "full" GP.

anyway, whether the above example's approach or PB's is more "realistic" depends on whether we see the stolen money as being intermingled with the rest, or being kept somewhere that's more in plain sight.
User avatar
Assassin
Moderator
Moderator
 
Posts: 1195
Joined: Tue Sep 14, 2004 5:10 am


Return to FF3 Gameplay Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron