The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary Hack Tutorials (https://www.pokecommunity.com/forumdisplay.php?f=66)
-   -   Sierra's MEGA-HUGE XSE Scripting Tutorial (https://www.pokecommunity.com/showthread.php?t=164276)

Phiupp February 17th, 2015 10:01 AM

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 :)

AceRoku February 27th, 2015 3:42 PM

A great tutorial dude. Thanks for this. I might start learning ASM today.

ME604 March 14th, 2015 10:51 AM

Hi! Love your tutorial!!! But my compile button is faded, and I can't click on it... what's wrong with it?

Mana March 14th, 2015 10:54 AM

Quote:

Originally Posted by ME604 (Post 8655383)
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.

Mystelex March 29th, 2015 9:17 AM

Um... The hidepokepic command doesn't work for me. Can someone please help me ?

Mana March 29th, 2015 9:20 AM

Quote:

Originally Posted by ShinyQuilava97(Gold) (Post 8679635)
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.

Mystelex March 29th, 2015 8:58 PM

Anyone ?

Thnx , Magic ! Will someone help me there ?

Hi ?

Spherical Ice March 30th, 2015 8:45 AM

Quote:

Originally Posted by ShinyQuilava97(Gold) (Post 8681318)
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!

asking25 April 2nd, 2015 9:50 AM

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?

chrunch April 2nd, 2015 9:35 PM

Quote:

Originally Posted by asking25 (Post 8686503)
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?

Percy April 2nd, 2015 9:52 PM

Quote:

Originally Posted by asking25 (Post 8686503)
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?

asking25 April 3rd, 2015 6:23 AM

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.

Mana April 3rd, 2015 6:29 AM

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.

destinedjagold April 3rd, 2015 6:34 AM

Quote:

Originally Posted by asking25 (Post 8688116)
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.
http://i60.*.com/mjv2h4.jpg
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.

Blah April 3rd, 2015 6:43 AM

Quote:

Originally Posted by destinedjagold (Post 8688141)
As Magic stated, NPCs that are too far away from the player character will not move.
http://i60.*.com/mjv2h4.jpg
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.

destinedjagold April 3rd, 2015 6:53 AM

Quote:

Originally Posted by FBI agent (Post 8688160)
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.

Mana April 3rd, 2015 7:07 AM

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.

asking25 April 3rd, 2015 7:10 AM

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!

Mystelex April 6th, 2015 3:57 AM

Amazing tutorial! Thanks so much!

zork787 April 16th, 2015 8:24 PM

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.



Mana April 17th, 2015 12:25 AM

Quote:

Originally Posted by zork787 (Post 8710947)
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. :(

zork787 April 17th, 2015 6:39 AM

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

Mystelex April 22nd, 2015 4:24 AM

How to edit the Seagallop animation ?

kearnseyboy6 April 22nd, 2015 5:50 AM

Quote:

Originally Posted by zork787 (Post 8711444)
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 !

U.Flame April 29th, 2015 4:00 PM

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.


All times are GMT -8. The time now is 8:11 PM.


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

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.