Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2011-11-06 21:25:03

tysonrss
Member
From: US, Ohio
Registered: 2011-08-27
Post 52/649

My Help thread

Yeah I figured I'd post a thread for asking help in, to lessen so many future threads I may want to post.

Also, it could be used as reference for others who may come across any problems I may add. Let's get started.

Well, I took a few ganders at the Compendium, Mateo's scripting thread and Miksey's videos. And after all that, well....I'm STOMPED!!! I get basic hex editing when editing someones script. I've done that a few times with ease. But the tricky part comes when I want triggers. I tried looking at the triggers by looking up it's offset via Hex editor and all I can make out of it is it's text. Movements and other things, how can I view that? What tool do I use?

I'd like to insert a basic "wait up, talk and follow me" script.

Now, I know you'll tell me make pointers for the map to add them. And I get that, but where do I actually code the movements and things like that? I don't see how that's possible with a hex editor.

Thanks to anyone who can help me here.

EDIT: Problem.

After changing fat boy's text to match Blue's in Pallet Town, the Pallet Town sign text becomes screwy and crashes. Any reason why?

EDIT: Decided to leave fat boi alone and worked on the signpost.

Another question(the other still stands). I realized the problem with the signpost interference with fat boy. In the hex editor, the sign post came right after the fat boi's script. So in the future, how would I be able to change this so they don't interfere?

Last edited by tysonrss (2011-11-06 23:10:54)


Pokemon Blue DX is reborn!

Offline

#2 2011-11-07 00:45:25

tysonrss
Member
From: US, Ohio
Registered: 2011-08-27
Post 56/649

Re: My Help thread

Okay, I think I figured the scripting thing out sorta. I guess it can be done with a hex editor after all.

After comparing the compendium with the starting script I saw 6A. 6A makes the person face hero.(I don't know why this was used with the Gent Men in Cheerygrove, but that's the example I used). The number signs I'm assuming are the commands in the compendium. Am I correct?

EDIT: Okay, I kinda get things, at the same time I'm losing it.

Looking at Johto map I see that each script on a certain map starts out with the same 2 bits, and the last 2 are different and matches the last 2 bits of the script location. Example.

Pallet Town. Each signpost starts out with 46 in the script box, but the last 2 bits are always different and matches the script location.

RED's HOUSE - Script 46B9 Script location 0x1386B9
BLUE's HOUSE - Script 46BF Script location 0x1386BF

And so on.

However, I don't get something. Sure the last 2 bits of the script are at the end of the script locations, but what does this mean? Is that where it end? 46 is where Pallet Town data begins? It's all confusing. I really need some assistance.

And another thing, how do I find free data for certain maps? Wouldn't I be able to go anywhere where there is free data left alone? Also, I tried starting a script, 51 into a hex editor and it wouldn't appear as 51. I really don't know where to start at... None of the scripting tutorials here really go in depth into the starting positions, finding space and things like that..

EDIT: Okay! Kinda figured things out. 51 starts a simple script. the other bytes are pointers. Well here's the problem. I used pointer Calc v3.24, inserted a clean offest with decimal checked. Got the pointer. I than went to the spaces above said offset and put "51 A9 79" into the editor. On the offset bar, I inserted some simple letters. Well I put the pointer data into the script box on Johto Map, and the wrong offest appeared. I switched the pointers around and still, not the offset I inserted data for. So can someone assist me on that?

Last edited by tysonrss (2011-11-07 02:33:29)


Pokemon Blue DX is reborn!

Offline

#3 2011-11-07 04:02:23

tysonrss
Member
From: US, Ohio
Registered: 2011-08-27
Post 60/649

Re: My Help thread

Sorry for the posts. But they keep coming in.

Well this time, I inserting a OW into Pallet Town. The "current event" offset I pluged into Pointer Berechner. Than I used the pointer found and reversed it and put it into Johto Map. After saving...the OW disapeared!!!!

Why did this happen?


Pokemon Blue DX is reborn!

Offline

#4 2011-11-07 19:47:38

tysonrss
Member
From: US, Ohio
Registered: 2011-08-27
Post 64/649

Re: My Help thread

Anybody? Surely someone can assist me. It's not as if I'm like others who just quick if it looks hard.

I'm trying to understand this, and some assisstance would be great.


Pokemon Blue DX is reborn!

Offline

#5 2011-11-08 03:00:02

315/700

Re: My Help thread

tysonrss wrote:

Anybody? Surely someone can assist me. It's not as if I'm like others who just quick if it looks hard.

Patience, young Padawan. People will answer when they have both time and interest. As it happens, I don’t have much time, so my response will be somewhat brief.

tysonrss wrote:

Yeah I figured I'd post a thread for asking help in, to lessen so many future threads I may want to post.

This is okay for common questions like scripting, but for unusual things, try to split them into their own topic. In the future, someone may want to link to an answer to a specific question, and it is easier to look for a specific thread title than to dig through a several‐hundred‐post topic. (Case in point: can you find a specific post in Pokécommunity’s Simple Questions thread? Probably not, because it currently has 19920 posts, and more every day.)

tysonrss wrote:

Well, I took a few ganders at the Compendium, Mateo's scripting thread and Miksey's videos. And after all that, well....I'm STOMPED!!! I get basic hex editing when editing someones script. I've done that a few times with ease. But the tricky part comes when I want triggers. I tried looking at the triggers by looking up it's offset via Hex editor and all I can make out of it is it's text. Movements and other things, how can I view that? What tool do I use?

It is all hex. Take copious notes.

tysonrss wrote:

I'd like to insert a basic "wait up, talk and follow me" script.

Now, I know you'll tell me make pointers for the map to add them. And I get that, but where do I actually code the movements and things like that? I don't see how that's possible with a hex editor.

I suggest the best way to learn scripting is by example: the existing scripts in the game. Take apart a map header completely and learn how all its scripts work. In this thread, Tauwasser details the Olivine Pokémon Center, then adds a new script that gives the player a Celebi. Studying this thread is how I learned scripting.

Something similar to what you want happens in New Bark Town before you visit Elm’s Lab. So instead of Olivine Pokémon Center, disassemble the New Bark Town map and see what you can find.

tysonrss wrote:

Another question(the other still stands). I realized the problem with the signpost interference with fat boy. In the hex editor, the sign post came right after the fat boi's script. So in the future, how would I be able to change this so they don't interfere?

Repoint either the fat boy’s script or the signpost.

#6 2011-11-08 03:21:19

tysonrss
Member
From: US, Ohio
Registered: 2011-08-27
Post 67/649

Re: My Help thread

I suggest the best way to learn scripting is by example: the existing scripts in the game. Take apart a map header completely and learn how all its scripts work. In this thread, Tauwasser details the Olivine Pokémon Center, then adds a new script that gives the player a Celebi. Studying this thread is how I learned scripting.

I suspect the new Johto Map would make this a bit easier? Nonetheless I'll look and see what I can find.


Repoint either the fat boy’s script or the signpost.

So this means that it'd have to be located at a new offset than?

Thanks for the reply.


Pokemon Blue DX is reborn!

Offline

#7 2011-11-08 04:40:39

Miksy91
Member
Registered: 2010-10-16
Post 580/2,305

Re: My Help thread

Johtomap is almost perfect already, I don't think it needs an improvement.
Besides, use a hex editor to learn how map headers work.

Offline

#8 2011-11-08 06:31:52

tysonrss
Member
From: US, Ohio
Registered: 2011-08-27
Post 69/649

Re: My Help thread

I'll give it a shot...

I suspect that for an event to work on a certain map that the script has to be in the map bank area?

I ask because I inserted a script for someone new using Johto map. After applying the pointer to the OW it disapeared!


Pokemon Blue DX is reborn!

Offline

#9 2011-11-08 08:28:43

Miksy91
Member
Registered: 2010-10-16
Post 581/2,305

Re: My Help thread

tysonrss wrote:

I'll give it a shot...

I suspect that for an event to work on a certain map that the script has to be in the map bank area?

I ask because I inserted a script for someone new using Johto map. After applying the pointer to the OW it disapeared!

Wait.. so your pointer was basically something else than 4000-7FFF ?
In that case, you're either pointing to rom bank 0 or in other GBC ram areas.

