Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#26 2014-03-11 12:50:50

comet
Member
Registered: 2012-04-09
Post 392/673

Re: Crystal: Updating Growth Move to Gen V / VI Changes

Pushs/pops is an assembler macro that lets you add stuff in some other bank without losing your spot in the current bank. GrowthCommand should be in the current bank (outside pushs/pops). _GrowthCommand should not (inside pushs/pops).

Offline

#27 2014-03-11 18:06:01

walk_away21
Member
Registered: 2014-02-20
Post 26/69

Re: Crystal: Updating Growth Move to Gen V / VI Changes

comet wrote:

Pushs/pops is an assembler macro that lets you add stuff in some other bank without losing your spot in the current bank. GrowthCommand should be in the current bank (outside pushs/pops). _GrowthCommand should not (inside pushs/pops).

I currently do have _GrowthCommand inside the pushs/pops as I showed here

PUSHS

SECTION "Growth Command", ROMX

_GrowthCommand:

... rest of code

POPS

Are you saying this at the end should be outside of PUSHS/POPS because that is the only other code I have in that file?

INCLUDE "battle/effects/growth.asm"

The command GrowthCommand is currently in the different file growth.asm as I showed here and the file does not have any  PUSHS/POPS.

GrowthCommand: ; 37588
; growth
    callba _GrowthCommand
    ret

In your previous post you said:

comet wrote:

You've defined _GrowthCommand. You still need to call it from GrowthCommand.

GrowthCommand:
    callba _GrowthCommand
    ret

So I put the above code in growth.asm.


You also said:

comet wrote:

You can also keep your include:

PUSHS
SECTION "Growth Command", ROMX
INCLUDE "battle/effects/growth.asm"
POPS

I have this done, but I also have the _GrowthCommand code in between SECTION and INCLUDE here which you didn't say to put there in this post but now you say I should in your most recent post.


Overall, I am still confused and acting like I'm not isn't going to help me any. I'm not sure what should go in which file because of the ROM bank storage issue. What goes in growth.asm? The move I used as a base, Curse, keeps the code I have since moved to effect_commands.asm (under the name _GrowthCommand) in curse.asm. I moved it because I thought you were telling me to because of the ROM storage issue. Currently, growth.asm only has what I posted above with the GrowthCommand callba function. This post seems confusing even to me. The best way I can describe my problem is where I posted on the last page the list of each file and what code is currently in that file.

Last edited by walk_away21 (2014-03-11 18:15:58)

Offline

#28 2014-03-11 18:27:50

comet
Member
Registered: 2012-04-09
Post 394/673

Re: Crystal: Updating Growth Move to Gen V / VI Changes

walk_away21 wrote:
comet wrote:

You can also keep your include:

PUSHS
SECTION "Growth Command", ROMX
INCLUDE "battle/effects/growth.asm"
POPS

At this point I thought _GrowthCommand was in that file.

walk_away21 wrote:

I moved it because I thought you were telling me to because of the ROM storage issue.

Nope.

Here's what I meant:

GrowthCommand:
    callba _GrowthCommand
    ret

pushs
section "Growth", romx
include "battle/effects/growth.asm" ; the meat
pops

Offline

#29 2014-03-12 01:26:39

walk_away21
Member
Registered: 2014-02-20
Post 27/69

Re: Crystal: Updating Growth Move to Gen V / VI Changes

Ok I changed to what I think is right (keyword think...).


This is in effects_commands.asm

GrowthCommand:
    callba _GrowthCommand
    ret

PUSHS
section "Growth", romx
include "battle/effects/growth.asm" ; the meat
POPS

And this is in growth.asm

_GrowthCommand:
; growth

    ld bc, PlayerStatLevels
    ld a, [hBattleTurn]
    and a
    jr z, .growth
    ld de, EnemyMonType1
    ld bc, EnemyStatLevels

.growth


; If no stats can be increased, don't.

; Attack
    ld a, [bc]
    cp 13 ; max
    jr c, .checkSun

; Special Attack
    inc bc
    inc bc
    inc bc
    ld a, [bc]
    cp 13 ; max
    jr nc, .cantraisestats


.checkSun

; Check if sunny for sharp increases

    ld a, [Weather]
    cp WEATHER_SUN
    jr z, .double
    
    ld a, $1
    ld [$c689], a
    call AnimateCurrentMove
    ld a, $2
    call Function36532
    call BattleCommand70
    call BattleCommand8c
    call ResetMiss
    call BattleCommand73
    jp BattleCommand8c


