The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > ROM Hacking > Tools, Tutorials & Resources
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

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.


Advertise here

Reply
Click here to go to the first staff post in this thread.  
Thread Tools
  #576    
Old April 20th, 2011, 04:59 AM
potasho's Avatar
potasho
Froot Loop Troop Member
 
Join Date: Apr 2008

Advertise here
Help me.... If anyone knows how to make professor oak (or anyone, for that matter) give you the NATIONALdex without needing all the kanto pokemon, then can someone tell me how? thanks...
__________________
Scoot, scoot, Scootaloo...
Reply With Quote
  #577    
Old April 22nd, 2011, 08:02 AM
Echidna's Avatar
Echidna
Community Supporter
 
Join Date: Aug 2010
Location: Vaniville Town
Age: 20
Gender: Male
Nature: Brave
use special 0x16F
if u don't know how to insert that into the context, go away and learn :D
__________________






Reply With Quote
  #578    
Old April 26th, 2011, 09:19 AM
pabioxxx
Unhatched Egg
 
Join Date: Aug 2010
Gender: Male
How can I make a "check happines" script? Is it possible?
Reply With Quote
  #579    
Old April 26th, 2011, 07:32 PM
colcolstyles's Avatar
colcolstyles
Yours truly
 
Join Date: May 2008
Location: The Bay Area
Gender: Male
Nature: Lonely
Quote:
Originally Posted by pabioxxx View Post
How can I make a "check happines" script? Is it possible?
In most (if not all) of the Gen. III games there is a person who will tell the player how happy their lead pokémon is. If you can find that script (Google it or something), then you can decompile the script for that person, examine the code, and make your own.
__________________

Brother of Vrai
Reply With Quote
  #580    
Old April 27th, 2011, 12:50 AM
pabioxxx
Unhatched Egg
 
Join Date: Aug 2010
Gender: Male
Ok i have compared those scripts in different game, and main line of this script is:

special2 LASTRESULT 0xE6

Ok. But now i want to know how to use special 2 in different situations, becouse it is used in scripts like check happines or check catched pokemons (pokedex status). Is there any description of bytes using with special 2 ??
Reply With Quote
  #581    
Old April 27th, 2011, 01:29 PM
colcolstyles's Avatar
colcolstyles
Yours truly
 
Join Date: May 2008
Location: The Bay Area
Gender: Male
Nature: Lonely
Quote:
Originally Posted by pabioxxx View Post
Ok i have compared those scripts in different game, and main line of this script is:

special2 LASTRESULT 0xE6

Ok. But now i want to know how to use special 2 in different situations, becouse it is used in scripts like check happines or check catched pokemons (pokedex status). Is there any description of bytes using with special 2 ??
Yeah, that seems to be the key line. It seems that the happiness of the first pokémon is stored in LASTRESULT. The commands after the 'special2' branch off to different scripts based on how happy the pokémon is. Here's a table linking each value to each level of happiness (source: Psypokes):

Code:
Value:	Happiness:
0	0
1	1-49
2	50-99
3	100-149
4	150-199
5	200-249
6	250-255
So, for example, if you want to give the player an item if their lead pokémon has at least 200 happiness, the script would look like this:

Code:
...
special LASTRESULT 0xE6
copyvar 0x8000 LASTRESULT    // The game does this so you should do it too
compare 0x8000 0x5
if B_>= goto @happy
...

#org @happy
giveitem blah blah blah
__________________

Brother of Vrai
Reply With Quote
  #582    
Old April 28th, 2011, 12:37 AM
pabioxxx
Unhatched Egg
 
Join Date: Aug 2010
Gender: Male
Thanks for answer, It's very helpfull...
Reply With Quote
  #583    
Old April 30th, 2011, 06:09 AM
TheZerox9's Avatar
TheZerox9
That's Right
 
Join Date: Dec 2010
Location: NO ONE SHALL STALK ME!!!
Gender: Male
Nature: Relaxed
hey is it possible to script a wildbattle that is inescapable cause i need it 4 my game.
basically, the fact that you cannot proceed until a wild pokemon in your way is beaten.
NO RUNNING AWAY
Reply With Quote
  #584    
