Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#426 2017-07-27 22:54:28

Rangi
Member
Registered: 2016-05-09
Post 776/791

Re: Simple Questions & Answers

Maniac379 wrote:

I was following Rangi's commit to show quantity held in bag on the mart screen:

https://github.com/jpmac26/polishedcrys … c73ff295c9

Works great except for TMs.  I guess Rangi doesn't have any stores selling TMs.  I made mine unlimited so wouldn't mind hiding the TM count but I at least need the store to say if the player owns the TM or not.

I tried this as my best shot, it glitches.  I'm not the best with this coding:

.TMHM:
ld a, [CurItem]
cp 0
jr .owns
ret
.owns
inc hl
ret

Look at the up-to-date mart.asm code; a later commit added TM support.


ROM hack: Pokémon Polished Crystal (GitHub) — version 2.2.0 released!

Offline

#427 2017-07-27 23:57:11

Maniac379
Member
Registered: 2015-01-15
Post 105/106

Re: Simple Questions & Answers

Rangi wrote:
Maniac379 wrote:

I was following Rangi's commit to show quantity held in bag on the mart screen:

https://github.com/jpmac26/polishedcrys … c73ff295c9

Works great except for TMs.  I guess Rangi doesn't have any stores selling TMs.  I made mine unlimited so wouldn't mind hiding the TM count but I at least need the store to say if the player owns the TM or not.

I tried this as my best shot, it glitches.  I'm not the best with this coding:

.TMHM:
ld a, [CurItem]
cp 0
jr .owns
ret
.owns
inc hl
ret

Look at the up-to-date mart.asm code; a later commit added TM support.

Hmm I see many different commits to add in a TMMart.  Anyway to do this without going through all that?  I'm weary of just straight copying the mart file as well, probably many other changes.


---
Pokémon White Crystal
A simple quality of life and gameplay improved hack

Offline

#428 2017-07-28 02:37:54

Danny-E 33
Administrator
Registered: 2012-06-09
Post 1,029/1,030

Re: Simple Questions & Answers

Zwyft wrote:

Hi everybody! I'm hacking Red and changed the trainer data so that the rival picks the starter weak to yours and his team develops accordingly. That being said, I'd like to 'recycle' the unused Oak Battle script so that the last Gym Leader's team changes based on the starter you chose (Has the starter that beats yours). But I can't seem to work out how to link those battles. If anyone could lend a hand, it would be nice.

Hi, Zwyft.

Sorry I don't check the board too often or too carefully sometimes nowadays.

To make this work, you need to set the "trainer number" manually in a map script when the battle starts in a way similar to how the rival's trainer number is decided.

Currently, the gym leader's trainer number is constant:
in data/mapObjects/viridiangym.asm:

object SPRITE_GIOVANNI, $2, $1, STAY, DOWN, $1, OPP_GIOVANNI, $3

And the "$3" at the very end is the trainer number. This refers to the 3rd party for Giovanni defined in data/trainer_parties.asm

For comparison, see how the trainer number is set for any rival battle.
in data/mapObjects/ceruleancity.asm:

object SPRITE_BLUE, $14, $2, STAY, DOWN, $1 ; person

and from data/mapObjects/ssanne2.asm:

object SPRITE_WAITER, $3, $7, WALK, $1, $1 ; person

Every map object for your rival claims to use trainer number 1, but that's just because that value never actually gets used.
Instead, take a look at scripts/ceruleancity.asm:

...
    ld hl, CeruleanCityText_1966d
    ld de, CeruleanCityText_19672
    call SaveEndBattleTextPointers
    ld a, OPP_SONY1
    ld [wCurOpponent], a

    ; select which team to use during the encounter
    ld a, [wRivalStarter]
    cp STARTER2
    jr nz, .NotSquirtle
    ld a, $7
    jr .done
.NotSquirtle
    cp STARTER3
    jr nz, .Charmander
    ld a, $8
    jr .done
.Charmander
    ld a, $9
.done
    ld [wTrainerNo], a

As you can see, the rival's starter is checked (but you could just as easily check wPlayerStarter) and based on the result, load a specific value into wTrainerNo (in this case, trainer number $7, $8, or $9).
Then if you include 2 more trainer parties for Giovanni, you could have the last gym leader load trainer number 3, 4, or 5 based on your starter.


Red Hack: Pokémon Prototype

Total number of registered users: 7000+
Total number of active users: ~12

Offline

#429 2017-07-28 21:29:12

Maniac379
Member
Registered: 2015-01-15
Post 106/106

Re: Simple Questions & Answers

