PDA

View Full Version : XSE Scripting Tutorial


Darthatron
February 24th, 2008, 03:12 AM
Hello, welcome to my XSE Tutorial, I hope some people ind it helpful. XSE is the revolutionary Script Editing Tool by - HackMew -. Please leave comments on how helpful this was to you. :) Here is a quick OverVeiw of XSE:
http://img184.imageshack.us/img184/2396/27831120ep2.png

XSE will be available for download in the ToolBox shortly, I have the Release Candidate version and it is simply fantastic. When you all have the chance to download XSE I'm sure you'll fall in love with it as much as I did. :D Look in the spoiler for the very basics of scripting in XSE.

XSE has a new Automatic Offset Location system, not unlike PokeScript. But instead of using the "$" sign it uses the "@" sign, in my eyes it makes more sense to use the "@" sign because it is "at" the location. Anyway, it is farely simple to use and I will just give you a brief description on it.

Basically, if you used PokeScript you will get the gist of this system. At the start of your script put something like this: #Dynamic 0xOffset but replace the word "Offset" with the Hexadecimal offset with free space (FF for FireRed and LeafGreen, 00 for Ruby and Sapphire).

Example: In FSF (Free Space Finder) you have to find a certain amount of "Free Space", depending on how large your script is. For simplicity just search for a large number, something between 100 and 300 should be plenty. Next click the "Search" button in the ListBox you should see something like this:
http://img205.imageshack.us/img205/2225/26746516xs1.png
Click the "Copy" button and replace the word "Offset", in our script above, with that Value.

So far our script should look something like this: #Dynamic 0x3B4D84 Ok, next we are going to get to the actual scripting! Ho-rah!

Ok, to start a script you must put the following line of code, no matter what kind of script you are doing: #ORG @Start Feel free to replace the word "Start" with any other word, it really doesn't matter what word you use, it is just for reference. Anyway, so far the script should look something like this: #Dynamic 0x3B4D84

#ORG @Start It doesn't have to look exactly like that, but it should look similar.
Presuming you already know the basics I will start explaining how the actual scripting works, it is nearly completely the same as ScriptEd and PokeScript but with some differences that you will find out during this tutorial.

1. A basic talking script!
________________________

Ok, as usual we will start with the Important parts, the begining. So, your script should look something like this: #Dynamic 0x800000

#ORG @Main

In talking scripts, and in some others, you must have these 2 lines. Lock
FacePlayer I'll now explain what these lines of code do...
"Lock" = Makes it so the Player can't move and the NPC you are talking to also won't be able to move.
"FacePlayer" = This code makes it so the NPC you are talking to looks at the Player.

So now your script should look something like this: #Dynamic 0x800000

#ORG @Main
Lock
FacePlayer

Next we will be adding the "Offset" where the text is "Saved". So add these 2 lines of code and then I will explain them shortly: Message @Speak
BoxSet 0x6 Once again, you may replace the word "Speak" with any other word as it is just for reference. Now to explain to you what these lines of code mean...
"Message" = This is just a simple word that allows you to incert a message, this would have to be one of the most used functions in Pokemon Scripting.
"@Speak" = This is the offset at which the "Message" will be saved, of course you can use any word instead of "Speak" as it is just for reference.
"BoxSet 0x6" = This is merely a function used to show you how the message is shown in the game. The "0x6" means it is just a normal TextBox, you can also use "0x5" which is a "Yes/No" Box, I will go into more detail for that at a later time.

So now your script should look similar to this: #Dynamic 0x800000

#ORG @Main
Lock
FacePlayer
Message @Speak
BoxSet 0x6

Rightio, next we are going to add 2 more new lines, get ready: Release
End Now these 2 lines are very important, especially the later. Now, once more I will explain what these lines mean!
"Release" = This function give your Player the ability to move again, it also allows the NPC you are talking to the ability to walk around as well.
"End" = This simply means that it is the End of the script and makes it so the Game doesn't continue to read the data. Don't worry, we are almost finished, just 2 more lines of code.

Your Script should look something like this now: #Dynamic 0x800000

#ORG @Main
Lock
FacePlayer
Message @Speak
BoxSet 0x6
Release
End

Now we are going to put what the actual Message is, this is the part we have all been waiting for! Put these 2 lines of code at the bottom of your script: #ORG @Speak
= This is a message! And for the last time today I will explain what there lines of code mean!
"#ORG @Speak" = This is merely the place that you pointed to earlier in the script, if you didn't use the word "Speak" before, you must change this "Speak" to the same word.
"= This is a message!" = This the message that will be displayed in-game. Feel free to change the "This is a message!" text to whatever you want the person you are talking to, to say.

Well, that's all I have time for today, but I will edit this post and add some more tutorials in the future. Until then, I'll be programming. :D

2. Compiling the script!
________________________

To compile a script into a ROM you just have to follow 3 simple steps.

Make sure the script you want to compile is open in XSE.
Go into the "File" menu and click "Open...", select the ROM you want to compile the script into.
Then click the Compile button http://img148.imageshack.us/img148/3746/41551228tr2.png, and that's it. Your script is comiled into your ROM.

thethethethe
February 24th, 2008, 04:55 AM
You got this up quick. Maybe a little too early, but still good.
Hmmm. A tool, that a tool maker loves.
If you're writing this one up, you've got a lot of commands to work with. I wish I'd seen it sooner, I couldn't figure out the dynamic offset thing on my own.

ZodiacDaGreat
February 24th, 2008, 05:02 AM
Great Darthathron cause in XSE, some commands have new parameters like wildbattle
Anyways great job putting this up!!!
Looking forward to see it completed

Darthatron
February 24th, 2008, 05:02 AM
You got this up quick. Maybe a little too early, but still good.
Hmmm. A tool, that a tool maker loves.
If you're writing this one up, you've got a lot of commands to work with. I wish I'd seen it sooner, I couldn't figure out the dynamic offset thing on my own.
Yes, I realize it's out early but I want whoever else who might test it to be able to do it well, right?
I love all - HackMew -'s tools, I also have no doubt that he is a best programmer than myself. :D

Thanks for commenting. :)

Great Darthathron cause in XSE, some commands have new parameters like wildbattle
Anyways great job putting this up!!!
Looking forward to see it completed
I have realized that too. I won't be doing anymore of this tutorial tonight however, I think I should find my Visual Basic install disk and release the new PEP... Thanks for commenting.

Time
February 24th, 2008, 05:04 AM
I don't understand how the compiling is... I guess what I'm trying to say is that I think I need some screen/visual help... :\

And thanks for the quick tutorial though. :D

Darthatron
February 24th, 2008, 05:13 AM
Here is a very quick outveiw of XSE I made in Paint is about 12 seconds:
http://img184.imageshack.us/img184/2396/27831120ep2.png

cooley
February 26th, 2008, 05:21 PM
Well, I understand now, and 'm already used to it.
It's just I'm still waiting on m Unlock Key for a different computer.

But I've still tried it, and Nice tutorial!

zolo1243
February 26th, 2008, 08:15 PM
where can i download XSE?

Visual
February 27th, 2008, 01:47 AM
Would it matter if we put normal commands as lowercase?
Such as lock, faceplayer.

Because I figure, it's like scriptEd, but much better, you cant find your own offset and all you need is the #dynamic 0x000000 at the start. It's a good idea :P.

Darthatron
February 27th, 2008, 01:58 AM
Yeah, LowerCase still works, infact that's how it descripts it. I just think it is easier to read and learn with UpperCase in the right positions. :) I plan to update this later in the week, by the way.

rsr13
February 27th, 2008, 03:49 PM
It's good that you discoverd it a little to early..
I like it .. Thanx for the tutorial

iPredator
February 27th, 2008, 06:01 PM
#ORG $begin
lock
faceplayer
checkflag 0x200
if B_true goto $done
message $person
boxset 6
givepokemon 1 5 0
setflag 0x200
release
end

#org $done
message $person2
boxset 6
release
end

#org $person
$person = Hello,

I have done this to get give pokemon

but what do i put for the players name is it h01?

Darthatron
February 27th, 2008, 08:51 PM
#ORG $begin
lock
faceplayer
checkflag 0x200
if B_true goto $done
message $person
boxset 6
givepokemon 1 5 0
setflag 0x200
release
end

#org $done
message $person2
boxset 6
release
end

#org $person
$person = Hello,

I have done this to get give pokemon

but what do i put for the players name is it h01?
That is a pokescript script, this tutorial is for XSE. Plus this should go into the Script Help thread anyway.

SerenadeDS
February 27th, 2008, 09:02 PM
Thanks for the tut Darthatron! XSE is an awsome program, so this should help some people that decide to use XSE get started.

iPredator
February 27th, 2008, 09:08 PM
This looks much more easy where can i donwload this

Green Charizard
March 1st, 2008, 09:57 AM
You can not currently download this as HackMew has not released it publicly. Only "Pre-Release Candidates" have a copy.

But, nice tutorial Darthatron it should prevent some confusion on it's release.

Visual
March 3rd, 2008, 04:18 AM
I beleive he released it, but you need an activation key?
I have a script i'm having problems with, when I land on the tile, the game freezes.
All I have to click is compile, and put the dynamic offset into A map right?

#dynamic 0x800000

#org @begin
lock
checkflag 0x200
if 1 goto @done
message @stop
boxset 0x6
applymovement 0x3 @coming
waitmovement 0
message @dontgo
boxset 0x6
applymovement 0x3 @going
applymovement 0xFF @follow
waitmovement 0
message @dangerous
boxset 6
release
end

#org @stop
= Wait \v\h01!

#org @dontgo
= Don't go out there!

#org @dangerous
= Wild Pokemon jump out of\n the grass on the way\p to the next town.

#org @coming
#raw 0A
#raw 0A
#raw 0A
#raw 0A
#raw FE

#org @going
#raw 0B
#raw 0B
#raw 0B
#raw 0B
#raw 02
#raw FE

#org @follow
#raw 0B
#raw 0B
#raw 0B
#raw FE

#org @done
release
end

