You are not logged in.
Since the Name Rater is the only thing that lets you change a pokémon's nickname, that's probably the code you need to look into. wPartyMon1OTID is loaded in the script, at least, and most likely it's for the purpose of checking whether you can change the nickname or not.
Last edited by Schattenjäger (2015-11-06 09:53:12)
Offline
Since the Name Rater is the only thing that lets you change a pokémon's nickname, that's probably the code you need to look into. wPartyMon1OTID is loaded in the script, at least, and most likely it's for the purpose of checking whether you can change the nickname or not.
wPartyMon1OTID shows up in a few different files.
core.asm
experience.asm
namerater.asm
learn_move.asm
in_game_trades.asm
cable_club.asm
I assume I only need to change it in namerater.asm
NameRaterScript_1da20: ; 1da20 (7:5a20)
ld hl, wPartyMonOT
ld bc, NAME_LENGTH
ld a, [wWhichPokemon]
call AddNTimes
ld de, wPlayerName
ld c, NAME_LENGTH
call .asm_1da47
jr c, .asm_1da52
ld hl, wPartyMon1OTID
ld bc, wPartyMon2 - wPartyMon1
ld a, [wWhichPokemon]
call AddNTimes
ld de, wPlayerID
ld c, $2
.asm_1da47
ld a, [de]
cp [hl]
jr nz, .asm_1da52
inc hl
inc de
dec c
jr nz, .asm_1da47
and a
ret
.asm_1da52
scf
ret
Any idea where to start? I'm looking at the "ld c, $2", with the idea in my head that I might have to change 2 to something else.
Offline
It might be easier to follow like this:
IsMonRenamable:
; Return carry if mon [wWhichPokemon] can't be renamed.
ld hl, wPartyMonOT
ld bc, NAME_LENGTH
ld a, [wWhichPokemon]
call AddNTimes
ld de, wPlayerName
ld c, NAME_LENGTH
call .Compare
jr c, .no
ld hl, wPartyMon1OTID
ld bc, wPartyMon2 - wPartyMon1
ld a, [wWhichPokemon]
call AddNTimes
ld de, wPlayerID
ld c, 2
.Compare
ld a, [de]
cp [hl]
jr nz, .no
inc hl
inc de
dec c
jr nz, .Compare
.yes
and a
ret
.no
scf
ret
It just checks whether the OT ID and name both match.
Last edited by comet (2015-11-08 17:43:26)
Offline
Looks like you could remove the check and make all Pokemon renamable by just commenting out/removing lines 63, 64, and 65 in namerater.asm (line numbers taken from your github repo).
That would remove the check, remove it loading the text for not being able to rename it, and remove the conditional jump that makes it show that text if the move wasn't renamable.
I am not very active on this forum. I only pop in from time to time.
Offline
Looks like you could remove the check and make all Pokemon renamable by just commenting out/removing lines 63, 64, and 65 in namerater.asm (line numbers taken from your github repo).
That would remove the check, remove it loading the text for not being able to rename it, and remove the conditional jump that makes it show that text if the move wasn't renamable.
Cheers! I had previously thought about removing the part where it doesn't let you rename, but didn't think it would be that easy!
Offline
Where can I change how much money you lose if you lose a battle? And is MissingNo not working due to adding new Pokemon? All I'm getting is Snorlax, Cloyster, Golduck and Electrode at levels 132 etc.
I'd also like to know if and how it would be possible to include the option to fly to the Pokemon Centre at Rock Tunnel.
Offline
bump...
Offline
If you replaced the would-be-Missingno Pokemon with others you'll encounter those instead. It also depends on what your name is, you know the glitch.
The function responsible for halving the player's money on a loss is this one: https://github.com/pret/pokered/blob/bf … sm#L22-L67
Fly warp data is here (https://github.com/pret/pokered/blob/7e … _warps.asm) but there may be more to it.
Offline
If you replaced the would-be-Missingno Pokemon with others you'll encounter those instead. It also depends on what your name is, you know the glitch.
The function responsible for halving the player's money on a loss is this one: https://github.com/pret/pokered/blob/bf … sm#L22-L67
Fly warp data is here (https://github.com/pret/pokered/blob/7e … _warps.asm) but there may be more to it.
Thanks. I knew where the function for the player's money was, but just had no idea which part I had to change to make you lose less money.
As for the fly warp data, I see that the options for Routes 4 and 10 are already there, but what exactly do I need to do to make it possible to fly there?
Cheers.
Offline
Pretty sure wTownVisitedFlag determines where you can fly to but nothing sets the route 4 and 10 flags.
https://github.com/pret/pokered/blob/ma … 2933-L2934
Edit: You'd have to change this if you want some maps apart from towns to set a flag: https://github.com/pret/pokered/blob/bf … L3231-3239
Map constants are here: https://github.com/pret/pokered/blob/ma … stants.asm Only the first 11 flags are ever set since map id 12 is unused and anything past Route 1 is ignored. This leaves the last 2 (route 4 and route 10) to be never set during regular gameplay.
What do you want to do with the money? Lose 1/4, 1/8, a different algorithm?
Last edited by Crystal_ (2016-06-17 15:00:58)
Offline
Pretty sure wTownVisitedFlag determines where you can fly to but nothing sets the route 4 and 10 flags.
https://github.com/pret/pokered/blob/ma … 2933-L2934
Edit: You'd have to change this if you want some maps apart from towns to set a flag: https://github.com/pret/pokered/blob/bf … L3231-3239
Map constants are here: https://github.com/pret/pokered/blob/ma … stants.asm Only the first 11 flags are ever set since map id 12 is unused and anything past Route 1 is ignored. This leaves the last 2 (route 4 and route 10) to be never set during regular gameplay.
I kind of understand, but I'm not sure exactly which parts to change, exactly?
What do you want to do with the money? Lose 1/4, 1/8, a different algorithm?
1/4 is probably more realistic than half. I was never a fan of that in the original game.
Thanks!
Offline
whenever you hit route 4 or 10 for the first time, you have to set their town visited flag if you want to be able to fly there. That's what i'd try first, but i'm just guessing. I know as much as you, really. there may be more to it so it's a matter of investigating if the first approach doesn't work.
For 1/4 you could replace the division by two with a division by 4, then substract the result to your original money by calling SubstractBCD (or however it's called).
Offline