Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#526 2018-04-22 00:48:18

vanlach
New member
Registered: 2018-03-04
Post 2/2

Re: Simple Questions & Answers

So I've been trying to add an option for rematching gym leaders after you beat them in Crystal but I must be missing something since I keep getting crashes. The few that I have encountered so far are:
- After winning the battle, Misty's end of battle text doesn't show up and the game crashes.
- Choosing 'no' for the rematch prompt works but walking into the line of sight for a trainer in the gym prompts a battle but crashes the game instead of starting a battle.
- I'm not able to leave the gym after refusing the rematch and surfing around the trainers.

Here's the code that I added/modified for the Cerulean gym (that's where my save is since I've been adding to this personal hack as I go).

MistyScript_0x188432:
    faceplayer
    opentext
    checkflag ENGINE_CASCADEBADGE
    iftrue MistyRematchScript
    writetext UnknownText_0x188674
    waitbutton
    closetext
    winlosstext UnknownText_0x18870c, 0
    loadtrainer MISTY, MISTY1
    startbattle
    reloadmapafterbattle
    setevent EVENT_BEAT_MISTY
    setevent EVENT_BEAT_SWIMMERF_DIANA
    setevent EVENT_BEAT_SWIMMERF_BRIANA
    setevent EVENT_BEAT_SWIMMERM_PARKER
    opentext
    writetext UnknownText_0x188768
    playsound SFX_GET_BADGE
    waitsfx
    setflag ENGINE_CASCADEBADGE
.FightDone:
    writetext UnknownText_0x188782
    waitbutton
    closetext
    end

MistyRematchScript:
    writetext UnknownText_0x188782
    waitbutton
    writetext MistyRematchText
    yesorno
    iftrue MistyRematchBattle
    winlosstext MistyEndRematchBattleText, 0
    closetext
    end

MistyRematchBattle:
    loadtrainer MISTY, MISTY1
    startbattle
    scall MistyEndRematchScript
    end

MistyEndRematchScript:
    reloadmapafterbattle
    setevent EVENT_BEAT_MISTY
    setevent EVENT_BEAT_SWIMMERF_DIANA
    setevent EVENT_BEAT_SWIMMERF_BRIANA
    setevent EVENT_BEAT_SWIMMERM_PARKER
    opentext
    writetext MistyRematchWinLossText
    waitbutton
    closetext
    end

MistyRematchText:
    text "Unless you would"
    line "like to battle"
    cont "me again?"
    done

MistyEndRematchBattleText:
    text "MISTY: You really"
    line "are good…"

    para "I'll admit that"
    line "you are skilled…"
    done

MistyRematchWinLossText:
    text "MISTY: That was"
    line "a great battle!"

    para "Talk to me again"
    line "if you want a"
    cont "rematch."
    done

Offline

#527 2018-04-22 11:14:04

Cloud
Member
Registered: 2010-12-18
Post 296/302

Re: Simple Questions & Answers

Rangi wrote:
Cloud wrote:

Somebody know how do I edit the townmap? I could only find the gfx for it.

gfx/pokegear/johto.bin and kanto.bin are 20x18 tilemaps with a $ff marking the very end. Use a hex editor like HxD, Frhed, or Notepad++'s hex editor plugin.

Thanks, Rangi. I've actually look at that file but didn't know you have to view it in hex editor. My bad!

Also, this maybe obvious to most of you but I find this really convenient.
- To draw your map with ease for pokecrystal, first, use this editor on any clean gen 2 ROM.
- When you're done editing your region, go to file > export map so you'll get a file with .map extension.
- Use hex editor to read the file then copy the whole thing and paste it over the data in johto.bin file in pokecrystal.
- Don't forget you need to leave $FF at the end of the file for it to work
- Done.

Offline

#528 2018-04-22 12:29:15

Cloud
Member
Registered: 2010-12-18
Post 297/302

Re: Simple Questions & Answers

vanlach wrote:

So I've been trying to add an option for rematching gym leaders after you beat them in Crystal but I must be missing something since I keep getting crashes. The few that I have encountered so far are:
- After winning the battle, Misty's end of battle text doesn't show up and the game crashes.
- Choosing 'no' for the rematch prompt works but walking into the line of sight for a trainer in the gym prompts a battle but crashes the game instead of starting a battle.
- I'm not able to leave the gym after refusing the rematch and surfing around the trainers.


Hey, Vanlach. I'm a newbie. So I tried and rewrite your script. You might want to test it to see if it's working. I haven't tested it. Save a backup of your .asm file first.

