You are not logged in.
Pages: 1
I'm trying to make it so the Director in Celadon Mansion gives you a Mew upon completion of the Pokedex.
Messing around with the Lapras guy script, I tested it out on the Programmer, and it worked fine. I'm just a bit confused as to where I put things for the Director's script.
This is a rough idea of what I used to test it on the Programmer:
TX_ASM
ld a, [wd72e]
and a ; got mew?
jr z, .givemew
.givemew
ld hl, .MeetMewGuyText
call PrintText
lb bc, MEW, 5
call GivePokemon
jr nc, .done
ld a, [wSimulatedJoypadStatesEnd]
and a
call z, WaitForTextScrollButtonPress
call EnableAutoTextBoxDrawing
ld hl, .HeresYourMewText
call PrintText
ld hl, wd72e
set 0, [hl]
jr .done
.done
jp TextScriptEnd
.MeetMewGuyText
TX_FAR _MeetMewGuyText
db "@"
.HeresYourMewText
TX_FAR _HeresYourMewText
db "@"
Now the Director has two scripts.
The first being:
DirectorText: ; 487b2 (12:47b2)
TX_ASM
; check pokédex
ld hl, wPokedexOwned
ld b, wPokedexOwnedEnd - wPokedexOwned
call CountSetBits
ld a, [wNumSetBits]
cp 150
jr nc, .CompletedDex
ld hl, .GameDesigner
jr .done
.CompletedDex
ld hl, .CompletedDexText
.done
call PrintText
jp TextScriptEnd
and the second being:
.CompletedDexText
TX_FAR _CompletedDexText
db $6
TX_ASM
callab DisplayDiploma
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
jp TextScriptEnd
Where would I put/reference the Give Mew routine? I assume it would be somewhere before "jp TextScriptEnd" but I'm not entirely confident about that.
Offline
Bump.
Offline
No ideas??
Offline
put it after ld [wDoNotWaitForButtonPressAfterDisplayingText], a
Offline
put it after ld [wDoNotWaitForButtonPressAfterDisplayingText], a
When I did that, it kept freezing after showing the diploma.
Right now, I've taken the diploma out completely (as I always thought it was pretty useless).
Now if you have completed your Pokedex, he'll just give you a Mew.
My problem now is that this keeps repeating and he can give you a Mew over and over again. How do I stop that?
scripts/celadonmansion3.asm
DirectorText: ; 487b2 (12:47b2)
TX_ASM
; check pokédex
ld hl, wPokedexOwned
ld b, wPokedexOwnedEnd - wPokedexOwned
call CountSetBits
ld a, [wNumSetBits]
cp 150
jr nc, .CompletedDex
ld hl, .GameDesigner
jr .done
.CompletedDex
ld hl, .CompletedDexText
.done
call PrintText
jp TextScriptEnd
.GameDesigner ; 487d0 (12:47d0)
TX_FAR _GameDesignerText
db "@"
.CompletedDexText
TX_FAR _CompletedDexText
db $6
TX_ASM
ld a, [wd72e]
and a ; got mew?
jr z, .givemew
.givemew
ld hl, .MeetMewGuyText
call PrintText
lb bc, MEW, 5
call GivePokemon
jr nc, .done
ld a, [wSimulatedJoypadStatesEnd]
and a
call z, WaitForTextScrollButtonPress
call EnableAutoTextBoxDrawing
ld hl, .HeresYourMewText
call PrintText
ld hl, wd72e
set 0, [hl]
jp TextScriptEnd
.MeetMewGuyText
TX_FAR _MeetMewGuyText
db "@"
.HeresYourMewText
TX_FAR _HeresYourMewText
db "@"
jp TextScriptEnd
text/celadon_mansion_3f.asm
_MeetMewGuyText::
text "For completing"
line "your #DEX..."
cont "I have a surprise"
para "Here is one last"
line "#MON as a reward!"
done
_HeresYourMewText::
text "MEW can learn"
line "every single move!"
cont "Many believe it"
cont "is the ancestor"
cont "of all #MON!"
done
Offline
Take a look at the rematch/phone call thread, I explained how to make events only run once over there.
I am not very active on this forum. I only pop in from time to time.
Offline
Take a look at the rematch/phone call thread, I explained how to make events only run once over there.
Would that be any of these?
PewterPhoneCall:
ld hl, wPhoneCallFlags ; something you would add to mark special event phone calls having already happened
bit 1, [hl] ; check to see if this call has already happened
ret nz ; if it has already happened, don't run it again
ld a, [wObtainedBadges] ; variables that stores which badges you have
bit 0,a ; check to see if you have beaten Brock
ret z ; if you haven't, don't do the phone call yet
ld hl,wPhoneCallFlags ; address with your special call flags that we checked earlier
set 1,[hl] ; mark you as having received that call
ret ; we're done, so go back to the rest of the scripts in the header
Last edited by megamctaco (2015-11-11 02:03:57)
Offline
Nevermind, worked it out after much trial and error.
DirectorText: ; 487b2 (12:47b2)
TX_ASM
; check pokédex
ld hl, wPokedexOwned
ld b, wPokedexOwnedEnd - wPokedexOwned
call CountSetBits
ld a, [wNumSetBits]
cp 150
jr nz, .gotmew
jr nc, .CompletedDex
ld hl, .GameDesigner
jr .done
.CompletedDex
ld hl, .CompletedDexText
.done
call PrintText
jp TextScriptEnd
.GameDesigner ; 487d0 (12:47d0)
TX_FAR _GameDesignerText
db "@"
.CompletedDexText
TX_FAR _CompletedDexText
db $6
TX_ASM
ld a, [wd72e]
and a ; got mew?
jr z, .givemew
.givemew
ld hl, .MeetMewGuyText
call PrintText
call z, WaitForTextScrollButtonPress
lb bc, MEW, 5
call GivePokemon
ld a, [wSimulatedJoypadStatesEnd]
and a
call z, WaitForTextScrollButtonPress
call EnableAutoTextBoxDrawing
ld hl, .HeresYourMewText
call PrintText
ld hl, wd72e
set 0, [hl]
jr z, .gotmew
.gotmew
ld hl, .GaveMewText
call PrintText
jp TextScriptEnd
.GaveMewText
TX_FAR _GaveMewText
db $6
TX_ASM
callab DisplayDiploma
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
jp TextScriptEnd
.MeetMewGuyText
TX_FAR _MeetMewGuyText
db "@"
.HeresYourMewText
TX_FAR _HeresYourMewText
db "@"
jp TextScriptEnd
Turns out I just had to add "jr nz, .gotmew" to
cp 150
jr nz, .gotmew
jr nc, .CompletedDex
ld hl, .GameDesigner
jr .done
Offline
Okay, seems I've ran into some more trouble.
Since I've added more Pokemon, making it a total of 163 obtainable, I tried to change it so Mew is given to you when you have caught 162 Pokemon. However, when I change it to more than 150, it skips right ahead to the "Congratulations on completing your Pokedex" text and displaying the diploma, even though that's not the case.
The only way it works is if it is set to 150. What's the fix for this?
Offline
Speaking of Mew, I'm actually thinking of including an homage to the Mew glitch in my own hack. Specifically, after you beat the Swimmer in Cerulean Gym, after a set number of steps, you'll have a random wild encounter with Mew, and unless you're in a house, a Pokémon Center, or a Poké Mart, the whole map becomes like a less strong version of the Cave Tile Effect, i.e. every step has a chance of summoning wild Pokemon, only the appearances will be far less frequent and every wild encounter not in tall grass or water or cave will be a Lv. 5 Mew, which will not stop bothering you even if you defeat it in combat until you capture it successfully.
Or would there be a better way to go about this Mew glitch homage? (Do keep in mind that you can do the Mew glitch as it's traditionally performed as early as Cerulean City in the actual games.)
Offline
Okay, seems I've ran into some more trouble.
Since I've added more Pokemon, making it a total of 163 obtainable, I tried to change it so Mew is given to you when you have caught 162 Pokemon. However, when I change it to more than 150, it skips right ahead to the "Congratulations on completing your Pokedex" text and displaying the diploma, even though that's not the case.
The only way it works is if it is set to 150. What's the fix for this?
You put jr nz right after the check. That means if it isn't exactly 150 caught, it jumps to Mew. You should have added the part about giving Mew in the "completed dex" part. The way its written, it should jump to mew no matter how many Pokémon you have, unless it is exactly the same number you checked for.
I'll try to explain how to properly do it when I'm on my computer, I hate typing anything longer tgan a text message on a stupid touchscreen lol.
Last edited by Luna (2015-11-11 04:50:29)
I am not very active on this forum. I only pop in from time to time.
Offline
Ok, so I setup a fork of your copy on github, got it on my pc, and when I tried to build it, I just got a ton of "OPP_ already defined" errors. I thought it would be easier for me to work in out if I was playing with your actual code, but since clearly that isn't working, guess I'll have to do it the way I'd been doing.
I am not very active on this forum. I only pop in from time to time.
Offline
Ok, so I setup a fork of your copy on github, got it on my pc, and when I tried to build it, I just got a ton of "OPP_ already defined" errors. I thought it would be easier for me to work in out if I was playing with your actual code, but since clearly that isn't working, guess I'll have to do it the way I'd been doing.
That's strange. Any ideas why it would do that?
Offline
Mateo wrote:Ok, so I setup a fork of your copy on github, got it on my pc, and when I tried to build it, I just got a ton of "OPP_ already defined" errors. I thought it would be easier for me to work in out if I was playing with your actual code, but since clearly that isn't working, guess I'll have to do it the way I'd been doing.
That's strange. Any ideas why it would do that?
Talked to Danny (since your project is based on his patch) and he suggested that my RGBDS is probably out of date. Sounds about right. I'll get that updated and see what I can come up with.
In the meantime, try moving the
jr nz, .gotMew
line, so that instead of being right after cp 150, it is REPLACING the "jr z, .giveMew" line further down.
That way, if you've already got mew, it goes to the GotMew line, otherwise it falls through to giving you mew the first time.
I am not very active on this forum. I only pop in from time to time.
Offline
Hello? Guys? I'm trying to figure out how to homage the Mew glitch in my hack.
Offline
Hello? Guys? I'm trying to figure out how to homage the Mew glitch in my hack.
To be fair, that comment was actually off-topic, so I was focusing on the original question (how to make the man give Mew instead of just the Diploma) before moving on to that. And since that is completely unrelated to what we're figuring out in this thread, it would probably be better to discuss that in another thread, so it doesn't get lost by trying to have two unrelated discussions at the same time.
Also, the way you originally wanted to do it, I'm not sure of any good way to do that, so I would have to look into it.
I am not very active on this forum. I only pop in from time to time.
Offline
In the meantime, try moving the
jr nz, .gotMew
line, so that instead of being right after cp 150, it is REPLACING the "jr z, .giveMew" line further down.
That way, if you've already got mew, it goes to the GotMew line, otherwise it falls through to giving you mew the first time.
That just made the diploma show up like normal, with a Mew part at all.
Offline
I think the problem is what you are trying to use to set Mew as being received. wd72e is used by various other things, and is not a good choice to use for trying to permanantly mark an event as having happened. Kinda like how you added a new location to store the player's gender. You could just add
wExtraFlags::
ds 1
in wram.asm, (probably near wPlayerGender, but it doesn't really matter so long as it is inside the "main data" block so it will be saved) and replace wd72e with wExtraFlags and see if it works properly. Probably something else has already set the bit you are trying to check, so the game thinks you've already got Mew.
I am not very active on this forum. I only pop in from time to time.
Offline
I think the problem is what you are trying to use to set Mew as being received. wd72e is used by various other things, and is not a good choice to use for trying to permanantly mark an event as having happened. Kinda like how you added a new location to store the player's gender. You could just add
wExtraFlags::
ds 1in wram.asm, (probably near wPlayerGender, but it doesn't really matter so long as it is inside the "main data" block so it will be saved) and replace wd72e with wExtraFlags and see if it works properly. Probably something else has already set the bit you are trying to check, so the game thinks you've already got Mew.
Added that and my file got destroyed. Luckily I had a backup save state, so I don't have to catch that many Pokemon again!
Still gives me the diploma first.
Offline
Pages: 1