The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking > Binary Hack Tutorials
Reload this Page thethethethe's Scripting Tutorial

Notices
For all updates, view the main page.

Binary Hack Tutorials Various tools and resources to help you develop your legacy hacks can be found here.

Ad Content
Reply
 
Thread Tools
  #426   Link to this post, but load the entire thread.  
Old July 20th, 2010 (4:14 PM).
joshblevins's Avatar
joshblevins joshblevins is offline
 
Join Date: Jul 2010
Gender: Male
Posts: 79
I have a lot of events in my hack and i was wondering how to make on script after another specific one. i have my game so far starting in kanto and you get your starter and the pokedex like normal but i want my script for oaks aide to give you the national dex exactly after you get the pokedex in oaks lab if somebody could help with this i would be very grateful!
Reply With Quote
  #427   Link to this post, but load the entire thread.  
Old August 8th, 2010 (5:41 PM). Edited August 9th, 2010 by Funfat..
Funfat.'s Avatar
Funfat. Funfat. is offline
Working on scripts that fail
 
Join Date: Apr 2009
Location: At home
Gender: Male
Nature: Bold
Posts: 17
The attached script dosn't do any thing when stepped on.

i did convert it frome .rbc to .txt .
so if you test it do the oppisite

EDIT:other factors
unknown: 0003
var number: 6001
var value: 0001
Attached Files
File Type: txt unworking scipt.txt‎ (967 Bytes, 2 views) (Save to Dropbox)
Reply With Quote
  #428   Link to this post, but load the entire thread.  
Old August 9th, 2010 (6:32 PM).
dbzmay's Avatar
dbzmay dbzmay is offline
Advanced Adventure
 
Join Date: Jul 2010
Gender: Male
Posts: 212
funfat, first of all you didnt set your var. That would cause it to not work. it should be setvar 6001x0001 and in the values in advanced map it should be number : 6001 value: 0
Reply With Quote
  #429   Link to this post, but load the entire thread.  
Old August 10th, 2010 (9:36 AM).
jessemac_7 jessemac_7 is offline
 
Join Date: Jul 2010
Posts: 17
When I use advancemap and pokescript to open a script I get

Invalid Command : pokemon
Reply With Quote
  #430   Link to this post, but load the entire thread.  
Old August 10th, 2010 (9:58 PM).
colcolstyles's Avatar
colcolstyles colcolstyles is offline
Yours truly
 
Join Date: May 2008
Location: The Bay Area
Gender: Male
Nature: Lonely
Posts: 1,588
Quote:
Originally Posted by jessemac_7 View Post
When I use advancemap and pokescript to open a script I get

Invalid Command : pokemon
As far as I know, there is no command in Pokescript called "pokemon" (and if you got an error message saying "Invalid Command", then chances are there isn't a "pokemon" command). Perhaps you meant "givepokemon"?
__________________

Brother of Vrai
Reply With Quote
  #431   Link to this post, but load the entire thread.  
Old August 11th, 2010 (5:30 PM).
jessemac_7 jessemac_7 is offline
 
Join Date: Jul 2010
Posts: 17
Nope this is exactly what it says (except the link, cuz I cant post them yet)

WELCOME TO POKESCRIPT
Copyrite Pokewitch Inc

Invalid Command : pokemon

It says this on every script, is it just a bad ROM?
Reply With Quote
  #432   Link to this post, but load the entire thread.  
Old August 15th, 2010 (8:05 PM).
shawn0173's Avatar
shawn0173 shawn0173 is offline
Pokemon: Metallic Flames!
 
Join Date: Jul 2010
Gender: Male
Posts: 82
how would i write a script to get lets say a person event like lets say a pokemon follow our character without scripting the movement for our character, so we can move our character freely and the person event still follow us like in pokemon yellow how pikachu follows the hero??
Reply With Quote
  #433   Link to this post, but load the entire thread.  
Old August 15th, 2010 (8:13 PM).
colcolstyles's Avatar
colcolstyles colcolstyles is offline
Yours truly
 
Join Date: May 2008
Location: The Bay Area
Gender: Male
Nature: Lonely
Posts: 1,588
Quote:
Originally Posted by shawn0173 View Post
how would i write a script to get lets say a person event like lets say a pokemon follow our character without scripting the movement for our character, so we can move our character freely and the person event still follow us like in pokemon yellow how pikachu follows the hero??
To do that you're going to need to go beyond scripting. It requires ASM. There's a thread about the subject in Research & Development (link) but nobody has really given it much effort. For all intents and purposes, you should consider it impossible for the time being.
__________________

Brother of Vrai
Reply With Quote
  #434   Link to this post, but load the entire thread.  
Old August 16th, 2010 (8:35 AM).
Multi's Avatar
Multi Multi is offline
 
Join Date: Aug 2010
Gender: Male
Posts: 5
its very long tut a lot of reading time ill read later ;)
Reply With Quote
  #435   Link to this post, but load the entire thread.  
