Go Back   The PokéCommunity Forums > ROM Hacking > Tools, Tutorials & Resources
Reload this Page [Tutorial] diegoisawesome's MEGA-HUGE XSE Scripting Tutorial

Notices
For all updates, view the main page.

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



Reply
 
Thread Tools
  #1101    
Old February 17th, 2015 (10:01 AM).
Phiupp's Avatar
Phiupp Phiupp is offline
 
Join Date: Jul 2013
Location: German
Gender: Male
Posts: 7
Hola,

after trying and searching for a long time I have to ask now

I've got a problem with healing places.
Is it possible to set them at another place, after I deleted the original Pokémon-Center Lady
When I lose a fight now I am at the map the Poke-Center was (before I edited the map) and my Pokémon get healed but there is no sprite of Joy and it is not the map I want.
Hope you understand what I mean

Now I want to change this "reset point" to another place - so at the Poke-Center I created by my self.
I tried to set it simply with the line "sethealingplace 0x01" in my healing script but like I thought before this one doesn't work.

Hope someone can help me with this problem
Would help a lot
thanks
__________________
it's not about how hard you hit it's about how hard you can get hit!
Reply With Quote
  #1102    
Old February 27th, 2015 (03:42 PM).
AceRoku's Avatar
AceRoku AceRoku is offline
Dev of Pokemon Flare
 
Join Date: Feb 2015
Gender: Male
Posts: 28
A great tutorial dude. Thanks for this. I might start learning ASM today.
__________________
Pokémon Flare - Coming SOON

Looking for scripters,mappers and tile inserters (all sort of persons who can help me) on Pokémon Flare.
If you're interested, feel free to leave me a VM/PM
Reply With Quote
  #1103    
Old March 14th, 2015 (10:51 AM).
ME604 ME604 is offline
 
Join Date: Mar 2015
Posts: 1
Hi! Love your tutorial!!! But my compile button is faded, and I can't click on it... what's wrong with it?
Reply With Quote
  #1104    
Old March 14th, 2015 (10:54 AM).
Mana's Avatar
Mana Mana is online now
ARCHER
ModeratorCS
 
Join Date: Jan 2009
Location: UK
Gender: Male
Posts: 6,066
Quote originally posted by ME604:
Hi! Love your tutorial!!! But my compile button is faded, and I can't click on it... what's wrong with it?
That normally means you need to load the ROM you want to compile. Either by file->open or by clicking the button next to the white box.
__________________
#teamHOENN
Moderator of The Roleplay Theatre
Reply With Quote
  #1105    
Old March 29th, 2015 (09:17 AM).
ShinyQuilava97(Gold)'s Avatar
ShinyQuilava97(Gold) ShinyQuilava97(Gold) is offline
ROM Hacker & Programmer !
 
Join Date: Feb 2015
Location: New Bark Town , Johto
Gender: Male
Nature: Rash
Posts: 76
Um... The hidepokepic command doesn't work for me. Can someone please help me ?
__________________
My Works:



All the Pokémon Manga at Jack Bauer's info !!!



- The Pokécommunity Android app !
Reply With Quote
  #1106    
Old March 29th, 2015 (09:20 AM).
Mana's Avatar
Mana Mana is online now
ARCHER
ModeratorCS
 
Join Date: Jan 2009
Location: UK
Gender: Male
Posts: 6,066
Quote originally posted by ShinyQuilava97(Gold):
Um... The hidepokepic command doesn't work for me. Can someone please help me ?
As in the pokepic stays open? Hmm, post your script in the script help thread and I/someone will have a look :3.
__________________
#teamHOENN
Moderator of The Roleplay Theatre
Reply With Quote
  #1107    
Old March 29th, 2015 (08:58 PM). Edited March 30th, 2015 by Spherical Ice.
ShinyQuilava97(Gold)'s Avatar
ShinyQuilava97(Gold) ShinyQuilava97(Gold) is offline
ROM Hacker & Programmer !
 
Join Date: Feb 2015
Location: New Bark Town , Johto
Gender: Male
Nature: Rash
Posts: 76
Anyone ?

Thnx , Magic ! Will someone help me there ?

Hi ?
__________________
My Works:



All the Pokémon Manga at Jack Bauer's info !!!



- The Pokécommunity Android app !
Reply With Quote
  #1108    
Old March 30th, 2015 (08:45 AM).
Spherical Ice's Avatar
Spherical Ice Spherical Ice is offline
Team Rocket Grunt would like to battle!
ModeratorCS
 
