Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#676 2022-01-07 17:52:11

nightbringer
Member
Registered: 2021-08-18
Post 14/24

Re: Simple Questions & Answers

One more:

I have changed the stats screen so that it shows the pokemon's current happiness, e.g. 70/255. It works. But the number displays with the game's "¥" money symbol in front. Its not game-breaking but I'd rather it not be there.

The script I have for displaying happiness in engine/battle/stats_screen.asm is:

LoadOrangePage:
ld de, HappinessString
call PlaceString
hlcoord 1, 9
ld de, wTempMonHappiness
call PrintNum
ld de, HappinessTextString
call PlaceString
; now for caught location
call .PlaceCaughtLocation
ld de, MetAtMapString
hlcoord 1, 11
call PlaceString
ret

Is there a simple way to fix it?

Last edited by nightbringer (2022-01-07 17:52:43)

Offline

#677 2022-01-08 00:40:47

Rangi
Administrator
Registered: 2016-05-09
Post 982/984

Re: Simple Questions & Answers

Put "lb bc, 1, 3" before "call PrintNum". The comment in engine/math/print_num.asm explains why:

; Print c digits of the b-byte value from de to hl.
; Allows 2 to 7 digits. For 1-digit numbers, add
; the value to char "0" instead of calling PrintNum.
; The high nybble of the c register specifies how many of the total amount of
; digits will be in front of the decimal point.
; Some extra flags can be given in bits 5-7 of b.
; Bit 5: money if set (unless left-aligned without leading zeros)
; Bit 6: left-aligned if set
; Bit 7: print leading zeros if set

Offline

#678 2022-01-08 12:31:59

nightbringer
Member
Registered: 2021-08-18
Post 16/24

Re: Simple Questions & Answers

Rangi, you hero.

I was reading that text in engine/math/print_num.asm and figured that was something to do with it but I couldn't figure what exactly to do. Glad to know I was on the right track - just needed a little helping hand!

Offline

#679 2022-01-08 12:34:52

nightbringer
Member
Registered: 2021-08-18
Post 17/24

Re: Simple Questions & Answers

Btw, BOOST15673, it sounds like something might be up with your RGBDS installation? Maybe you didn't get all the packages you needed when you installed it?

Doesn't sound like there's anything wrong with the ROM code or with the emulators so it sounds like there's a problem with the software that's building the game from the code.

Last edited by nightbringer (2022-01-08 12:36:33)

Offline

#680 2022-03-19 22:31:19

eddieweppler
New member
From: Germany
Registered: 2018-05-25
Post 4/5

Re: Simple Questions & Answers

after a small hiatus from modding GSC i'm back with tinkering with Item Effects... but i'm a bit struck ATM...
maybe someone has an idea to improve it... the goal is to give my PKMN a berry (RAZZ_BERRY) and increase its happiness outside of a battle AND without healing it

well, here's the script:
RazzBerryEffect:
ld c, HAPPINESS_RAZZ_BERRY
jr RazzBerryCommon

RazzBerryCommon:
ld b, PARTYMENUACTION_HEALING_ITEM
call UseItem_SelectMon

jp c, .DecidedNotToUse

ld a, MON_ITEM
call GetPartyParamLocation

pop bc
cp 0
jr nz, .skip_happiness

farcall ChangeHappiness
call RazzBerryMessage
ld a, 0
call QueueScript
ld a, [wItemEffectSucceeded]
cp 1
call z, UseDisposableItem
ret

.skip_happiness
jp StatusHealer_Jumptable

.DecidedNotToUse:
xor a
ld [wItemEffectSucceeded], a
ret


it technically works, but only in battle... outside of it, it just displays the text that my PKMN ate the berry, but doesn't increase its happiness for some reason
it's probably a simply solution i'm just overlooking

Offline

#681 2022-05-24 17:43:38

nightbringer
Member
Registered: 2021-08-18
Post 23/24

Re: Simple Questions & Answers

@eddieweppler

I recently added an item to my hack that increases happiness with no additional effect. It seems to be working. It's not a held item and is only usable outside of battle so it's not exactly what you're after but perhaps it will still help. Here's my script in engine/items/item_effects.asm:

ld b, PARTYMENUACTION_HEALING_ITEM
call UseItem_SelectMon

jp c, RareCandy_StatBooster_ExitMenu

call RareCandy_StatBooster_GetParameters

ld c, HAPPINESS_BRONZEITEM
farcall ChangeHappiness

ld hl, HappinessRoseText
call PrintText

jp UseDisposableItem

...

The HAPPINESS_BRONZEITEM is just a value I defined in the happiness arguments file. Replace it with your chosen happiness value. And obviously, you'll need your own text to load.

Last edited by nightbringer (2022-05-24 17:44:15)

Offline

#682 2022-05-24 17:45:49

nightbringer
Member
Registered: 2021-08-18
Post 24/24

Re: Simple Questions & Answers

Alright, here's a question about a basic skill but it's one I haven't used yet in my hack.

At present, pokemon in my hack cannot learn as many moves through levelling up as they can in, say, Polished Crystal. That's because when I try to add more moves to data/pokemon/evos_attacks.asm it isn't long before the file becomes too big for its current ROM bank.