Martin™
March 3rd, 2008, 04:35 AM
I thought it was a rumour (it wasn't there in early beta versions) but you need to get an activation key from HackMew but you won't get it if you aren't chosen as a beta tester.

Anyway, I had a chance to test it out in early beta stages and later when Andrea added dynamic offsets (which are better than Pokéscript's - you can even use mixed offsets - dynamic AND static) and I am happy with it. This tutorial is neat and I like it.

Keep it up!

[css-div="padding: 5px; border: 1px solid navy; background-color: #CDCDCD;"]Offtopic comment:
Why do you write some words weird way, Darthatron? In scripting editor or sometimes in post... For example BoxSet or LowerCase, it looks silly. Sorry :x[/css-div]

HackMew
March 3rd, 2008, 03:18 PM
Well, thanks for your efforts Darthatron. Anyway, I'd like to say I'm already preparing a complete readme/guide for XSE (which will be included in the final release, obviously) to explain all the features and commands XSE has. And since you're not the programmer you would sure miss a lot of hidden or kinda "undocumented" features.
Feel free to continue your tutorial as long as you won't blame me to make something more complete.

Visual
March 16th, 2008, 05:59 AM
I just noticed, basic scriptEd works in XSE aswell.
And the dynamic offset really isn't needed, a scriptEd script would work fine.
For instance using a basic pointer would work.

#org 0x800000
Good tut though.

Nine-Tailed Assassin
March 26th, 2008, 09:31 AM
who does the XSE belong to HackMew or Darthatron? i feel confused

Pachel
March 26th, 2008, 11:48 AM
Well this is not a questions thread actulie.

but okay HackMew is the maker of XSE Darthatron just maked the tut.

Totypoke1
May 14th, 2008, 08:14 AM
Hey Darthatron, where can i download XSE script editor
i'm a n00b scripter so ow bout telling me where to download
it.

Darthatron
May 14th, 2008, 08:28 AM
Hey Darthatron, where can i download XSE script editor
i'm a n00b scripter so ow bout telling me where to download
it.

It's not available for download yet. I just have the BETA. :) It should be released soon.

Jawash
May 18th, 2008, 09:59 PM
It's not available for download yet. I just have the BETA. :) It should be released soon.

really now?
there is only a beta. interesting =]
where is that even?
but i've heard news on this, only a teency bit, but is sounds like it'll be worth while.
i REALLY look forward to it's completion ;D

Master_Track
June 1st, 2008, 06:52 AM
~problem eliminated~
sry, everythings fine now xD

Tropical Sunlight
June 1st, 2008, 12:54 PM
It's not available for download yet. I just have the BETA. :) It should be released soon.
Yeah, very soon (I hope)

(lessthan25characters)

liuyanghejerry
June 2nd, 2008, 01:02 AM
Well,this is my first time to see XSE scripts,it looks more like scriptED's style...
Hope more useful commands~

Pounder_Zeikku
June 2nd, 2008, 07:07 AM
To those asking if its out..its out dudes...go download :)

Master_Track
June 2nd, 2008, 09:08 AM
I have a question: How can u use the comman "multichoice"?
I can script the normal things quite good, but I just don't understand this one ^^''

Wind~
June 2nd, 2008, 09:55 AM
This tut is kool!
But, r u gonna add more to it?
Like, what about signpost scripts?
Follow-me, applymovement, etc.

X-Buster
June 2nd, 2008, 09:57 AM
when will the full XSE tut be created..?

BlackRainbow*
June 2nd, 2008, 10:05 AM
i don't see any need to make it. Its actualy the same as pokescript or scripted but much better. you only need to use #Dynamic 0x?????? at the start of the script
and you only use @start or something, not 0x900100

Master_Track
June 2nd, 2008, 10:39 AM
yeah, but there all many commands included most of us didn't even know ^^
for example, I knew there's the possibility to make a list of things the player can choose.
but I didn't know HOW to do it, and I saw the command included in XSE ^^
so there'll be MANY questions here since many newbies don't know much commands.

mat1554
June 2nd, 2008, 02:04 PM
Sorry my english is not good lol :D

How to choose the offset, because we must choose the number of bytes that are needed .

BlackRainbow*
June 2nd, 2008, 02:43 PM
yeah, but there all many commands included most of us didn't even know ^^
for example, I knew there's the possibility to make a list of things the player can choose.
but I didn't know HOW to do it, and I saw the command included in XSE ^^
so there'll be MANY questions here since many newbies don't know much commands.

yeah you're right but if you click F1 you have command help there.

Wind~
June 2nd, 2008, 04:37 PM
For the #Dynamic 0x?????? part of the script, how will we know what to put for the ?s...?

Master_Track
June 2nd, 2008, 04:46 PM
put the programm Free Space Finder by hackmew into the same folder as XSE.
Now if you open XSE you can go to "tools" and free space finder.
there, u open your rom, insert the number of bytes u need (i expect 100-200) and klick search.
the found offset will be copied, and u just have to insert it ^^

Wind~
June 2nd, 2008, 05:49 PM
Oh, cool! ^^
I made a test rom to see if scripts work on my comp. too.

One Winged Angel
June 2nd, 2008, 05:57 PM
Hey, an easy way to translate your pokescripts is.
Get a ROM just for test. Then go to A Map, then go to
settings. Next, you select Choose a Scripting Program.
Then search for XSE. When the prompt shows up saying something
Press yes. Next make a script that you want to translate,
then insert it in your test ROM. Then when its inserted, just
click on the script in A-Map and click Edit Script. This will
pop up XSE and you will now be able to see your Pokescript
Commands in XSE format. Hope this helped and Sorry to
Darthatron if this Spam and I will delete it. If not you can put it in your
first post xD

Wind~
June 2nd, 2008, 06:07 PM
Yea, I get that now...
Now I'm trying to compile it.
But now it's saying this:
Unknown keyword "@hotel" at line 10

~EDIT~
It worked!
Thanx yunghove, hackmew, and dartatron!
I can script, except it showed the /p lol...

One Winged Angel
June 2nd, 2008, 06:57 PM
It showed the /p becuase its supposed to be\pwith no spaces.

heres an example.

hey, whats up? hows\pyour brother doing?

Darthatron
June 3rd, 2008, 01:11 AM
Wow... Soo many posts... :o

I have a question: How can u use the comman "multichoice"?
I can script the normal things quite good, but I just don't understand this one ^^''
MultiChoice is something that you should really only do when you know all of the basics. You see it needs to use Variables, which may be difficult to some. I'll show you how to make a working script with multichoice, however I won't go into too much detail.
Ok, so first we will set a #Dynamic.
#Dynamic 0x800000
Next we want to lock the Player so he/she can't move. Also make the Person we are talking to Face the Player.
Lock
FacePlayer
Next we will call the MultiChoice Command.
MultiChoice 0xA 0x4 0x1 B_True
Ok, you should know what each of those means, because it's explained in the Command Help...

Next we need to copy the Value "LASTRESULT" into another Var, so we can use it. Today I will be using 0x4003
CopyVar 0x4003 LASTRESULT
Now, we are going to "Check" if the Value of 0x4003 is 0. If it is we will goto another script.
Compare 0x4003 0x0
If B_TRUE Call @Choice1
Pretty much we just go that for as many results as the MultiChoice Box has. This certain Multichoice has 5 Options. So...
Compare 0x4003 0x1
If B_TRUE Call @Choice2
Compare 0x4003 0x2
If B_TRUE Call @Choice3
Compare 0x4003 0x3
If B_TRUE Call @Choice4
Compare 0x4003 0x4
If B_TRUE Call @Choice5
Next we are going to Release the Lock Command, giving control back to the player. And also End the script.
Release
End

Ok... That's pretty much it, all you really hae to do now is decide what you want each choice to do... Here is my beautiful example.
#Dynamic 0x800000

#ORG @Main
Lock
FacePlayer
MultiChoice 0xA 0x4 0x1 0x1
CopyVar 0x4003 LASTRESULT
Compare 0x4003 0x0
If B_TRUE Call @Choice1
Compare 0x4003 0x1
If B_TRUE Call @Choice2
Compare 0x4003 0x2
If B_TRUE Call @Choice3
Compare 0x4003 0x3
If B_TRUE Call @Choice4
Compare 0x4003 0x4
If B_TRUE Call @Choice5
Release
End

#ORG @Choice1
Message @Text1
BoxSet 6
Return

#ORG @Choice2
Message @Text2
BoxSet 6
Return

#ORG @Choice3
Message @Text3
BoxSet 6
Return

#ORG @Choice4
Message @Text4
BoxSet 6
Return

#ORG @Choice5
Message @Text5
BoxSet 6
Return

#ORG @Text1
= Message 1.

#ORG @Text2
= Message 2.

#ORG @Text3
= Message 3.

#ORG @Text4
= Message 4.

#ORG @Text5
= Message 5.
when will the full XSE tut be created..?
HackMew is writing it up as we speak.

hockeypanda32
June 3rd, 2008, 01:28 AM
Wow... Soo many posts... :o


MultiChoice is something that you should really only do when you know all of the basics. You see it needs to use Variables, which may be difficult to some. I'll show you how to make a working script with multichoice, however I won't go into too much detail.
Ok, so first we will set a #Dynamic.
#Dynamic 0x800000
Next we want to lock the Player so he/she can't move. Also make the Person we are talking to Face the Player.
Lock
FacePlayer
Next we will call the MultiChoice Command.
MultiChoice 0xA 0x4 0x1 B_True
Ok, you should know what each of those means, because it's explained in the Command Help...

Next we need to copy the Value "LASTRESULT" into another Var, so we can use it. Today I will be using 0x4003
CopyVar 0x4003 LASTRESULT
Now, we are going to "Check" if the Value of 0x4003 is 0. If it is we will goto another script.
Compare 0x4003 0x0
If B_TRUE Call @Choice1
Pretty much we just go that for as many results as the MultiChoice Box has. This certain Multichoice has 5 Options. So...
Compare 0x4003 0x1
If B_TRUE Call @Choice2
Compare 0x4003 0x2
If B_TRUE Call @Choice3
Compare 0x4003 0x3
If B_TRUE Call @Choice4
Compare 0x4003 0x4
If B_TRUE Call @Choice5
Next we are going to Release the Lock Command, giving control back to the player. And also End the script.
Release
End

Ok... That's pretty much it, all you really hae to do now is decide what you want each choice to do... Here is my beautiful example.
#Dynamic 0x800000

#ORG @Main
Lock
FacePlayer
MultiChoice 0xA 0x4 0x1 0x1
CopyVar 0x4003 LASTRESULT
Compare 0x4003 0x0
If B_TRUE Call @Choice1
Compare 0x4003 0x1
If B_TRUE Call @Choice2
Compare 0x4003 0x2
If B_TRUE Call @Choice3
Compare 0x4003 0x3
If B_TRUE Call @Choice4
Compare 0x4003 0x4
If B_TRUE Call @Choice5
Release
End

#ORG @Choice1
Message @Text1
BoxSet 6
Return

#ORG @Choice2
Message @Text2
BoxSet 6
Return

#ORG @Choice3
Message @Text3
BoxSet 6
Return

#ORG @Choice4
Message @Text4
BoxSet 6
Return

#ORG @Choice5
Message @Text5
BoxSet 6
Return

#ORG @Text1
= Message 1.

#ORG @Text2
= Message 2.

#ORG @Text3
= Message 3.

#ORG @Text4
= Message 4.

#ORG @Text5
= Message 5.

HackMew is writing it up as we speak.

Nice, something else to work on now. i cannot wait until Hackmew is done! :)