Normally, you must point to $4000-7FFF.

Basically, if your pointer is in offset 21000, pointer 7000 would lead to offset 23000.
However, I think Johtomap works so that it shows pointer 8A00 leading to 24A00 but Gameboy doesn't work like that -a 2-byte pointer cannot point toanother rom bank.

Offline

#10 2011-11-08 08:32:59

tysonrss
Member
From: US, Ohio
Registered: 2011-08-27
Post 72/649

Re: My Help thread

I actually don't remember the pointer number.

But I went to free space somewhere after the data ends that was used. I typed a offset into a calculator and used that pointer. I can't show anything because it's all gone now since I had a virus. But basically, I inserted the script in a spot that was totally empty, 2 spots above it I typed in 5A XX YY and the 2 spots below was the script.


Pokemon Blue DX is reborn!

Offline

#11 2011-11-08 19:06:14

tysonrss
Member
From: US, Ohio
Registered: 2011-08-27
Post 75/649

Re: My Help thread

Alright I feel that I deserve a pat on the back here.

I'm finally starting to understand. Thanks to Mateo's tut, I was able to repoint new data for Pallet and added a new person. Than I used it's offset and found the free space. Than I preceeded, 47 4C F3 61 53 49 90---F3 61 being the pointer data for that offset of the character. Now I saved it and the text points to a "take phone number command". According to PKSV but crashes in game.

What did I do wrong? I'm really starting to get though.


Pokemon Blue DX is reborn!

Offline

#12 2011-11-08 19:41:11

Miksy91
Member
Registered: 2010-10-16
Post 582/2,305

Re: My Help thread

4C XX YY is used to show text and often points to byte 00 before text data.
If you want the script jump into a different fuction, use call and jump commands.

Offline

#13 2011-11-08 19:49:31

tysonrss
Member
From: US, Ohio
Registered: 2011-08-27
Post 76/649

Re: My Help thread

EDIT: Alright my problem was corrected and I used PKSV, Hex editor to touch it up and Johto Map.

So my text came out nice. I feel great, I've inserted my first script!!!!

But, the problem happens to be that I recieve that dreaded 2f- thing after "Hi there.". Which is my script.

Any thoughts?

Thanks to the folks who've helped, it feels great doing this.

EDIT: Fixed it. Gotta end the script with 57 in the hex editor. Yay!!!

If I come across any other script problems I'll be sure to post. I'm getting the hang of this, I'm just going to keep testing more scripts and make it tougher as it progress so I can finally start on my hack.

I do have a question. When it comes to PKSV, what are it's limits? Would I be able to do fool blown map scripts, and follow me scripts? And even battles?

Last edited by tysonrss (2011-11-08 21:05:48)


Pokemon Blue DX is reborn!

Offline

#14 2011-11-09 01:38:51

tysonrss
Member
From: US, Ohio
Registered: 2011-08-27
Post 77/649

Re: My Help thread

I have anotther question.

Can you insert text than give item(yes) than another text? I tried and it didn't crash, but the palette of the room messed up a little than after I get item he continues to the text after. Without leaving the room(I didn't include bit flag)if you talk again, he says the first set of text, but its a little messed up, gives item than says the message after. I'm aware that the GBA scripting is like that but I don't know if the same rule is applied here.

#org 0x1660A0
'-----------------------------------
faceplayer
2writetext 0x60B0 ' 0x1660B0
closetext
giveitem 0x92 0x1
loadfont
2writetext 0x60C0 ' 0x1660C0
closetext
loadmovesprites
end


#org 0x1660B0
= Are you hungry\nson?\pI bet youare.\pHere you little\nbrat.\e


#org 0x1660C0
= Now get the fuck\nout of my face\llittle boy.\e

I'm gonna go on a limb and say it messed up because the text happened to interfere with the other set?

EDIT: Yeah the problem was that they mushed together. I have to be smarter in what areas they're separated from. How can I be certain what space to use next? I don't want to golike 10 spaces down and waste free data that can  be used with the script together...

Last edited by tysonrss (2011-11-09 02:11:38)


Pokemon Blue DX is reborn!

Offline

#15 2011-11-09 04:56:18