Maniac379 wrote:
Rangi wrote:
Maniac379 wrote:

I was following Rangi's commit to show quantity held in bag on the mart screen:

https://github.com/jpmac26/polishedcrys … c73ff295c9

Works great except for TMs.  I guess Rangi doesn't have any stores selling TMs.  I made mine unlimited so wouldn't mind hiding the TM count but I at least need the store to say if the player owns the TM or not.

I tried this as my best shot, it glitches.  I'm not the best with this coding:

.TMHM:
ld a, [CurItem]
cp 0
jr .owns
ret
.owns
inc hl
ret

Look at the up-to-date mart.asm code; a later commit added TM support.

Hmm I see many different commits to add in a TMMart.  Anyway to do this without going through all that?  I'm weary of just straight copying the mart file as well, probably many other changes.

I tried, https://github.com/maniac379/White-Crys … rtquantity

I am guessing a lot of issues from the gfx you use in the menu.  Will look later, took forever to even get it to compile.  Marts are glitched on the left side and do not show quantity.  TM mart in Goldenrod crashes game...enough time on it for today...

EDIT: Undid menu gfx changes, normal marts work correctly again.  TM mart still crashes game. https://github.com/maniac379/White-Crys … bd8f542191

Last edited by Maniac379 (2017-07-29 19:47:36)


---
Pokémon White Crystal
A simple quality of life and gameplay improved hack

Offline

#430 2017-08-05 18:29:25

rbroab
Member
Registered: 2017-06-13
Post 62/63

Re: Simple Questions & Answers

Have a few questions...

After adding menu sprites for every Pokemon, the dolls got all messed up. Thoughts?

6anTt5x.png


Does anyone know where to find the dimensions of the pokepic box? (Picture box that displays the pokemon using an overworld move). The pokepic box in mine seems to have a lot of overhang and isn't square


Is it possible to turn the surfing sprite blue? It's weird to go catch a blue Lapras, use it to surf, than it turns red. And honestly I just like the blue colored surf sprite more.

Last edited by rbroab (2017-08-05 19:14:55)

Offline

#431 2017-08-10 13:22:59

Adam
Member
Registered: 2016-05-07
Post 84/89

Re: Simple Questions & Answers

Where abouts in the code are the items that your mom buys you? I tried searching Pokecrystal but couldn't find. Not even sure what it'd be under.

I want to swap the items for stuff that will actually be useful!

Offline

#432 2017-08-10 14:54:12

Rangi
Member
Registered: 2016-05-09
Post 783/791

Re: Simple Questions & Answers

Adam wrote:

Where abouts in the code are the items that your mom buys you? I tried searching Pokecrystal but couldn't find. Not even sure what it'd be under.

I want to swap the items for stuff that will actually be useful!

event/mom_phone.asm:

MomItems_1: ; fd136
    momitem      0,   600, MOM_ITEM, SUPER_POTION
    momitem      0,    90, MOM_ITEM, ANTIDOTE
    momitem      0,   180, MOM_ITEM, POKE_BALL
    momitem      0,   450, MOM_ITEM, ESCAPE_ROPE
    momitem      0,   500, MOM_ITEM, GREAT_BALL
MomItems_2: ; fd15e
    momitem    900,   600, MOM_ITEM, SUPER_POTION
    momitem   4000,   270, MOM_ITEM, REPEL
    momitem   7000,   600, MOM_ITEM, SUPER_POTION
    momitem  10000,  1800, MOM_DOLL, DECO_CHARMANDER_DOLL
    momitem  15000,  3000, MOM_ITEM, MOON_STONE
    momitem  19000,   600, MOM_ITEM, SUPER_POTION
    momitem  30000,  4800, MOM_DOLL, DECO_CLEFAIRY_DOLL
    momitem  40000,   900, MOM_ITEM, HYPER_POTION
    momitem  50000,  8000, MOM_DOLL, DECO_PIKACHU_DOLL
    momitem 100000, 22800, MOM_DOLL, DECO_BIG_SNORLAX_DOLL

Last edited by Rangi (2017-08-10 14:54:37)


ROM hack: Pokémon Polished Crystal (GitHub) — version 2.2.0 released!

Offline

#433 2017-08-10 16:28:03

Ketchup_Raptor
Member
Registered: 2017-04-23
Post 20/23

Re: Simple Questions & Answers