Old August 16th, 2010 (6:48 PM).
Zenox9120's Avatar
Zenox9120 Zenox9120 is offline
 
Join Date: Feb 2010
Location: Alpine, Utah
Age: 28
Gender: Male
Nature: Naughty
Posts: 32
This is kind of an irrelevant question, but I'm looking at the PokePic command and I was wondering if there was a listing of the Pokemon's hex numbers? If not, is there a program to find it out? (Don't say hex editor, please)
__________________
Reply With Quote
  #436   Link to this post, but load the entire thread.  
Old August 16th, 2010 (7:34 PM).
colcolstyles's Avatar
colcolstyles colcolstyles is offline
Yours truly
 
Join Date: May 2008
Location: The Bay Area
Gender: Male
Nature: Lonely
Posts: 1,588
Quote:
Originally Posted by Zenox9120 View Post
This is kind of an irrelevant question, but I'm looking at the PokePic command and I was wondering if there was a listing of the Pokemon's hex numbers? If not, is there a program to find it out? (Don't say hex editor, please)
You can find a list in XSE's "stdpoke.rbh" header file.
__________________

Brother of Vrai
Reply With Quote
  #437   Link to this post, but load the entire thread.  
Old August 17th, 2010 (5:22 AM).
Zenox9120's Avatar
Zenox9120 Zenox9120 is offline
 
Join Date: Feb 2010
Location: Alpine, Utah
Age: 28
Gender: Male
Nature: Naughty
Posts: 32
Quote:
Originally Posted by colcolstyles View Post
You can find a list in XSE's "stdpoke.rbh" header file.
Oh, then I was thinking of the wrong thing. I knew what that was.
__________________
Reply With Quote
  #438   Link to this post, but load the entire thread.  
Old August 18th, 2010 (11:10 AM).
shawn0173's Avatar
shawn0173 shawn0173 is offline
Pokemon: Metallic Flames!
 
Join Date: Jul 2010
Gender: Male
Posts: 82
ASM? is this a coding kind of thing? what exactly is it?
Reply With Quote
  #439   Link to this post, but load the entire thread.  
Old August 18th, 2010 (11:31 AM).
colcolstyles's Avatar
colcolstyles colcolstyles is offline
Yours truly
 
Join Date: May 2008
Location: The Bay Area
Gender: Male
Nature: Lonely
Posts: 1,588
Quote:
Originally Posted by shawn0173 View Post
ASM? is this a coding kind of thing? what exactly is it?
ASM (short for "assembly") is a low-level programming language. You can read about it here.
__________________

Brother of Vrai
Reply With Quote
  #440   Link to this post, but load the entire thread.  
Old August 19th, 2010 (7:03 AM). Edited August 19th, 2010 by Nightcrow.
Nightcrow's Avatar
Nightcrow Nightcrow is offline
 
Join Date: Jun 2010
Location: Belgium
Age: 37
Gender: Male
Nature: Calm
Posts: 47
hi, i'm new to rom hacking and wanted to learn scripting. so i started with some simple scripts like placing a message when you step on a certain square.

#org 0xE6D800
msgbox 0x8E6D000
end

#org 0xE6D000
= Testbox

(offsets are found with free space finder)
compiling and burning worked hooray :D

so i open advance map (leaf green rom). and in pallet town i add the script.
unknown: 0003(like the tutorial said)
script offset: E6D800
i save it, when i click open script i see the script i wrote... hooray it's gona work right :D

but it doesn't. . .

when i walk over the script nothing happens... i used a diffrent script (one that moves your character one to the right)

same story, everything works until i go to test... but in this case the rom freezes.

it's probably something silly i forgot since i'm new, but i wasted half an afternoon already looking for what it could be.

any ideas?

[EDIT]
I have done some more tests and appearently i can edit existing game scripts and they will work. But any new script i add myself either does nothing or freezes up the game.
[\EDIT]
Reply With Quote
  #441   Link to this post, but load the entire thread.  
Old August 19th, 2010 (9:52 AM).
colcolstyles's Avatar
colcolstyles colcolstyles is offline
Yours truly
 
Join Date: May 2008
Location: The Bay Area
Gender: Male
Nature: Lonely
Posts: 1,588
The problem probably lies in the "Var Number" field in AdvanceMap. Here, read this post. The reason that preexisting scripts tiles work is that they already have values in those fields. Once you fill the fields for your custom script tiles with your own values, they should work as well.

Also, I noticed that you don't set any flag/increment any variable in your script. If you don't, then that script is going to run every single time that the player steps on it. Unless that was your intention (most scripts are only designed to run once), you're going to need to use a 'setvar 0x7000 0x0001' or something like that to prevent it from running more than once.
__________________

Brother of Vrai
Reply With Quote
  #442   Link to this post, but load the entire thread.  
Old August 19th, 2010 (2:24 PM).
Nightcrow's Avatar
Nightcrow Nightcrow is offline
 
Join Date: Jun 2010
Location: Belgium
Age: 37
Gender: Male
Nature: Calm
Posts: 47
thanks that helps A LOT :)
and yeah.. i know about flags and all, i just put something simple as an example. Scripting is no problem at all, i just had a problem to test it:)
Reply With Quote
  #443   Link to this post, but load the entire thread.  