Miksy91
Member
Registered: 2010-10-16
Post 583/2,305

Re: My Help thread

Normally, moving sprites are loaded to ram and at that time, you can't show text - instead, the game shows graphics of people's moving sprites (when you make it display text).

When font is once loaded, you don't have to load it in ram anymore because it's already there.
On the other hand, moving sprites shouldn't be loaded either before the end of the script if no text is used in that script.

Example:
cry 0xA2
end

Last edited by Miksy91 (2011-11-09 04:57:52)

Offline

#16 2011-11-09 05:12:30

tysonrss
Member
From: US, Ohio
Registered: 2011-08-27
Post 80/649

Re: My Help thread

No I mean on how it's scripted.

For example I have a sprite and I assign it a script where I talk to it and it gives me an item than once it's set he'll say something else. But I'd like all that to be in the same zone in the hex editor. Not all around. How can I anticipate where the pointer of something being true is.?

Ex: if true 0xXXYY 0x800000
2writefont yadyayda 0x800056


And on and on. Since there's barely a tool to script, I'd like it to be easier to pinpoint the next location of the offset that should be used in that script, and make it closer to the other part of the script as it possibly can.

Get the picture?


Pokemon Blue DX is reborn!

Offline

#17 2011-11-09 07:19:12

tysonrss
Member
From: US, Ohio
Registered: 2011-08-27
Post 85/649

Re: My Help thread

No, I know how that works. I pretty much know the basics now.

It's just that I'd like the scripts to be tidy, and keep a whole scripts data together as possible to save space for more scripts.


Pokemon Blue DX is reborn!

Offline

#18 2011-11-09 07:23:03

Miksy91
Member
Registered: 2010-10-16
Post 585/2,305

Re: My Help thread

I often make the pointer 0xAAAA and when I've scripted the first part, I change the pointer so that a couple of bytes of free space are left between the two parts of the script (in case it's possible that my script is missing something).

Last edited by Miksy91 (2011-11-09 07:24:18)

Offline

#19 2011-11-09 07:26:12

tysonrss
Member
From: US, Ohio
Registered: 2011-08-27
Post 86/649

Re: My Help thread

Yeah that's basically what I try doing, being careful text data don't mush together.


Pokemon Blue DX is reborn!

Offline

#20 2011-11-16 01:15:49

tysonrss
Member
From: US, Ohio
Registered: 2011-08-27
Post 147/649

Re: My Help thread

Hey all.

Where can I find the trigger table in the hex editor? I want to add Pallet Town to it so my triggers activate.

And, where exactly is can I find out what map bank a place is at? Johto Map and Gold Map doesn't specify like AMap.

Last edited by tysonrss (2011-11-16 02:18:52)


Pokemon Blue DX is reborn!

Offline

#21 2011-11-16 02:26:43

331/700

Re: My Help thread

tysonrss wrote:

And, where exactly is can I find out what map bank a place is at? Johto Map and Gold Map doesn't specify like AMap.

You can find the current map’s bank / map number by looking at memory locations $D044 and $D045 while the game is running.

#22 2011-11-16 02:45:42

tysonrss
Member
From: US, Ohio
Registered: 2011-08-27
Post 148/649

Re: My Help thread

Well...what would I use for that, vram viewer?


Pokemon Blue DX is reborn!

Offline

#23 2011-11-16 03:19:58

332/700

Re: My Help thread

tysonrss wrote:

Well...what would I use for that, vram viewer?

Just hit escape in BGB to open the debugger.

#24 2011-11-16 04:17:51

tysonrss
Member
From: US, Ohio
Registered: 2011-08-27
Post 149/649

Re: My Help thread

Okay.

And another thing. What number should be filled in the map so that my OW is invisible until I demand it to reapear?


Pokemon Blue DX is reborn!

Offline

#25 2011-11-16 18:12:06

tysonrss
Member
From: US, Ohio
Registered: 2011-08-27
Post 151/649

Re: My Help thread

bump.

i take it that a ow can't be made hidden via map than? i tried entering the data from other invisible people and it was a no go...


Pokemon Blue DX is reborn!

Offline

Board footer

Powered by FluxBB