• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Forum moderator applications are now open! Click here for details.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[ARCHIVE] Simple Questions (SEARCH BEFORE ASKING A QUESTION)

Status
Not open for further replies.
34
Posts
11
Years
  • Seen Sep 10, 2013
Guys, how do i edit existing ingame scripts?
I need to remove the oak starting part of fire red, thanks.

And what's the script for a box that asks me instead of just yes/no...
Custom options, like

Instead of yes no
Hum...
Ho-oh or lugia
 
Last edited:

miksy91

Dark Energy is back in action! ;)
1,480
Posts
15
Years
My question: I need a new offset for my new pokémon's moveset, how much space do I need?

Thanks in advance for all answers
Reygok
There are more than 256 different moves in Gen III games. And what I refer this by is that 0x100 as hexadecimal number stands for 256 in decimal. And in other words, we can't describe all the moves by just using one single byte, we need another (or at least part of it).

So basically, each move takes 2 bytes space. And pokemon's level value is only (at maximum) one byte long (which it most likely is) so there could be a structure such as this one built in the game for each pokemon:
[Level] [Move parameter 1] [Move parameter 2] [Level] [Move parameter 1] [Move parameter 2] [Level] ...

So each move takes three bytes, the level the pokemon learns the certain move at along with two bytes describing the move the pokemon learns. So if you for example make a certain pokemon learn 10 different moves, that takes (10 * 3 = ) 30 bytes (and 0x1E bytes in hex).
And if that move data would be stored in offset 0x740005 in the rom for instance, the move data would end at offset 0x740005 + 0x1E - 0x1 = 0x740022

Spoiler:


This whole thing is just an assumption because I don't know if the structure really is like that. But you can easily check it out with a hex editor by looking for the move learning data of a certain pokemon.
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
Guys, how do i edit existing ingame scripts?
I need to remove the oak starting part of fire red, thanks.

And what's the script for a box that asks me instead of just yes/no...
Custom options, like

Instead of yes no
Hum...
Ho-oh or lugia

1. Most ingame scripts can be found in A-Map which will open it if you define a script editor in the options menu.

2. You are looking to create a new multi-choice box. I haven't looked much into this but I know that there are a bunch of preset ones that can be edited with a couple programs in the Toolbox. I also believe you can create your own, but I haven't needed to yet, so I don't know how to.

Edit: Multi-choice boxes are included in diegoisawesome's tut (well, not how to make new ones, maybe in part 3 which I didn't search yet) so don't get snippy with Reygok. I constantly refer back to that tut, in fact I downloaded it. I also noticed that there is a few preset multi-choice boxes listed in the tut that are blank. Use one of the tools to edit them.

Edit2: Nope, nothing on making your own, so just edit one of the blank ones.
 
Last edited:
34
Posts
11
Years
  • Seen Sep 10, 2013
Ok guys i keep getting the floating pointer thingy and i cant see the missing pointer

Script
Spoiler:


+Thanks Karate, youre always there to help!

EDIT: I keep getting Invalid Command while opening a script!
 
Last edited:

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
Ok guys i keep getting the floating pointer thingy and i cant see the missing pointer

Script
Spoiler:


+Thanks Karate, youre always there to help!

ARE YOU USING POKESCRIPT???? Wow... Okay... What is the exact error message as I am not familiar with the errors in Pokescript?

Also, if your are going to shorten my username, use "kid", karate is just weird....:p haha, you're welcome.
 

Renegade

Time for real life...
995
Posts
12
Years
I have a question. Hope someone can answer!

Pokemon Ruby: When I step into a map, the "name" of the map doesn't come down onto the screen when I enter into the map (In-game). Does anybody know why this is happening? Thank you in advance.
 
534
Posts
11
Years
  • Age 26
  • Seen Jul 24, 2023
I have a question. Hope someone can answer!

Pokemon Ruby: When I step into a map, the "name" of the map doesn't come down onto the screen when I enter into the map (In-game). Does anybody know why this is happening? Thank you in advance.

Can you make your question clearer?
 

ShyRayq

Unprofessional Unprofessional
1,856
Posts
16
Years
  • Seen Mar 26, 2024
Hey guys, just wondering something.
So, I create a new item in one of the blanks spots. Specifically between Stick "0xE1" and Red Scarf "0xFE"
Then, I make an NPC give the item with giveitem. But nothing happens.
If anyone can help explain why this is, it would be greatly appreciated.
 

Reygok

Beginning Hacker
60
Posts
14
Years
  • Seen Jan 22, 2016
There are more than 256 different moves in Gen III games. And what I refer this by is that 0x100 as hexadecimal number stands for 256 in decimal. And in other words, we can't describe all the moves by just using one single byte, we need another (or at least part of it).

[...]

This whole thing is just an assumption because I don't know if the structure really is like that. But you can easily check it out with a hex editor by looking for the move learning data of a certain pokemon.

Thanks miksy, I'll try with that size :)

Edit: Okay, that did not work out the way I assumed it would. I'm using the Pokémon Editor in 0xRH's GBA Pokémon Game Editor to add new moves to my newly created pokémon. It now only has Tackle, by default, and I can't figure out how to add new ones. Does anybody know how to do that :)?

Thanks in advance
Reygok
 
Last edited:
34
Posts
11
Years
  • Seen Sep 10, 2013
ARE YOU USING POKESCRIPT???? Wow... Okay... What is the exact error message as I am not familiar with the errors in Pokescript?

Also, if your are going to shorten my username, use "kid", karate is just weird....:p haha, you're welcome.