Join Date: Nov 2007
Location: Leicester, UK
Posts: 3,662
Quote originally posted by ShinyQuilava97(Gold):
Hi ?
Hello! I must remind you that this is a forum, and not, say, an IRC channel, and so it may take some time for users to respond to you. Just be patient and I'm sure they'll get to you quickly!

As for your problem, it would help if you posted the entire script over here in the Script Help Thread. Good luck!
__________________

"Develop amnesia conveniently and forget everything you've heard!"
spheal clicker | rom hacking | pokémon gaia
staff antagonists collab 2015
Reply With Quote
  #1109    
Old April 2nd, 2015 (09:50 AM).
asking25 asking25 is offline
 
Join Date: Aug 2014
Gender: Male
Posts: 6
Hello, I am new to scripting and I have a problem in applying movement, I made a script that only happens a mistake. The idea of the script was a character walking up to me I deliver a master ball and then back to the starting point and it disappears, it happens and the sprit is on my screen the gba .. but when I put the A-map out of my screen (in the case of GBA) the script but happen! character not walk up to me.

Does anyone know why?
Reply With Quote
  #1110    
Old April 2nd, 2015 (09:35 PM).
chrunch's Avatar
chrunch chrunch is offline
Silver Tier
 
Join Date: Oct 2009
Gender: Male
Posts: 1,118
Quote originally posted by asking25:
Hello, I am new to scripting and I have a problem in applying movement, I made a script that only happens a mistake. The idea of the script was a character walking up to me I deliver a master ball and then back to the starting point and it disappears, it happens and the sprit is on my screen the gba .. but when I put the A-map out of my screen (in the case of GBA) the script but happen! character not walk up to me.

Does anyone know why?
I'm not sure I understand what you're saying. Does the script actually work when you test it out? Does the game freeze or does the script just not start?
__________________
Reply With Quote
  #1111    
Old April 2nd, 2015 (09:52 PM).
Percy's Avatar
Percy Percy is offline
Let's moonwalk, sha'mone!
 
Join Date: Sep 2014
Location: Somewhere in the world, obviously
Gender: Male
Nature: Gentle
Posts: 2,207
Quote originally posted by asking25:
Hello, I am new to scripting and I have a problem in applying movement, I made a script that only happens a mistake. The idea of the script was a character walking up to me I deliver a master ball and then back to the starting point and it disappears, it happens and the sprit is on my screen the gba .. but when I put the A-map out of my screen (in the case of GBA) the script but happen! character not walk up to me.

Does anyone know why?
We're confused. Can you post the actual script?
__________________
Pair | #TeamTrivia
Reply With Quote
  #1112    
Old April 3rd, 2015 (06:23 AM).
asking25 asking25 is offline
 
Join Date: Aug 2014
Gender: Male
Posts: 6
My Script
Spoiler:

#dynamic 0x71F878

#org @start
msgbox @talk1 0x6
playsong 0x011A 0x0
applymovement 16 @walk1
waitmovement 16
msgbox @talk2 0x6
giveitem 0x1 1 0x0
msgbox @talk3 0x6
applymovement 16 @walk2
waitmovement 16
hidesprite 16
setvar 0x6000 0x1
setflag 0x1206
fadesong 0x012C
release
end

#org @talk1
= Wait....

#org @talk2
= You need PokeBall? Take This.

#org @talk3
= BYE BYE!!

#org @walk1
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0xFE

#org @walk2
#raw 0x10
#raw 0x10
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0xFE


It works perfectly when the Sprite that will move is within the scope of the GBA screen, but when I put away 10 steps (getting out of the GBA in game screen) it does not go to me, the script msg giveitem and hidesprite work, but she does not go to me.

but when I put the sprite in the range of vision of my character in game, it moves perfectly.
Reply With Quote
  #1113    
Old April 3rd, 2015 (06:29 AM).
Mana's Avatar
Mana Mana is online now
ARCHER
ModeratorCS
 
Join Date: Jan 2009
Location: UK
Gender: Male
Posts: 6,066
OWs that are too far off screen won't be able to move during the script, I can't remember it movesprite works - easiest way would be to make the OW so it is just one tile offscreen, that should work.
__________________
#teamHOENN
Moderator of The Roleplay Theatre
Reply With Quote
  #1114    
Old April 3rd, 2015 (06:34 AM).
destinedjagold's Avatar
destinedjagold destinedjagold is online now
Oh Hai Thar~ 'ω'
Silver Tier
 