Old August 20th, 2010 (2:03 PM).
BlazeGirl12's Avatar
BlazeGirl12 BlazeGirl12 is offline
Just Another Pokemon Player
 
Join Date: Aug 2010
Location: In the forest on Route 25 (near Cerulean, in Kanto)
Gender: Female
Nature: Quirky
Posts: 35
PoketScript keeps telling me that I am using an invalid command!
__________________

I believe in Jesus Christ. If you do too, and aren't scared to admit it, then put this in your signature.
Please visit my website, BlazeGirl12's Creative Haven! Anyone who joins will be considered for moderator.
Reply With Quote
  #444   Link to this post, but load the entire thread.  
Old August 20th, 2010 (2:17 PM).
colcolstyles's Avatar
colcolstyles colcolstyles is offline
Yours truly
 
Join Date: May 2008
Location: The Bay Area
Gender: Male
Nature: Lonely
Posts: 1,588
Quote:
Originally Posted by BlazeGirl12 View Post
PoketScript keeps telling me that I am using an invalid command!
If you post your script in the Script Help Thread, maybe the people there can help you figure out what's wrong.
__________________

Brother of Vrai
Reply With Quote
  #445   Link to this post, but load the entire thread.  
Old August 28th, 2010 (10:57 PM). Edited August 28th, 2010 by chriskid198.
chriskid198's Avatar
chriskid198 chriskid198 is offline
Happy New Year!
 
Join Date: Jul 2010
Location: Australia
Age: 26
Gender: Male
Nature: Relaxed
Posts: 159
What is the code for the e with the symbol above it?

This one: é

Or can I just put that in the script?

EDIT: Nevermind, it works just with the é.
Reply With Quote
  #446   Link to this post, but load the entire thread.  