.double

; Raises Attack and Special Attack sharply if sunny

    ld a, $1
    ld [$c689], a
    call AnimateCurrentMove
    ld a, $2
    call Function36532
    call BattleCommand77
    call BattleCommand8c
    call ResetMiss
    call BattleCommand7a
    jp BattleCommand8c


.cantraisestats

; Can't raise either stat.

    ld b, $8 ; ABILITY
    call GetStatName
    call AnimateFailedMove
    ld hl, WontRiseAnymoreText
    jp StdBattleTextBox
; 37618

Is that correct? (Please say yes). I do get an error when trying to make that says:

ERROR: main.tx(38397) -> battle/effect_commands.tx(9294) :
syntax error
Assembly aborted in pass 1 (1 errors)!
make: *** [main.o] Error 1

So either I understood you wrong (yet again my noobness shows) or I am adding it wrong in effect_command_pointers when I added   dw GrowthCommand.
Should that be     dw _GrowthCommand?

I also added this in battle constants but I think it's right.
EFFECT_GROWTH              EQU $9d

Offline

#30 2014-03-12 01:57:58

comet
Member
Registered: 2012-04-09
Post 395/673

Re: Crystal: Updating Growth Move to Gen V / VI Changes

walk_away21 wrote:

or I am adding it wrong in effect_command_pointers when I added   dw GrowthCommand.
Should that be     dw _GrowthCommand?