Old May 1st, 2011, 04:39 PM
Ziddia
Beginning Trainer
 
Join Date: Apr 2011
Gender: Male
What about creating a legendary poemon battle? I would guess that it uses something similar to a gym battle, but formatted for Pokemon...

If anyone knows this please PM me, I don't know if I can keep track of this
Reply With Quote
  #585    
Old May 2nd, 2011, 01:57 PM
Quilava's Master's Avatar
Quilava's Master
Shattered Dreams '13
 
Join Date: Jul 2007
Nature: Adamant
Quote:
Originally Posted by TheZerox9 View Post
hey is it possible to script a wildbattle that is inescapable cause i need it 4 my game.
basically, the fact that you cannot proceed until a wild pokemon in your way is beaten.
NO RUNNING AWAY
Use
"special2 LASTRESULT 0xB4
compare LASTRESULT 0x[insert number here]
if 0x1 goto @pointer"
after the wildbattle command. The special 0xB4 checks for the result of the battle then sets a value to the variable.

comparing 0x1 checks if the pokemon fainted
comparing 0x4 checks if you ran away
comparing 0x7 checks if you caught the Pokemon.
__________________
The return of Pokemon Shattered Dreams! Click the screenshot to visit the thread, you know you want to.
Reply With Quote
  #586    
Old May 13th, 2011, 11:29 PM
bcrobert's Avatar
bcrobert
Lazy Antagonist
 
Join Date: Apr 2011
Gender: Male
Nature: Quirky
Great tutorial.

Is the list of flags that have been used in the Emerald ROM complete or partial? I've been adding flags from 0x900 to 0x920 since they look unused, but I just want to make sure I'm not screwing myself over for later.
__________________
Reply With Quote
  #587    
Old May 14th, 2011, 07:04 AM
inuside21
Beginning Trainer
 
Join Date: Feb 2010
Gender: Male
hi, im getting stucked in scripting in emerald than fire red,

'---------------
#org 0x827D52
lock
applymovement 0x9 0x8827D68
waitmovement 0x9
msgbox 0x8827DAD 0x6 '"yoh!"
release
end


'---------
' Strings
'---------
#org 0x827DAD
= yoh!


'-----------
' Movements
'-----------
#org 0x827D68
#raw 0x8 'Step Down (Normal)
#raw 0xFE 'End of Movements


i putted that code (just a example), when i put the offset above and put the 4050 in var num and 0300 (i tried 0003) brendad dont walk and try to talk, its not freezing, but my char just step and, darn! nothing happen, i tried to 4051 to 5000 but nothing work, i tried 0000 to 0003 nothing work, do all combination, nothing work,, what should i put in var number and unknown in emerald, but i tried in fire red, RED walks and talk. but in emerald, nothing happens.

hi, im getting stucked in scripting in emerald than fire red,

'---------------
#org 0x827D52
lock
applymovement 0x9 0x8827D68
waitmovement 0x9
msgbox 0x8827DAD 0x6 '"yoh!"
release
end


'---------
' Strings
'---------
#org 0x827DAD
= yoh!


'-----------
' Movements
'-----------
#org 0x827D68
#raw 0x8 'Step Down (Normal)
#raw 0xFE 'End of Movements


i putted that code (just a example), when i put the offset above and put the 4050 in var num and 0300 (i tried 0003) brendad dont walk and try to talk, its not freezing, but my char just step and, darn! nothing happen, i tried to 4051 to 5000 but nothing work, i tried 0000 to 0003 nothing work, do all combination, nothing work,, what should i put in var number and unknown in emerald, but i tried in fire red, RED walks and talk. but in emerald, nothing happens.

Last edited by inuside21; May 14th, 2011 at 07:06 AM. Reason: Your double post has been automatically merged.
Reply With Quote
  #588    
Old May 25th, 2011, 09:32 AM
peirau's Avatar
peirau
........
 