Join Date: May 2007
Location: Philippines
Gender: Male
Nature: Careful
Posts: 7,247
Quote originally posted by asking25:
My Script
Spoiler:

#dynamic 0x71F878

#org @start
msgbox @talk1 0x6
playsong 0x011A 0x0
applymovement 16 @walk1
waitmovement 16
msgbox @talk2 0x6
giveitem 0x1 1 0x0
msgbox @talk3 0x6
applymovement 16 @walk2
waitmovement 16
hidesprite 16
setvar 0x6000 0x1
setflag 0x1206
fadesong 0x012C
release
end

#org @talk1
= Wait....

#org @talk2
= You need PokeBall? Take This.

#org @talk3
= BYE BYE!!

#org @walk1
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0xFE

#org @walk2
#raw 0x10
#raw 0x10
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0xFE


It works perfectly when the Sprite that will move is within the scope of the GBA screen, but when I put away 10 steps (getting out of the GBA in game screen) it does not go to me, the script msg giveitem and hidesprite work, but she does not go to me.

but when I put the sprite in the range of vision of my character in game, it moves perfectly.
As Magic stated, NPCs that are too far away from the player character will not move.

The range of an NPC for them to move is 1-9 tiles away from the player's left/right, and 1-6(or maybe 7?) from the player's north/south.
__________________


3DS FC: 0061-1111-6462
TSV: 1364(X), 0790(OR)

~Serge,
Chrono Cross


Reply With Quote
  #1115    
Old April 3rd, 2015 (06:43 AM).
FBI agent's Avatar
FBI agent FBI agent is offline
If my PM box is full, VM instead :x
 
Join Date: Jan 2013
Location: Unknown Island
Gender: Male
Posts: 826
Quote originally posted by destinedjagold:
As Magic stated, NPCs that are too far away from the player character will not move.

The range of an NPC for them to move is 1-9 tiles away from the player's left/right, and 1-6(or maybe 7?) from the player's north/south.
Is this true for when you're using the move camera specials as well? I'm wondering if that has to do with the player avatar or the camera itself.
__________________
...

My name forum name is FBI Agent, though you can call me FBI because it's shorter.

Some of my stuff:
ASM request/resource thread
ASM tutorials thread
ASM Workshop
Reply With Quote
  #1116    
Old April 3rd, 2015 (06:53 AM).
destinedjagold's Avatar
destinedjagold destinedjagold is online now
Oh Hai Thar~ 'ω'
Silver Tier
 
Join Date: May 2007
Location: Philippines
Gender: Male
Nature: Careful
Posts: 7,247
Quote originally posted by FBI agent:
Is this true for when you're using the move camera specials as well? I'm wondering if that has to do with the player avatar or the camera itself.
No idea. Never crossed that bridge before. :/
But in theory, it should work. Since the player and the camera are locked all the time, and probably created this 'illusion' that the NPCs could only work around a specific radius from the player, so maybe the camera's actually the one's important here for NPCs to move.
__________________


3DS FC: 0061-1111-6462
TSV: 1364(X), 0790(OR)

~Serge,
Chrono Cross


Reply With Quote
  #1117    
Old April 3rd, 2015 (07:07 AM).
Mana's Avatar
Mana Mana is online now
ARCHER
ModeratorCS
 
Join Date: Jan 2009
Location: UK
Gender: Male
Posts: 6,066
You can move the camera and still move NPCs normally, from my experience. I don't think it's solely down to luck that they're in range, so the scope is probably judged from the center of the camera position.
__________________
#teamHOENN
Moderator of The Roleplay Theatre
Reply With Quote
  #1118    
Old April 3rd, 2015 (07:10 AM).
asking25 asking25 is offline
 
Join Date: Aug 2014
Gender: Male
Posts: 6
Oh thank you, at least I know that the script is correct, only 2 more questions.

is there any way I banter with script it? eg a script that makes another sprite like another appears on the screen? would practically the same than my sprite forward to my screen.

does anyone know a script for me to do rematch? I know I'll probably use SetFlags out the basic commands, but I found no tutorial on the internet.

Thank U!
Reply With Quote
  #1119    
Old April 6th, 2015 (03:57 AM).
ShinyQuilava97(Gold)'s Avatar
ShinyQuilava97(Gold) ShinyQuilava97(Gold) is offline
ROM Hacker & Programmer !
 
Join Date: Feb 2015
Location: New Bark Town , Johto
Gender: Male
Nature: Rash
Posts: 76
Awesome tutorial !
__________________
My Works:



All the Pokémon Manga at Jack Bauer's info !!!



- The Pokécommunity Android app !
Reply With Quote
  #1120    
Old April 16th, 2015 (08:24 PM).
zork787's Avatar
zork787 zork787 is offline
 
Join Date: Oct 2012
Gender: Male
Posts: 15
Ok so I'm adding some custom items to my hack and when I try to compile my item description it gives me a "Error 6 Overflow on line 4 Wrong parameter type" error and I don't think my code is wrong but I dunno whats going on

Code:
'-----------------------
#dynamic 0x634906
#org @string
= A peculiar stone that makes certain\nspecies of POKeMON evolve.\lIt shines with a dazzling light.
Reply With Quote
  #1121    
Old April 17th, 2015 (12:25 AM).
Mana's Avatar
Mana Mana is online now
ARCHER
ModeratorCS
 
Join Date: Jan 2009
Location: UK
Gender: Male
Posts: 6,066
Quote originally posted by zork787:
Ok so I'm adding some custom items to my hack and when I try to compile my item description it gives me a "Error 6 Overflow on line 4 Wrong parameter type" error and I don't think my code is wrong but I dunno whats going on

Code:
'-----------------------
#dynamic 0x634906
#org @string
= A peculiar stone that makes certain\nspecies of POKeMON evolve.\lIt shines with a dazzling light.
Hmm. Try copy and pasting the script in your post over the entire script you have in XSE (ctrl+A to make sure you highlight eeeeverything).

Sometimes XSE has a mishap. I copy and pasted your script and it debugged just fine for me.
__________________
#teamHOENN
Moderator of The Roleplay Theatre
Reply With Quote
  #1122    
Old April 17th, 2015 (06:39 AM). Edited April 17th, 2015 by zork787.
zork787's Avatar
zork787 zork787 is offline
 
Join Date: Oct 2012
Gender: Male
Posts: 15
well I redownloaded XSE and my code worked that time, mustve been a bug with teh version I was using.

Edit: Well I seem to have run into anotehr snag, I've managed to successfully impliment the Dawn, Dusk and Shiny stones but there text is kinda messed up http://gyazo.com/92547a1abd9b40e256f25dbe521218f1 and yet in the editing programs they appear fine
Reply With Quote
  #1123    
Old April 22nd, 2015 (04:24 AM).
ShinyQuilava97(Gold)'s Avatar
ShinyQuilava97(Gold) ShinyQuilava97(Gold) is offline
ROM Hacker & Programmer !
 
Join Date: Feb 2015
Location: New Bark Town , Johto
Gender: Male
Nature: Rash
Posts: 76
How to edit the Seagallop animation ?
__________________
My Works:



All the Pokémon Manga at Jack Bauer's info !!!



- The Pokécommunity Android app !
Reply With Quote
  #1124    
Old April 22nd, 2015 (05:50 AM).
kearnseyboy6's Avatar
kearnseyboy6 kearnseyboy6 is offline
Aussie's Toughest Mudder
 
Join Date: Dec 2008
Posts: 294
Quote originally posted by zork787:
well I redownloaded XSE and my code worked that time, mustve been a bug with teh version I was using.

Edit: Well I seem to have run into anotehr snag, I've managed to successfully impliment the Dawn, Dusk and Shiny stones but there text is kinda messed up http://gyazo.com/92547a1abd9b40e256f25dbe521218f1 and yet in the editing programs they appear fine
I'm not 100% sure on the accents or anything but I saw your code incorrectly used the \l command as it pushes the text up and away:

First Line
\nSecond Line
\nThird Line

Also make sure you compile in free space and fix the pointers appropritely !
__________________
HOLIDAYING CURRENTLY!!
Reply With Quote
  #1125    
Old April 29th, 2015 (04:00 PM).
U.Flame's Avatar
U.Flame U.Flame is offline
Brony Hacker
 
Join Date: Jun 2008
Location: Sapphire City in future Hoenn
Age: 19
Gender: Male
Nature: Jolly
Posts: 1,220
I found a command that's not covered in the tutorial nor did I find a mention of it in the thread. It's "PLAYERFACING", a handy command that allows the script to differentiate depending on the direction the player is facing. I found it in the Black Glasses guy.
Spoiler:
'---------------
#org 0x150B23
lock
faceplayer
checkitem 0xCE 0x1
compare LASTRESULT 0x1
if 0x1 goto 0x8150B5E
special2 LASTRESULT 0x13C
compare LASTRESULT 0x1
if 0x1 goto 0x8150B4F
msgbox 0x817087E MSG_KEEPOPEN '"I dropped my glasses...\nCan you h..."
release
end

'---------------
#org 0x150B5E
msgbox 0x817087E MSG_KEEPOPEN '"I dropped my glasses...\nCan you h..."
msgbox 0x81708B1 MSG_KEEPOPEN '"Those glasses!\nMay I see them for..."
special2 LASTRESULT 0x13C
compare LASTRESULT 0x1
if 0x1 goto 0x8150B88
msgbox 0x8170993 MSG_KEEPOPEN '"Hmm...\nThese are BLACKGLASSES.\lT..."
release
end

'---------------
#org 0x150B4F
msgbox 0x8170947 MSG_KEEPOPEN '"Hmm...\nI can't find my glasses an..."
closeonkeypress
goto 0x8150B97

'---------------
#org 0x150B88
msgbox 0x81708DD MSG_KEEPOPEN '"Hmm...\nThese are BLACKGLASSES.\lT..."
closeonkeypress
goto 0x8150B97

'---------------
#org 0x150B97
pause 0x14
compare PLAYERFACING 0x2
if 0x1 call 0x8150BCB
compare PLAYERFACING 0x1
if 0x1 call 0x8150BCB
compare PLAYERFACING 0x3
if 0x1 call 0x8150BCB
compare PLAYERFACING 0x4
if 0x1 call 0x8150BD6
hidesprite LASTTALKED
release
end

'---------------
#org 0x150BCB
applymovement LASTTALKED 0x8150BE1
waitmovement 0x0
return

'---------------
#org 0x150BD6
applymovement LASTTALKED 0x8150BEB
waitmovement 0x0
return


'---------
' Strings
'---------
#org 0x17087E
= I dropped my glasses...\nCan you help me find them?

#org 0x1708B1
= Those glasses!\nMay I see them for a second?

#org 0x170993
= Hmm...\nThese are BLACKGLASSES.\lThey're not what I'm looking for...

#org 0x170947
= Hmm...\nI can't find my glasses anywhere...\lMaybe they're not around here...

#org 0x1708DD
= Hmm...\nThese are BLACKGLASSES.\lThey're not what I'm looking for...\pMaybe my glasses aren't around\nhere...


'-----------
' Movements
'-----------
#org 0x150BE1
#raw 0xA 'Step Left (Normal)
#raw 0xA 'Step Left (Normal)
#raw 0xA 'Step Left (Normal)
#raw 0xA 'Step Left (Normal)
#raw 0xA 'Step Left (Normal)
#raw 0xA 'Step Left (Normal)
#raw 0xA 'Step Left (Normal)
#raw 0xA 'Step Left (Normal)
#raw 0xA 'Step Left (Normal)
#raw 0xFE 'End of Movements

#org 0x150BEB
#raw 0x9 'Step Up (Normal)
#raw 0xA 'Step Left (Normal)
#raw 0xA 'Step Left (Normal)
#raw 0xA 'Step Left (Normal)
#raw 0xA 'Step Left (Normal)
#raw 0xA 'Step Left (Normal)
#raw 0xA 'Step Left (Normal)
#raw 0xA 'Step Left (Normal)
#raw 0xA 'Step Left (Normal)
#raw 0xA 'Step Left (Normal)
#raw 0xFE 'End of Movements


As you can see, it's used with:
"compare PLAYERFACING 0xX
if 0x1 call @string"

The X in 0xX is dependent on the direction the player is facing. After some experimenting, I found that 0x1 is facing down, 0x2 is facing up, 0x3 is facing left, and 0x4 is facing right.
__________________
Hacks I'm currently working on:
Pokemon Sapphire Hoenn's Ruin - My own hack, actively making progress.
3rd Gen Multiplayer Project - Research and development, occasionally testing, sometimes with support.
Pokemon Ruby Destiny Broken Timeline - Mapping assigned maps, slow pace at the moment.
Pokemon Cursed/Creepy White - Group project, on hiatus for now with plans to return eventually.

Times I've been ninja'd: 18
Times I've ninja'd people: 3
Reply With Quote
Reply
Quick Reply

Sponsored Links

You may also like.. (Beta)
Thread Tools

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

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

Forum Jump


All times are UTC -8. The time now is 12:32 AM.