Darthatron
June 3rd, 2008, 02:05 AM
Nice, something else to work on now. i cannot wait until Hackmew is done! :)
He is done. Check XSE out here (http://www.pokecommunity.com/showpost.php?p=3634208&postcount=333). Have fun with it. :)

Master_Track
June 3rd, 2008, 02:43 AM
thx darthatron, I already know all the basics since I scripted with pokescript very much and quite advanced.(so I understood what u wrote there ^^)
I just don't know how some things are set in XSE, but I believe the tut will help? :D

Darthatron
June 3rd, 2008, 06:19 AM
thx darthatron, I already know all the basics since I scripted with pokescript very much and quite advanced.(so I understood what u wrote there ^^)
I just don't know how some things are set in XSE, but I believe the tut will help? :D
Yes, from what I've seen the guide HackMew is making is very detailed. :)

Tré
June 3rd, 2008, 06:31 AM
wow..this XSE is too easy to use..but is there an alternative..were basic pokescript can stick here
it..confuses me...

Darthatron
June 3rd, 2008, 06:53 AM
wow..this XSE is too easy to use..but is there an alternative..were basic pokescript can stick here
it..confuses me...
It's pretty much the same, all that has changed dramatically is "$" to "@". Everything else is just easier. :P

Visual
June 3rd, 2008, 06:57 AM
Im addicted to the new uses of XSE, but I think i'll stick to using 0x?????? offsets instead of Dynamic, I can track where im going with that.

Wind~
June 3rd, 2008, 11:24 PM
I tried to make a script with a different color, but it stayed at red instead of Dark Green.
What would color scripts on XSE look like?

hockeypanda32
June 4th, 2008, 12:15 AM
How can you give pokemon, I have tried the default one for poketscript and scripted but no luck. I hope there is more coverage in this and follow me scripts in following tutorials!

Time
June 4th, 2008, 01:14 AM
Darthatron, care to add more tuts in the first page? :\

Darthatron
June 4th, 2008, 01:18 AM
I tried to make a script with a different color, but it stayed at red instead of Dark Green.
What would color scripts on XSE look like?
What game are you hacking?
How can you give pokemon, I have tried the default one for poketscript and scripted but no luck. I hope there is more coverage in this and follow me scripts in following tutorials!
It's rather simple really:

The GivePokemon Command is set out like this:
Byte1 = Pokemon Number
Byte2 = Pokemon Level
Byte3 = Held Item
Byte4 = ?
Byte5 = ?
Byte6 = ?
So to make a basic script to give the Player a Level 5 Pikachu, holding a Pokeball, we would do this:
#Dynamic 0x800000

#ORG @Main
Lock
FacePlayer
GivePokemon 25 5 4 0 0 0
Release
End
Tada! :D

Satoshi-Ash
June 4th, 2008, 01:31 AM
Thanks so much. This really helps people like me with scripting using this awesome program.

I do have one question:
"#Dynamic 0x800000" would be the offset for the event, right?

hockeypanda32
June 4th, 2008, 01:35 AM
What game are you hacking?

It's rather simple really:

The GivePokemon Command is set out like this:
Byte1 = Pokemon Number
Byte2 = Pokemon Level
Byte3 = Held Item
Byte4 = ?
Byte5 = ?
Byte6 = ?
So to make a basic script to give the Player a Level 5 Pikachu, holding a Pokeball, we would do this:
#Dynamic 0x800000

#ORG @Main
Lock
FacePlayer
GivePokemon 25 5 4 0 0 0
Release
End
Tada! :D

Dang, thanks man! :D, gonna try a script for this now!

one more thing, are flags the same as others, i have not tried, can someone confirm or show an example of how to use flags in xsc and do the same movement codes apply?

ZodiacDaGreat
June 4th, 2008, 01:55 AM
Dang, thanks man! :D, gonna try a script for this now!

one more thing, are flags the same as others, i have not tried, can someone confirm or show an example of how to use flags in xsc and do the same movement codes apply?

Everything's same and remains unchanged, - flags will never change, they carry the same value, unless the flag base is modified..., movements also remain unchange. Other then a few, only some commands area changed, like multi, startwildbattle etc, as the more accurate parameters for the command was discovered and so changes had to be made. If you're not sure, check the command database - it should answer most of these questions.

Tré
June 4th, 2008, 03:13 AM
hey i understand now....you can only change the $ to @...whoa...this is addicting...xD

Qwerty-117
June 4th, 2008, 03:48 AM
now that XSE has been released, will the beta tut still work for the full version?

hockeypanda32
June 4th, 2008, 10:16 AM
So according to you Zodiac something like this would work!


#Dynamic 0x800000

#ORG @Main
Lock
FacePlayer
checkflag 0x200
if b_true goto @gotit
GivePokemon 25 5 4 0 0 0
message @recieved
setflag 0x200
Release
End

#ORG @gotit
message @howis
Release
End

#ORG @recieved
=Here is pikachu!

#ORG @howis
=How is pikachu doing?

Wind~
June 4th, 2008, 11:10 AM
Oh, I'm using a script test Rom for Fire Red.

Darthatron
June 4th, 2008, 11:10 AM
So according to you Zodiac something like this would work!


#Dynamic 0x800000

#ORG @Main
Lock
FacePlayer
checkflag 0x200
if b_true goto @gotit
GivePokemon 25 5 4 0 0 0
message @recieved
setflag 0x200
Release
End

#ORG @gotit
message @howis
Release
End

#ORG @recieved
=Here is pikachu!

#ORG @howis
=How is pikachu doing?


That will work fine. Except I think you need a space after the "=" in Text Scripts. #ORG @recieved
=Here is pikachu!

#ORG @howis
=How is pikachu doing? Should be #ORG @recieved
= Here is pikachu!

#ORG @howis
= How is pikachu doing?

Oh, I'm using a script test Rom for Fire Red.
Oh, well... If it can wait a few days the new version of XSE will have color codes included. :) Otherwise, PM me, and I'll explain.

Master_Track
June 4th, 2008, 11:22 AM
I'm quite sure I used colour codes with XSE O.o
I'll try it out again, but I'm sure it was with XSE......
just wrote \c\h01\h04 (code for red).

Jamiras843
June 4th, 2008, 12:24 PM
I need halp with a script I made... To get your first pokemon you talk to this guy, he just says "test blah blah blah" then you get a Houndour and music plays and a txt box pops up saying "[PLAYER] recieved a HOUNDOUR!" but after that box the "test blah blah blah" box comes back and so does the "[PLAYER] recieved a HOUNDOUR!" then it just stops. How do I make it not repeat the second time? this is the script its not fully complete but the whole repeat thing bugs me...

#dynamic 800109

#org @starterpkm
lock
faceplayer
checkflag 0x200
if 0x1 goto @father1
msgbox @houndour
callstd 0x6
goto @houndourget
release
end

#org @father1
lock
faceplayer
msgbox @well
callstd 0x6
release
end

#org @houndour
= test blah blah blah

#org @houndourget
lock
fanfare 0x13E
msgbox2 @houndourget2
waitmsgbox
waitfanfare
callstd 0x6
givepokemon 0xE4 0x5 0x0 0x0 0x0 0x000000 0x00
setflag 0x200
setflag 0x828
release
end

#org @houndourget2
= \v\h01 received a HOUNDOUR!

#org @well
= You already have a pokemon

Dr.Razor
June 4th, 2008, 01:57 PM
I show my method tu use XSE:
-Insert script with Poketscript
-Then decompile the script with XSE
-Edit it
-Compile it.

I use this way because i don't like very much dynamic system
and i can edit the script easily with XSE

Hope it will help someone^^

Ps:Sorry for my english.

Mike2494
June 4th, 2008, 02:01 PM
Well, why do you have two setflags, try giving the 0x828 just away. I am not a XSE-Pro, I am also only learning right now, but I know some stuff about PokeScript..so yeah..

Jamiras843
June 4th, 2008, 02:17 PM
Well, why do you have two setflags, try giving the 0x828 just away. I am not a XSE-Pro, I am also only learning right now, but I know some stuff about PokeScript..so yeah..

The 0x828 flag is the flag that enables you to view your pokemon status, this flag is enabled when you choose your starter pokemon. Since this is your starter pokemon I need to enable that flag, or else you just get the pokemon and can't check its status.

hockeypanda32
June 4th, 2008, 07:49 PM
That will work fine. Except I think you need a space after the "=" in Text Scripts. #ORG @recieved
=Here is pikachu!

#ORG @howis
=How is pikachu doing? Should be #ORG @recieved
= Here is pikachu!

#ORG @howis
= How is pikachu doing?


Oh, well... If it can wait a few days the new version of XSE will have color codes included. :) Otherwise, PM me, and I'll explain.

My script glitches, when I talk to the person assigned with this it shows no text but gives the poke, then when I go to bag, you change your character to the giver of the pokemon! What did I do wrong, here is my improved script

#Dynamic 0x71A2EC

#ORG @Main
Lock
FacePlayer
checkflag 0x200
if b_true goto @gotit
GivePokemon 25 5 4 0 0 0
message @recieved
setflag 0x200
Release
End

#ORG @gotit
message @howis
Release
End

#ORG @recieved
= Here is pikachu!

#ORG @howis
= How is pikachu doing?

Jamiras843
June 4th, 2008, 11:44 PM
My script glitches, when I talk to the person assigned with this it shows no text but gives the poke, then when I go to bag, you change your character to the giver of the pokemon! What did I do wrong, here is my improved script

#Dynamic 0x71A2EC

#ORG @Main
Lock
FacePlayer
checkflag 0x200
if b_true goto @gotit
GivePokemon 25 5 4 0 0 0
message @recieved
setflag 0x200
Release
End

#ORG @gotit
message @howis
Release
End

#ORG @recieved
= Here is pikachu!

#ORG @howis
= How is pikachu doing?

This happened to me, If you change maps before going to the bag it shouldnt switch characters. I wish I could tell you how to fix it, but if you do let me know I would like to fix that on mine too :)

hockeypanda32
June 4th, 2008, 11:51 PM
This happened to me, If you change maps before going to the bag it shouldnt switch characters. I wish I could tell you how to fix it, but if you do let me know I would like to fix that on mine too :)

Ya I fixed the change character thing by making it say if b_false goto @recieved instead of message @recieved after the givepokemon but placed it before the givepokemon! Now I am giong to try to move the givepokemon script to one of the subscripts and see if any positive results happen.

ZodiacDaGreat
June 5th, 2008, 12:16 AM
#Dynamic 0x71A2EC

#ORG @Main
Lock
FacePlayer
checkflag 0x200
if b_true goto @gotit
GivePokemon 0x25 0x5 0x4 0x0 0x0 0x0
message @recieved
boxset 0x2
setflag 0x200
Release
End

#ORG @gotit
message @howis
boxset 0x2
End

#ORG @recieved
= Here is pikachu!

#ORG @howis
= How is pikachu doing?
here, its a bit improved, I did it in a rush, tell me if there's errors. Um, you've forgot to put boxset under message. There's no need to use CAPs(Uppercase) but thats upto you.

hockeypanda32
June 5th, 2008, 12:22 AM
here, its a bit improved, I did it in a rush, tell me if there's errors. Um, you've forgot to put boxset under message. There's no need to use CAPs(Uppercase) but thats upto you.

Thanks, it worked, time to add my movement script, this is gonna be the beginning of new hack!

My Movement script is like this and when I compile and open it adds every movement so it confuses itself while moving and freezes, why is it doing this!

#dynamic 0x71A2E0

#org @beginning
lockall
checkflag 0x200
if b_true goto @gotit
applymovement 0x2 0x71A2E0
applymovement MOVE_PLAYER 0x71A41C
waitmovement 0x0
call 0x71A41C
boxset 0x2
releaseall
end

'-----------
' Movements
'-----------
#org 0x71A2E0
#raw 12 'Step Left (Normal)
#raw 4A 'Face player
#raw FE 'End of Movements

#org @gotit
release
end

Darthatron
June 5th, 2008, 02:50 AM
Thanks, it worked, time to add my movement script, this is gonna be the beginning of new hack!

My Movement script is like this and when I compile and open it adds every movement so it confuses itself while moving and freezes, why is it doing this!

#dynamic 0x71A2E0

#org @beginning
lockall
checkflag 0x200
if b_true goto @gotit
applymovement 0x2 0x71A2E0
applymovement MOVE_PLAYER 0x71A41C
waitmovement 0x0
call 0x71A41C
boxset 0x2
releaseall
end

'-----------
' Movements
'-----------
#org 0x71A2E0
#raw 12 'Step Left (Normal)
#raw 4A 'Face player
#raw FE 'End of Movements

#org @gotit
release
end

