Users browsing this thread: 1 Guest(s)
Edit GP Rain damage

#1
Posts: 145
Threads: 47
Thanks Received: 0
Thanks Given: 0
Joined: Jan 2020
Reputation: 0
Status
None
I'm looking for an edit tool to change the formula of GP Rain because the damage is pitiful. Is there such tool? Thank.
  Find
Quote  

#2
Posts: 3,966
Threads: 279
Thanks Received: 234
Thanks Given: 56
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
Does GP rain do as damage the cost in GP for casting it? If it's the case you may only need to increase the #$1E to a higher value at the beginning of the special effect, but it will cost more GP.. You'll need to test this because I know little about the battle engine ad I'm not sure if this sole change will do the job..

Code:
Special effect $51
GP Rain

C2/3FB7: B9 18 3B     LDA $3B18,Y (Attacker's Level)
C2/3FBA: EB           XBA
C2/3FBB: A9 1E        LDA #$1E    (change this)
C2/3FBD: 20 81 47     JSR $4781   (attack will cost: Attacker's Level * 30)
C2/3FC0: C2 20        REP #$20    (Set 16-bit accumulator)
C2/3FC2: C0 08        CPY #$08
C2/3FC4: B0 0D        BCS $3FD3   (Branch if attacker is monster)
C2/3FC6: 20 B6 37     JSR $37B6   (deduct thrown gold from party's inventory)
C2/3FC9: D0 1E        BNE $3FE9   (branch if there was actually some GP to throw)
C2/3FCB: 64 A4        STZ $A4     (Makes attack target nothing)
C2/3FCD: A2 08        LDX #$08
C2/3FCF: 8E 01 34     STX $3401   (Set to display text 8 - "No money!!")
C2/3FD2: 60           RTS
  Find
Quote  
[-] The following 1 user says Thank You to madsiur for this post:
  • doofenH (01-02-2020)

#3
Posts: 377
Threads: 34
Thanks Received: 10
Thanks Given: 7
Joined: Dec 2018
Reputation: 18
Status
Moog
This is the only other code relevant to GP Rain.
Code:
GP Rain

C2/1907: BB           TYX
C2/1908: 20 8A 29     JSR $298A      (Load command data, and clear special effect,
                                      magic power, etc.)
C2/190B: EE A6 11     INC $11A6      (Set spell power to 1)
C2/190E: A9 60        LDA #$60
C2/1910: 0C A2 11     TSB $11A2      (Set ignore defense, no split damage)
C2/1913: 9C 14 34     STZ $3414      (Skip damage modification)
C2/1916: E0 08        CPX #$08
C2/1918: 90 05        BCC $191F      (branch if character)
C2/191A: A9 05        LDA #$05
C2/191C: 8D 12 34     STA $3412      (will display "GP Rain" atop screen.
                                      differentiated from "Health" and "Shock"
                                      by $B5 holding command 18h in this case.)
C2/191F: A9 A2        LDA #$A2
C2/1921: 8D A9 11     STA $11A9      (Store GP Rain in special effect)
C2/1924: 4C 7B 31     JMP $317B      (entity executes one hit)
So Madsiur is correct. When the GP Rain command is selected, an animation override is put in place (making the character throw coins instead of using their normal fight movement), base battle power is set to 1 and set to be unmodified (to ensure that the character's stats do not influence the attack), and then battle power is set to Level * 30. The game deducts a comparable quantity of gold from the party's inventory when the attack is attempted.

What Madsiur described is thus the only good way to tweak GP Rain: change the amount of money that it costs per level. Otherwise you'd have to rewrite the special effect to allow for a multiplier or a flat base damage.


EDIT: Keep in mind $1E is a signed hex value; if you set it any higher than $80 (128 gold per level) the game will interpret it as a negative number and will either crash or do something erratic like heal the enemies and give your party gold for it.
  Find
Quote  
[-] The following 2 users say Thank You to C-Dude for this post:
  • doofenH (01-02-2020), madsiur (01-01-2020)

#4
Posts: 51
Threads: 5
Thanks Received: 2
Thanks Given: 0
Joined: Apr 2018
Reputation: 8
Status
Shell
There's one other relevant bit. The code Madsiur posted has
Code:
BNE $3FE9   (branch if there was actually some GP to throw)

Here's the code that jumps to:

Code:
C2/3FE9: A2 02        LDX #$02
C2/3FEB: 86 E8        STX $E8
C2/3FED: 20 B7 47     JSR $47B7      (24-bit $E8 = A * 2)
C2/3FF0: A5 E8        LDA $E8        (A = gold to consume * 2)
C2/3FF2: AE C9 3E     LDX $3EC9      (Number of targets)
C2/3FF5: 20 92 47     JSR $4792      (A / number of targets)
C2/3FF8: 8D B0 11     STA $11B0      (Sets maximum damage)
C2/3FFB: 60           RTS

GP Rain does a total 2 damage per GP thrown, divided equally among the targets. If you want to change the 2x multiplier instead of/in addition to the cost, C2/3FE9 is the place to do it.
  Find
Quote  
[-] The following 2 users say Thank You to Subtraction for this post:
  • C-Dude (01-02-2020), doofenH (01-02-2020)

#5
Posts: 145
Threads: 47
Thanks Received: 0
Thanks Given: 0
Joined: Jan 2020
Reputation: 0
Status
None
Thank you all. Will try.
  Find
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite