Go Back   The PokéCommunity Forums > ROM Hacking > Tools, Tutorials & Resources
Reload this Page [Tutorial] Flags, Vars, & Script Tiles

Notices
For all updates, view the main page.

Tools, Tutorials & Resources Various tools to help you develop your hacks can be found here.
New threads in this forum are to be approved by a moderator before they are displayed.



Reply
 
Thread Tools
  #51    
Old July 9th, 2014 (10:24 AM).
Rambon99's Avatar
Rambon99 Rambon99 is offline
 
Join Date: Jul 2014
Location: Caracas Venezuela
Gender: Male
Nature: Lonely
Posts: 11
I did set the flag in a different script and it seemed to work, but I don't know why do anything in this one. I'll also put that script if you'd like to take a look at it.
Spoiler:
#dynamic 0x71B2FE
#org @start
lock
checkflag 0x213
if 0x1 goto @stop
msgbox @1 0x6
setflag 0x213
release
end

#org @stop
msgbox @2 0x6
release
end

#org @1
=\[black_fr]Mom: Hey sweetie could you come down here?\p\[red_fr][PLAYER]:Moooom! I'm on the computer!\p\[black_fr]Mom:COME DOWN HERE GODDAMNIT!

#org @2
=\[black_fr]Mom: I CAN HEAR YOU ON THAT FUNKIN MACHINE! \nCOME DOWN HERE NOW!
__________________
Omg spriterz pls! Right nao I'm looking for someone who can sprite decently to help me on my game! I don't have any money but I can give lots of love and kisses ;3. PM for mo' info'!
Reply With Quote
  #52    
Old July 9th, 2014 (06:31 PM).
karatekid552's Avatar
karatekid552 karatekid552 is offline
What happens if I push it?....
 
Join Date: Nov 2012
Location: Do you really want to know? Really?
Gender: Male
Nature: Bold
Posts: 1,767
Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552 Send a message via Skype™ to karatekid552
Quote originally posted by Rambon99:
I did set the flag in a different script and it seemed to work, but I don't know why do anything in this one. I'll also put that script if you'd like to take a look at it.
Spoiler:
#dynamic 0x71B2FE
#org @start
lock
checkflag 0x213
if 0x1 goto @stop
msgbox @1 0x6
setflag 0x213
release
end

#org @stop
msgbox @2 0x6
release
end

#org @1
=\[black_fr]Mom: Hey sweetie could you come down here?\p\[red_fr][PLAYER]:Moooom! I'm on the computer!\p\[black_fr]Mom:COME DOWN HERE GODDAMNIT!

#org @2
=\[black_fr]Mom: I CAN HEAR YOU ON THAT FUNKIN MACHINE! \nCOME DOWN HERE NOW!
What results do you get from this script?

Flag 0x213 is not known for any use. It may not exist and therefore result in reseting each time it is used by overwrite from other data.
__________________

Paired with Simba
Reply With Quote
  #53    
Old July 11th, 2014 (08:34 AM).
Gorrioncillo Gorrioncillo is offline
 
Join Date: Nov 2013
Gender: Male
Posts: 35
as you know, this flags/varibles have to be safe in the .sav, where are the offset for this, or where can i see for it on the ram
Reply With Quote
  #54    
Old July 12th, 2014 (08:15 PM).
karatekid552's Avatar
karatekid552 karatekid552 is offline
What happens if I push it?....
 
Join Date: Nov 2012
Location: Do you really want to know? Really?
Gender: Male
Nature: Bold
Posts: 1,767
Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552 Send a message via Skype™ to karatekid552
Quote originally posted by Gorrioncillo:
as you know, this flags/varibles have to be safe in the .sav, where are the offset for this, or where can i see for it on the ram
In the ram, flags are shifted around by DMA every cycle of the mainloop. Using ASM and dumping the offset found by the flag return function is the only way to locate a flag at a specific cycle. I have long lost the offset of said function but it is labeled in Knizz's IDB file if I remember right.
__________________

Paired with Simba
Reply With Quote
  #55    
Old September 29th, 2014 (05:45 AM).
NG55's Avatar
NG55 NG55 is offline
 