First off, you really shouldn't be using a mix of Dynamic and Static Offsets in your script. This makes it kind of difficult to read...

If possible could you show me the fully non-compiled script? Unless you don't have one... In which case please PM me with exactly what you want the script to do and I'll write you up a script and show you exactly what each command does. :)

Onvoloper
June 5th, 2008, 05:02 AM
#Dynamic 0x3B4D84

#org @Main
Lock
FacePlayer
Message @Speak
BoxSet 0x06
release
end
#org @Speak
= "Hey!"

That's my script. :)
On Advance Map I create a person, Their Offset is 71A284
Their script offset is 3B4D84.
I click "Open script" in advance map and XSE opens up with FireRed as file and 3B4D84 as the offset.
That's when I put this in
#Dynamic 0x3B4D84

#org @Main
Lock
FacePlayer
Message @Speak
BoxSet 0x06
release
end
#org @Speak
= "Hey!" Same code again :P
And hit Compile. It says it worked but it doesn't...Whenever I re open the script offset 3B4D84 It gives me a blank page...almost
'-----------------------
#org 0x3B4D84

And the person doesn't talk to me ingame. What am I doing wrong?

ZodiacDaGreat
June 5th, 2008, 05:24 AM
And the person doesn't talk to me ingame. What am I doing wrong?

lol, you're not supposed to use offsets anyhow, try looking for lot of FF's(byte 0xFF), FF means free space, other than that it means its used. Try to optimise your script also:

#Dynamic 0x3B4D84

#org @Main
Lock
FacePlayer
Message @Speak
BoxSet 0x06
release
end
#org @Speak
= "Hey!"
to:

#dynamic 0xYour Free Space Offset
#org @Main
message @speak
boxset 0x2 ' 0x2 contains a builtin faceplayer and lock
end

#org @speak
= "Hey!"

Tré
June 5th, 2008, 05:55 AM
#Dynamic 0x800000
#org @battlepika
lock
faceplayer
checkflag 0x200
if 0x1 goto @done
message @poke
@poke 1 =Hey!!! \pIt's A Pikachu!!! \pBattle it???
boxset 0x5
compare LASTRESULT 0x1
if 0x1 goto @battle
message @no
@no 1 =Maybe This Pikachu Has an \nOwner...
boxset 0x6
release
end
#org @done
#raw 0x53 0x04 0x00 0xFE
release
end
#org @battle
lock
faceplayer
message @pikachuu
@pikachuu 1 =Pika....Pikachuuuu!!!!
boxset 0x6
wildbattle 25 7 0
setflag 0x200
fadescreen 0x0
release
end


uhhh...what's wrong with these it says....
"unknown keyword "@poke" at line 9"

ZodiacDaGreat
June 5th, 2008, 06:33 AM
uhhh...what's wrong with these it says....
"unknown keyword "@poke" at line 9"
of course there's something wrong, you've completely mistaken XSE as pokewitch, XSE uses the original method for msgbox scripts. Here's the code

#dynamic 0x800000
#org @Start
msgbox @msg
boxset 0x2
end

#org @msg
= ....
Once again, this here's XSE, not pokewitch. Plus there's command help, just press F1 if you don't understand any command or if it says unknown keyword-honestly do anyone ever bother reading the command database before scripting?

Tré
June 5th, 2008, 06:43 AM
uh... so that's why....i'll try it...
hey it workred....thanks pal...woohoo

Onvoloper
June 5th, 2008, 08:03 PM
lol, you're not supposed to use offsets anyhow, try looking for lot of FF's(byte 0xFF), FF means free space, other than that it means its used. Try to optimise your script also:


to:

Thanks, but I already had an offset in the top part that I found uses FsF. I got it to work by looking at other scripts already in Pokemon.
Made it like this
'-----------------------
#org 0x3B4D84
lock
faceplayer
msgbox2 0x8456734 '""
callstd 0x6
release
end


'---------
' Strings
'---------
#org 0x456734
= Hey! How are you?

XSE gave me a hand and put thre strings part in automatically :D Hazzam lol

hockeypanda32
June 5th, 2008, 08:37 PM
Lol my warp goes to nowhere, well to a black map where I cant see anything not even the character! i got everything else to work how I wanted it too!

here is my code


#dynamic 0x71A5F8

#org @start
lock
faceplayer
checkflag 0x829
checkflag 0x828
if b_true goto @letin
message @message
callstd 0x6
release
end

#org @letin
message @open
boxset 0x6
warp 0x3 0x66 0xFF 0x6 0x17
release
end

#org @message
= I cannot let you pass\nGet your pokemon from\pJesse outside and your\npokedex from that\ptable.

#org @open
= You may proceed.

現実として巨大なもの
June 5th, 2008, 10:46 PM
I've heard that someone can use XSE to get night and day in Firered adn or leafgreen. Is this possible or is this a rumor? If it is possible has it been dun before?

ZodiacDaGreat
June 5th, 2008, 10:52 PM
@hockeypanda32 - is the map bank, map number, and warp number in hex?

@KanouKono - You can't, there's no such thing. Day and Night can only be achieved by ASM.

Visual
June 5th, 2008, 10:52 PM
You cant use a normal script to make a day night system in FireRed.
The only way, of which I know, is to use a level script in every single map, which would of worked like thethethethe's weather script, but the day and night would go by too fast, and it would require too much space. People just need to give up on this until someone can figure out a way to input a real time clock into FireRed. Which so far doesnt exist.

hockeypanda32
June 5th, 2008, 11:03 PM
@hockeypanda32 - is the map bank, map number, and warp number in hex?

@KanouKono - You can't, there's no such thing. Day and Night can only be achieved by ASM.

I am trying to warp to map Route 1 and have it at X: 6 Y:17

its this line


warp 0x3 0x66 0xFF 0x6 0x17

Shaggy Typhlosion
June 5th, 2008, 11:11 PM
i tried to compile this script(in the spoiler):
#Dynamic 0x80830C

#ORG @Main
callasm 0x71B771
nop
Lock
Faceplayer
Message @rar
boxset 0x6
wildbattle 130 30 1
setflag 0x1000
fadescreen 0
release
end

#ORG @rar
= Bishaan!
Then a window pops out, saying:
Error 13 'Type mismatch' on line 10
Missing #define or parameter
Line: wildbattle 130 30 1

Visual
June 5th, 2008, 11:13 PM
Hockeypanda:

You'll need to convert it to hex if you put 0x infront of it.
17 should be 0x11. I think Advance Map has is in decimal, if not, im wrong. Try it anyways though.

Psyduck007:

Why did you add a nop? It doesnt mean anything.
Also, there must be something wrong with your command if it says that.
Try this:

startwildbattle 0x82 0x1E 0x0

Instead of wildbattle, remember XSE has some differences to other scripting programs.

ZodiacDaGreat
June 5th, 2008, 11:20 PM
I am trying to warp to map Route 1 and have it at X: 6 Y:17

its this line

and which warp?

but this should work:

warp 0x3 0x13 0xFF 0x6 0x11
remember the values should be in hex, use XSE's built in calculator to find the values.

Line: wildbattle 130 30 1
wildbattle is a construct, why don't you check the database to see what's wrong, but, I think you're trying to use this:
startwildbattle 0xPK 0xLV 0xItem

hockeypanda32
June 5th, 2008, 11:23 PM
and which warp?

but this should work:

remember the values should be in hex, use XSE's built in calculator to find the values.


wildbattle is a construct, why don't you check the database to see what's wrong, but, I think you're trying to use this:
startwildbattle 0xPK 0xLV 0xItem

Great how do I post pone it til after my message?

ZodiacDaGreat
June 5th, 2008, 11:25 PM
Great how do I post pone it til after my message?

You can't, therefore warp is always used at the end of the script.

Onvoloper
June 5th, 2008, 11:45 PM
My earlier script, that I tried jsut had a girl saying "Hey, how are you?"
Now I tried to make one that gave you a Pikachu then asked how the Pikachu was...
I clicked open script in advance map and opened the old script in XSE
'-----------------------
#org 0x3B4D84
lock
faceplayer
msgbox2 0x8456734 '"Hey! How are you?"
callstd 0x6
release
end


'---------
' Strings
'---------
#org 0x456734
= Hey! How are you?

That one works, I had the offset in XSE as 3B4D84 and comiled it into Fire Red

Now my new script is

'-----------------------
#Dynamic 0x3B4D84

#org @Talk
lock
faceplayer
checkflag 0x910
if b_true goto @Speak
message @message
givepokemon 0x19 0xA 0x0 0x0 0x0 0x0
setflag 0x910
release
end

#org @Speak
message @Pika
boxset 0x6
release
end

#org @message
= Here, this pikachu\nIs lonely.\nYou take it.

#org @Pika
= How is the Pikachu?

I deleted the old script, and wrote this one in. It doesn't have any errors in it that I know of as it gives me this
Version\1636 - Pokemon - Fire Red Version.gba...
Processing input script...
2 - DYNAMIC
> lDynamicStart = 0x3B4D84
4 - ORG
> lNewOffset = 0x47B0E7
5 - (6A) - LOCK
6 - (5A) - FACEPLAYER
7 - (2B) - CHECKFLAG
> iWord = 0x910
8 - (??) IF (native)
> bCondition = 0x1
This is a jumping IF, 0x06.
> pTarget = 0x847B139
9 - (0F) MSGBOX (native)
> pText = 0x847B22F
10 - (79) - GIVEPOKEMON
> iWord = 0x19
> bByte = 0xA
> iWord = 0x0
> lDword = 0x0
> lDword = 0x0
> bByte = 0x0
11 - (29) - SETFLAG
> iWord = 0x910
12 - (6C) - RELEASE
13 - (02) - END
15 - ORG
> lNewOffset = 0x47B139
16 - (0F) MSGBOX (native)
> pText = 0x847B4C7
17 - (09) BOXSET (native)
> bType = 0x6
18 - (6C) - RELEASE
19 - (02) - END
21 - ORG
> lNewOffset = 0x47B22F
22 - RAW TEXT
> sText = "Here, this pikachu\nIs lonely.\nYou take it."
24 - ORG
> lNewOffset = 0x47B4C7
25 - RAW TEXT
> sText = "How is the Pikachu?"
-------------------------------
DYNAMIC_OFFSET 1
> sLabel = @Pika
> lOffset = 0x47B4C7
DYNAMIC_OFFSET 2
> sLabel = @Speak
> lOffset = 0x47B139
DYNAMIC_OFFSET 3
> sLabel = @Talk
> lOffset = 0x47B0E7
DYNAMIC_OFFSET 4
> sLabel = @message
> lOffset = 0x47B22F
-------------------------------
Cleaning up...
Closing output...
Finished processing input in 0.145 seconds.

BUT when I close it and go into advance map and reopen the script it still has the first one...and ingame all she says is "Hey, how are you?"
:/ I get this whenever I use #Dynamic 0xOffset
If I start it with #org 0xOffset it works BUT I can't use stuff like #org @message I have to use other offsets :/

hockeypanda32
June 5th, 2008, 11:51 PM
My earlier script, that I tried jsut had a girl saying "Hey, how are you?"
Now I tried to make one that gave you a Pikachu then asked how the Pikachu was...
I clicked open script in advance map and opened the old script in XSE
'-----------------------
#org 0x3B4D84
lock
faceplayer
msgbox2 0x8456734 '"Hey! How are you?"
callstd 0x6
release
end


