Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#26 2014-02-23 02:31:39

comet
Member
Registered: 2012-04-09
Post 368/679

Re: Hack Requests

The wContestMon struct is kept in wram at 1:df9c. It's identical to a normal partymon.

The function you're looking for is probably this one:

ContestScore: ; 13900
; Determine the player's score in the Bug Catching Contest.

    xor a
    ld [hProduct], a
    ld [hMultiplicand], a

    ld a, [wContestMonSpecies] ; Species
    and a
    jr z, .done

    ; Tally the following:

    ; Max HP * 4
    ld a, [wContestMonMaxHP + 1]
    call .AddContestStat
    ld a, [wContestMonMaxHP + 1]
    call .AddContestStat
    ld a, [wContestMonMaxHP + 1]
    call .AddContestStat
    ld a, [wContestMonMaxHP + 1]
    call .AddContestStat

    ; Stats
    ld a, [wContestMonAttack  + 1]
    call .AddContestStat
    ld a, [wContestMonDefense + 1]
    call .AddContestStat
    ld a, [wContestMonSpeed   + 1]
    call .AddContestStat
    ld a, [wContestMonSpclAtk + 1]
    call .AddContestStat
    ld a, [wContestMonSpclDef + 1]
    call .AddContestStat

    ; DVs
    ld a, [wContestMonAtkDefDV]
    ld b, a
    and 2
    add a
    add a
    ld c, a

    swap b
    ld a, b
    and 2
    add a
    add c
    ld d, a

    ld a, [wContestMonSpdSpcDV]
    ld b, a
    and 2
    ld c, a

    swap b
    ld a, b
    and 2
    srl a
    add c
    add c
    add d
    add d

    call .AddContestStat

    ; Remaining HP / 8
    ld a, [wContestMonHP + 1]
    srl a
    srl a
    srl a
    call .AddContestStat

    ; Whether it's holding an item
    ld a, [wContestMonItem]
    and a
    jr z, .done

    ld a, 1
    call .AddContestStat

.done
    ret
; 1397f

.AddContestStat: ; 1397f
    ld hl, hMultiplicand
    add [hl]
    ld [hl], a
    ret nc
    dec hl
    inc [hl]
    ret
; 13988

Related functions are right by, but also check its caller (Function1369d).


Crystal_ wrote:

I don't even have any clue about whether the formula is calculated right after the pokemon is caught, in the exact moment the contest ends, or during the speech.

During the speech. It's hidden in a std script:

UnknownScript_0x6ab47: ; 0x6ab47
    ...
    jumpstd $0017
; 0x6ab76

std $17 is:

StdScripts:: ; bc000
    ...
    dbw BANK(UnknownScript_0xbc274), UnknownScript_0xbc274 ; $17
    ...
UnknownScript_0xbc274: ; bc274
    ... ; "Are you ready for this?"
    special $0014
    ...
; 0xbc2b1

special $14 is:

SpecialsPointers: ; c029
    ...
    dbw BANK(Functionc34a), Functionc34a ; $14
    ...
Functionc34a: ; c34a
    callba Function1369d
    ld a, b
    ld [ScriptVar], a
    ret
; c355

finally:

Function1369d: ; 1369d
    call ContestScore
    ...

Note that the current "CheckContestMon" function is mislabelled. It doesn't seem to be related to the contest at all.

Last edited by comet (2014-02-23 03:06:28)

Offline

#27 2014-02-23 10:59:09

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

Re: Hack Requests

Ah I see, so I should've tracked down the std script, I see. The funny thing is that I had in some way ended up there, because I have also edited the items given and one of them is in the std 17 script. Would've thought the formula would be calculated earlier than that, but I see I was wrong.

Thanks a ton!

Offline

#28 2014-03-20 12:48:57

Pokemon_Master
Member
From: Eastern Kingdom of Mikado
Registered: 2013-05-18
Post 761/951
Website

Re: Hack Requests

Hello there. I'm making a Red hack and need to ask something. How do i edit the price of an item at any pokemart? I want to make Rare cand $0 and all TMs free.

And

Does anyone know the offsets for the credits like nintendo gamefreak etc and the offsets for the text Red Version under the pokemon logo?(TLP)
Thanks

Offline

#29 2014-03-20 14:16:03

Danny-E 33
Administrator
Registered: 2012-06-09
Post 758/1,119

Offline

#30 2014-03-20 18:42:39

Pokemon_Master
Member
From: Eastern Kingdom of Mikado
Registered: 2013-05-18
Post 762/951
Website

Re: Hack Requests

Danny-E 33 wrote:

Item prices begin at $4608.

And I'm not gonna play your hack if you make Rare Candies and TMs free.

ok no free items (only the master ball)

Offline

#31 2014-03-21 18:57:18

MrElephant
Member
Registered: 2012-07-15
Post 19/28

Re: Hack Requests

I think it would make the game more interesting if you made the items free.  You could have trainers with level 100 pokemon, and have actually challenging battles inside game.


Really like modding pokemon games, lego racers, super smash bros brawl, final fantasy 1, dragon warrior 1, and others.  Really don't have a lot of time right now to make game though, but I am sure I will eventually have some.

Offline

#32 2014-03-21 20:43:11

Pokemon_Master
Member
From: Eastern Kingdom of Mikado
Registered: 2013-05-18
Post 763/951
Website

Re: Hack Requests

MrElephant wrote:

I think it would make the game more interesting if you made the items free.  You could have trainers with level 100 pokemon, and have actually challenging battles inside game.

Sometimes things should stay as they are,but you can use the MissingNO. glitch for unlimited free stuff

Offline

#33 2014-09-09 08:15:29

comet
Member
Registered: 2012-04-09
Post 474/679

Re: Hack Requests

Vitharix wrote:

I've always been interested by the idea of including seasons. If anyone has ever played Legend of Zelda: Oracle of Seasons, that's my obvious inspiration. Seems like it wouldn't be too difficult, too. After a certain number of days, a different tileset is displayed in the overworld. That would really be the extent of it aside from the coding involved.

Hat wrote:

Seasons could work nicely with this:

KBM for Prism wrote:

- New Clock system – No longer real time but can keep track of days months and years.

DW again. More possibilities for events, less waiting for them.

Time could be slowed/hastened (DW/Zelda) or skipped (like the 3 years between the RGBY and GSC stories). Time travel would obviously be helpful for Celebi stories.

I've gone and made the clock run at 60x normal speed, and track seasons. They last a week (a little under 3 hours in real time).

So far the only effect of seasons is on palettes. The sky is the limit but I'm lazy.

gLfhb2y.pngGdQeeVM.png
CvvA2n3.pngyO2Nk9H.png

Things I haven't done yet:

  • Completely remove RTC functions so MBC5 can be used

  • Actually save the date and season

  • Report the season in the Pokegear

  • Morning/night palettes, season-dependent maps/tilesets/events, and so on

Offline

Board footer

Powered by FluxBB