Join Date: Oct 2006
Age: 19
Nature: Naive
When I put boxset 5 in my Script it keeps giving me "unknown keyword" -_-....
Anyone a solution?
Thanks,
Reply With Quote
  #589    
Old May 25th, 2011, 10:47 AM
colcolstyles's Avatar
colcolstyles
Yours truly
 
Join Date: May 2008
Location: The Bay Area
Gender: Male
Nature: Lonely
Quote:
Originally Posted by peirau View Post
When I put boxset 5 in my Script it keeps giving me "unknown keyword" -_-....
Anyone a solution?
Thanks,
'callstd' is the XSE equivalent of 'boxset'. However, if you're using it with a 'msgbox' command, you should be appending the number (0x2, 0x6, etc.) to the end of the 'msgbox' construct instead.
__________________

Brother of Vrai
Reply With Quote
  #590    
Old May 25th, 2011, 10:51 AM
peirau's Avatar
peirau
........
 
Join Date: Oct 2006
Age: 19
Nature: Naive
Quote:
Originally Posted by colcolstyles View Post
'callstd' is the XSE equivalent of 'boxset'. However, if you're using it with a 'msgbox' command, you should be appending the number (0x2, 0x6, etc.) to the end of the 'msgbox' construct instead.
Thank you very much brother I will test it :).
Reply With Quote
  #591    
Old June 6th, 2011, 07:14 PM
Weavile05's Avatar
Weavile05
Currently Hacking BW
 
Join Date: Jun 2010
Location: North Carolina
Gender: Male
Nature: Lax
Okay, I would just like to clarify something. I haven't gotten very far in the tutorial yet, but I want to see if I can impress myself with my awesome inference skills.

So I made a givepokemon script. Long story short, your Mom gives you a Houndoom because it is your birthday. After that, she tells you to go see Professor Oak (unless i decide to change the Prof.). What I plan on doing is having the Prof. give you a Pokedex when he sees you have a Pokemon. So in order to do this, would you do something like this?

#org @start
msgbox @1 0x6
checkflag 0x828
if 0x1 goto @pokedex
msgbox @2 0x6
release
end

