Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.
Help, I Have NO Expirience In Scripting But I Wanna Insert A Script, But A-Map Is Asking Me For All These Offsets And I Dunno What To Do
Sorry For Being A Meganoob
Please Help
I just recently started scripting so forgive me if I'm doing this completely wrong.
I'm trying to make a script that won't let the player walk pass a certain point until he gets a Pokemon.
It's just supposed to make the player move 1 space left and display a message saying you can't go into the tall grass without a Pokemon.
Code:
#org $script
lock
message $warning
$warning 1 = I shouldn't go into the tall grass without a POKEMON..
boxset 6
applymovement 0xFF $move
$move 1 ; #binary 0x02 0xFE
pausemove 0x0000
release
end
But it this script just crashes my game and I don't know why.
Can someone tell me what I'm doing wrong and help me out? Thanks in advance
#org $script
lock
message $warning
$warning 1 = I shouldn't go into the tall grass without a POKEMON..
boxset 6
applymovement 0xFF $move
$move 1 ; #binary 0x02 0xFE
pausemove 0x0000
release
end
What program are you using? I use XSE, and if you don't any my help doesn't work, sorry.
First off, things like $warning and $move should be moved down under the original script (put in #org $warning and then the message, and #org $move and then the action.)
2. Moving. After #org $move, use #raw instead of #binary. The 0x02 and 0xFE work ^^
3. Instead of pausemovement, use waitmovement.
4. If you want to wait to make them get a pokemon, you need to check the givepokemon script for a setflag code. If you're directly replacing the Oak stops you script, you'll have to dig around (or ask another question) for the flag number.
That should cover it.
Now, my question: Whats the variable or flag for Oak giving you a pokemon? If no flag or variable, how (in directions, not code) would I change it so a script like above would click off when Oak hands you a pokemon?
#org $script
lock
message $warning
$warning 1 = I shouldn't go into the tall grass without a POKEMON..
boxset 6
applymovement 0xFF $move
$move 1 ; #binary 0x02 0xFE
pausemove 0x0000
release
end
What program are you using? I use XSE, and if you don't any my help doesn't work, sorry.
I use poketscript not XSE but i don't think it matters.
First off, things like $warning and $move should be moved down under the original script (put in #org $warning and then the message, and #org $move and then the action.)
Now, my question: Whats the variable or flag for Oak giving you a pokemon? If no flag or variable, how (in directions, not code) would I change it so a script like above would click off when Oak hands you a pokemon?[/QUOTE]
[FONT=Segoe UI]The Flag is 0x828. That activates the Pokémon menu when you are given a Pokémon. So you would use it like this:
[I]givepokemon PKMN_CHARMANDER 0x5 ITEM_ORANBERRY
setflag 0x828
//[/I][/FONT][I]fanfare 0x13E
[FONT=Segoe UI]//msgbox @received_poke 0x4[/FONT]
//waitfanfare
release
end[/I]
The "//" indicate optional, but optimal commands for a givepokemon script.
And the easiest way to check off whether Prof. Oak gives you a Pokémon is to use Setflag, or if you're advanced, setvar. But setflag is easier to understand.. So you pick a flag (eg. 1000) and use it: "setflag 0x1000".
Now, just doing that is just... useless Lol. You'd have to check it with checkflag;
[I]checkflag 0x1000
if 0x1(true) goto @gave_poke[/I]
Simple enough, right?
[QUOTE="RainDogg54, post: 5219496, member: 177556"]I use poketscript not XSE but i don't think it matters.
Ok so do you mean I should put this?
[CODE]#org $warning
message $warning
$warning 1 = I shouldn't go into the tall grass without a POKEMON..
and then do the same with $move?
Sorry I'm very new at this I'm still learning.
And I'm going to add the checkflag after I get this part of the script working
Using XSE over Pokescript does matter.. It's the amount of help you'll get as a beginner, and the ease of using one as a beginner. But you're choice is your choice. Right click, compile in Notepad < XSE compiling on spot with one click of a button
Code:
[B]#org $warning
$warning 1 =[/B] I shouldn't go into the tall grass without a POKEMON..
This would be right. But I'll allow romancandle to help you more, because I don't know pokescript that well. :\
Do certain flags not work? I tried using the numbers 7 and 900 among others in the person ID field, and the person did not disappear after a setflag line (yes I had a hidesprite working).
Then, ONLY changing the flag and ID to others (20, 28, 29, 2A), it worked perfectly.
Do certain flags not work? I tried using the numbers 7 and 900 among others in the person ID field, and the person did not disappear after a setflag line (yes I had a hidesprite working).
Then, ONLY changing the flag and ID to others (20, 28, 29, 2A), it worked perfectly.
That's exactly how it is. Some of the flags, are used by the game already.
Check you're XSE guide to see which ones are in use, meaning anyone not listed, is available to you. And there are many..
#org $warning
$warning 1 = I shouldn't go into the tall grass with a POKEMON..
This is the correct way to do messages. The 2nd $warning (left of the 1) is not necessary, but it won't hurt (from my experience). You'll need to expand the first #org though. Like this:
Spoiler:
#org $start
lock
message $warning 0x6
release
end
#org $warning
1 = I shouldn't go into the tall grass with a POKEMON..
The 0x6 makes it a normal textbox message.
Move Script:
Spoiler:
The move script will look like:
Code:
#org $move
#raw 0x02 0xFE
or
Code:
#org $move
#raw 0x02
#raw 0xFE
Both are correct, and if you use the first style, when you compile the script to the ROM, at least in XSE, it'll automatically convert it to the 2nd style.
Let us know if you need help with the flag part too ^^
Well, it's been awhile since I posted here...
Alright, this is a very, very basic XSE roadblock script. The only problem I have is that the applymovement doesn't work, so there's really no point to the script. I've already set the unknown and var number to the correct values (0003 and 4050), so I'm not sure what the problem is.
Script:
Spoiler:
#dynamic 0x800000
#org @noleave
checkflag 0x1001
if 0x1 goto @done
msgbox @notyet 0x6
applymovement 0xFF @stepaway
releaseall
end
#org @done
end
#org @notyet
= ...better see Gardevoir first...
#org @stepaway
#raw 0x10
#raw 0xFE
Okay, I'll try it that way. Thanks!
EDIT: LOL, Cooley, you know better! The script worked alright, but you added setflag! It's a roadblock, so I don't want to setflag with this script. Bad Cooley!
Seriously though, thanks. This was enlightening.
Script Type: Trainerbattle, Applymovement, Msgbox Script Editor: eXtreme Script Editor [XSE] Script Problem: After the battle, the game freezes. Script:
Comments: I removed the text because... I don't really know why, as I'm going to release screenshots with them in anyway. But, meh, it shortens the scripts length, so who cares?
Script Type: Trainerbattle, Applymovement, Msgbox Script Editor: eXtreme Script Editor [XSE] Script Problem: After the battle, the game freezes. Script:
Comments: I removed the text because... I don't really know why, as I'm going to release screenshots with them in anyway. But, meh, it shortens the scripts length, so who cares?
For these kind of trainerbattles, with the script continueing after the battle, I always use trainerbattle 0x1 instead of 0x0, and I think that's your problem. Try the changes made in bold that I added to the above script and see if that helps.
Game: Fire Red Type: Trigger Editor: Pokescript Script:
Spoiler:
#org $script
lock
checkflag 0x828
if 0x01 goto $flag
applymovement 12 $move
$move 1 ; #binary 0x62 0x18 0x18 0x18 0x18 0xFE
pausemove 0x0000
message $talk
$talk 1 = Hello there.\nI heard from my collegue\lProfessor Oak, that you are\nbeginning your journey.\pI've got some help from\nProf. Oak, Prof. Birch and Prof. Elm\lto get these starters for you.\pSo choose wisely.
msgbox 6
release
end
#org $flag
end
Screenshots and/or Videos: Can't give you pics yet because of 15 post lock
I made a script tile after oaks door
When I go through that door, nothing happens and when i step up and down, the game freezes...
I made a XSE script too:
'---------------
#org 0x80145B
checkflag 0x828
if 0x1 goto 0x8801480
applymovement 0x9 0x8801481
msgbox 0x8801487 MSG_NORMAL '"Hello there.\nI heard from my coll..."
release
end
'---------------
#org 0x801480
end
'---------
' Strings
'---------
#org 0x801487
= Hello there.\nI heard from my collegue\lProfessor Oak, that you are\nbeginning your journey.\pI've got some help from\nProf. Oak, Prof. Birch and Prof. Elm\lto get these starters for you.\pSo choose wisely.
'-----------
' Movements
'-----------
#org 0x801481
#raw 0x62 'Exclamation Mark (!)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0xFE 'End of Movements
Game: Fire Red Type: Trigger Editor: Pokescript Script:
Spoiler:
#org $script
lock
checkflag 0x828
if 0x01 goto $flag
applymovement 0x12 $move
$move 1 ; #binary 0x62 0x18 0x18 0x18 0x18 0xFE
pausemove 0x0000
message $talk
$talk 1 = Hello there.\nI heard from my collegue\lProfessor Oak, that you are\lbeginning your journey.\pI've got some help from\nProf. Oak, Prof. Birch and Prof. Elm\lto get these starters for you.\pSo choose wisely.
msgbox 6
release
end
#org $flag
end
Screenshots and/or Videos: Can't give you pics yet because of 15 post lock
Okay, so I'm not a big Pokescript fan, but I've used it before and I think I can see a few problems with your script. Changes in bold. Remember to always use hex numerals, I think that's the issue here.
Also, you might need to seperate your move command like a msgbox, but I'm not sure (you do in XSE...)
Seriously, change to XSE. It's way better, and very, very easy to learn if you already know Pokescript.
...Yeah, don't know enough about Pokescript to change more than that...
I made a script tile after oaks door
When I go through that door, nothing happens and when i step up and down, the game freezes...
I made a XSE script too:
Spoiler:
'---------------
#org 0x80145B lockall-(this might not be necessary, but it helps)
checkflag 0x828
if 0x1 goto 0x8801480
applymovement 0x9 0x8801481 waitmovement 0x0
msgbox 0x8801487 MSG_NORMAL '"Hello there.\nI heard from my coll..."
releaseall
end
'---------------
#org 0x801480 releaseall
end
'---------
' Strings
'---------
#org 0x801487
= Hello there.\nI heard from my colleague\lProfessor Oak, that you are\lbeginning your journey.\pI've got some help from\nProf. Oak, Prof. Birch and Prof. Elm\lto get these starters for you.\pSo choose wisely.
'-----------
' Movements
'-----------
#org 0x801481
#raw 0x62 'Exclamation Mark (!)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0xFE 'End of Movements
Oh, this is the same thing. In XSE. Cool. :)
I take it you extracted this from the game. When you edit and reinsert this, copy, paste, and compile it. DO NOT try to decompile, edit, then recompile it.
Umm, why are the targets for applymovement different in both scripts?
By the way, if you apply the changes above, the script will work if you step onto it after entering the map, but it still will not work right when you enter the lab. For that, you need a Level script; Cooley's done two absolutely terrific tutorials on level scripting, look them up.
That's all I can think of for that.
My own problem:
Spoiler:
#dynamic 0x800000
#org @rival1
lockall
checkflag 0x100B
if 0x1 goto @done
msgbox @hey 0x6
applymovement 0x1 @walkdown
waitmovement 0x0
msgbox @who 0x6
trainerbattle 0x1 0x001 0x0 @begin @end @after
releaseall
end
#org @after
msgbox @noway 0x6
applymovement 0x1 @thinking
waitmovement 0x0
msgbox @noway2 0x6
applymovement 0x1 @donethinking
waitmovement 0x0
msgbox @goodbye 0x6
applymovement 0x1 @leaving
waitmovement 0x0
hidesprite 0x1
setflag 0x100B
release
end
#org @done
releaseall
end
#org @hey
= Hey, what're you doing out here?
#org @who
= Who're you? And how'd you get\nout here? There aren't supposed\lto be any humans living out this\lfar!\p...\n...\l...\lWhat, never seen another human\lbeing before? Speak up!\p...\nWHAT?!\lYou can't be serious. How can\lanyone be raised by Pok\h1bmon?!\p...And you've got Pok\h1bballs on\nyour belt, where'd you get those?\pA Pok\h1bmon gave them to you?\nAre you crazy? Pok\h1bmon don't\leven understand English! You can't\ltalk to a Pok\h1bmon!\pAlright, I'm tired of this. You\nmust be a Trainer, so let's\lbattle!\p...you...don't...know...what...\na...battle...is...\p..........................\n......................\pWHAT IS WRONG WITH YOU?!\p...(Sheesh, maybe all that talk\nwas true after all. If it\lwas, I'll beat this rookie easily...)\pAlright then, I'll show you how\nto battle. Send out your Pok\h1bmon!
#org @begin
= Ready, go!
#org @end
= Impossible! You must have been\nlying to me!
#org @noway
= WHAT! I LOST?!\p...Liar! There's no way this was\nyour first battle! I refuse\lto accept it!\p...Urk, I can't believe I lost...
#org @noway2
= (But then, if that story was a lie...\phow...all the way out here...
#org @goodbye
= Fine then, I'll head back to\nFrontier Town. Next time, I won't\lgo so easy on you!
#org @walkdown
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0xFE
The applymovement target doesn't walk down like I want him to. People # is 100B, so he vanishes right, and event # is 1. Oh, Unknown is 3, Movement 11, and on the script itself, unknown 3 var number 4050.