'---------
' Strings
'---------
#org 0x456734
= Hey! How are you?

That one works, I had the offset in XSE as 3B4D84 and comiled it into Fire Red

Now my new script is

'-----------------------
#Dynamic 0x3B4D84

#org @Talk
lock
faceplayer
checkflag 0x910
if b_true goto @Speak
message @message
givepokemon 0x19 0xA 0x0 0x0 0x0 0x0
setflag 0x910
release
end

#org @Speak
message @Pika
boxset 0x6
release
end

#org @message
= Here, this pikachu\nIs lonely.\nYou take it.

#org @Pika
= How is the Pikachu?

I deleted the old script, and wrote this one in. It doesn't have any errors in it that I know of as it gives me this
Version\1636 - Pokemon - Fire Red Version.gba...
Processing input script...
2 - DYNAMIC
> lDynamicStart = 0x3B4D84
4 - ORG
> lNewOffset = 0x47B0E7
5 - (6A) - LOCK
6 - (5A) - FACEPLAYER
7 - (2B) - CHECKFLAG
> iWord = 0x910
8 - (??) IF (native)
> bCondition = 0x1
This is a jumping IF, 0x06.
> pTarget = 0x847B139
9 - (0F) MSGBOX (native)
> pText = 0x847B22F
10 - (79) - GIVEPOKEMON
> iWord = 0x19
> bByte = 0xA
> iWord = 0x0
> lDword = 0x0
> lDword = 0x0
> bByte = 0x0
11 - (29) - SETFLAG
> iWord = 0x910
12 - (6C) - RELEASE
13 - (02) - END
15 - ORG
> lNewOffset = 0x47B139
16 - (0F) MSGBOX (native)
> pText = 0x847B4C7
17 - (09) BOXSET (native)
> bType = 0x6
18 - (6C) - RELEASE
19 - (02) - END
21 - ORG
> lNewOffset = 0x47B22F
22 - RAW TEXT
> sText = "Here, this pikachu\nIs lonely.\nYou take it."
24 - ORG
> lNewOffset = 0x47B4C7
25 - RAW TEXT
> sText = "How is the Pikachu?"
-------------------------------
DYNAMIC_OFFSET 1
> sLabel = @Pika
> lOffset = 0x47B4C7
DYNAMIC_OFFSET 2
> sLabel = @Speak
> lOffset = 0x47B139
DYNAMIC_OFFSET 3
> sLabel = @Talk
> lOffset = 0x47B0E7
DYNAMIC_OFFSET 4
> sLabel = @message
> lOffset = 0x47B22F
-------------------------------
Cleaning up...
Closing output...
Finished processing input in 0.145 seconds.

BUT when I close it and go into advance map and reopen the script it still has the first one...and ingame all she says is "Hey, how are you?"
:/ I get this whenever I use #Dynamic 0xOffset
If I start it with #org 0xOffset it works BUT I can't use stuff like #org @message I have to use other offsets :/

notice the dynamics in each you are using the same hex, use a free space finder and change yours, that is what is happening

Onvoloper
June 5th, 2008, 11:57 PM
Thanks, but what If I'm trying to replace the first script? Which is what I am trying. Why can't it have the same offset, and replace the older one?

Also I found that offset in fsf, and used it in my first script, that was practically the one in the tutorial and it had the same problem until I made it like the first script in my post there.

Oki, I changed the offset of the script, and the offset of the event's script in advance map to 71A794 and it works :)

So how do I replace scripts offsets? :/

Also the with the script, she always says "How's Pikachu?" :/ What'd I do wrong there? :P

hockeypanda32
June 6th, 2008, 12:05 AM
Thanks, but what If I'm trying to replace the first script? Which is what I am trying. Why can't it have the same offset, and replace the older one?

Also I found that offset in fsf, and used it in my first script, that was practically the one in the tutorial and it had the same problem until I made it like the first script in my post there.

Oki, I changed the offset of the script, and the offset of the event's script in advance map to 71A794 and it works :)

So how do I replace scripts offsets? :/

Also the with the script, she always says "How's Pikachu?" :/ What'd I do wrong there? :P

In a hex editor totally clean up the hex manually then if you want to overwrite it! Close XSE after and reopen, then compile

Onvoloper
June 6th, 2008, 12:12 AM
In a hex editor totally clean up the hex manually then if you want to overwrite it! Close XSE after and reopen, then compile

Thanks :D I had sooooooo much problems with this. Tried rescripting it a bazillion times :P
Now I have another problem
'-----------------------
#org 0x71A794
lock
faceplayer
checkflag 0x910
if 0x1 goto 0x871A7BA
msgbox 0x871A7C5 '"Here, this pikachu\nIs lonely.\nYou..."
givepokemon 0x19 0xA 0x0 0x0 0x0 0x0
setflag 0x910
release
end

'-----------------------
#org 0x71A7BA
msgbox 0x871A7F3 '"How is the Pikachu?"
callstd 0x6
release
end


'---------
' Strings
'---------
#org 0x71A7C5
= Here, this pikachu\nIs lonely.\nYou take it.

#org 0x71A7F3
= How is the Pikachu?