Old August 28th, 2010 (10:59 PM).
colcolstyles's Avatar
colcolstyles colcolstyles is offline
Yours truly
 
Join Date: May 2008
Location: The Bay Area
Gender: Male
Nature: Lonely
Posts: 1,588
Quote:
Originally Posted by chriskid198 View Post
What is the code for the e with the symbol above it?

This one: é

Or can I just put that in the script?
It's mentioned in the first post but it's "\h1B".

And to answer your second question: you can if you're using XSE.
__________________

Brother of Vrai
Reply With Quote
  #447   Link to this post, but load the entire thread.  
Old August 28th, 2010 (11:19 PM). Edited August 28th, 2010 by chriskid198.
chriskid198's Avatar
chriskid198 chriskid198 is offline
Happy New Year!
 
Join Date: Jul 2010
Location: Australia
Age: 26
Gender: Male
Nature: Relaxed
Posts: 159
Quote:
Originally Posted by colcolstyles View Post
It's mentioned in the first post but it's "\h1B".

And to answer your second question: you can if you're using XSE.
What's XSE? Is that when you like write the scripts in Notepad and save as .rbc?

EDIT: And is this the script that I would use to make a Signpost?
Code:
#org $start
message $1
boxset 6
#raw 0xCA
message $1
boxset 6
#raw 0xCB
message $1
boxset 6
release
end

#org $1
$1 1 =Test.
Reply With Quote
  #448   Link to this post, but load the entire thread.  
Old August 28th, 2010 (11:42 PM).
colcolstyles's Avatar
colcolstyles colcolstyles is offline
Yours truly
 
Join Date: May 2008
Location: The Bay Area
Gender: Male
Nature: Lonely
Posts: 1,588
XSE is an alternative script editor which is arguably better than Pokescript because the latter is quite outdated and prone to causing bugs. You can find a download link for XSE over at HackMew's Tool Factory. And if you want to switch to XSE, something that I highly recommend, you should read this tutorial which is basically an XSE port of this very tutorial.
__________________

Brother of Vrai
Reply With Quote
  #449   Link to this post, but load the entire thread.  
Old August 29th, 2010 (12:10 AM). Edited August 29th, 2010 by chriskid198.
chriskid198's Avatar
chriskid198 chriskid198 is offline
Happy New Year!
 
Join Date: Jul 2010
Location: Australia
Age: 26
Gender: Male
Nature: Relaxed
Posts: 159
Quote:
Originally Posted by colcolstyles View Post
XSE is an alternative script editor which is arguably better than Pokescript because the latter is quite outdated and prone to causing bugs. You can find a download link for XSE over at HackMew's Tool Factory. And if you want to switch to XSE, something that I highly recommend, you should read this tutorial which is basically an XSE port of this very tutorial.
Is this Tutorial for XSE?

EDIT: I don't like XSE. I prefer PokeScript.
And this was all I needed to do for the signpost.

Code:
#org $start
message $1
$1 1 = Pinewood Town.\nWhere journeys begin!
#raw 0xCA
boxset 6
end
Reply With Quote
  #450   Link to this post, but load the entire thread.  
Old August 29th, 2010 (9:04 AM).
colcolstyles's Avatar
colcolstyles colcolstyles is offline
Yours truly
 
Join Date: May 2008
Location: The Bay Area
Gender: Male
Nature: Lonely
Posts: 1,588
Quote:
Originally Posted by chriskid198 View Post
Is this Tutorial for XSE?

EDIT: I don't like XSE. I prefer PokeScript.
I don't want to seem rude but if you have to ask what scripting program this tutorial is for, you clearly didn't read it.

I didn't like XSE when I started out, too. You'll warm up to it eventually. In the mean time, have fun with all your bugs and missing commands.
__________________

Brother of Vrai
Reply With Quote
Reply

Quick Reply

Join the conversation!

Create an account to post a reply in this thread, participate in other discussions, and more!

Create a PokéCommunity Account
Ad Content

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 -8. The time now is 9:06 AM.