Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2014-09-09 06:15:02

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

Simple Questions & Answers

If you have a question that you think doesn't warrant a thread, ask it here.

Offline

#2 2014-09-09 10:08:18

frz hax
Member
Registered: 2014-08-06
Post 22/43

Re: Simple Questions & Answers

Great, I have a few but I can only think of one now-
How do you disable the bike sprite so it doesn't appear after you speak to someone after running?

Offline

#3 2014-09-09 14:18:04

ShantyTown
Member
Registered: 2013-12-04
Post 142/341

Re: Simple Questions & Answers

It might be useful to sticky this thread.

Offline

#4 2014-09-10 03:34:59

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

Re: Simple Questions & Answers

frz hax wrote:

How do you disable the bike sprite so it doesn't appear after you speak to someone after running?

This happens because the running shoes hack never accounts for the sprite at all. The sprite is conveniently never checked during overworld movement because it usually only changes because of an event (using the bike, getting in the water, entering a map, etc). In fact, you should have the same problem if you exit a house holding B.

Fortunately, the check is universal. It maps a sprite to the player's movement type. All you need to do is assign the regular walking sprite to biking too. Here's how the table looks in Crystal:

GetPlayerSprite: ; 14183

        ...

        db PLAYER_NORMAL,    SPRITE_CHRIS
        db PLAYER_BIKE,      SPRITE_CHRIS_BIKE
        db PLAYER_SURF,      SPRITE_SURF
        db PLAYER_SURF_PIKA, SPRITE_SURFING_PIKACHU
        db -1

To save you some time, this resolves to:

00 01 01 02 04 53 08 34 ff

The table is at 0x141a8 in Gold.

Offline

#5 2014-09-10 13:04:00

frz hax
Member
Registered: 2014-08-06
Post 23/43

Re: Simple Questions & Answers

Thanks! Also how do I create a an event where the screen goes black but you can see a text box kind of like the intro? I can make the black screen but the text box isnt visible.

Offline

#6 2014-09-14 10:35:34

Pokemon_Master
Member
From: emuNAND
Registered: 2013-05-18
Post 914/947
Website

Re: Simple Questions & Answers

Sorry for off topic posting,but i think this should be a sticky thread.

Offline

#7 2015-04-10 10:10:07

Rocket Grunt
Member
Registered: 2014-12-27
Post 56/75

Re: Simple Questions & Answers

I have a question about G/S Evolution/Moveset edit.

How do I repoint the whole Evolution/Moveset data to a different rom bank instead of the original Rom Bank #10? I don't seem to find any pointers for the game to decide where it should load the data from. Thanks!

(Just asking, ignore this if you like) And on a completely unrelated question, how do I disable the option where some moves can use outside battle like Softboiled and Milk Drink? Thanks in advance.

Last edited by Rocket Grunt (2015-04-10 10:39:04)


Today I won't steal Pokemon

Offline

#8 2015-04-10 14:18:14

Miksy91
Member
Registered: 2010-10-16
Post 2,167/2,308

Re: Simple Questions & Answers

Rocket Grunt wrote:

I have a question about G/S Evolution/Moveset edit.

How do I repoint the whole Evolution/Moveset data to a different rom bank instead of the original Rom Bank #10? I don't seem to find any pointers for the game to decide where it should load the data from. Thanks!

The pointer(s) to the table is/are in that same rom bank. Those are part of code that uses the evolution/moveset data.
For instance, every time your pokemon levels up, the game probably checks using some code in that same rom bank 10, does your pokemon learn a new move/moves. And this is just one example of using that table.

There is no easy way around this and I personally never bothered to move the data to another rom bank although I did that for trainer data. For it, I moved the entire code that handles the trainer data (there were dozens of bytes probably) to another rom bank, searched where the execution of that code was originally called from and changed that into pointing to the address where I moved that routine. I also had to change a few things about the routine to make it function correctly in the rom bank where I moved it to.

I believe that there is a lot more code in the background that uses evolution/moveset data (compared to the amount of code that uses trainer data). This means that doing the same task for this would require more changes as well and moving it to another rom bank could break the game in many ways if not done correctly.