Lol, ok karatekid.
The full error message is "Floating pointer must be pushed" Anyways, i think it means that i made an offset and didnt make an use of it(Im not sure), and i'll try with XSE then...

Ok, i found the floating pointer and everything, now i inserted the script and the game crashes, new

Script:
Spoiler:
 
Last edited:

Renegade

Time for real life...
995
Posts
12
Years
It's probably the name of map that is always shown on the left topmost corner.

@CrystalStatic: Go to header tab of map and set the "show name" possibility ;)

I tried that and it still isn't working... I also went to some of the original cities (Lilycove City, ect) and the name doesn't show up there, either.
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
Thanks miksy, I'll try with that size :)

Edit: Okay, that did not work out the way I assumed it would. I'm using the Pokémon Editor in 0xRH's GBA Pokémon Game Editor to add new moves to my newly created pokémon. It now only has Tackle, by default, and I can't figure out how to add new ones. Does anybody know how to do that :)?

Thanks in advance
Reygok

I'm just going to going to tell you how to expand movesets in PGE. The only problem with this is that all old moves will be deleted so you will have to reinsert them.

I shall assume you have the move editor tab of P.E. open.

1. Click "Insert Attacks at Offset".

2. Type in the address of some free space (use FSF and just search for 1000 bytes, well more than enough). Copy the address into a notepad or such as we will we need it later.

3. Type in the number of attacks you want your Pokémon to learn. (In decimal)

4. Click insert.

5. Now paste the address we saved earlier into the box labeled "Level-up Attack Pointer" and click "repoint". Save the original address, you may want it later.

6. Now you have a brand new *clean* moveset that you can edit however you wish. If you want the old moveset in there because it sucks entering them all in again, you will have to copy it from the old location and paste it over the new location in a hex editor.

7. To do that, open HxD and go to the original address of the level-up attack pointer.

[miksy91: your guess on how moves are stored was an educated one... but wrong:/. That is how most people would think they are stored, myself included, but they are actually squished into 2 bytes by some formula instead of 3. I'm trying to figure out the formula right now... But it is weird....]

8. Find out the orginal number of attacks by some means, multiply that by two, and select that many bytes.

9. Copy and paste-WRITE to our new level-up attack pointer that we found using FSF.

Done!

Edit: I figured out the formula!

Okay, for moves that are numbered 255 and below, they are stored [move number] [level x 2].

For moves above 255, they are stored [move number - 255] [level x 2 + 1]

So, as you can see, if the level byte is odd, it knows to read from the set of moves above 255 and if it is even, it reads from the set of moves below 255. Quite the thought that went into this one!
 
Last edited:
865
Posts
13
Years
  • Age 38
  • Seen Feb 24, 2024
Back with yet another question. I've been reading the tutorials on making a world map and importing it into my game. However, it seems... really complicated when it comes to importing it and such... Is there an easier way to explain what I need to do?
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
I know of this tutorial, however, even creating a rough item, using descriptions and images already in the game, the NPC does not give me the item.

I know that the NPC should because I have already created an evolutionary stone. But just this random item is not being given to me.

Can we see the script as it is compiled in game?

Also, is your bag full? Without a special check to see if it is, the game will just skip that command if it is indeed full, and won't say a thing.

Lol, ok karatekid.
The full error message is "Floating pointer must be pushed" Anyways, i think it means that i made an offset and didnt make an use of it(Im not sure), and i'll try with XSE then...

Ok, i found the floating pointer and everything, now i inserted the script and the game crashes, new

Script:
Spoiler:

The only problems I can see:

1. You are using flags over 900. Won't cause a crash, but will cause bad eggs and broken vars as they overwrite pc and var RAM space.

2. Your multichoice box isn't using preparemsg. This command will be used around it in XSE. I don't know if it is the same in Pokescript, but it may be. I noticed you used msgbox2, is that the same? Also, shouldn't there be a message attached to that command: {i.e. msgbox2 $msgforchoice} ?

Hope you can get this right, it looks like a fun script!

I tried that and it still isn't working... I also went to some of the original cities (Lilycove City, ect) and the name doesn't show up there, either.

I have had this problem before....... but I can't remember what I did!!! Ugggh, I wish I could help:/.
 
Last edited:

miksy91

Dark Energy is back in action! ;)
1,480
Posts
15
Years
Edit: I figured out the formula!

Okay, for moves that are numbered 255 and below, they are stored [move number] [level x 2].

For moves above 255, they are stored [move number - 255] [level x 2 + 1]

So, as you can see, if the level byte is odd, it knows to read from the set of moves above 255 and if it is even, it reads from the set of moves below 255. Quite the thought that went into this one!
Yeah, looking at the pattern like that, it doesn't make much sense. But even so, there is some rational solution to why Gamefreak wanted to program the move learning pattern like that, and I believe that is the fact that Gen III games won't allow the level of the encountered pokemon being higher than 127 (or "100").

This leaves the highest bit of the level value unused which can be used as part of the move learning routine. Now instead of 8 bits, 9 bits can be used to describe each move, by using the highest bit of the level value as one. This kind of a method allows 512 moves to be stored in the game.

But you're right about the fact that the pattern doesn't look that user-friendly. But the fact is that it doesn't have to, not while being viewed with a hex editor. Because the original games were programmed by creating a disassembly, a "text document" holding all the in-game data that could be compiled into a rom file using an asm compiler (unless they simply wrote the game using a real programming language, can't really tell). This kind of a game developing method leaves more possibilities into actual game developing, without having to pay attention to all existing structures so much.
 
Last edited:
Status
Not open for further replies.
Back
Top