Users browsing this thread: 1 Guest(s)
Steal formula

#1
Posts: 1,633
Threads: 56
Thanks Received: 13
Thanks Given: 84
Joined: Apr 2014
Reputation: 12
Status
Atma
Hi! Smile

I have to edit the steal formula, in order to make possible stealing to a monster lv 255.

So... do you know the position of the hex code that involves the chance of stealing, inside the rom? Wink


THE GREATEST CHALLENGE OF ALL TIMES AWAITS:
http://www.ff6hacking.com/forums/showthr...p?tid=2593
DO YOU HAVE WHAT IT TAKES TO SLAY A GOD?
------------------------------------------------------------------------
Tenkarider's project #2 is started: FF6 Curse of the Madsiur Joke (CotMJ)
http://www.ff6hacking.com/forums/showthr...p?tid=2755
What happens when Madsiur tweaks your account? This full game hack will show that!
  Find
Quote  

#2
Posts: 3,970
Threads: 279
Thanks Received: 236
Thanks Given: 58
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
It is well documented and fun to play with:

Code:
C2/399E: A3 05        LDA $05,S   (Attacker)
C2/39A0: AA           TAX
C2/39A1: A9 01        LDA #$01
C2/39A3: 8D 01 34     STA $3401   (=1) (Sets message to "Doesn't have anything!")
C2/39A6: E0 08        CPX #$08    (Check if attacker is monster)
C2/39A8: B0 5F        BCS $3A09   (Branch if monster)
C2/39AA: C2 20        REP #$20    (Set 16-bit accumulator)
C2/39AC: B9 08 33     LDA $3308,Y (Target's stolen items)
C2/39AF: 1A           INC
C2/39B0: E2 21        SEP #$21    (Set 8-bit Accumulator AND Carry Flag)
C2/39B2: F0 4D        BEQ $3A01   (Fail to steal if no items)
C2/39B4: EE 01 34     INC $3401   (now = 2) (Sets message to "Couldn't steal!!")
C2/39B7: BD 18 3B     LDA $3B18,X (Attacker's Level)
C2/39BA: 69 32        ADC #$32    (adding 51, since Carry Flag was set)
C2/39BC: B0 1A        BCS $39D8   (Automatically steal if level >= 205)
C2/39BE: F9 18 3B     SBC $3B18,Y (Subtract Target's Level, along with an extra 1 because
                                   Carry Flag is unset at this point.  Don't worry; this
                                   cancels out with the extra 1 from C2/39BA.)

                                  (StealValue = [attacker level + 51] - [target lvl + 1]
                                   = Attacker level + 50 - Target level )

C2/39C1: 90 3E        BCC $3A01   (Fail to steal if StealValue < 0)

C2/39C3: 30 13        BMI $39D8   (Automatically steal if StealValue >= 128)
C2/39C5: 85 EE        STA $EE     (save StealValue)
C2/39C7: BD 45 3C     LDA $3C45,X
C2/39CA: 4A           LSR
C2/39CB: 90 02        BCC $39CF   (If no sneak ring)
C2/39CD: 06 EE        ASL $EE     (Double value)
C2/39CF: A9 64        LDA #$64
C2/39D1: 20 65 4B     JSR $4B65   (Random: 0 to 99)
C2/39D4: C5 EE        CMP $EE
C2/39D6: B0 29        BCS $3A01   (Fail to steal if the random number >= StealValue)
C2/39D8: 5A           PHY
C2/39D9: 20 5A 4B     JSR $4B5A   (Random: 0 to 255)
C2/39DC: C9 20        CMP #$20
C2/39DE: 90 01        BCC $39E1   (branch 1/8 of the time, so Rare steal slot
                                   will be checked)
C2/39E0: C8           INY         (Check the 2nd [Common] slot 7/8 of the time)
C2/39E1: B9 08 33     LDA $3308,Y (Target's stolen item)
C2/39E4: 7A           PLY
C2/39E5: C9 FF        CMP #$FF    (If no item)
C2/39E7: F0 18        BEQ $3A01   (Fail to steal)
C2/39E9: 8D 35 2F     STA $2F35   (Item stolen, for message purposes)
C2/39EC: 9D F4 32     STA $32F4,X (Store in "Acquired item")
C2/39EF: BD 18 30     LDA $3018,X
C2/39F2: 0C 8C 3A     TSB $3A8C   (flag character to have any applicable item in
                                   $32F4,X added to inventory when turn is over.)
C2/39F5: A9 FF        LDA #$FF
C2/39F7: 99 08 33     STA $3308,Y  (Set to no item to steal)
C2/39FA: 99 09 33     STA $3309,Y  (in both slots)
C2/39FD: EE 01 34     INC $3401    (now = 3) (Sets message to "Stole #whatever ")
C2/3A00: 60           RTS
  Find
Quote  
[-] The following 1 user says Thank You to madsiur for this post:
  • Tenkarider (06-29-2014)

#3
Posts: 1,633
Threads: 56
Thanks Received: 13
Thanks Given: 84
Joined: Apr 2014
Reputation: 12
Status
Atma
C2/39BE: F9 18 3B SBC $3B18,Y (Subtract Target's Level)

Ok, this should be the line that interests me, my idea was to halve the target's Level value(only for the steal formula, not halving it even in battle Laugh ), just before that SBC(maybe with a LSR?).

In this way, an high level stealer, should have some chance to steal... it doesn't seem so hard to set it, but i dunno where's stored the target's level Finger

Could you tell me, please? Wink

PS. Even if it becomes easier twice to steal, i don't care about that.


THE GREATEST CHALLENGE OF ALL TIMES AWAITS:
http://www.ff6hacking.com/forums/showthr...p?tid=2593
DO YOU HAVE WHAT IT TAKES TO SLAY A GOD?
------------------------------------------------------------------------
Tenkarider's project #2 is started: FF6 Curse of the Madsiur Joke (CotMJ)
http://www.ff6hacking.com/forums/showthr...p?tid=2755
What happens when Madsiur tweaks your account? This full game hack will show that!
  Find
Quote  

#4
Posts: 91
Threads: 1
Thanks Received: 13
Thanks Given: 1
Joined: Apr 2014
Reputation: 2
Status
None
The line you are looking for, is this one

Quote: C2/39BA: 69 32 ADC #$32 (adding 51, since Carry Flag was set)

Change the value (32) to a higher one and you will raise the chances of a successful theft


[Image: SvEf6Yh.png]
  Find
Quote  
[-] The following 2 users say Thank You to Xenovant for this post:
  • Tenkarider (06-29-2014), wolfokami321 (11-11-2014)

#5
Posts: 1,633
Threads: 56
Thanks Received: 13
Thanks Given: 84
Joined: Apr 2014
Reputation: 12
Status
Atma
LoL, that's a lot easier Laugh

It must be myself that i tend to see the hard route, before the easy one Wink


THE GREATEST CHALLENGE OF ALL TIMES AWAITS:
http://www.ff6hacking.com/forums/showthr...p?tid=2593
DO YOU HAVE WHAT IT TAKES TO SLAY A GOD?
------------------------------------------------------------------------
Tenkarider's project #2 is started: FF6 Curse of the Madsiur Joke (CotMJ)
http://www.ff6hacking.com/forums/showthr...p?tid=2755
What happens when Madsiur tweaks your account? This full game hack will show that!
  Find
Quote  

#6
Posts: 36
Threads: 6
Thanks Received: 0
Thanks Given: 5
Joined: Aug 2014
Reputation: 0
Status
None
Sorry for necroposting but does this also apply to the theif knife?
  Find
Quote  

#7
Posts: 1,633
Threads: 56
Thanks Received: 13
Thanks Given: 84
Joined: Apr 2014
Reputation: 12
Status
Atma
I don't know, but i doubt they invented 2 different steal formulas...


THE GREATEST CHALLENGE OF ALL TIMES AWAITS:
http://www.ff6hacking.com/forums/showthr...p?tid=2593
DO YOU HAVE WHAT IT TAKES TO SLAY A GOD?
------------------------------------------------------------------------
Tenkarider's project #2 is started: FF6 Curse of the Madsiur Joke (CotMJ)
http://www.ff6hacking.com/forums/showthr...p?tid=2755
What happens when Madsiur tweaks your account? This full game hack will show that!
  Find
Quote  

#8
Posts: 47
Threads: 7
Thanks Received: 5
Thanks Given: 5
Joined: Aug 2014
Status
None
I found this code in headered rom address C2/23BBE: F9 18 3B is this code will change it or not and where!?this also code in headered rom address C2/23BBA: 69 32 in the value is [32] what is the max number to raise the chances of a successful theft even the rare items are succeed stole!?I want to be sure....
  Find
Quote  

#9
Posts: 1,633
Threads: 56
Thanks Received: 13
Thanks Given: 84
Joined: Apr 2014
Reputation: 12
Status
Atma
I'm not sure about what you wanna know exactly... for editing the chances of make a succesful steal, the answer is in the posts above;
The chances of steal a common, or a rare item are a different formula.


THE GREATEST CHALLENGE OF ALL TIMES AWAITS:
http://www.ff6hacking.com/forums/showthr...p?tid=2593
DO YOU HAVE WHAT IT TAKES TO SLAY A GOD?
------------------------------------------------------------------------
Tenkarider's project #2 is started: FF6 Curse of the Madsiur Joke (CotMJ)
http://www.ff6hacking.com/forums/showthr...p?tid=2755
What happens when Madsiur tweaks your account? This full game hack will show that!
  Find
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite