PHO - Pokémon Hackers Online
Go Back   PHO - Pokémon Hackers Online > Discussion Board > Archive

Notices

Archive Old threads that serve no purpose are here.

 
 
Thread Tools Display Modes
Old 31st October 2013, 03:00 PM   #1
Haradion
Neophyte
 
Join Date: Oct 2013
Posts: 14
Haradion
Default Free Flags and Variable

Is there a comprehensive list of Variables and Flags which are not in use by Fire Red?
It might be a useful resource to have, to allow hackers to keep a track of what Variables are being used for what. I am not sure what the limit is, (Or even if it can realistically be reached) but it would be helpful to know.
Is anyone able to help?
Haradion is offline  
Sponsored Links
Old 31st October 2013, 05:20 PM   #2
karatekid552
What does this button do?.....
Ex-Staff
 
karatekid552's Avatar
 
Join Date: Feb 2013
Location: Stalker.......
Posts: 229
karatekid552 karatekid552
Default

Dude. Google this: "Flags, Vars, & Script Tiles PHO"
karatekid552 is offline  
Old 31st October 2013, 07:49 PM   #3
Haradion
Neophyte
 
Join Date: Oct 2013
Posts: 14
Haradion
Default

I have seen this resource - and was thinking about it when I posted. What I am looking for though, is a list of Unused Flags and variables for my own scripting - not a list of flags and variables already in use.
Haradion is offline  
Old 31st October 2013, 11:18 PM   #4
droomph
握りモンスター
Ex-StaffPHO VIP
 
droomph's Avatar
 
Join Date: Apr 2012
Location: maybe.
Age: 21
Posts: 418
droomph
Default

Quote:
Originally Posted by Haradion View Post
I have seen this resource - and was thinking about it when I posted. What I am looking for though, is a list of Unused Flags and variables for my own scripting - not a list of flags and variables already in use.
search, and if it is found, then don't use it
__________________
droomph is offline  
Old 1st November 2013, 12:08 PM   #5
karatekid552
What does this button do?.....
Ex-Staff
 
karatekid552's Avatar
 
Join Date: Feb 2013
Location: Stalker.......
Posts: 229
karatekid552 karatekid552
Arrow

Quote:
Originally Posted by Haradion View Post
I have seen this resource - and was thinking about it when I posted. What I am looking for though, is a list of Unused Flags and variables for my own scripting - not a list of flags and variables already in use.
With the logic you just presented here.... I have no idea how you will be able to hack. Seriously? A flag is a boolean: only true or false. So, as Droomph said, if I give you all of the true, what does that leave? Hmm, the false? Not to mention, if you actually read it, I included a paragraph for both flags and vars detailing exactly which flags were 100% safe to use and which ones were sketchy.
karatekid552 is offline  
Old 1st November 2013, 12:40 PM   #6
Haradion
Neophyte
 
Join Date: Oct 2013
Posts: 14
Haradion
Default

Perhapes my understanding of Flags is in correct, and if so I apologize most profoundly.

My understanding of Flag, is a number which is either true or false. When I reference a flag, it detects if the flag is true of false, and applies the appropriate action.

I was under the impression that these flags were prebuilt into the game, to be referenced. I assumed there was a limit, but also that several were unused.

I assumed that their were empty flags in the game to be used.

For instance, I assumed that I could not reference the Flag:
0x57ACA7C0623F826FF83160F

Am I wrong - is it only solution to find a flag already in use, (And even then, only a safe one) delete the accompanying script, and use that flag in the new script?
Is it not possible to add more Flags to the game? To use more flags, without changing the vanilla game?
O_O
Haradion is offline  
Old 1st November 2013, 08:10 PM   #7
karatekid552
What does this button do?.....
Ex-Staff
 
karatekid552's Avatar
 
Join Date: Feb 2013
Location: Stalker.......
Posts: 229
karatekid552 karatekid552
Default

Quote:
Originally Posted by Haradion View Post
Perhapes my understanding of Flags is in correct, and if so I apologize most profoundly.

My understanding of Flag, is a number which is either true or false. When I reference a flag, it detects if the flag is true of false, and applies the appropriate action.

I was under the impression that these flags were prebuilt into the game, to be referenced. I assumed there was a limit, but also that several were unused.

I assumed that their were empty flags in the game to be used.

For instance, I assumed that I could not reference the Flag:
0x57ACA7C0623F826FF83160F

Am I wrong - is it only solution to find a flag already in use, (And even then, only a safe one) delete the accompanying script, and use that flag in the new script?
Is it not possible to add more Flags to the game? To use more flags, without changing the vanilla game?
O_O
Flags are stored starting at a specific memory address and up. Basically, a routine does this:

flag_start_offset + (flag_number/8)

Flags are stored in bits, so 8 per byte. This will get you to the byte, and then a flag_number%[modulo]8 yeilds the bit.

So, basically you could reference flag 0x57ACA7C0623F826FF83160F (though you might run out of memory) but that doesn't mean it is used as a flag. There is no cap on where flags end, they just spill out into vars, which spill into PC data. Basically, vars 0x4000 start at flag 0x900 (vars under 0x4000 are dosregarded by the var decrypter in most cases. They don't exist.) and after vars end, there is PC data. The issue is, there is no limit. It won't give you an error if you try to setflag 0x900. It will simply set the bit, corrupting var 0x4000.

Jambo51 wrote a hack that repoints where the game thinks flags over 0x1000 are, repointing them to free space. This will be usefull to you.



Before you ask, the 0x4000 is a reference set by the game. The var decrypter does this when scripting:

if arg <= 0x3FFF:
use_are_as_static_number
else:
goto var_decrypter

This allows the engine to use both vars and static numbers without changing syntax.
karatekid552 is offline  
Old 1st November 2013, 09:18 PM   #8
Haradion
Neophyte
 
Join Date: Oct 2013
Posts: 14
Haradion
Default

1)
So unless I used Jambo51's Hack, if I wanted to use a flag or variable, I would have to find a flag or variable in use in the game - for example, at an item on the ground - delete its used script, and used that flag?
My difficulty, is that if I do that, then every time I want to make a trainer, use a scripted tile - or make an item disappear once its picked up, or prevent a script from taking place again - every time I wanted to make a "one time only" event in the game, to create my own hack, I would have to delete something in use in the game itself.

2)
Are there any flags, set by the game, but not already in use?

3)
Jambo51's hack sounds useful, but to use it (I assume I have found it) I need to use JPAN's Save Block Patch for FR, which I am denied access to... If I could find that patch, I might be able to apply Jambo51's hack, and make use of these new flags and variables for the purpose of (finally) starting scripting in my Hack.

Thanks for all your help, and I am sorry for any confusion I might have caused.
Haradion is offline  
Old 1st November 2013, 11:21 PM   #9
karatekid552
What does this button do?.....
Ex-Staff
 
karatekid552's Avatar
 
Join Date: Feb 2013
Location: Stalker.......
Posts: 229
karatekid552 karatekid552
Default

Quote:
Originally Posted by Haradion View Post
1)
So unless I used Jambo51's Hack, if I wanted to use a flag or variable, I would have to find a flag or variable in use in the game - for example, at an item on the ground - delete its used script, and used that flag?
My difficulty, is that if I do that, then every time I want to make a trainer, use a scripted tile - or make an item disappear once its picked up, or prevent a script from taking place again - every time I wanted to make a "one time only" event in the game, to create my own hack, I would have to delete something in use in the game itself.

2)
Are there any flags, set by the game, but not already in use?

3)
Jambo51's hack sounds useful, but to use it (I assume I have found it) I need to use JPAN's Save Block Patch for FR, which I am denied access to... If I could find that patch, I might be able to apply Jambo51's hack, and make use of these new flags and variables for the purpose of (finally) starting scripting in my Hack.

Thanks for all your help, and I am sorry for any confusion I might have caused.
1) For the most part, yes. There are some free ones, but not too many. I personally prefer vars. They are much more versatile. I have only used 2 flags in my hack, vars for all other events.

2) There are some, but they are tough to come by. Most people remove all of the scripts and make a new game when hacking.

3) I made that patch.:P Here is a link: https://www.dropbox.com/s/4sxkmrlns1...ck_recycle.ips

Why are you denied? It should be public....
karatekid552 is offline  
Old 2nd November 2013, 04:46 AM   #10
droomph
握りモンスター
Ex-StaffPHO VIP
 
droomph's Avatar
 
Join Date: Apr 2012
Location: maybe.
Age: 21
Posts: 418
droomph
Default

Quote:
Originally Posted by karatekid552 View Post
1) For the most part, yes. There are some free ones, but not too many. I personally prefer vars. They are much more versatile. I have only used 2 flags in my hack, vars for all other events.
For most intents and purposes, you should use vars for story lines. For example, I meet someone important? I increment the var one, so that it's 1. If I go to the next event in the story, I would check if it has at least that value, and if so, let them pass.

The reason why you would ever use flags, then, is to mark things that can happen out of order (for example, the gyms) so that you don't have to deal with the bitwise-shifting and asdfasdj;lfas if you used the variables for them.
Quote:
Originally Posted by karatekid552 View Post
I have only used 2 flags in my hack, vars for all other events.
Story-wise or all-the-events wise? It should be more difficult to use vars for getting items, but I could be wrong.
__________________
droomph is offline  
 

Tags
flags, free, variable

Thread Tools
Display Modes

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 GMT. The time now is 06:56 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2018, vBulletin Solutions, Inc. User Alert System provided by Advanced User Tagging (Lite) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Lite) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Pokémon characters and images belong to Pokémon USA, Inc. and Nintendo.
Pokémon Hackers Online (PHO) is in no way affiliated with or endorsed by Nintendo LLC, Creatures, GAMEFREAK inc,
The Pokémon Company, Pokémon USA, Inc., The Pokémon Company International, or Wizards of the Coast.
All forum/site content (unless noted otherwise) and site designs are © 2006-2013 Pokémon Hackers Online (PHO).
Green Charizard Christos TreeckoLv100

"Black 2" by ARTPOP. Kyurem artwork by XOUS.

no new posts