I take it that a solution is to move this file into a roomier ROM bank.

I assumed that the way to do this was to find where the INCLUDE: "data/pokemon/evos_attacks.asm" command is and move the location of that command to a different ROM bank. But I can't find any such command. The evos_attacks.asm file is not 'included' anywhere, so far as I can see.

So I'm honestly stumped. Appreciate any help from kindly folks out there!

Offline

#683 2022-06-03 11:39:54

eddieweppler
New member
From: Germany
Registered: 2018-05-25
Post 5/5

Re: Simple Questions & Answers

nightbringer wrote:

@eddieweppler

I recently added an item to my hack that increases happiness with no additional effect. It seems to be working. It's not a held item and is only usable outside of battle so it's not exactly what you're after but perhaps it will still help. Here's my script in engine/items/item_effects.asm:

ld b, PARTYMENUACTION_HEALING_ITEM
call UseItem_SelectMon

sorry, already tried, PARTYMENUACTION_HEALING_ITEM will NOT work if the corresponding item isn't a healing item anymore

but it WILL work for, say: SWEET_HEART, MOOMOO_MILK, LEMONADE ect.


nightbringer wrote:

Alright, here's a question about a basic skill but it's one I haven't used yet in my hack.

At present, pokemon in my hack cannot learn as many moves through levelling up as they can in, say, Polished Crystal. That's because when I try to add more moves to data/pokemon/evos_attacks.asm it isn't long before the file becomes too big for its current ROM bank.

I take it that a solution is to move this file into a roomier ROM bank.

I assumed that the way to do this was to find where the INCLUDE: "data/pokemon/evos_attacks.asm" command is and move the location of that command to a different ROM bank. But I can't find any such command. The evos_attacks.asm file is not 'included' anywhere, so far as I can see.

So I'm honestly stumped. Appreciate any help from kindly folks out there!

The main problem is that the data/moves/moves.asm AND the evos_attacks.asm must be in the same rom bank to work properly, or your mons will show up with no moves at all and use STRUGGLE on end...

pokecrystal.link
ROMX $10
"bank10"
"Evolutions and Attacks" <- the file you're looking for

the easiest way to shovel out a bit of free space is to go to:
main.asm
SECTION "bank10", ROMX

remove the
INCLUDE "engine/pokedex/pokedex.asm"
INCLUDE "engine/pokemon/evolve.asm"

and copy them to another SECTION
SECTION "Pic Animations 3", ROMX should be enough for booth

Offline

#684 2022-06-22 04:54:39

BOOST15673
New member
Registered: 2020-12-30
Post 5/5

Re: Simple Questions & Answers

nightbringer wrote:

Btw, BOOST15673, it sounds like something might be up with your RGBDS installation? Maybe you didn't get all the packages you needed when you installed it?

Doesn't sound like there's anything wrong with the ROM code or with the emulators so it sounds like there's a problem with the software that's building the game from the code.

Unfortunately not. I went ahead and redid everything from scratch, still the same issue. Got the latest pokecrystal repo, reinstalled cygwin & RGBDS, still the same issue. Apparently pokecrystal is not fond of me. This is strange, because many years ago before I even heard of pokecrystal I would mod using old-fashioned modding tools and never encountered these issues, even when manually hex editing it was fine. I went ahead and nixed my mod and started over in pokecrystal and can't seem to get past this issue.

EDIT: WAIT A MINUTE, I THINK I GOT SOMETHING HERE. Whenever a wild Pokemon uses a status move, like Caterpie with String Shot, the game crashes to a black screen with the audio being stuck. HOWEVER, when a wild Hoppip uses Splash, a crash does not occur. Whenever the first Rival battle in Cherrygrove makes his starter use a status move, Growl or Leer that is, the game resets with the "Designed for Gameboy Color error" while still being in color. I have loaded multiple save states and both aforementioned cases are consistent. So obviously something is broken with the AI using status moves that affect me as every normal attack works fine, and when I use a status move, nothing crashes or resets. Any ideas? Only took 6 months to corner this damn issue!

If anybody else has any ideas, remember though, this happens when pokecrystal/cygwin's terminal creates a vanilla rom AND when it creates my modified rom, so both cases, see my old comment from 12/20/21 #675 for more info.

EDIT 2!: I found out something else interesting. When using the pokegold disassembly and building either gold or silver roms, regardless if vanilla or modded, NO CRASHES OR ISSUES! So what, something's wrong with Crystal only? This doesn't make sense that building Gold & Silver works flawlessly, but Crystal doesn't.



FINAL EDIT (Please dear god!): I DID IT, I FIGURED IT OUT! I was attempting to remove the badge boosts you get by removing all BadgeStatBoosts routines from engine\battle\core.asm & engine\battle\effect_commands.asm. Something in here was being removed that shouldn't have been, I removed too much somewhere and that was causing it. By reverting all of the changes completely, it is now fully fixed! I no longer have this issue. It was my dumb doing all along! Well so much for removing badge boosts I guess. Maybe someday.

Last edited by BOOST15673 (2022-06-24 03:56:00)

Offline

Board footer

Powered by FluxBB