You are not logged in.
This is what the EFFECT_GROWTH constant refers to.
What I meant is EFFECT_GROWTH is used as an index in that table. By adding a new id (0x9d), it looks up the 0x9dth entry in the table. There isn't one, so it reads unrelated data as a move effect. This is causing the crash.
Offline
So what do I need to do to fix it? I didn't understand what you wrote here
My guess is you haven't added the new Growth effect to the move effects table:
battle/moves/move_effects_pointers.asm
@@ -11,7 +11,7 @@
dw AttackUp
dw DefenseUp
dw SpeedUp
- dw Growth
+ dw SpecialAttackUp
dw SpecialDefenseUp
dw AccuracyUp
dw EvasionUp
@@ -155,4 +155,5 @@
dw BeatUp
dw Fly
dw DefenseCurl
+ dw Growth
This is what the EFFECT_GROWTH constant refers to.
Offline
add dw Growth to the bottom of the table
Last edited by comet (2014-03-17 00:07:37)
Offline
All hail Comet!!! I can't believe it was as simple as adding in dw Growth at the end since I added that new effect at the end of that table and needed it to match up. THANK YOU SO MUCH! If anyone would like the code to this I would be happy to give it in the .asm form. Much thanks to Comet again!
Was going to try to upload a video showing it but I;m not sure the best way to do it on Mac. It works I promise haha.
Last edited by walk_away21 (2014-03-17 01:23:18)
Offline
Couple things.
_GrowthCommand:
...
ld a, 2
callba Function36532
callba overwrites a and hl. When reaching the destination a is 0xd, not 2. This is the part in Curse that lowers speed (2). Incidentally it lowers the enemy's accuracy (d) instead.
.cantraise
...
ld hl, WontRiseAnymoreText
callba StdBattleTextBox
StdBattleTextBox is in bank 0, so it doesn't need a callba.
Offline
Couple things.
_GrowthCommand: ... ld a, 2 callba Function36532
callba overwrites a and hl. When reaching the destination a is 0xd, not 2. This is the part in Curse that lowers speed (2). Incidentally it lowers the enemy's accuracy (d) instead.
.cantraise ... ld hl, WontRiseAnymoreText callba StdBattleTextBox
StdBattleTextBox is in bank 0, so it doesn't need a callba.
So replace 2 with 0xd in first part and just delete callba in the second?
Offline
@Comet can I get some clarification :)
Offline
I can't be any clearer than that. I leave it to you to experiment.
Offline
So I'm back. I quit my project after I couldn't fix this. I'm thinking of just making it increase attack and special attack with no concern for the sun sharply raising. I'm having trouble remembering all that I changed so this should be interesting. I still never figured out the issue brought up in this thread on this page (3).
Offline
Ok so after testing the rom I think growth is lowering the opponents' accuracy like Comet said. It also causes the game to crash if I use Sunny Day when Growth has maxed out.
EDIT: In the can't raise stats part I changed callba to the code shown below
jp StdBattleTextBox
This fixed the crash when stats couldn't raise anymore. My only lingering problem is that using Growth is lowering enemy accuracy which I'm not sure how to fix.
Last edited by walk_away21 (2015-01-28 20:36:42)
Offline
The problem was more or less that it couldn't fit in the same bank, and calling across banks was overwriting the stat you wanted to raise.
To avoid that, you could do the following (remove lines starting with -, add lines starting with +):
battle/effect_commands.asm
+RaiseStatB:
+ ld a, b
Function36532:
battle/effects/growth.asm
_GrowthCommand:
...
- ld a, 2
- callba Function36532
+ ld b, 2
+ callba RaiseStatB
Last edited by comet (2015-01-28 20:55:07)
Offline
The problem was more or less that it couldn't fit in the same bank, and calling across banks was overwriting the stat you wanted to raise.
To avoid that, you could do the following (remove lines starting with -, add lines starting with +):
battle/effect_commands.asm +RaiseStatB: + ld a, b Function36532:
battle/effects/growth.asm _GrowthCommand: ... - ld a, 2 - callba Function36532 + ld b, 2 + callba RaiseStatB
Quick reply after many months! I think that may have fixed it. Everything's attack isn't missing anymore after using Growth and the power increase is definitely working on attack and special attack. Thanks so much! Hopefully I don't have any more trouble with this move in testing!
Offline
Alternative method.
You can do a variation of the commmand "BattleCommand9e" (skipsuncharge) but named "skipsunendturn" with the next sintaxis and similar to the effect of Solarbeam:
; skipsunendturn
ld a, [Weather]
cp WEATHER_SUN
ret nz
ld b, $fe ; endturn
jp SkipToBattleCommand
And the new MoveEffects would be:
Growth:
db $02//checkobedience
db $03//usedmovetext
db $04//doturn
db $9E//skipsunendturn ; new command
db $73//specialattackup
db $0A//effect0x0a
db $92//effect0x92
db $0C//effect0x0c
db $8C//statmessageuser
db $8E//statupfailtext
db $70//attackup
db $8C//statmessageuser
db $8E//statupfailtext
db $FE//endturn
db $7A//specialattackup2
db $0A//effect0x0a
db $92//effect0x92
db $0C//effect0x0c
db $8C//statmessageuser
db $8E//statupfailtext
db $77//attackup2
db $8C//statmessageuser
db $8E//statupfailtext
db $FF//endmove
When the sun is in play the command jumps up to specialattackup2, otherwise it runs as you normally would. This new command can have many uses, not only with the weather.
Last edited by Chamber_ (2015-03-25 03:26:28)
Offline