No (and it wouldn't cause a syntax error).

Can't tell you what's causing it without knowing line 9294 of battle/effect_commands.tx.

Last edited by comet (2014-03-12 02:00:03)

Offline

#31 2014-03-12 02:08:26

walk_away21
Member
Registered: 2014-02-20
Post 28/69

Re: Crystal: Updating Growth Move to Gen V / VI Changes

Well this is line 9294 of effect_commands.asm

INCLUDE "battle/effects/foresight.asm"


It's about 20 lines below this code I added in

GrowthCommand:
    callba _GrowthCommand
    ret

PUSHS
section "Growth", romx
include "battle/effects/growth.asm" ; the meat
POPS

Offline

#32 2014-03-12 02:12:11

comet
Member
Registered: 2012-04-09
Post 396/673

Re: Crystal: Updating Growth Move to Gen V / VI Changes

tx, not asm

Offline

#33 2014-03-12 02:17:43

walk_away21
Member
Registered: 2014-02-20
Post 29/69

Re: Crystal: Updating Growth Move to Gen V / VI Changes

PUSHS
section $86, $B1, $AE, $B6, $B3, $A7, romx
include $A1, $A0, $B3, $B3, $AB, $A4, $F3, $A4, $A5, $A5, $A4, $A2, $B3, $B2, $F3, $A6, $B1, $AE, $B6, $B3, $A7, $E8, $A0, $B2, $AC ; the meat
POPS


Line 9294 is the line with section

Offline

#34 2014-03-12 02:18:43

comet
Member
Registered: 2012-04-09
Post 397/673

Re: Crystal: Updating Growth Move to Gen V / VI Changes

neat

use caps for SECTION and INCLUDE

my bad, rgbasm accepts lowercase but i forgot the text preprocessor doesnt

Offline

#35 2014-03-12 02:38:29

walk_away21
Member
Registered: 2014-02-20
Post 30/69

Re: Crystal: Updating Growth Move to Gen V / VI Changes

That seems to have actually fixed it lol. Now to test if it actually works haha.

Offline

#36 2014-03-12 02:50:07

walk_away21
Member
Registered: 2014-02-20
Post 31/69

Re: Crystal: Updating Growth Move to Gen V / VI Changes

Ok I will try to test it later. I have also been editing dialogue but even when I tried to test a clean ROM with only dialogue changed and now the ROM with edited Dialogue and edited Growth, the game freezes every time after talking to your mom about setting the day and if it's daylight savings. Immediately after. The ROM with only updated trainers and move powers worked fine and I didn't edit New Bark Town yet so is there a reason I'm getting this? I even pasted all clean New Bark Town maps and the same thing happens.

Offline

#37 2014-03-12 03:44:54

stag019
Idea Killer
Registered: 2011-01-05
Post 577/630

Re: Crystal: Updating Growth Move to Gen V / VI Changes

comet wrote:

my bad, rgbasm accepts lowercase but i forgot the text preprocessor doesnt

lol


You can try to hide yourself in this world of pretend; when the paper's crumpled up, it can't be perfect again.

Offline

#38 2014-03-15 19:04:28

walk_away21
Member
Registered: 2014-02-20
Post 32/69

Re: Crystal: Updating Growth Move to Gen V / VI Changes

walk_away21 wrote:

Ok I will try to test it later. I have also been editing dialogue but even when I tried to test a clean ROM with only dialogue changed and now the ROM with edited Dialogue and edited Growth, the game freezes every time after talking to your mom about setting the day and if it's daylight savings. Immediately after. The ROM with only updated trainers and move powers worked fine and I didn't edit New Bark Town yet so is there a reason I'm getting this? I even pasted all clean New Bark Town maps and the same thing happens.

@Comet I figured out something in Text folder I changed is causing the crash. Buttt... Growth is still causing the game to reset.

Offline

#39 2014-03-16 03:54:53

comet
Member
Registered: 2012-04-09
Post 398/673

Re: Crystal: Updating Growth Move to Gen V / VI Changes

Since _GrowthCommand is now in another bank, you can't call move effect functions directly. It's not ideal, but callba will work fine.

_GrowthCommand:
; growth

    ld bc, PlayerStatLevels
    ld a, [hBattleTurn]
    and a
    jr z, .growth
    ld de, EnemyMonType1
    ld bc, EnemyStatLevels
.growth

; If no stats can be increased, don't.

; Attack
    ld a, [bc]
    cp 13 ; max
    jr c, .can

; Special Attack
    inc bc
    inc bc
    inc bc
    ld a, [bc]
    cp 13 ; max
    jr nc, .cantraisestats

.can
    callba AnimateCurrentMove
    ld a, 2
    callba Function36532

; Check if sunny for sharp increases

    ld a, [Weather]
    cp WEATHER_SUN
    jr z, .double

    callba BattleCommand70
    callba BattleCommand8c
    callba ResetMiss
    callba BattleCommand73
    callba BattleCommand8c
    ret

.double
; Raises Attack and Special Attack sharply if sunny
    callba BattleCommand77
    callba BattleCommand8c
    callba ResetMiss
    callba BattleCommand7a
    callba BattleCommand8c
    ret

.cantraisestats
; Can't raise either stat.
    ld b, 8 ; ABILITY
    callba GetStatName
    callba AnimateFailedMove
    ld hl, WontRiseAnymoreText
    callba StdBattleTextBox
    ret

Last edited by comet (2014-03-16 04:23:05)

Offline

#40 2014-03-16 17:59:55

walk_away21
Member
Registered: 2014-02-20
Post 33/69

Re: Crystal: Updating Growth Move to Gen V / VI Changes

comet wrote:

Since _GrowthCommand is now in another bank, you can't call move effect functions directly. It's not ideal, but callba will work fine.

_GrowthCommand:
; growth

    ld bc, PlayerStatLevels
    ld a, [hBattleTurn]
    and a
    jr z, .growth
    ld de, EnemyMonType1
    ld bc, EnemyStatLevels
.growth

; If no stats can be increased, don't.

; Attack
    ld a, [bc]
    cp 13 ; max
    jr c, .can

; Special Attack
    inc bc
    inc bc
    inc bc
    ld a, [bc]
    cp 13 ; max
    jr nc, .cantraisestats

.can
    callba AnimateCurrentMove
    ld a, 2
    callba Function36532

; Check if sunny for sharp increases

    ld a, [Weather]
    cp WEATHER_SUN
    jr z, .double

    callba BattleCommand70
    callba BattleCommand8c
    callba ResetMiss
    callba BattleCommand73
    callba BattleCommand8c
    ret

.double
; Raises Attack and Special Attack sharply if sunny
    callba BattleCommand77
    callba BattleCommand8c
    callba ResetMiss
    callba BattleCommand7a
    callba BattleCommand8c
    ret

.cantraisestats
; Can't raise either stat.
    ld b, 8 ; ABILITY
    callba GetStatName
    callba AnimateFailedMove
    ld hl, WontRiseAnymoreText
    callba StdBattleTextBox
    ret

It's still resetting the game... It resets to a screen that says that the game is made for a Gameboy Color pack. I just went over your code a couple times and I can't see the issue with it.

Offline

#41 2014-03-16 18:31:36

comet
Member
Registered: 2012-04-09
Post 399/673

Re: Crystal: Updating Growth Move to Gen V / VI Changes

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

#42 2014-03-16 19:28:10

walk_away21
Member
Registered: 2014-02-20
Post 34/69

Re: Crystal: Updating Growth Move to Gen V / VI Changes

comet wrote:

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.

I do have this added tho

dw Growth

What are those @@ -155,4 +155,5 @@ though? Do I need them?

EDIT: Are those @@ -155,4 +155,5 @@ for the sharply increases in Sun?

Another thing is I have this in move_effects.asm

Growth:
checkobedience
usedmovetext
doturn
growth
endmove


And this in moves.asm

move GROWTH,       EFFECT_GROWTH,              0, NORMAL,   100, 20,   0

Do I need to change these because of the ROM bank change?

Last edited by walk_away21 (2014-03-16 19:32:08)

Offline

#43 2014-03-16 20:13:31

comet
Member
Registered: 2012-04-09
Post 400/673

Re: Crystal: Updating Growth Move to Gen V / VI Changes

no

The @@ stuff is diff output. http://pastie.org/private/mrbd0hl8vnp8pa7ustsqbg

If what you've done matches this, something else must be causing the crash. Run "git diff" to see everything you've done so far.

Last edited by comet (2014-03-16 20:13:52)

Offline

#44 2014-03-16 20:20:53

walk_away21
Member
Registered: 2014-02-20
Post 35/69

Re: Crystal: Updating Growth Move to Gen V / VI Changes

comet wrote:

no

The @@ stuff is diff output. http://pastie.org/private/mrbd0hl8vnp8pa7ustsqbg

If what you've done matches this, something else must be causing the crash. Run "git diff" to see everything you've done so far.

Here:

http://pastie.org/private/wbgso8ssdy06dyv162jua


Not sure why it looks like some stuff is repeating. I have changed Trainers, Leaders, and wild mons FYI also

Offline

#45 2014-03-16 20:38:23

comet
Member
Registered: 2012-04-09
Post 401/673

Re: Crystal: Updating Growth Move to Gen V / VI Changes

When git diff's output is too big for the terminal window, it shows it to you in a text viewer called less. It doesn't do very well when trying to copy by hand.

To copy it to your clipboard instead, use "git diff | pbcopy".

Last edited by comet (2014-03-16 20:39:59)

Offline

#46 2014-03-16 20:49:48

walk_away21
Member
Registered: 2014-02-20
Post 36/69

Re: Crystal: Updating Growth Move to Gen V / VI Changes

Yep that was it thanks. I deleted some stuff like Trainer updates and item name updates in which I removed capitalization because the file was too big to be pasted but all stuff related to Growth should be in here:

http://pastie.org/private/bh72wy4cbpqezinisqgn2q

Offline

#47 2014-03-16 21:08:48

comet
Member
Registered: 2012-04-09
Post 402/673

Re: Crystal: Updating Growth Move to Gen V / VI Changes

Everything in the paste looks ok. battle/moves/move_effects_pointers.asm and battle/effects/growth.asm are missing. If you can't fit it all in one paste, two is fine.

it would also help to see the diff of the extras submodule (git submodule foreach git diff | pbcopy).

Last edited by comet (2014-03-16 21:14:24)

Offline

#48 2014-03-16 21:28:50

walk_away21
Member
Registered: 2014-02-20
Post 37/69

Re: Crystal: Updating Growth Move to Gen V / VI Changes

Ok try this:
http://pastie.org/private/p6fjqvdhertc1p3oivsma

I don't think growth.asm is showing up because it has nothing to compare to maybe?

Offline

#49 2014-03-16 21:36:31

comet
Member
Registered: 2012-04-09
Post 403/673

Re: Crystal: Updating Growth Move to Gen V / VI Changes

That's the same as before. Are you sure you've edited battle/moves/move_effects_pointers.asm?

Offline

#50 2014-03-16 21:42:15

walk_away21
Member
Registered: 2014-02-20
Post 38/69

Re: Crystal: Updating Growth Move to Gen V / VI Changes

comet wrote:

That's the same as before. Are you sure you've edited battle/moves/move_effects_pointers.asm?

I haven't because it already has dw Growth in there. Do I need to change that?

Offline

Board footer

Powered by FluxBB