You are not logged in.
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).
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
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
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
Item prices begin at $4608.
And I'm not gonna play your hack if you make Rare Candies and TMs free.
Offline
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
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
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
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.
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.
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