I think The proglem lies in this part...not sure though.
#org 0x71A794
lock
faceplayer
checkflag 0x910
if 0x1 goto 0x871A7BA
msgbox 0x871A7C5 '"Here, this pikachu\nIs lonely.\nYou..."
givepokemon 0x19 0xA 0x0 0x0 0x0 0x0
setflag 0x910
release
end
Whether I make the if 0x1 or 0x0 she still says "How's the pikachu?" From the begining and never gives it to you. :(

#org @Talk
lock
faceplayer
checkflag 0x910
checkflag 0x910
if b_true goto @Speak
message @message
givepokemon 0x19 0xA 0x0 0x0 0x0 0x0
setflag 0x910
release
end

Is the same section not compiled.

Darthatron
June 6th, 2008, 12:17 AM
Thanks, but what If I'm trying to replace the first script? Which is what I am trying. Why can't it have the same offset, and replace the older one?

Also I found that offset in fsf, and used it in my first script, that was practically the one in the tutorial and it had the same problem until I made it like the first script in my post there.

Oki, I changed the offset of the script, and the offset of the event's script in advance map to 71A794 and it works :)

So how do I replace scripts offsets? :/

Also the with the script, she always says "How's Pikachu?" :/ What'd I do wrong there? :P
You can use the Erase Function. It is set out like this:
#Dynamic 0x800000
#Erase 0x812345 0xFF

Just change "0x812345" to the location where your script starts, and also change "0xFF" to how many bytes you want to erase. Hope that helped.

I will edit later and answer the other questions...

Onvoloper
June 6th, 2008, 12:24 AM
So I just recompile it with erase and the amount of bytes the offsets held? Cool
I'ma go make cheese muffins. Thanks for the help...I think I'm actually learning things :P...sorta lol

One Winged Angel
June 6th, 2008, 05:11 PM
How many more commands are in here than in Poke script?Also, are they important commands?

現実として巨大なもの
June 6th, 2008, 05:14 PM
I guess I'm in the wrong section. This'll do later as I script more but is it possible for anyone to help me navigate to the ASM hack tool or to a tutorial because I can't find one. All thanks is aprreciated and sorry for the clueless spamming.

ZodiacDaGreat
June 6th, 2008, 05:35 PM
How many more commands are in here than in Poke script?Also, are they important commands?

@yunghove - check the features, XSE has nearly all included though not all uses have been found, but the fact is pokewitch only had 2-5 new commands while XSE outweighs it. Yes, all commands are important, without which the game won't run proper and you won't be able to script.

I guess I'm in the wrong section. This'll do later as I script more but is it possible for anyone to help me navigate to the ASM hack tool or to a tutorial because I can't find one. All thanks is aprreciated and sorry for the clueless spamming.

@KanouKono - There's no such thing is a specific ASM tool, as ASM itself is unspecific, all you need is a emulator with builtin debugger(VBA-SDL-H), disassembler(VBA has one), assembler(GoldRoad, Devkit Adv, etc) and some knowledge on ASM. Then you fiddle around with it, find stuff amd modifiy it to your desire. There aren't much tutorials on ASM, google it or something, PHO has some.

Onvoloper
June 6th, 2008, 10:37 PM
@yunghove - check the features, XSE has nearly all included though not all uses have been found, but the fact is pokewitch only had 2-5 new commands while XSE outweighs it. Yes, all commands are important, without which the game won't run proper and you won't be able to script.



@KanouKono - There's no such thing is a specific ASM tool, as ASM itself is unspecific, all you need is a emulator with builtin debugger(VBA-SDL-H), disassembler(VBA has one), assembler(GoldRoad, Devkit Adv, etc) and some knowledge on ASM. Then you fiddle around with it, find stuff amd modifiy it to your desire. There aren't much tutorials on ASM, google it or something, PHO has some.

There are a lot of very in-depth tutorials on ASM. It's just up to you to gain a decent enough understanding to apply it to roms. The Dark Alliance is a good place to learn basic ASM, and more complicated...Most people who know ASM well, apply their knowkledge in diffrent areas so yeh. Also Cheat engine and it's tutorial are a good place to start. Cheat engine is a memory scanner, that uses ASM. (Some AV's scan it as a trojan -_-. The site warns you).
It's just up to you to learn the basics, then apply em in roms. Btw ASM is not reccomended for a first language :)

ZodiacDaGreat
June 6th, 2008, 10:42 PM
There are a lot of very in-depth tutorials on ASM. It's just up to you to gain a decent enough understanding to apply it to roms. The Dark Alliance is a good place to learn basic ASM, and more complicated...Most people who know ASM well, apply their knowkledge in diffrent areas so yeh. Also Cheat engine and it's tutorial are a good place to start. Cheat engine is a memory scanner, that uses ASM. (Some AV's scan it as a trojan -_-. The site warns you).
It's just up to you to learn the basics, then apply em in roms. Btw ASM is not reccomended for a first language :)
he means ASM as per ROM hacking for pokemon.

mattattack
June 7th, 2008, 01:21 AM
excuse me but does anyone know how to get wild pokemon sprites to fight you (meaning when you fight Mewtwo you have to talk to the sprite)

ZodiacDaGreat
June 7th, 2008, 01:25 AM
excuse me but does anyone know how to get wild pokemon sprites to fight you (meaning when you fight Mewtwo you have to talk to the sprite)
Reply With Quote

I think you're referring to this:

wildbattle 0xSpecies 0xLv 0xItem 0xStyle

Onvoloper
June 7th, 2008, 01:39 AM
he means ASM as per ROM hacking for pokemon.

I know that...lol. but how exactly does he plan to hack a rom with ASM if he doesn't know ASM and there are no tuts showing him step by step how to use to hack a pokemon rom?

That would be hard...very hard :/ I was just suggesting that instead of asking for tutorials on how to apply knowledge, he should be looking for tutorials on the basics first. Then once he understands the basics, move on to applying knowledge.

Btw, with scripting, how do you tell how many bytes are needed for a script? Mainly the script I posted before that I'm having problems with :P Where you talk to her and she gives you a pikachu then asks how the pikachu is going...Does each command take up a certain amount of bytes? Or does it vary depending on say how you use the command?

mattattack
June 7th, 2008, 01:45 AM
hey you try to work on a hack with nobody else to help you

ZodiacDaGreat
June 7th, 2008, 01:51 AM
Btw, with scripting, how do you tell how many bytes are needed for a script? Mainly the script I posted before that I'm having problems with :P Where you talk to her and she gives you a pikachu then asks how the pikachu is going...Does each command take up a certain amount of bytes? Or does it vary depending on say how you use the command?

Different commands have different parameters, each bit of a parameter takes up a byte, text data also take up bytes - one character per byte.

GiantGroudon
June 7th, 2008, 12:06 PM
I took the open source script (credits to cheesePeow) and copied it in XSE, changed the $ into @, but when i want to compile it, it says something like :no dynamic startoffset was chosen (this sentence was translated. I'm using german version) That's the script:

#org @begin
lock
faceplayer
message @flightchooser
@flightchooser 1 = Hello, welcome to Heartrow Airport.\nYou can choose where you\nare to fly to.\pHere we go.
boxset 6
message @Izuki
@kanto 1 = Would you like to fly to Izuki?
boxset 5
compare LASTRESULT 1
if 1 goto @flytokanto

release
end

#org @flytokanto
message $enjoyflightkanto
@enjoyflightkanto 1 = Enjoy your flight to Izuki!
boxset 6
warp 0x0 0x0
release
end

And i need to know where to input the mapbankExample: 3.10 and warp number 0. if anyone could posta reply, please insert this stuff where it belongs and correct the script if there are any mistakes.

hockeypanda32
June 7th, 2008, 12:16 PM
I took the open source script (credits to cheesePeow) and copied it in XSE, changed the $ into @, but when i want to compile it, it says something like :no dynamic startoffset was chosen (this sentence was translated. I'm using german version) That's the script:


And i need to know where to input the mapbankExample: 3.10 and warp number 0. if anyone could posta reply, please insert this stuff where it belongs and correct the script if there are any mistakes.


#dynamic 0x?????? '<----offset you want replaces ??????

#org @begin
lock
faceplayer
message @flightchooser
boxset 6
message @Izuki
boxset 5
compare LASTRESULT 1
if 1 goto @flytokanto
release
end

#org @izuki
= Would you like to fly to Izuki?

#org @flightchooser
= Hello, welcome to Heartrow Airport.\nYou can choose where you\nare to fly to.\pHere we go.

#org @enjoyflightkanto
= Enjoy your flight to Izuki!

#org @flytokanto
message @enjoyflightkanto
boxset 6
warp 0x3 0x19 0xFF 0x5 0x5 '<------ 1st int means bank, 2 no., 3. seperator, 4 x coord, 5 y, what I have would be route 1 at 5x/5y
release
end

GiantGroudon
June 7th, 2008, 12:25 PM
Thanks dude. Now it works.

hockeypanda32
June 7th, 2008, 12:56 PM
Thanks dude. Now it works.

No problem, if you need command help press F1 in XSE it brings up a popup with all its commands listed so enjoy! I you still need help post here and I will see what I can do about it ;)

GiantGroudon
June 7th, 2008, 12:57 PM
How much bytes do I need for this script? #dynamic 0x??????

#org @begin
lock
faceplayer
message @flightchooser
boxset 6
#define message @Izuki
boxset 5
compare LASTRESULT 1
if 1 goto @flytokanto
release
end

#org @izuki
= Would you like to fly to Izuki?

#org @flightchooser
= Hello, welcome to Heartrow Airport.\nYou can choose where you\nare to fly to.\pHere we go.

#org @enjoyflightkanto
= Enjoy your flight to Izuki!

#org @flytokanto
#define message @enjoyflightkanto
boxset 6
warp 0x3 0x19 0xFF 0x5 0x5 '<------ 1st int means bank, 2 no., 3. seperator, 4 x coord, 5 y, what I have would be route 1 at 5x/5y
release
end

hockeypanda32
June 7th, 2008, 01:02 PM
How much bytes do I need for this script? #dynamic 0x??????

#org @begin
lock
faceplayer
message @flightchooser
boxset 6
#define message @Izuki
boxset 5
compare LASTRESULT 1
if 1 goto @flytokanto
release
end

#org @izuki
= Would you like to fly to Izuki?

#org @flightchooser
= Hello, welcome to Heartrow Airport.\nYou can choose where you\nare to fly to.\pHere we go.

#org @enjoyflightkanto
= Enjoy your flight to Izuki!

#org @flytokanto
#define message @enjoyflightkanto
boxset 6
warp 0x3 0x19 0xFF 0x5 0x5 '<------ 1st int means bank, 2 no., 3. seperator, 4 x coord, 5 y, what I have would be route 1 at 5x/5y
release
end


Just enter your dynamic offset where the ?'s are and it comes up with a window once you press compile. It already selected the needed offset so press the copy button then in Adv Map go to you event you want to apply it to and paste your offset in the Event's offset box!

Shaggy Typhlosion
June 14th, 2008, 09:11 PM
Hockeypanda:

You'll need to convert it to hex if you put 0x infront of it.
17 should be 0x11. I think Advance Map has is in decimal, if not, im wrong. Try it anyways though.

Psyduck007:

Why did you add a nop? It doesnt mean anything.
Also, there must be something wrong with your command if it says that.
Try this:

startwildbattle 0x82 0x1E 0x0Instead of wildbattle, remember XSE has some differences to other scripting programs.
i added nop to make it shiny

master morty
June 18th, 2008, 10:36 AM
I am good with almost everything but flags how do I use them!?!

Master_Track
June 18th, 2008, 10:54 AM
using flags is something really simple. They are just marks that a script has been activated before.
for example:
#dynamic 0x800000

#org @begin
checkflag 0x200
if B_true goto @other
lock
faceplayer
message @talk
boxset 0x6
setflag 0x200
release
end

#org @talk
= Hi, nice to meet you!

#org @other
lock
faceplayer
message @met
boxset 0x6
release
end

#org @met
= We met before, right?
you first check, if flag 0x200 has been activated. if it was, you give a pointer to another part of the script.
So the first time the script activates, flag 0x200 is activated. The second time, the script will recognize that flag 0x200 has been activated, and jump to another part of the script.
hope that helps ^^

@psyduck: nop to make a wild pokemon shiny? O.o
nop is simply a buffer, it doesn't do ANYTHING. It's useless ^^( at least in XSE, afaik. In pokescript it's sometimes necessary)
To make a wild pokemon shiny u need to use MM_X's shiny hack and the command "callasm".

現実として巨大なもの
June 18th, 2008, 10:57 AM
I know that...lol. but how exactly does he plan to hack a rom with ASM if he doesn't know ASM and there are no tuts showing him step by step how to use to hack a pokemon rom?

That would be hard...very hard :/ I was just suggesting that instead of asking for tutorials on how to apply knowledge, he should be looking for tutorials on the basics first. Then once he understands the basics, move on to applying knowledge.

That's what I was talking about. I know its a little on topic and 'll stop doing this after this post but where can I get the basic knowledge and advance. I hear people talking but I've never seen anyone around here actually apply it in a pokemon game or try it. There has to be a group or something here that can help me with the basics, is there?

コリンク
June 19th, 2008, 09:47 AM
I hate to be a bother, but how can you script the Pokeballs at the beginning of the game? I keep trying but I get this -

" Error 13 'Type Mismatch' on line 23.
Missing #define or parameter."

Master_Track
June 19th, 2008, 01:31 PM
er...if this message comes up, you've written a command wrong.
XSE should automatically go to the line where the error is (in this case line 23).
so there is the mistake, you need to copy this line and post it here so we know what command it was and what's wrong with the way you wrote it ;)

HackMew
June 19th, 2008, 04:53 PM
In a hex editor totally clean up the hex manually then if you want to overwrite it! Close XSE after and reopen, then compile

Sorry but that's wrong. First of all you wouldn't need to close and reopen XSE. Second, XSE features some cleaning up directives. One of them is called #erase. It will overwrite any number of bytes with FFs, starting from a specified offset.

Example:

#erase 0x800000 0xA


That would erase 10 bytes (0xA) starting from offset 0x800000.

Eventually you can use the #eraserange directive. It's quite the same except you input the starting and the ending offset as parameters.

コリンク
June 19th, 2008, 05:46 PM
er...if this message comes up, you've written a command wrong.
XSE should automatically go to the line where the error is (in this case line 23).
so there is the mistake, you need to copy this line and post it here so we know what command it was and what's wrong with the way you wrote it ;)

It was: givepokemon 0x247 0x05 0x00

I'm aware I've done something wrong, seeing as I'm a noob like that..

Master_Track
June 19th, 2008, 05:51 PM
klick f1 after you write a command, and you'll see how much bytes it needs.
In this case it's givepokemon, and it needs 15 bytes.
So you write givepokemon [number][level][item]0 0 0
givepokemon 247 5 0 0 0 0

hope that's right, I sometimes confuse wildbattle and givepokemon xD

コリンク
June 19th, 2008, 06:05 PM
klick f1 after you write a command, and you'll see how much bytes it needs.
In this case it's givepokemon, and it needs 15 bytes.
So you write givepokemon [number][level][item]0 0 0
givepokemon 247 5 0 0 0 0

hope that's right, I sometimes confuse wildbattle and givepokemon xD


Oh thank you so much!! *hugs* It works!

It works, but when I complie it I get the log but not the offsets.. Unless the 0x?????? is the offset.. oO

lennycharriez315
June 23rd, 2008, 09:48 AM
anybody know the wild battle script for xse? im using firered.....

i need the whole script and maybe a couple tips like how to change the pokemon that apears and the level.........please i need help.

Turtwigtoon
June 24th, 2008, 03:15 PM
Can someone help me with a Wild Battle script for Ruby. This is the script:

'-----------------------
#org 0x978456
lock
faceplayer
startwildbattle 0x19A 0x46 0x0
checksound
cry 0x19A 0x2
pause 0x28
waitcry
setflag 0x306
setflag 0x862
special 0x139
waitstate
clearflag 0x862
release
end


How can you make it so that you only fight the pokemon once, not over and over again like it is doing?

lennycharriez315
June 25th, 2008, 02:12 AM
Can someone help me with a Wild Battle script for Ruby. This is the script:


How can you make it so that you only fight the pokemon once, not over and over again like it is doing?
ok. i tried your script myself and if give you a wild deoxys lv.70.now i understand what you are talking about that its still there..according to the one of MANY guides i read that were totally useless and thats y im waiting for hack mews guide.

but i do know that you need to add a ''fadescreen 0'' or ''fadescreen 1'' before release. if that dont work then im sorry but itried.

ok i understand most basics of scripting and i wondered if any body would kindly post a script for a wild celebi lv 30 and tell me how to change the pokemon.but it can only appear once in the game...

i hope one of u get the heart to help me. and ill kindly post you a real real good story line that i read about. and believe me you WILL like it.just please help me.

Onvoloper
June 25th, 2008, 06:46 AM
ok. i tried your script myself and if give you a wild deoxys lv.70.now i understand what you are talking about that its still there..according to the one of MANY guides i read that were totally useless and thats y im waiting for hack mews guide.

but i do know that you need to add a ''fadescreen 0'' or ''fadescreen 1'' before release. if that dont work then im sorry but itried.

ok i understand most basics of scripting and i wondered if any body would kindly post a script for a wild celebi lv 30 and tell me how to change the pokemon.but it can only appear once in the game...

i hope one of u get the heart to help me. and ill kindly post you a real real good story line that i read about. and believe me you WILL like it.just please help me.

You need to checkflag.
setflag 0x306
setflag 0x862
special 0x139

Are they used anywhere else? If so add another one in I spose, just to be safe :P

Then make it
#Dynamic 0x800000
checkflag 0x862
if 0x1 goto @Battledone
lock
faceplayer
startwildbattle 0x19A 0x46 0x0
checksound
cry 0x19A 0x2
pause 0x28
waitcry
setflag 0x306
setflag 0x862
special 0x139
waitstate
clearflag 0x862
release
end

#ORG @Battledone
code for changing sprite or something lol not to sure. But this'll at least
stop it battling you twice :P

lennycharriez315
June 25th, 2008, 11:26 PM
ok guys i need help understanding the wild pokemon battle maybe someone can write a small tutorial that can help us with wild battles..and im hoping its hackmews tutorial wich im hearing about that will help and im hoping it comes out as soon as possible because i need a quick tutorial.really badly.

especially with the part that you need to add the person id thing.

コリンク
June 26th, 2008, 09:02 AM
Could I get some help with a script? I'm trying to figure out how to script the three Pokeballs in my hacks, does anyone know how?

Jolteon1
June 29th, 2008, 07:40 AM
Whenever I try to compile any script with ''compare LASTRESULT 1'',I always get ''Error 13,'Type Mismatch' on Line 31 missing #define or paramater''
''Line : compare LASTRESULT 1''

Tropical Sunlight
June 29th, 2008, 08:18 AM
Does anyone how to make a givepokemon pokeball disappear after you take it?

'-----------------------
#org 0x26D4E4
lock
faceplayer
msgbox 0x826D506 '"I'd better take my CHARMANDER\nwith..."
callstd 0x6
givepokemon 0x4 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
setflag 0x828
release
end

'---------
' Strings
'---------
#org 0x26D506
= I'd better take my CHARMANDER\nwith me!

Master_Track
June 29th, 2008, 09:38 AM
write the hidesprite command with the person number of the pokeball, and in the next line a setflag.
use the setflag as ID for the pokeball.
here's an example:
#raw 0x53 0x01 0x00 (#raw 0x53= hidesprite)( 0x01 0x00 = person number)
setflag 0x828

give it the ID 0828 and it will vanish. It will also vanish without setflag and using setflag as ID, but after one movement it would reappeare.

(I hope I used hidesprite right, it's like this in pokescript and I didn't use hidesprite in XSE yet).

Darthatron
June 29th, 2008, 10:35 AM
write the hidesprite command with the person number of the pokeball, and in the next line a setflag.
use the setflag as ID for the pokeball.
here's an example:
#raw 0x53 0x01 0x00 (#raw 0x53= hidesprite)( 0x01 0x00 = person number)
setflag 0x828

give it the ID 0828 and it will vanish. It will also vanish without setflag and using setflag as ID, but after one movement it would reappeare.

(I hope I used hidesprite right, it's like this in pokescript and I didn't use hidesprite in XSE yet).

It's like this in XSE...
hidesprite 0x1
Everything else is the same. :)

foullump
June 29th, 2008, 05:22 PM
(Sorry if this is a bit off topic) Everyone is saying that XSE is the "revolutionary" scripting program. Well, how exactly is it so great? I've seen many things about this program and I will tell you, diamond cutter, pokescript, and even scripted can do these things! Is there anything unique or special about this program that would give me a reason to use it over any other scripting program? And shouldn't the dynamic offset just create more work? And does this thing even save into individual .RBCs? If not, that's a horrible thing, as I save all of my scripts in a folder.

hockeypanda32
June 29th, 2008, 05:37 PM
(Sorry if this is a bit off topic) Everyone is saying that XSE is the "revolutionary" scripting program. Well, how exactly is it so great? I've seen many things about this program and I will tell you, diamond cutter, pokescript, and even scripted can do these things! Is there anything unique or special about this program that would give me a reason to use it over any other scripting program? And shouldn't the dynamic offset just create more work? And does this thing even save into individual .RBCs? If not, that's a horrible thing, as I save all of my scripts in a folder.

Great things of XSE to point out

First of all a Command DB in the palm of your hands
Easy compilation
Saves your scripts in .RBC format
Quickest compiler
Decompilation
Open up scripts from the game and edit them
Script checker for bugs.
Tabs for easy access to more and more scripts.

Helios Neri
June 30th, 2008, 03:50 PM
Great things of XSE to point out

First of all a Command DB in the palm of your hands
Easy compilation
Saves your scripts in .RBC format
Quickest compiler
Decompilation
Open up scripts from the game and edit them
Script checker for bugs.
Tabs for easy access to more and more scripts.

You also forgot that XSE is the only scripting program that works on every computer in circulation. While all the rest (ScriptED,PokeScript,ECT) only work on about 40% of the computers in circulation today. :3 Thank god for XSE or I wouldn't be able to script.

Lucario 9
June 30th, 2008, 04:01 PM
well this scripting programme is awsome i could not script without this because pokescript and scripted doesnt work on my p.c so without this how could i script thanks for making it i love it thanks for this tutorial is awsome thanks

thethethethe
July 1st, 2008, 02:41 AM
It's like this in XSE...
hidesprite 0x1
Everything else is the same. :)
I always hate to correct the writer of a tutorial, but I asked Hackmew a while ago about this because I was curious, and also too lazy to test myself.
XSE is backwards compatible, and by that I mean that it's compatible with uses from Pokescript and ScriptEd and others which help with a transition over.
So to my point,
hidesprite 0x1
...doesn't have to be this way in XSE.
#raw 0x53 0x01 0x00
Will also work.

Darthatron
July 1st, 2008, 02:45 AM
I always hate to correct the writer of a tutorial, but I asked Hackmew a while ago about this because I was curious, and also too lazy to test myself.
XSE is backwards compatible, and by that I mean that it's compatible with uses from Pokescript and ScriptEd and others which help with a transition over.
So to my point,
hidesprite 0x1
...doesn't have to be this way in XSE.
#raw 0x53 0x01 0x00
Will also work.
I know you can still use #RAW commands, but I thought it would be easier if I told them the actual command for it. >_>

lennycharriez315
July 1st, 2008, 04:01 PM
Does anyone have the basic wildpokemonbattle script for xse...and can you explain it a bit.including the raw and were to put the person num...or how to find the person number..but i do need the script.

hockeypanda32
July 1st, 2008, 09:18 PM
You also forgot that XSE is the only scripting program that works on every computer in circulation. While all the rest (ScriptED,PokeScript,ECT) only work on about 40% of the computers in circulation today. :3 Thank god for XSE or I wouldn't be able to script.

Not a Mac, too bad... Well woot for Intel Macs and boot camp :D

DPP Rival
July 2nd, 2008, 12:03 AM
This is my problem.

I gave this little girl a script saying, What's your favorite pokemon? Mine's Clefairy!

But on Clefairy, only the C shows up. How can I fix this?

Darthatron
July 2nd, 2008, 02:13 AM
This is my problem.

I gave this little girl a script saying, What's your favorite pokemon? Mine's Clefairy!

But on Clefairy, only the C shows up. How can I fix this?
It appears that you havn't added a new line, and the game runs out of space, so to fix this, just add a new like command in the text. Like so;
What's your favorite pokemon?\lMine's Clefairy!
Hope that helped. :)

lennycharriez315
July 2nd, 2008, 05:24 AM
Does anyone have the basic wildpokemonbattle script for xse...and can you explain it a bit.including the raw and were to put the person num...or how to find the person number..but i do need the script.

nevermind the explaining just need the script....but please make sure the pokemon DISAPPEARES AFTER the battle..pleeeeeeease

robie392
July 3rd, 2008, 02:07 AM
with xse can you make it so a pokemon cant evolve like in yellow version but only for one spacifiic pokemon not the whole species the reson im asking is because I think that would be an event that you can write with xse.

Darthatron
July 3rd, 2008, 02:12 AM
with xse can you make it so a pokemon cant evolve like in yellow version but only for one spacifiic pokemon not the whole species the reson im asking is because I think that would be an event that you can write with xse.
No, you cannot add that event with a script editor. >_>

robie392
July 3rd, 2008, 02:28 AM
ok thank you for the information, but might I ask how you can do that?

lennycharriez315
July 4th, 2008, 09:51 PM
ok i got the script to the wild pokemon and to get it to work i was supposed to add the HIDESPRITE command.

and none of ya could have told me that.

tharding6
July 6th, 2008, 01:48 AM
k so i am kinda new to scripting but have the basic stuff down, like just adding a talking sprite, i am having trouble with the trainer thing though please tell me what is wrong with this:

#Dynamic 0x799999

#org @start
lock
faceplayer
trainerbattle 1 0x001
message @boo
boxset 6
release
end

#org @before
@before 1 =Check out my bugs

#org @after
@after 1 =Oh no!

#org @boo
@boo 1 =I'll get you back for this.


P.S. it comes up with an error 13 'type miss match on line 6 'trainer battle'

Line: trainerbattle 1 0x001

Darthatron
July 6th, 2008, 06:34 AM
k so i am kinda new to scripting but have the basic stuff down, like just adding a talking sprite, i am having trouble with the trainer thing though please tell me what is wrong with this:

#Dynamic 0x799999

#org @start
lock
faceplayer
trainerbattle 1 0x001
message @boo
boxset 6
release
end

#org @before
@before 1 =Check out my bugs

#org @after
@after 1 =Oh no!

#org @boo
@boo 1 =I'll get you back for this.


P.S. it comes up with an error 13 'type miss match on line 6 'trainer battle'

Line: trainerbattle 1 0x001

Open up XSE, and look in the Command Help. Now, look at the Parameters...

Parameters:
> Byte - Kind of battle.
> Word - Battle # to start.
> Word - Reserved.
> Pointer - Pointer to challenge text.
> Pointer - Pointer to defeat text.

This is what you have...

Parameters:
> Byte - 1
> Word - 0x1
> Word - ?
> Pointer - ?
> Pointer - ?

You're missing some things, right? So, let's fill in the gaps...

Parameters:
> Byte - 1
> Word - 0x1
> Word - 0x1
> Pointer - @before
> Pointer - @after

See? Much better when all the parameters are met. So now convert that back into your script, and you're done.

#Dynamic 0x799999

#org @start
lock
faceplayer
trainerbattle 1 0x1 0x1 @before @after
message @boo
boxset 6
release
end

#org @before
= Check out my bugs

#org @after
= Oh no!

#org @boo
= I'll get you back for this.

:) If you don't understand something, post it here, or PM me.

Also, you're doing the PokeScript way of messages, with XSE you don't need the "@dynamic 1" in there...

#org @before
@before 1 =Check out my bugs
Will be...
#org @before
= Check out my bugs
Etc...

tharding6
July 7th, 2008, 04:45 AM
thanks, you have been a huge help.. one more problem i am having though is i can't get the sprite to come to me to battle, like where they see you.. as soon as i put them as a trainer in Ad-map they just don't work, and the message just comes up as "CeCeCeCeCeCe..." anything you can do to help.

Thanks,
Taylor

wave-guiding riolu_08
July 8th, 2008, 02:25 PM
I'm new at script editing and I'm using XSE.
This script isn't working. Can anyone tell me why?
I'm testing for now so I can get the hang of creating Wild Pokemon events.
#dynamic 0x165858

#org @start
lock
faceplayer
message @suicune
startwildbattle 0x245 0x32 0x0
release
end

#org @suicune
= Cuuuun!
Wait, I left something out. I'll test to see if it works now. If it doesn't, I'll post back.
Nope, still doesn't work......

1KewlDude
July 8th, 2008, 03:19 PM
I'm new at script editing and I'm using XSE.
This script isn't working. Can anyone tell me why?
I'm testing for now so I can get the hang of creating Wild Pokemon events.
#dynamic 0x165858

#org @start
lock
faceplayer
message @suicune
startwildbattle 0x245 0x32 0x0
release
end

#org @suicune
= Cuuuun!
Wait, I left something out. I'll test to see if it works now. If it doesn't, I'll post back.
Nope, still doesn't work...... You missed out the 'callstd' after the message command. Here's what it should look like: #dynamic 0x165858

#org @start
lock
faceplayer
msgbox @suicune
callstd 0x2
startwildbattle 0x245 0x32 0x0
release
end

#org @suicune
= Cuuuun! You should use the 'debug' tool in XSE, it will pick up these little mistakes.

wave-guiding riolu_08
July 8th, 2008, 03:28 PM
Thanks and I'll be sure to use the debug feature more often!

The event still doesn't work.
The offset for my event is supposed to be to the left of the offset of the rival's
mailbox in Pokemon FireRed. I click on the sprite and nothing happens.
Even if I find free space(using Advance Map), the offsets generated aren't
pinpointed on the map.

poke freak 101
July 16th, 2008, 03:35 PM
whenever i do my script and try to compile it it says

unknown keyword "applymovement" at line 4

can someone help me.
i still am a newbie so if its obvious then sorry.....

hey can you do movement scripts on it?

because every time i do it says a error and when i fix them it says &ho

please help?

1KewlDude
July 16th, 2008, 05:38 PM
whenever i do my script and try to compile it it says

unknown keyword "applymovement" at line 4

can someone help me.
i still am a newbie so if its obvious then sorry.....

hey can you do movement scripts on it?

because every time i do it says a error and when i fix them it says &ho

please help?It would really helpful if you posted the script...

Darthatron
July 16th, 2008, 11:38 PM
whenever i do my script and try to compile it it says

unknown keyword "applymovement" at line 4

can someone help me.
i still am a newbie so if its obvious then sorry.....

hey can you do movement scripts on it?

because every time i do it says a error and when i fix them it says &ho

please help?

Please post the script, so we can help you.

Wind~
July 16th, 2008, 11:47 PM
Um, I'm kind of waiting for a full XSE tut to come out, but, what would a give Pokemon script look like?
Also, the script is long.
How would I make it so that someone talks first, gives u the pokemon, then talks some more?
Also, the sound when ur given something?
Sry, I'm still a little new to scripting.

Ryousha
July 16th, 2008, 11:53 PM
#Dynamic 0x800000

#ORG @Main
Lock
FacePlayer
Message @Speak
checkflag 0x200
#include stdpoke.rbh
givepokemon PKMN_SNEASAL 0x5 0x0 0x0 0x0 0x0
BoxSet 0x6
setflag 0x200
Release
End

#ORG @Speak
= There's a note attached!\n Dear [player],\pI known you since you were 6,\nI got this for your b-day.
= Would you like to rename it?

Like that. Don't steal, this is for my hack. :)

also i think mine has a glitch, :\

KhaosKnight
July 16th, 2008, 11:57 PM
Um, I'm kind of waiting for a full XSE tut to come out, but, what would a give Pokemon script look like?
Also, the script is long.
How would I make it so that someone talks first, gives u the pokemon, then talks some more?
Also, the sound when ur given something?
Sry, I'm still a little new to scripting.



#Dynamic 0x800000

#org @main
lock
faceplayer
checkflag 0x200
if 0x1 goto @end
msgbox @msg1
boxset6
givepokemon 0x4 0x5 0x0
msgbox @msg2
boxset 6
setflag 0x200
release
end

#org @end
msgbox @msg3
boxset 6
release
end

#org @msg1
= Here, take this pokemon

#org @msg2
= Take good care of it

#org @msg3
= how is my pokemon doing?



there is a basic cut n' dry give pokemon script(it will give you a lv 5 charmander)
[givepokemon] this tell the script to give a pokemon (duh :D)
[0x4] 4 is charmanders number
[0x5] this one is the pkmns level
[0x0] is the value, just use 0, im not 100% percent on what this does, but i know it wont work without it )