CeruleanGymMistyScript:
    faceplayer
    opentext
    checkflag ENGINE_CASCADEBADGE
    iftrue CeruleanGymMistyRematchScript
    writetext UnknownText_0x188674
    waitbutton
    closetext
    winlosstext UnknownText_0x18870c, 0
    loadtrainer MISTY, MISTY1
    startbattle
    reloadmapafterbattle
    setevent EVENT_BEAT_MISTY
    setevent EVENT_BEAT_SWIMMERF_DIANA
    setevent EVENT_BEAT_SWIMMERF_BRIANA
    setevent EVENT_BEAT_SWIMMERM_PARKER
    opentext
    writetext UnknownText_0x188768
    playsound SFX_GET_BADGE
    waitsfx
    setflag ENGINE_CASCADEBADGE
    
CeruleanGymMistyRematchScript:
    faceplayer
    opentext
    writetext MistyRematchText
    yesorno
    iffalse .AskMistyRematch
    winlosstext MistyRematchWinLossText, 0
    loadtrainer MISTY, MISTY1
    startbattle
    reloadmapafterbattle
    opentext
    writetext MistyEndRematchBattleText
    waitbutton
    closetext
    end
    
.AskMistyRematch:
    writetext MistyRematchWinLossText
    closetext
    end
    
MistyRematchText:
    text "Unless you would"
    line "like to battle"
    cont "me again?"
    done

MistyEndRematchBattleText:
    text "MISTY: You really"
    line "are good…"

    para "I'll admit that"
    line "you are skilled…"
    done

MistyRematchWinLossText:
    text "MISTY: That was"
    line "a great battle!"

    para "Talk to me again"
    line "if you want a"
    cont "rematch."
    done

Offline

#529 2018-04-22 20:29:02

UberMedic7
Member
From: Greece
Registered: 2013-07-25
Post 73/74

Re: Simple Questions & Answers

Cloud's seems a bit overloaded with code so here's a very simple way that i used for my romhack that works 100% flawlessly, i know cuz i've tested it myself.

.FightDone:
    writetext UnknownText_0x188782
    yesorno
    iftrue .MistyRematch
    closetext
    end

.MistyRematch:
    winlosstext Misty_RematchDefeat, 0
    loadtrainer MISTY, 1
    startbattle
    reloadmapafterbattle
    end

The "Misty_RematchDefeat" is the text that pops up after she's defeated.

Offline

#530 2018-04-23 00:29:25

Cloud
Member
Registered: 2010-12-18
Post 298/302

Re: Simple Questions & Answers

That's pretty neat! I wish to write shorter and more efficient scripts too but I'll need a lot more experience to do that since unfortunately I have to learn by myself.

EDIT: Hey, I think I might as well ask this here so to anybody reading this what is something you wish you should have known/done when you started hacking (with pokecrystal)? Maybe something that would make code shorter or how to find certain things/data in the disassembly or anything that would be really useful to a new hacker. Please tell me anything!

Last edited by Cloud (2018-04-23 00:55:05)

Offline

#531 2018-04-23 10:34:42

UberMedic7
Member
From: Greece
Registered: 2013-07-25
Post 74/74

Re: Simple Questions & Answers

Cloud wrote:

That's pretty neat! I wish to write shorter and more efficient scripts too but I'll need a lot more experience to do that since unfortunately I have to learn by myself.

EDIT: Hey, I think I might as well ask this here so to anybody reading this what is something you wish you should have known/done when you started hacking (with pokecrystal)? Maybe something that would make code shorter or how to find certain things/data in the disassembly or anything that would be really useful to a new hacker. Please tell me anything!


Besides the info in these forums, nowdays pokecrystal has thorough documentation on github, anything from fixing the game's bugs to learning assembly and how it works. And one way to learn is practice, write code, test code, as long as you spend some time doing stuff you will pick things up. Take it from me, i had no idea how it all works but now its pretty clear to me on a basic level, if all else fails, google what you're looking for.

Offline

#532 2018-04-23 20:05:24

Cloud
Member
Registered: 2010-12-18
Post 299/302

Re: Simple Questions & Answers

Editing map connection and it works ok but to the north of the town there is this when there should be trees. Why?

10x9i5i.jpg

Offline

#533 2018-04-23 22:15:05

Zarator
Member
Registered: 2012-09-30
Post 50/50

Re: Simple Questions & Answers

