Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2018-02-23 15:41:48

Halfshadow
Member
From: Italy - Lucca
Registered: 2012-04-24
Post 238/280

SAFARI ZONE BATTLE TYPE does exist in G/S/C? Maybe yes...

WARNING: All the images are from Pokécrystal, not Pokegold.

The entire Red Safari_zone.asm content is still included in the big core.asm file and is the same:

L78zRbJ.png

There is the anger count and the eating status, in red appear a bit different but however is present, also the texts are present.


Found also a routine to a second start menu to see the remaining steps and the safari ball:

lwyYBHJ.png

According to the disassembly, there is a safari zone flag, the setbit2 0x12.


Seems that the rock and the bait aren't present, in Red I found references to animations as example, not in Pokécrystal but will not be a problem, animations aren't the most important thing.

In the items constants seems references to the SAFARI BALL, but is the MOONSTONE now, however the Safari battle type could use the PARK BALL instead, should have the same effect.

I found that the battle type exists, at least the menu:

MNwy47T.png

You can compare safari and contest menu data structures.

I translated the safari menu and tried to modify the contestbattlemenu to go to 24F4E instead of 24F89. When the contest battle type starts I see the Safari menu with the translated voices but my first pokémon go to battle and if I try to use the ball I see that remind me to the fight menu and instead the ROCK voice throw a PARK BALL. Why this?

Maybe 'Cause both the battle types follow the same function or is something else?


The italian Pokémon Green creator.

Offline

#2 2018-02-23 17:16:17

Rangi
Member
Registered: 2016-05-09
Post 836/865

Re: SAFARI ZONE BATTLE TYPE does exist in G/S/C? Maybe yes...

Some important Safari-related code does not exist and would have to be reimplemented. Mateo did so here for Polished Crystal, so you may want to study her changes and apply them to your copy of pokecrystal (as opposed to Polished Crystal, which has lots of its own changes, so you can't just copy+paste that code).

Offline

#3 2018-02-23 17:25:00

Halfshadow
Member
From: Italy - Lucca
Registered: 2012-04-24
Post 239/280

Re: SAFARI ZONE BATTLE TYPE does exist in G/S/C? Maybe yes...

Then the tutorial get replaced with the Safari game? Mateo's changes overwriting the tutorial battle type?


The italian Pokémon Green creator.

Offline

#4 2018-02-23 19:59:02

Halfshadow
Member
From: Italy - Lucca
Registered: 2012-04-24
Post 240/280

Re: SAFARI ZONE BATTLE TYPE does exist in G/S/C? Maybe yes...

I'm studying the code, I see that could I have problems with 3 files, 'cause you know that my project is for Gold/Silver/Crystal in english but also italian, then if I have patience I could do it in a month (maybe) fixing all the pointers that change adding stuff between the existing codes and using also the ASM editor for the roms.

Then the question is: If I change the core and the other necessary files, there is something else in the game that refer to them?

Can I repoint these files in the rom? There is a pointer that point to them?

And maybe a better question, there is a way to set a specific offset where assembly a file? If I know as example that I have an entire free bank in the rom can I point as example to assembly here the main.asm file? Will be easier then copy all to a rom in another language the changed files.

I can't restart all the project from the beginning (it's over except the SAFARI ZONE) and I can't translate all the game... But if I could assembly these changed files where I want maybe I could copy them and repoint the rom to the new added and maybe only translate their text strings. Is possible?


The italian Pokémon Green creator.

Offline

#5 2018-02-23 20:36:27

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

Re: SAFARI ZONE BATTLE TYPE does exist in G/S/C? Maybe yes...

No, my changes did not replace the tutorial battle type.

Offline

#6 2018-02-23 20:45:50

Halfshadow
Member
From: Italy - Lucca
Registered: 2012-04-24
Post 241/280

Re: SAFARI ZONE BATTLE TYPE does exist in G/S/C? Maybe yes...

Oh, ok, was a doubt. And how you can set the safari game started? Only setting the bit 0x12?