I haven't been here or worked on my hack in a while but will probably be putting some more effort in soon and I had an idea for making it seem more unique. I think I know how I would be able to do this but I want to know if others think its possible.
Flareon
with this sprite instead of having two colors, black, and a transparent which becomes white, I have three colors and a transparent which becomes black.
I think this could work but I'm not sure, I would have to make it so the background color in battle is black instead of white and recolor the battle interface, I'd probably have to make it so textboxes are white on black too, I haven't tried anything yet but would like to know if others think this is possible before I get into doing it because I'd probably have to change a lot of stuff.

Last edited by Ketchup_Raptor (2017-08-10 16:35:15)

Offline

#434 2017-08-10 17:29:56

Rangi
Member
Registered: 2016-05-09
Post 784/791

Re: Simple Questions & Answers

Ketchup_Raptor wrote:

I haven't been here or worked on my hack in a while but will probably be putting some more effort in soon and I had an idea for making it seem more unique. I think I know how I would be able to do this but I want to know if others think its possible.
http://imgur.com/e8yu8ZA.png
with this sprite instead of having two colors, black, and a transparent which becomes white, I have three colors and a transparent which becomes black.
I think this could work but I'm not sure, I would have to make it so the background color in battle is black instead of white and recolor the battle interface, I'd probably have to make it so textboxes are white on black too, I haven't tried anything yet but would like to know if others think this is possible before I get into doing it because I'd probably have to change a lot of stuff.

This certainly looks possible. You could start by seeing how the Pokédex inverts its font color temporarily. Then look at the battle graphics, including the ones for move animations, and edit those.

Something like this would be really cool:

YuHeieN.png

You would also need to edit move animations that fiddle with palettes, such as by lightening or inverting them.

Last edited by Rangi (2017-08-10 17:32:23)


ROM hack: Pokémon Polished Crystal (GitHub) — version 2.2.0 released!

Offline

#435 2017-08-12 04:22:43

SubstituteCreature
New member
Registered: 2016-12-01
Post 7/8

Re: Simple Questions & Answers

In the process of writing NPC dialogue, I've been wondering what's the specific character limit per line?
Also is there a limit to how lengthy dialogue can be?
So far I've just been eyeballing it but a concrete number (if any) would be nice.


GSC style Fakemon designer/spriter
My Art
My Hack (In Progress)

Offline

#436 2017-08-12 05:10:12

Ketchup_Raptor
Member
Registered: 2017-04-23
Post 21/23

Re: Simple Questions & Answers

SubstituteCreature wrote:

In the process of writing NPC dialogue, I've been wondering what's the specific character limit per line?
Also is there a limit to how lengthy dialogue can be?
So far I've just been eyeballing it but a concrete number (if any) would be nice.

I think it is 18 characters per line

Offline

#437 2017-08-12 15:17:41

Adam
Member
Registered: 2016-05-07
Post 85/89

Re: Simple Questions & Answers

Yeah Ketchup is right, it's 18 characters max.

Thanks Rangi for your answer before.

------------------

I now have a problem that's really annoying me, because I did this a couple of years ago but have completely forgotten. It's such a pain.

Anyway, what I am wanting to do is replace a few sprites. I am changing the baby pokes into the gen 4 evolutions, since noone really cares for the baby pokemon. I have done everything else, so the sprites are all I have left. I am not using disassembly.

Since this is a Crystal hack, I can't just use AGIXP since it doesn't work. So this is what I have done so far:

1) Using AGIXP, I have inserted a Mismagius sprite (which looks fine in the preview and is 56x56) into a Silver hack at address x146DA4
2) Using the disassembly *.*sym file, I have located the address of the Pichu front sprite - bank 54, pointer 4C2C (x150C2C, using GB-PC)
3) I have found free space at x166C50 (I'll '00' out the old pic once I've got it working....) to copy the hex across from the silver rom (it's 425 bytes, if that matters).
4) Now I want to find the old pointer for the pichu sprite and redirect it here. I assume it will be in the format 2C 4C 54 or 54 2C 4C, although I can't find either. HOWEVER, I seem to remember that bank pointers are off for crystal so I probably need to look for a different bank number. I can't remember how much it is off by.

Any ideas? Also, can someone confirm how many instances I would need to replace. I'm thinking maybe 3. One for battles, one for Pokedex and the other for the stats screen.

Thanks!

Last edited by Adam (2017-08-12 15:18:06)

Offline

#438 2017-08-12 16:22:19

Rangi
Member
Registered: 2016-05-09
Post 785/791

Re: Simple Questions & Answers

Adam wrote:

Anyway, what I am wanting to do is replace a few sprites. I am changing the baby pokes into the gen 4 evolutions, since noone really cares for the baby pokemon. I have done everything else, so the sprites are all I have left. I am not using disassembly.