Another method for achieving the job would be moving only the table to another rom bank and then re-code the routines that use it so that no data is lost when the table is used from another rom bank. There is only a very limited amount of registers to use (a, b, c, d, e, h, l) so some data would have to be pushed onto the stack / stored in memory somewhere for the time being. This should be a doable way to move the table to another rom bank too.

But still - doing both requires preliminary knowledge of assembly, knowing how to read code, and being able code yourself fairly well too. By going with the second method, you would also have to do some memory management on your own (which is not that difficult though when you're familiar with z80 asm and how to "work out" with it).

Rocket Grunt wrote:

(Just asking, ignore this if you like) And on a completely unrelated question, how do I disable the option where some moves can use outside battle like Softboiled and Milk Drink? Thanks in advance.

See in pokecrystal if those are documented there well enough, and if not, you would have to use bgb to debug (= "asm job") and find the routines which to modify and then implement the changes (=by coding).

Last edited by Miksy91 (2015-04-10 14:19:05)

Offline

#9 2015-04-10 14:28:13

Crystal_
Member
From: Spain
Registered: 2012-09-16
Post 264/417
Website

Re: Simple Questions & Answers

How do I repoint the whole Evolution/Moveset data to a different rom bank instead of the original Rom Bank #10? I don't seem to find any pointers for the game to decide where it should load the data from. Thanks!

If you are doing this due to space issues it's probably going to be a better idea to move the pokedex stuff (10:4000 . ~10:5800) to a different bank, then repoint every call to any of those pokedex functions to match the new bank where you moved them to. Will most likely be less work.

Offline

#10 2015-04-11 05:14:23

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

Re: Simple Questions & Answers

Crystal_ wrote:

How do I repoint the whole Evolution/Moveset data to a different rom bank instead of the original Rom Bank #10? I don't seem to find any pointers for the game to decide where it should load the data from. Thanks!

If you are doing this due to space issues it's probably going to be a better idea to move the pokedex stuff (10:4000 . ~10:5800) to a different bank, then repoint every call to any of those pokedex functions to match the new bank where you moved them to. Will most likely be less work.

Everything up to the moves table is Pokedex stuff. The only restriction is that it'll have to stay aligned at xx:4000.

There are only 2 calls (to the Pokedex from the start menu (bank 4), and the stripped down version when you catch a Pokemon (bank 3e)). Since the addresses will be staying the same, you'll only have to fix the bank.

Offline

#11 2015-04-14 22:17:03

Urnighter
Member
Registered: 2015-01-17
Post 55/123

Re: Simple Questions & Answers

Why is some text (such as the intro) located in both main.asm and in common2/3/4.asm? Changing the text in the common seems to be the way to do it, but do I need to worry about what it says in main then?

Is there a resource where I can watch every move animation? It can be hard to make them when I don't know what the original animations look like without testing them.

When working with pokecrystal, is there any way I can work so that I recompile the ROM but don't have to start the game over again? It is tedious to go through the intro every time.

Thanks Comet

Offline

#12 2015-04-15 00:44:48

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

Re: Simple Questions & Answers

Urnighter wrote:

Why is some text (such as the intro) located in both main.asm and in common2/3/4.asm? Changing the text in the common seems to be the way to do it, but do I need to worry about what it says in main then?

TX_FAR is a macro added by the localization team so they could put all the text in just a couple files and hand it off to be translated. In the Japanese versions, the text is right there with the code. To answer your question directly, the TX_FAR is just a reference to the actual text, so it doesn't need to be changed.

Urnighter wrote:

Is there a resource where I can watch every move animation? It can be hard to make them when I don't know what the original animations look like without testing them.

Depends how you want to go about it. You could add a debug menu, or you could use emulator scripting (which would let you take videos). All you would have to do is call PlayBattleAnim (farcall or predef) with the move you want at FXAnimID (wram, 16-bit).

Urnighter wrote:

When working with pokecrystal, is there any way I can work so that I recompile the ROM but don't have to start the game over again? It is tedious to go through the intro every time.

The save data should persist, but you can prevent OakSpeech from being called without deleting it like this:

DEBUG = 1

...

if !def(DEBUG)
    call OakSpeech
endc

Keep in mind that OakSpeech initializes your name, so you could do:

if !def(DEBUG)
    call OakSpeech
else
    call Debug_Init
endc

...

if def(DEBUG)
Debug_Init:
    ld hl, PlayerName
    ld de, .DebugName
    call InitName
    ret

.DebugName: "DEBUG@"
endc

You can also give yourself Pokemon (predef Functiond88c), items, whatever.

Offline

#13 2015-04-15 18:44:21

Urnighter
Member
Registered: 2015-01-17
Post 56/123

Re: Simple Questions & Answers

BattleAnim_IceFang: ; c977b
anim_2gfx ANIM_GFX_CUT, ANIM_GFX_HIT
anim_obj $36, 136, 56, $98
anim_obj $36, 136, 56, $18
anim_wait 8
anim_sound $1, SFX_BITE
anim_obj $1, 144, 48, $18
anim_wait 16
anim_sound $1, SFX_BITE
anim_obj $1, 128, 64, $18
anim_wait 8
anim_sound $1, SFX_SHINE
anim_obj $12, 128, 42, $0
anim_wait 6
anim_sound $1, SFX_SHINE
anim_obj $12, 144, 70, $0
anim_wait 6
anim_sound $1, SFX_SHINE
anim_obj $12, 120, 56, $0
anim_wait 6
anim_sound $1, SFX_SHINE
anim_obj $12, 152, 56, $0
anim_wait 6
anim_sound $1, SFX_SHINE
anim_obj $12, 144, 42, $0
anim_wait 6
anim_sound $1, SFX_SHINE
anim_obj $12, 128, 70, $0
anim_ret
; c97a1

What is wrong with that ice fang animation? In game the ice objects just appear as light blue squares.

Also, in my folder I have pokecrystal.map, but I don't see it here? https://github.com/kanzure/pokecrystal

Last edited by Urnighter (2015-04-15 19:07:01)

Offline

#14 2015-04-15 19:18:57

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

Re: Simple Questions & Answers

You haven't loaded ANIM_GFX_ICE.

pokecrystal.sym and pokecrystal.map are generated by rgblink.

Offline

#15 2015-04-16 01:48:54

Urnighter
Member
Registered: 2015-01-17
Post 57/123

Re: Simple Questions & Answers

Thanks!

This one is kinda odd.

BattleAnim_ThunderFang: ; ca3ee
anim_2gfx ANIM_GFX_CUT, ANIM_GFX_HIT
anim_obj $36, 136, 56, $98
anim_obj $36, 136, 56, $18
anim_wait 8
anim_sound $1, SFX_BITE
anim_obj $1, 144, 48, $18
anim_wait 16
anim_sound $1, SFX_BITE
anim_obj $1, 128, 64, $18
anim_wait 8
anim_1gfx ANIM_GFX_LIGHTNING
anim_obj $a, 136, 56, $43
anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $8, $2
anim_sound $1, SFX_THUNDER
anim_obj $2f, 152, 68, $0
anim_wait 64
anim_ret

For Thunder Fang above after the bolt comes down the top and bottom of the mouth for bite disappear leaving just the 4 teeth? How can I fix this?

Offline

#16 2015-05-10 15:00:03

Urnighter
Member
Registered: 2015-01-17
Post 58/123

Re: Simple Questions & Answers

So I'd like some help replacing Mr.Mime with Glaceon

I have front and back pics for glaceon I downloaded from http://wahackforo.com/t-26664/gbc-mega-pack-devamps

They are .bmp files. How to I put them into the game?

The folder includes...

anim0.asm
anim1.asm
back.6x6.2bpp.lz
bitmask.asm
frames.asm
front.5x5.2bpp.lz
normal.pal
shiny.pal

Can I have an explanation on what each of these are and how I would go about changing them for glaceon?

Offline

#17 2015-05-10 17:09:44

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

Re: Simple Questions & Answers

Open paint and save them as png.

The non-image files are for the animations. you can append frames below the first one like so:

DCa2Md1.png

anim0 and anim1 just tell the game what frames play in what order. You'll want to edit these if you don't have a lot of frames, or you'll probably get graphical errors.

There's an option to generate bitmask.asm and frames.asm from multi-frame pics. I'm not sure it's exposed, so you'll need to run a python interpreter and call it:

$ python
>>> from extras.pokemontools.gfx import export_png_to_2bpp
>>> export_png_to_2bpp('gfx/pics/glaceon/front.5x5.png', palout='gfx/pics/glaceon/normal.pal', animate=True)

The 5x5 can be changed to 6x6 or 7x7.

Offline

#18 2015-05-10 18:47:54

Urnighter
Member
Registered: 2015-01-17
Post 59/123

Re: Simple Questions & Answers

I only intend on having one frame, so what should I do with the anims?

Current error message says pics5 is too big. Al I did was put the .png file where mr. mime's old front pic should be and change the name in pics.asm accordingly. What's wrong? Can post diff if needed.

Offline

#19 2015-05-10 22:36:37

Urnighter
Member
Registered: 2015-01-17
Post 60/123

Re: Simple Questions & Answers

So I fixed it by making the .png file smaller

Getting...
"make: *** No rule to make target `gfx/pics/glaceon/GlaceonBack.png', needed by `gfx/pics.o'.  Stop."

I definitely screwed up a lot of stuff, this is my first time messing with adding a pokemon.

Here is git dif

http://www.writeurl.com/text/b7g1j4in81 … 7ppc1qxcel

Offline

#20 2015-05-11 05:36:28

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

Re: Simple Questions & Answers

make is complaining that gfx/pics/glaceon/GlaceonBack.png doesn't exist. Maybe it's named something else.

The only problem with your code is the incbins. change

INCBIN "gfx/pics/glaceon/GlaceonFront.png"

to

INCBIN "gfx/pics/glaceon/GlaceonFront.2bpp.lz"

the .2bpp.lz will automatically be made when you build. It will be jumbled because gfx.py doesn't know GlaceonFront.png is a pokemon pic (the tile arrangement is top-down instead of left-right). You can fix this by putting the dimensions in the filename ('GlaceonFront.7x7.png' if it's 7x7 tiles), or converting it using the interpreter like in my last post.