Hello, I was planning a new minor hack project, and I was wondering if there is room, in Pokemon Gold, to add brand new attacks instead of replacing existing ones (I looked up for similar questions but the only similar thread I found asked for new types instead...)

Offline

#534 2018-04-30 05:14:52

megamctaco
Member
Registered: 2015-08-23
Post 126/129

Re: Simple Questions & Answers

In pokered, is there a specific way the TM learn set should be written?

For example:

; learnset
    tmlearn 6,8
    tmlearn 9,10,15
    tmlearn 20,21
    tmlearn 26,27,28,31,32
    tmlearn 34,40
    tmlearn 44,48
    tmlearn 50,54

I changed the majority of the TMs in the game, but when editing each mon's learn set, the game wouldn't load (it would compile, however). Does each line need an x amount of TMs?

Offline

#535 2018-04-30 05:33:17

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 3,541/3,547

Re: Simple Questions & Answers

each line represents 8 entries out of the list, in order, since it's just a flag array. to see which tm numbers go on which line you should be able to just look at Mew since it can learn every tm.

Offline

#536 2018-04-30 06:34:10

megamctaco
Member
Registered: 2015-08-23
Post 127/129

Re: Simple Questions & Answers

Cheers.

I'm trying to add Prof Oak to Unknown Dungeon 1 as a trainer battle (he's in the right position, blocking the stairs) but I can't get him to engage in battle. I'm comparing it to the Giovanni trainer battle code in Celadon where he disappears after losing the battle. My game won't compile due to "Unknown symbol 'W_UNKNOWNDUNGEON1CURSCRIPT'"

I've added an event constant, script and text for the map. What else am I missing?

Offline

#537 2018-04-30 06:46:06

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 3,542/3,547

Re: Simple Questions & Answers

I'm not sure why you're using the old convention of naming wram addresses like W_SOMETHINGHERE instead of wSomethingHere like they do now, so that could be it. Or it could be that you haven't actually defined that address label but are trying to reference it anyway. Those are in wram.asm in the wGameProgressFlags area iirc. If that area didn't already have one, you'll need to add it.

Offline

#538 2018-04-30 07:04:17

megamctaco
Member
Registered: 2015-08-23
Post 128/129

Re: Simple Questions & Answers

Mateo wrote:

I'm not sure why you're using the old convention of naming wram addresses like W_SOMETHINGHERE instead of wSomethingHere like they do now, so that could be it. Or it could be that you haven't actually defined that address label but are trying to reference it anyway. Those are in wram.asm in the wGameProgressFlags area iirc. If that area didn't already have one, you'll need to add it.

Still using the outdated one so it has W_SOMETHINGHERE instead.

So I added it. But Mewmon start moon walking on screen randomly, all my party mon are poisoned or paralyzed and are missing the first letter of their name. Oak battle works though. Quite funny to watch haha

Offline

#539 2018-04-30 13:08:32

Maniac379
Member
Registered: 2015-01-15
Post 121/121

Re: Simple Questions & Answers

Zarator wrote:

Hello, I was planning a new minor hack project, and I was wondering if there is room, in Pokemon Gold, to add brand new attacks instead of replacing existing ones (I looked up for similar questions but the only similar thread I found asked for new types instead...)

You can only have the 255 attacks unless you do some programming to extend the rom.  It is not commonly done and I don’t think there is a guide anywhere to do this.


---
Pokémon White Crystal
A simple quality of life and gameplay improved hack

Offline

#540 2018-05-16 09:14:07

LusoTrainer
Member
Registered: 2015-05-06
Post 16/16

Re: Simple Questions & Answers

Crystal_ wrote:

. and m outside the string mean nothing. When inside the quotation marks (string), they are translated to the tile number where the symbol is at in the game font (see charmap.asm). If you try building the ROM with a line like the one you posted, it will give you a syntax error. Use the one I posted before, and play around with spacing within the string as you need.

I was saying that owned Pokemon overwrite that generic string with their own height values. To be more specific, they don't overwrite that string itself (as it is hardcoded in the ROM), but rather, they overwrite the screen tiles where that string is displayed. You may need to adjust the position in which your new height digits are copied to in order to match your new format to display height (otherwise you might see something a digit overwriting the '.' or the 'm', for example).

Sorry to bring this up again, but I just remembered that the localized versions (spanish, french, etc) already have everything in metric units. With the proper values for every Pokémon and all. Is it possible to copy the strings of size and weight from it, or is it futile?

Offline

Board footer

Powered by FluxBB