Since this is a Crystal hack, I can't just use AGIXP since it doesn't work. So this is what I have done so far:

1) Using AGIXP, I have inserted a Mismagius sprite (which looks fine in the preview and is 56x56) into a Silver hack at address x146DA4
2) Using the disassembly *.*sym file, I have located the address of the Pichu front sprite - bank 54, pointer 4C2C (x150C2C, using GB-PC)
3) I have found free space at x166C50 (I'll '00' out the old pic once I've got it working....) to copy the hex across from the silver rom (it's 425 bytes, if that matters).
4) Now I want to find the old pointer for the pichu sprite and redirect it here. I assume it will be in the format 2C 4C 54 or 54 2C 4C, although I can't find either. HOWEVER, I seem to remember that bank pointers are off for crystal so I probably need to look for a different bank number. I can't remember how much it is off by.

Any ideas? Also, can someone confirm how many instances I would need to replace. I'm thinking maybe 3. One for battles, one for Pokedex and the other for the stats screen.

Thanks!

Look for where else in the pokecrystal code uses PichuFrontpic. There's only one use of the pointer, not three, in gfx/pics/pic_pointers.asm. You're right that the pic banks are offset in Crystal. This line:

add_pic PichuFrontpic

uses this macro:

add_pic: MACRO
    db BANK(\1) - $36
    dw \1
ENDM

so the byte pattern should be 1E 2C 4C.

Remember, you'll also need to update the animation data if you haven't already.


ROM hack: Pokémon Polished Crystal (GitHub) — version 2.2.0 released!

Offline

#439 2017-08-12 16:43:04

Adam
Member
Registered: 2016-05-07
Post 86/89

Re: Simple Questions & Answers

Yeah, I've removed animations for all pokes to keep it simple.

gqdUq4D.png

The pointer was easy to find after I knew how much the banks were off by, but the image seems to be wonky. It looks like it found the right picture, as I can see bits of the image, but it's mangled and the colours aren't right.

Any ideas what's up?

Last edited by Adam (2017-08-12 16:43:33)

Offline

#440 2017-08-12 20:33:40

SubstituteCreature
New member
Registered: 2016-12-01
Post 8/8

Re: Simple Questions & Answers

Ketchup_Raptor wrote:
SubstituteCreature wrote:

In the process of writing NPC dialogue, I've been wondering what's the specific character limit per line?
Also is there a limit to how lengthy dialogue can be?
So far I've just been eyeballing it but a concrete number (if any) would be nice.

I think it is 18 characters per line

That was my guesstimate, but it's nice to have confirmation. Thanks!
I have a lot of trimming to do...


GSC style Fakemon designer/spriter
My Art
My Hack (In Progress)

Offline

#441 2017-08-14 11:19:26

Adam
Member
Registered: 2016-05-07
Post 87/89

Re: Simple Questions & Answers

Right, I've sorted out the size. In the end I just changed the default byte in the base stats from 5 to 6 in the disassembly, found the location of the changed byte and then altered the subsequent byte from 55 to 77. That seemed to sort out the size. The palette is still wrong though, and I can't find where the pokemon palettes are. I also need to know how to alter transparency colour. In a couple of pics I have black as the transparency, so they come out with a black square around them.

I know where the trainer ones are, because Miksy once told me, but not where the pokemon ones are. I assume that they are all 4 bytes long and are in pokedex order, so if that is the case then all I need is the start location for the data (bulbasaur presumably).

Last edited by Adam (2017-08-15 17:17:32)

Offline

#442 2017-08-15 18:55:09

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

Re: Simple Questions & Answers

0xa8ce. 8 bytes per pokemon (4 bytes for normal pal, followed by 4 bytes for shiny pal; for each pal, 2 bytes for light color and 2 bytes for dark color), by Pokedex order.

Offline

#443 2017-08-15 21:53:23

UberMedic7
Member
From: Greece
Registered: 2013-07-25
Post 53/54

Re: Simple Questions & Answers

So i messed around in crystal and made a gym rematch, although for some reason, the gym trainers become active again, playing random music when they see you/talk to them and the game hangs.

;i slightly edited this for the game to check if a rematch question can occur
.GotFuryCutter:
    writetext BugsyText_BugMonsAreDeep
    yesorno
    iftrue .BugsyRematch

;and here is the custom script of the rematch    
.BugsyRematch:
    winlosstext BugsyText_RematchDefeat, 0
    loadtrainer BUGSY, 1
    startbattle
    reloadmapafterbattle

Offline

#444 2017-08-16 22:03:52