Offline

#21 2015-05-11 13:50:10

Urnighter
Member
Registered: 2015-01-17
Post 61/123

Re: Simple Questions & Answers

Current name is "front.7x7.2bpp.lz" for glaceon's front png.

It gives me the error "make: *** No rule to make target `gfx/pics/glaceon/front.7x7.2bpp.lz', needed by `gfx/pics.o'.  Stop."

I'm positive the name in pics.asm matches what the file is called.

Offline

#22 2015-05-15 20:54:18

Urnighter
Member
Registered: 2015-01-17
Post 62/123

Re: Simple Questions & Answers

Anything comet? Would you like the git.diff? I still don't see why it's giving me that error message.

Offline

#23 2015-05-16 00:28:54

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

Re: Simple Questions & Answers

if you have gfx/pics/glaceon/front.7x7.png that ought to work.

Offline

#24 2015-05-16 05:06:17

Urnighter
Member
Registered: 2015-01-17
Post 63/123

Re: Simple Questions & Answers

Edit: Nevermind

Issue solved form what I can tell.

Current error is "gbasm: Section 'Pics 16' is too big (old size 16258 + 176 > 16384)"
This is where I put gliscor's back pic. What's the easiest solution?

Last edited by Urnighter (2015-05-16 20:36:50)

Offline

#25 2015-05-17 20:44:33

Mmmmmm
Member
From: West Virginia
Registered: 2015-05-17
Post 1/252

Re: Simple Questions & Answers

I recently added the physical/special split to the Crystal disassembly. Testing it, it seems to work perfectly, but I also want to add the phys/spec indicator to the battle screen, similar to how Maize and XY Naturia do it ("TYPE/" is replaced by "TYPE/PHY" or SPE or STA depending on the move type).

Where in the disassembly would I be able to find the battle menu, and if there's already an easy known way to do it with the disassembly, what would that way be? If it's not known, just pointing me to the file I need to go to would help a ton on its own.

Offline

Board footer

Powered by FluxBB