Join Date: Sep 2009
Location: Barrie, Ontario, Canada
Gender: Male
Posts: 67
What are the flags in LeafGreen that are safe. I'm making a hack through Blue's perspective (and later Leaf's) and I think it'd be easier to use LeafGreen for the names at the beginning. There are multiple instances of the names when I look for them in A-text, so I don't want to screw anything up.
Reply With Quote
  #56    
Old 4 Weeks Ago (07:38 AM).
Enoch- Enoch- is offline
 
Join Date: Jul 2015
Gender: Male
Posts: 20
This guide opens more questions than it gives answers. So, how many flags are you able to use then? And how do i know what specific flag to use? Also, if Im using Emerald 650 ROM Base, then how do I know what variables and flags to use?

Cant I just make up a flag number? like 569456 or something?
Reply With Quote
  #57    
Old 4 Weeks Ago (12:03 PM).
azurile13 azurile13 is offline
 
Join Date: Mar 2015
Posts: 115
Quote originally posted by Enoch-:
This guide opens more questions than it gives answers.
Each question that you say this guide "opens" is addressed in the guide itself.

Quote originally posted by Enoch-:
So, how many flags are you able to use then? And how do i know what specific flag to use?
Nearly the entire guide is a list of flags and vars, what they are for, and how to know whether or not they are safe to use. There are even lines in bold at the end saying:
Safe Flags:
->200-2FF
->Flags from events or OWs that have been removed

Safe Vars:
->0x4011-0x40FF
->Make sure you check the list! Some vars have specific functions!


Quote originally posted by Enoch-:
Also, if Im using Emerald 650 ROM Base, then how do I know what variables and flags to use?
As the guide says, this is for FireRed. You'll have to look for/create an emerald list, though I'm pretty sure that there is currently at least flag list out there.

Quote originally posted by Enoch-:
Cant I just make up a flag number? like 569456 or something?
From the guide:
Quote:
So, let's explain the reasons why flags outside of those ranges aren't safe:

-Many are temporary. Meaning they get reset every time the map changes.
-500-700 are used for Trainer Flags.
-Flags over 900 take up the same space as variables.

That is pretty much it. Fairly simple, huh?
Reply With Quote
  #58    
Old 4 Weeks Ago (02:14 PM).
Enoch- Enoch- is offline
 
Join Date: Jul 2015
Gender: Male
Posts: 20
Each question that you say this guide "opens" is addressed in the guide itself.
Obviously, but what you fail to realize is that noobs may read this, and a higher level of explanation may not register with people who don't quite grasp the concept but are looking to.

Nearly the entire guide is a list of flags and vars, what they are for, and how to know whether or not they are safe to use. There are even lines in bold at the end saying:
Numbers are nice. and saying 200-2FF and 0x4011-0x40FF is a list of flags and/or variables isn't quite illuminating. How do you choose one. How do you count from 200 to 2FF? Like I said, people may not know how numbers or variables increase, because letters are thrown into the mix, and i doubt all the letters cycle through Z before starting again (though i could be wrong).

As the guide says, this is for FireRed. You'll have to look for/create an emerald list, though I'm pretty sure that there is currently at least flag list out there.
Yes but why Im asking is because I don't know if information added (not scripts) could take up variables. Alot of information has been added into the Emerald 650, so I was inquiring how to figure this out or if you could explain to me that added pokemon, etc. does and does not take up variable space.

Thanks
Reply With Quote
  #59    
Old 4 Weeks Ago (03:04 PM).
Lost Heart's Avatar
Lost Heart Lost Heart is offline
the better journalist
Crystal Tier
 
Join Date: Mar 2010
Age: 18
Gender: Other
Nature: Impish
Posts: 2,100
Quote originally posted by Enoch-:
Each question that you say this guide "opens" is addressed in the guide itself.
Obviously, but what you fail to realize is that noobs may read this, and a higher level of explanation may not register with people who don't quite grasp the concept but are looking to.
If you (or anyone else) are unable to understand the material contained here, it would be best to first read tutorials on such topics as basic hacking skills and in particular scripting.

Quote originally posted by Enoch-:
Nearly the entire guide is a list of flags and vars, what they are for, and how to know whether or not they are safe to use. There are even lines in bold at the end saying:
Numbers are nice. and saying 200-2FF and 0x4011-0x40FF is a list of flags and/or variables isn't quite illuminating. How do you choose one. How do you count from 200 to 2FF? Like I said, people may not know how numbers or variables increase, because letters are thrown into the mix, and i doubt all the letters cycle through Z before starting again (though i could be wrong).
Numbers for flags/variables are counted in hexadecimal. https://en.wikipedia.org/wiki/Hexadecimal.
It's pretty much used all the time in hacking, so it's very important to know.

Quote originally posted by Enoch-:
As the guide says, this is for FireRed. You'll have to look for/create an emerald list, though I'm pretty sure that there is currently at least flag list out there.
Yes but why Im asking is because I don't know if information added (not scripts) could take up variables. Alot of information has been added into the Emerald 650, so I was inquiring how to figure this out or if you could explain to me that added pokemon, etc. does and does not take up variable space.

Thanks
You're best off asking this question to the creator of the patch. Variables are stored in the GBA's/emulator's memory, while the changes we make when ROM hacking are stored in the ROM file. This means that unless the patch maker made changes (like events) that make use of specific variables/flags, then you'll need to know. Most likely there were very few if any flags/variables taken by the patch.
__________________
Reply With Quote
  #60    
Old 4 Weeks Ago (03:11 PM).
Enoch- Enoch- is offline
 
Join Date: Jul 2015
Gender: Male
Posts: 20
Quote originally posted by Lost Heart:
If you (or anyone else) are unable to understand the material contained here, it would be best to first read tutorials on such topics as basic hacking skills and in particular scripting.



Numbers for flags/variables are counted in hexadecimal. https://en.wikipedia.org/wiki/Hexadecimal.
It's pretty much used all the time in hacking, so it's very important to know.



You're best off asking this question to the creator of the patch. Variables are stored in the GBA's/emulator's memory, while the changes we make when ROM hacking are stored in the ROM file. This means that unless the patch maker made changes (like events) that make use of specific variables/flags, then you'll need to know. Most likely there were very few if any flags/variables taken by the patch.
Thank you for not being sarcastic with me. I will message him/her eventually and check on that. I will also attempt to understand hexadecimal. It sounds really complicated but im sure its fairly simple once the concept is understood.
Reply With Quote
  #61    
Old 4 Weeks Ago (09:24 PM).
azurile13 azurile13 is offline
 
Join Date: Mar 2015
Posts: 115
Quote originally posted by Enoch-:
Each question that you say this guide "opens" is addressed in the guide itself.
Obviously, but what you fail to realize is that noobs may read this, and a higher level of explanation may not register with people who don't quite grasp the concept but are looking to.

Nearly the entire guide is a list of flags and vars, what they are for, and how to know whether or not they are safe to use. There are even lines in bold at the end saying:
Numbers are nice. and saying 200-2FF and 0x4011-0x40FF is a list of flags and/or variables isn't quite illuminating. How do you choose one. How do you count from 200 to 2FF? Like I said, people may not know how numbers or variables increase, because letters are thrown into the mix, and i doubt all the letters cycle through Z before starting again (though i could be wrong).

As the guide says, this is for FireRed. You'll have to look for/create an emerald list, though I'm pretty sure that there is currently at least flag list out there.
Yes but why Im asking is because I don't know if information added (not scripts) could take up variables. Alot of information has been added into the Emerald 650, so I was inquiring how to figure this out or if you could explain to me that added pokemon, etc. does and does not take up variable space.

Thanks
You should understand that I was in no way being "sarcastic." The thing is, most people here will know how to count from 0x200 to 0x2FF. To most people, 0x4011-0x40FF is extremely illuminating. If they don't know it? That's fine, they can learn. But no one is a mind reader. Rather than ask about it, you made a list of questions that, from the perspective of most people reading the tutorial, were directly addressed. Without specifying what you didn't understand about it, it came across as you lazily skimming through the post. It looked like you hadn't even read everything, so I pointed you directly to where they were answered.

As for your question, Lost Heart pretty much answered it. I'll add that a quick glance at that Emerald 650 thread shows that the creator didn't change any events, so it seems unlikely, and also would be inexplicably irresponsible, for them to have changed around any in game flags for no reason.

Adding Pokemon to the game does take up caught/seen flags, but I would think they would have used an extra "save block" for those flags that shouldn't affect the normal flags you'd want to use for scripting.
Reply With Quote
  #62    
Old 4 Weeks Ago (05:39 AM).
Enoch- Enoch- is offline
 
Join Date: Jul 2015
Gender: Male
Posts: 20
Your right, your right. Im just used to people always freaking out about stuff.
Reply With Quote
Reply
Quick Reply

Sponsored Links

You may also like.. (Beta)
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are UTC -8. The time now is 11:47 PM.