Adam
Member
Registered: 2016-05-07
Post 88/89

Re: Simple Questions & Answers

Crystal_ wrote:

0xa8ce. 8 bytes per pokemon (4 bytes for normal pal, followed by 4 bytes for shiny pal; for each pal, 2 bytes for light color and 2 bytes for dark color), by Pokedex order.

Thanks Crystal, that's a big help. I've got everything sorted now with the palettes.

However, I'm trying to disable animations via hex and can't seem to get it to work. I'm making two disassembly compiles. One as a base, and the other with one pokemon's animation set to "ENDANIM" (as per another post on the site). My intention was simply to note the difference and then copy it into the relevant place in my hack. When I compare though, there are lots of things changed so I don't know what part to alter.

A year ago I did it with Mewtwo and don't remember having any problems, so I've no idea why it's so difficult now :/

Offline

#445 2017-08-16 22:30:13

Rangi
Member
Registered: 2016-05-09
Post 787/791

Re: Simple Questions & Answers

Adam wrote:
Crystal_ wrote:

0xa8ce. 8 bytes per pokemon (4 bytes for normal pal, followed by 4 bytes for shiny pal; for each pal, 2 bytes for light color and 2 bytes for dark color), by Pokedex order.

Thanks Crystal, that's a big help. I've got everything sorted now with the palettes.

However, I'm trying to disable animations via hex and can't seem to get it to work. I'm making two disassembly compiles. One as a base, and the other with one pokemon's animation set to "ENDANIM" (as per another post on the site). My intention was simply to note the difference and then copy it into the relevant place in my hack. When I compare though, there are lots of things changed so I don't know what part to alter.

A year ago I did it with Mewtwo and don't remember having any problems, so I've no idea why it's so difficult now :/

If you just deleted all the animation data and replaced with "endanim"s, it probably shifted a bunch of other data that shows up as changed in diffs.

Try this: edit gfx/pics/anim_pointers.asm so all the pointers are NewEmptyAnimPointer, and likewise with gfx/pics/extra_pointers.asm and NewEmptyExtraPointer. Then edit gfx/pics/bulbasaur/anim0.asm and put the label "NewEmptyAnimPointer:" right before its endanim command, and likewise with gfx/pics/bulbasaur/anim1.asm and NewEmptyExtraPointer. Now when you compile pokecrystal, all that will have changed is the pointer values in those two tables. Those changes should be safe to copy.

Another way would be to note the offsets of AnimationPointers and AnimationExtraPointers in the .sym file. Then note that in main.asm, the animation data comes right after the animation pointer tables. Edit both pointer tables so all of their pointers point to right after the end of each table, then edit the animation data so the first byte is an "endanim" commnd and the rest is zeroed out. That way you can use it as free space.


ROM hack: Pokémon Polished Crystal (GitHub) — version 2.2.0 released!

Offline

#446 2017-08-17 12:04:59

Adam
Member
Registered: 2016-05-07
Post 89/89

Re: Simple Questions & Answers

Rangi wrote:

Try this: edit gfx/pics/anim_pointers.asm so all the pointers are NewEmptyAnimPointer, and likewise with gfx/pics/extra_pointers.asm and NewEmptyExtraPointer. Then edit gfx/pics/bulbasaur/anim0.asm and put the label "NewEmptyAnimPointer:" right before its endanim command, and likewise with gfx/pics/bulbasaur/anim1.asm and NewEmptyExtraPointer. Now when you compile pokecrystal, all that will have changed is the pointer values in those two tables. Those changes should be safe to copy.

I tried this, as I wasn't sure what you mean't with the second one. I got the following error:

$ make
make -C tools/
rgbasm -o main.o main.asm
ERROR:  main.asm(5286) -> gfx/pics/anim_pointers.asm(2) :
        Macro 'NewEmptyAnimPointer' not defined
make: *** [Makefile:62: main.o] Error 5

Offline

#447 2017-08-18 02:09:45

RareScepy
New member
Registered: 2017-04-18
Post 8/8

Re: Simple Questions & Answers

I just finished cleaning my pokecrystal rom of all non-New Bark maps (New Bark, player's house, Elm's Lab, etc. were kept, for now) and connected events, so that I could start fresh when building a new region. I compiled the .gbc ROM successfully, loaded it up in VBA, and the "Welcome to the world of Pokémon" intro worked fine. However, after the sprite shrinks and the screen fades to white to load the player's house, it froze on the frame shown below.

yqbbUU4.png

Any idea what I deleted that I shouldn't have?

Offline

Board footer

Powered by FluxBB