#org @pokedex
checkflag 0x(pokedex flag, I think it's 829)
if 0x0 goto...

And I'm not sure from there, but it would be whatever code gives you the pokedex. Right? I mean I'm pretty sure that's not exactly right, but am I at least on the right track?
__________________
In progress

Hoenn, 1 Badge
My Youtube Channel: Check out my Pokemon Red Walkthrough
Pokemon White FC: 2322 5491 2643
Reply With Quote
  #592    
Old June 6th, 2011, 07:42 PM
DrFuji's Avatar
DrFuji
Helfen, Wehren, Heilen
 
Join Date: Sep 2009
Location: Upside-downia
Age: 21
Gender: Male
Nature: Jolly
Quote:
Originally Posted by Weavile05 View Post
Okay, I would just like to clarify something. I haven't gotten very far in the tutorial yet, but I want to see if I can impress myself with my awesome inference skills.

So I made a givepokemon script. Long story short, your Mom gives you a Houndoom because it is your birthday. After that, she tells you to go see Professor Oak (unless i decide to change the Prof.). What I plan on doing is having the Prof. give you a Pokedex when he sees you have a Pokemon. So in order to do this, would you do something like this?

#org @start
msgbox @1 0x6
checkflag 0x828
if 0x1 goto @pokedex
msgbox @2 0x6
release
end

#org @pokedex
checkflag 0x(pokedex flag, I think it's 829)
if 0x0 goto...

And I'm not sure from there, but it would be whatever code gives you the pokedex. Right? I mean I'm pretty sure that's not exactly right, but am I at least on the right track?
Yes, the Pokedex is activated with flag 0x829.

You're heading in the right direction from what I can see from your script fragment. I can't see any errors and (at this point) it looks like it will be doing what you stated above.
__________________
Reply With Quote
  #593    
Old June 6th, 2011, 08:03 PM
Weavile05's Avatar
Weavile05
Currently Hacking BW
 
Join Date: Jun 2010
Location: North Carolina
Gender: Male
Nature: Lax
Quote:
Originally Posted by DrFuji View Post
Yes, the Pokedex is activated with flag 0x829.

You're heading in the right direction from what I can see from your script fragment. I can't see any errors and (at this point) it looks like it will be doing what you stated above.
Awesome. Now I've just gotta figure out how to actually give the pokedex... I'm sure that's explained later in the tut though.
__________________
In progress

Hoenn, 1 Badge
My Youtube Channel: Check out my Pokemon Red Walkthrough
Pokemon White FC: 2322 5491 2643
Reply With Quote
  #594    
Old June 7th, 2011, 12:25 AM
ZxC Mirai's Avatar
ZxC Mirai
Huh?
 
Join Date: Jun 2011
Location: Pampanga Philippines
Gender: Male
Nature: Timid
T_T why it doesn't COMPILES???

i cant click the Compile Button

SORRY I AM NEBIE IN SCRIPTING

Look at my screenshot
Reply With Quote
  #595    
Old June 7th, 2011, 12:29 AM
ZxC Mirai's Avatar
ZxC Mirai
Huh?
 
Join Date: Jun 2011
Location: Pampanga Philippines
Gender: Male
Nature: Timid
T_T why it doesn't COMPILES???

i cant click the Compile Button

SORRY I AM NEBIE IN SCRIPTING

Look at my screenshot

Soory for Double Posting :D
Attached Images
File Type: jpg Compiler.JPG‎ (88.4 KB, 6 views) (Save to Dropbox)
Reply With Quote
  #596    
Old June 7th, 2011, 12:47 AM
DrFuji's Avatar
DrFuji
Helfen, Wehren, Heilen
 
Join Date: Sep 2009
Location: Upside-downia
Age: 21
Gender: Male
Nature: Jolly
Quote:
Originally Posted by UnForgiven* View Post
T_T why it doesn't COMPILES???

i cant click the Compile Button

SORRY I AM NEBIE IN SCRIPTING

Look at my screenshot

Soory for Double Posting :D
You also need to open your ROM in XSE. Use the folder icon to select the ROM you want to insert the script in and then you should be able to compile the script.

You should also put in a viable offset at the top of your script.
__________________

Last edited by DrFuji; June 7th, 2011 at 01:36 AM.
Reply With Quote
  #597    
Old June 8th, 2011, 12:41 AM
ZxC Mirai's Avatar
ZxC Mirai
Huh?
 
Join Date: Jun 2011
Location: Pampanga Philippines
Gender: Male
Nature: Timid
Okay got it!! thanks............

ummm when i compile it what do i COPY???

Last edited by colcolstyles; June 8th, 2011 at 10:38 AM. Reason: Double posting
Reply With Quote
  #598    
Old June 8th, 2011, 01:02 AM
DrFuji's Avatar
DrFuji
Helfen, Wehren, Heilen
 
Join Date: Sep 2009
Location: Upside-downia
Age: 21
Gender: Male
Nature: Jolly
Quote:
Originally Posted by UnForgiven* View Post
ummm when i compile it what do i COPY???
You need to do it for the offset which correlates to the start of your script. Copy the offset for 'start'.
__________________
Reply With Quote
  #599    
Old June 8th, 2011, 07:54 PM
ZxC Mirai's Avatar
ZxC Mirai
Huh?
 
Join Date: Jun 2011
Location: Pampanga Philippines
Gender: Male
Nature: Timid
Ok.... THANKS..................
Reply With Quote
  #600    
Old June 9th, 2011, 09:52 AM
pabioxxx
Unhatched Egg
 
Join Date: Aug 2010
Gender: Male
Heh I have another problem...How can I delete scripts which was compiled to ROM by me...Well, there're too many problems witch overwrite it in hex, (ROM is unstable after it...)...So how can I do that ??
Reply With Quote
Reply
Quick Reply

Sponsored Links


Advertise here
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
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 09:17 PM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2014 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.