for a more detailed givepokemon script check here (http://www.pokecommunity.com/showthread.php?t=128887)

Ryousha
July 16th, 2008, 11:59 PM
meh, you're more advanced than me, (still learning.)

KhaosKnight
July 17th, 2008, 12:02 AM
#Dynamic 0x800000

#ORG @Main
Lock
FacePlayer
Message @Speak
checkflag 0x200
#include stdpoke.rbh
givepokemon PKMN_SNEASAL 0x5 0x0 0x0 0x0 0x0
BoxSet 0x6
setflag 0x200
Release
End

#ORG @Speak
= There's a note attached!\n Dear [player],\pI known you since you were 6,\nI got this for your b-day.
= Would you like to rename it?

Like that. Don't steal, this is for my hack. :)

also i think mine has a glitch, :\


i think so too, you have flags set but for no reason, there is no B_true or 0x1 line(or B_false 0x0)

But i have never seen a script like that before, especialy the "#stdpoke" thing

Wind~
July 17th, 2008, 12:06 AM
Will it always be checkflag 0x200 and setflag 0x200?

Ryousha
July 17th, 2008, 12:08 AM
Will it always be checkflag 0x200 and setflag 0x200?

No that's just the ID,

but 200 is commonly used,

i think so too, you have flags set but for no reason, there is no B_true or 0x1 line(or B_false 0x0)

But i have never seen a script like that before, especialy the "#stdpoke" thing


Can you try scripting it for me?

I can try to learn from there of yours skill

Wind~
July 17th, 2008, 12:13 AM
Should I always use checkflag and setflag 0x200?
I never understand these. :(

KhaosKnight
July 17th, 2008, 12:14 AM
Can you try scripting it for me?

I can try to learn from there of yours skill

Sorry but no, i am a major nOOb when it comes to scripting, when i get stuck(which happens alot) Dshayabusa helps me(alot)

i just know some of the basics, and i have my own hack to...hack, sorry Ryousha but i cant this time

Should I always use checkflag and setflag 0x200?
I never understand these. :(

give this a read Eveon



THIS WAS TAKEN FROM THEx4's SCRIPTING TUTORIAL, credit goes to THEx4

Before I continue. I'm going to just add something on flags.
Flags are very useful when you need an event to only occur once or if you want a person to disappear.
We can set a flag, and if we want an overworld, to dissappear we have to assign the set flag to the OW's, people ID in advancemap. But I'll go into more detail on that later.
Many flags are used within the game already. So if you plan on leaving scripts that are already in the rom, you'll need to be more careful on what flags you use, because flags can only really be used once.
If you want some flags that are not used in the rom as a start, here's a few. 0x200 - 0x29F, 500-79F, 1000-109F. But you'll find more if you experiment with them.

I'll have to do a bit of explaining here, so I'll start with preventing events to happen.


#org $start
lock
faceplayer
checkflag 0x200
if b_true goto $done
message $1
boxset 6
setflag 0x200
release
end

#org $done
message $2
boxset 6
clearflag 0x200
release
end


We've already covered lock and faceplayer, so we'll go to checkflag.
checkflag checks if a flag has been set. Checkflag is usually followed by an if line.
When using the if line after checkflag it contains either a b_true or b_false. b_true, meaning, that if the flag is set goto ${pointer}, and if not it will continue with the script. Similiarly, b_false checks if the flag is NOT set, and if it isn't it will goto ${pointer}, and if the flag is set, the script will continue without going to the pointer.
This pointer used in if b_true goto $done it points to another part of the script as you can see in the script.

As you can see the if b_true goto $done points to a different part of a script as shown with the #org $done
Here we have a message and a new command, clearflag.
Once flags are set they can be "unset" with the command clearflag.
Clearflag has to be followed by the flag number.
And here we are at the end of the script.

But there is more than one way to use a flag. Some flags have some sort of game function. I'll explain that in the next part.


Remember this tutorial(THEx4's) is for pokescript, you will need to change the $ to @ when using XSE, other than that everything else is pretty much the same

JackTheRipper
July 18th, 2008, 10:11 AM
I'm seriously about to lose my head.
I'm so frustrated that i have to search so endlessly for tutorials and information!!
I wish someone would help me!
I made a ROM hack of Leaf Green with Advance Map, Advance Text, Advance Starter, Overworld Editor, XSE, and FSF. When i test my ROM, it always starts out with "The save file is corrupted blah blah" and i can't get rid of that. If i press continue then it goes to a dark red screen. If i press new game then it puts me through the PROF. OAK lecture stuff(which i've been searching to figure out how to change what PROF. OAK says!) and then when i go out of my house it is a black screen and i can't do anything.
And here's the best part.............this all started happening when i tried to put my script from XSE on the game. The compile button that you said to click does not let me click it so i went to batched compiler or something and did it that way and took one of the 2 offsets that it gave me and put it on a sprite that i made from scratch and so now i can't even play my ROM and i feel like giving up and deleting everything!!!!
SOMEONE HELP ME!
................

Ryousha
July 18th, 2008, 10:26 AM
I'm seriously about to lose my head.
I'm so frustrated that i have to search so endlessly for tutorials and information!!
I wish someone would help me!
I made a ROM hack of Leaf Green with Advance Map, Advance Text, Advance Starter, Overworld Editor, XSE, and FSF. When i test my ROM, it always starts out with "The save file is corrupted blah blah" and i can't get rid of that. If i press continue then it goes to a dark red screen. If i press new game then it puts me through the PROF. OAK lecture stuff(which i've been searching to figure out how to change what PROF. OAK says!) and then when i go out of my house it is a black screen and i can't do anything.
And here's the best part.............this all started happening when i tried to put my script from XSE on the game. The compile button that you said to click does not let me click it so i went to batched compiler or something and did it that way and took one of the 2 offsets that it gave me and put it on a sprite that i made from scratch and so now i can't even play my ROM and i feel like giving up and deleting everything!!!!
SOMEONE HELP ME!
................

Geta new one, XSE is still unstable it may break your rom, get used to it.

Theres a reason called:Backs up ;)

Darthatron
July 18th, 2008, 10:32 AM
I'm seriously about to lose my head.
I'm so frustrated that i have to search so endlessly for tutorials and information!!
I wish someone would help me!
I made a ROM hack of Leaf Green with Advance Map, Advance Text, Advance Starter, Overworld Editor, XSE, and FSF. When i test my ROM, it always starts out with "The save file is corrupted blah blah" and i can't get rid of that. If i press continue then it goes to a dark red screen. If i press new game then it puts me through the PROF. OAK lecture stuff(which i've been searching to figure out how to change what PROF. OAK says!) and then when i go out of my house it is a black screen and i can't do anything.
And here's the best part.............this all started happening when i tried to put my script from XSE on the game. The compile button that you said to click does not let me click it so i went to batched compiler or something and did it that way and took one of the 2 offsets that it gave me and put it on a sprite that i made from scratch and so now i can't even play my ROM and i feel like giving up and deleting everything!!!!
SOMEONE HELP ME!
................
Change your Save Type to 128kb, from 64kb. :)
Geta new one, XSE is still unstable it may break your rom, get used to it.

Theres a reason called:Backs up ;)
XSE is much more stable than any other script editor, and it shouldn't screw up your ROM. :P

But still, BACK UP!

Ryousha
July 18th, 2008, 10:34 AM
Change your