However is possible set a specific pointer during the assembly of the hacked files? If yes will be easier copy the changes to a rom in another language.


The italian Pokémon Green creator.

Offline

#7 2018-02-27 00:54:57

Halfshadow
Member
From: Italy - Lucca
Registered: 2012-04-24
Post 243/280

Re: SAFARI ZONE BATTLE TYPE does exist in G/S/C? Maybe yes...

I did it partially, changing all trough GBasmeditor, without adding the bait function 'cause I don't have enough space at the end of the bank to repoint also other existing routines to use with the added, but is a bit buggy, I don't know why but don't show the texts like that I throw the rock, and don't tell nothing about that is angry, only if I throw a lot of rocks the pokémon runs, but don't tell nothing, only the run text works.

I linked to the park ball, but strangely if the pokémon broken free is buggy, or freeze or appear strange buggy texts. Someone could help me if I pass the added code at the end of the bank? Maybe I forgot something... :D

Last edited by Halfshadow (2018-02-27 00:56:45)


The italian Pokémon Green creator.

Offline

#8 2018-02-27 01:20:34

Halfshadow
Member
From: Italy - Lucca
Registered: 2012-04-24
Post 244/280

Re: SAFARI ZONE BATTLE TYPE does exist in G/S/C? Maybe yes...

Maybe don't load the texts 'cause for now I hacked only the core.asm file and maybe is trough the battle menu texts that load the bank to the other effects texts?


And maybe is buggy 'cause I copied a part of the .loop code only up to .next and then when back to the original routine and go to the original loop without the debug mode hack are back the original Crystal bugs of the debug mode? i don't have enough free space to copy also the next instructions at the end of the bank, only if I can move "effect_command_pointers.asm" in another bank and I don't know if is possible...

loop
ld a, [BattleType]
+ cp BATTLETYPE_SAFARI
+ jr z, .safari_game
cp BATTLETYPE_CONTEST
jr nz, .not_contest
farcall ContestBattleMenu
jr .next
+.safari_game
+ farcall SafariBattleMenu
+ jr .next
.not_contest

; Auto input: choose "ITEM"
ld a, [wInputType]
or a
jr z, .skip_dude_pack_select
farcall _DudeAutoInput_DownA
.skip_dude_pack_select
call LoadBattleMenu2
ret c

.next
ld a, $1
ld [hBGMapMode], a
ld a, [wBattleMenuCursorBuffer]
cp $1
jp z, BattleMenu_Fight
cp $3
jp z, BattleMenu_Pack
cp $2
jp z, BattleMenu_PKMN
cp $4
jp z, BattleMenu_Run
jr .loop

Last edited by Halfshadow (2018-02-27 01:22:59)


The italian Pokémon Green creator.

Offline

#9 2018-02-28 19:33:49

Halfshadow
Member
From: Italy - Lucca
Registered: 2012-04-24
Post 245/280

Re: SAFARI ZONE BATTLE TYPE does exist in G/S/C? Maybe yes...

Thank you Rangi and Mateo! Isn't complete 'cause I can't use the disassembly for an italian rom and I had to repoint also the routines that points to the new added and I have not enough space to add all the code, but except for the bait (and the park ball count that is blocked) seems to work fine. :)

https://www.youtube.com/watch?v=P4HWQtbN83M


The italian Pokémon Green creator.

Offline

#10 2018-06-28 20:53:31

Halfshadow
Member
From: Italy - Lucca
Registered: 2012-04-24
Post 273/280

Re: SAFARI ZONE BATTLE TYPE does exist in G/S/C? Maybe yes...

Hello Mateo and Rangi. Have you discovered something else about safari battletype? I added the bait function, I have only 1 little bug with my copy to an italian rom via hex editing, the balls don't decrease, but isn't rilevant now.

Now I want only to have a way to switch to the battle type that I added for both grass and fishing, currently I can test it only with a gameshark code. Can you tell me something about please? If a temporary flag is necessary I have one recicled that is only composed by only one value.


The italian Pokémon Green creator.

Offline

Board footer

Powered by FluxBB