Alexander Nicholi
what do you know about computing?
- 5,500
- Posts
- 15
- Years
- Age 27
- Research Triangle / Jakarta
- Seen Sep 22, 2024
Yes, just use 0x1 for the quantity.Does the checkitem command check for keyitems ?
Yes, just use 0x1 for the quantity.Does the checkitem command check for keyitems ?
Spoiler:spoiler tags
'---------------
#org @start
checkflag 0x8
if 0x0 goto @snippet1
checkflag 0x9
if 0x0 goto @snippet2
hidesprite 0x1
release
end
'---------------
#org @snippet1
applymovement MOVE_PLAYER @move1
waitmovement 0x0
msgbox @string1 MSG_NORMAL '"[rival]:Bist du es [player]?\nZum ..."
setflag 0x901
release
end
'---------------
#org @snippet2
msgbox @string2 MSG_NORMAL '"Hey, jetzt nimm dir eins!"
applymovement MOVE_PLAYER @move2
release
end
'---------
' Strings
'---------
#org @string1
= [rival]:Bist du es [player]?\nZum Glück bist du hier!\p[rival] : Du weisst gar nicht was hier \npassiert ist!\pGanz normaler Tag und auf einmal stürmt Team\nRocket Alabastia und nimmt alle gefangen.\pProfessor Eich bat mich deshalb diese\nPokebälle zu verstecken, aber\pum hier irgendwas zu bewirken\nbrauchen wir die Hilfe dieser Pokemon.\pSuch dir schon mal eins aus!
#org @string2
= Hey, jetzt nimm dir eins!
'-----------
' Movements
'-----------
#org @move1
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x11 'Step Up (Normal)
#raw 0xFE 'End of Movements
#org @move2
#raw 0x10 'Step Down (Normal)
#raw 0xFE 'End of Movements
Well Hi I´m pretty new to Romhacking and wanted to try play around my Firered Romand and now got stuck with my Script :/ It´s at the old Spawnpoint since i moved the Spawn over to the Rival´s house. The script should move the player towards the "rival" and shouldnt let him go out of the room before he picked his starter. Now if I walk on the script the game stops and only the music is playing. Someone see the mistake?:/
Thanks!Yes, just use 0x1 for the quantity.
This script is supposed to move an NPC and have my character follow it, but only my character moves while the NPC stays in place.
Spoiler:
#dynamic 0x801000
#org @main
checkflag 0x100
if 0x1 goto @done
applymovement 0x8 @lookright
applymovement 0xFF @lookleft
waitmovement 0
msgbox @0 0x6
applymovement 0x8 @movepc
applymovement 0xFF @movepcu
waitmovement 0
msgbox @1 0x6
applymovement 0x8 @movepm
applymovement 0xFF @movepm
waitmovement 0
msgbox @2 0x6
setflag 0x100
release
end
#org @done
release
end
#org @lookright
#raw 0x03
#org @lookleft
#raw 0x02
#raw 0xFE
#org @0
= Welcome to PEWTER CITY!\nAllow me to show you\paround!
#org @1
= Over there is the\nPOKEMON CENTER! You can heal\pyour POKEMON there.
#org @2
= That is the POKEMART!\nYou can buy supplies and\pPOKEBALLS there.
#org @movepc
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x02
#raw 0xFE
#org @movepcu
#raw 0x12
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x02
#raw 0xFE
#org @movepm
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x03
#raw 0xFE
This is for a Fire Red ROM and I'm using XSE. It worked correctly until I updated it and added a separate character movement.
#org @lookright
#raw 0x03
You have this going on:
Code:#org @lookright #raw 0x03
Since you missed the #raw 0xFE, the ROM never stops searching for movements and therefore loads junk, meaning the rest of the movements for that player will either fail or go incorrectly.
For both this and your previous question, you need to call an asm routine that writes graphics data to Video Ram. It's not all that difficult to do, but requires a little bit of asm and coding knowledge. The following might work fine, but I can't say for sure;I have another question. In a script, is there a way to make the main character do the animation for using the Vs. Seeker?
For both this and your previous question, you need to call an asm routine that writes graphics data to Video Ram. It's not all that difficult to do, but requires a little bit of asm and coding knowledge. The following might work fine, but I can't say for sure;
1. Check where the graphics data, of the sprite you want to change, is loaded in Video RAM (VBA can show you this).
2. Make sure that the address in that situation is always the same. If some people events in that map can be hidden and their graphics are thus possibly not loaded, the address may vary. If the address isn't always the same, you have to "adjust" the address based on the situation (= done in asm routine).
3. Draw a new sprite and put it somewhere in the rom.
4. Call an asm routine which you tell to copy the graphics data of that new sprite and paste it to the ram address in Video Ram where the graphics you wanted to replace is located.
This may or may not work. The reason why it might not work properly is related to how graphics data is loaded to Video Ram - you might not be able to write to Video Ram by copy pasting anytime you like to. Wouldn't work in a GB/C game, but could possibly work in GBA.
For doing the same animation Vs. Seeker does (if I understood your question correctly), just check how it changes the player's sprite. There may be a script related to using Vs. Seeker, or a just a pure asm routine. If it is handled by a script, the script may call asm routines for sprite changing for instance though.
Hello, I have a question about Emerald. How do I change Steven's battle music back to the Champion theme, and how do I make him re-fightable?
This is the script that XSE has given me when I click on Steven in Meteor Falls:
Spoiler:
'---------------
#org 0x23B182
lock
checkflag 0x4F8
if 0x1 goto 0x823B1CD
checksound
sound 0x15
applymovement 0x1 0x8272598
waitmovement 0x0
applymovement 0x1 0x827259A
waitmovement 0x0
applymovement 0x1 0x827259E
waitmovement 0x0
msgbox 0x823B1E1 0x4 '"Steven: Oh, wow, [player]\v\h05.\n..."
trainerbattle 0x3 0x324 0x0 0x823B32D
msgbox 0x823B358 0x4 '"Steven: Come to think of it, ever ..."
setflag 0x4F8
release
end
'---------------
#org 0x23B1CD
applymovement 0x1 0x827259E
waitmovement 0x0
msgbox 0x823B358 0x4 '"Steven: Come to think of it, ever ..."
release
end
'---------
' Strings
'---------
#org 0x23B1E1
= Steven: Oh, wow, [player]\v\h05.\nI'm amazed you knew where to find me.\pDo you, uh[.]maybe think of me as\njust a rock maniac?\pNo, that can't be right.\pWe battled alongside each other at\nthe Sootopolis Space Center.\pYou should have a very good idea\nabout how good I am.\pOkay, [player]\v\h05, if you're going to mount\na serious challenge, expect the worst!
#org 0x23B32D
= You[.]\nI had no idea you'd become so strong[.]
#org 0x23B358
= Steven: Come to think of it, ever since\nour paths first crossed in Granite\lCave in Dewford, I had this feeling.\pI thought that you would eventually\nbecome the Champion.\pMy predictions usually come true.\pAnd where will you go from here?\p[.] [.] [.] [.] [.] [.]\n[.] [.] [.] [.] [.] [.]\pFufufu, even I couldn't tell you that.
'-----------
' Movements
'-----------
#org 0x272598
#raw 0x56 'Exclamation Mark (!)
#raw 0xFE 'End of Movements
#org 0x27259A
#raw 0x14 'Delay5
#raw 0x14 'Delay5
#raw 0x14 'Delay5
#raw 0xFE 'End of Movements
#org 0x27259E
#raw 0x3E 'Face Player
#raw 0xFE 'End of Movements
Any help would be greatly appreciated.
Simply removing the flag check altogether would save more space, and in any case you'd need to set his trainer flag again, too, so the actual replacement would look like this:Now, about the Steven thing, if I did it like this, would it make Steven re-fightable everytime you talk to him? The bolded line in the spoiler tags is the only thing coming to mind.
Spoiler:
'---------------
#org 0x23B182
lock
clearflag 0x4F8
checkflag 0x4F8
if 0x1 goto 0x823B1CD
checksound
sound 0x15
applymovement 0x1 0x8272598
waitmovement 0x0
applymovement 0x1 0x827259A
waitmovement 0x0
applymovement 0x1 0x827259E
waitmovement 0x0
msgbox 0x823B1E1 0x4 '"Steven: Oh, wow, [player]\v\h05.\n..."
trainerbattle 0x3 0x324 0x0 0x823B32D
msgbox 0x823B358 0x4 '"Steven: Come to think of it, ever ..."
setflag 0x4F8
release
end
'---------------
#org 0x23B1CD
applymovement 0x1 0x827259E
waitmovement 0x0
msgbox 0x823B358 0x4 '"Steven: Come to think of it, ever ..."
release
end
'---------
' Strings
'---------
#org 0x23B1E1
= Steven: Oh, wow, [player]\v\h05.\nI'm amazed you knew where to find me.\pDo you, uh[.]maybe think of me as\njust a rock maniac?\pNo, that can't be right.\pWe battled alongside each other at\nthe Sootopolis Space Center.\pYou should have a very good idea\nabout how good I am.\pOkay, [player]\v\h05, if you're going to mount\na serious challenge, expect the worst!
#org 0x23B32D
= You[.]\nI had no idea you'd become so strong[.]
#org 0x23B358
= Steven: Come to think of it, ever since\nour paths first crossed in Granite\lCave in Dewford, I had this feeling.\pI thought that you would eventually\nbecome the Champion.\pMy predictions usually come true.\pAnd where will you go from here?\p[.] [.] [.] [.] [.] [.]\n[.] [.] [.] [.] [.] [.]\pFufufu, even I couldn't tell you that.
'-----------
' Movements
'-----------
#org 0x272598
#raw 0x56 'Exclamation Mark (!)
#raw 0xFE 'End of Movements
#org 0x27259A
#raw 0x14 'Delay5
#raw 0x14 'Delay5
#raw 0x14 'Delay5
#raw 0xFE 'End of Movements
#org 0x27259E
#raw 0x3E 'Face Player
#raw 0xFE 'End of Movements
hi guys i am having problem with this script
Spoiler:#dynamic 0x161ADA
#org @start
lockall
msgbox @tv 0x6
showsprite 0x2
applymovement 0x2 @move
waitmovement 0x0
applymovement 0xFF @move1
playsong 0x112 0x0
pause 0x20
msgbox @mom 0x6
msgbox @osk 0x6
applymovement 0x2 @move2
waitmovement 0x0
hidesprite 0x2
fadesong 0x155
releaseall
end
#org @tv
= And Nidorina begins the battle\nwith a horn attack. Oh, but\lGengar bounces right back- and\lthere it is the hypnosis power of\lGengar. This could be the end of\lNidorina. Wait, the trainer\lrecalls Nidorina. Which Pokémon\lwill he use now? Oh, its Onix!\lNow this giant Pokémon is on the\lattack. Oh, but Gengar jumps\laside. Gengar is moving\lbeautifully today, its training\lis top notch...
#org @mom
= [PLAYER's name], get to bed! It's\n11\lo'clock, and you should be asleep\l\p But I'm just so psyched to\lstart trainin', winnin', and\lbattlin'!\l\pWell, if you can't sleep you\lshould at least get ready for\ltomorrow. Here watch this.
#org @osk
= Prof Oak on TV: Good evening\nPallet. Tomorrow is the big day\lfor the newest class of Pokémon\lstudents. I'd like to introduce\lyou to Bulbasaur, Charmander, and\lSquirtle. Each one is available\lfor new trainers, which one shall\lyou choose.\pGo to bed when this\lis done\lAnd change into your pajamas okay?
#org @move
#raw 0xE
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0xF
#raw 0xFE
#org @move1
#raw 0x3
#raw 0x62
#raw 0xFE
#org @move2
#raw 0xE
#raw 0xD
#raw 0xD
#raw 0xD
#raw 0xD
#raw 0xF
#raw 0xFE
and after i compile it it canged into
Spoiler:'---------------
#org 0x161ADA
lockall
loadpointer 0x0 0x69000F69
loadpointer 0x0 0x25569
applymovement 0x2 0x2555A6A
nop
applymovement 0x2 0x2555A6A
nop
applymovement 0x2 0x2555A6A
nop
loadpointer 0x0 0x2555A6A
nop
applymovement 0x2 0x2555A6A
nop
applymovement 0x58 0xF5A6A
lock
faceplayer
msgbox 0x8161B55 MSG_NORMAL '"À ûî Ô \v\h1CàËÌÉÔ mëàËÌÉ\h4FÁ é\h..."
showsprite 0x2
applymovement 0x2 0xF5A6A
waitkeypress
comparebanks 0x816 0x609
showsprite 0x2
applymovement 0x2 0xF5A6A
bufferpokemon 0x1B 0x816
callstd 0x6
showsprite 0x2
applymovement 0x2 0x8161F0F
waitmovement 0x0
applymovement MOVE_PLAYER 0x8161F17
playsong 0x112 0x0
pause 0x20
msgbox 0x8161CFD MSG_NORMAL '" PLAYER's name , get to bed! It's\..."
msgbox 0x8161DE1 MSG_NORMAL '"Prof Oak on TV: Good evening\nPall..."
applymovement 0x2 0x8161F1B
waitmovement 0x0
hidesprite 0x2
fadesong 0x155
release
end
'---------
' Strings
'---------
#org 0x161B55
= À ûî Ô \v\h1CàËÌÉÔ mëàËÌÉ\h4FÁ é\h1FàË¿ [PK]Á ;[PO]À\h6CÁ
#org 0x161CFD
= PLAYER's name , get to bed! It's\n11\lo'clock, and you should be asleep\l\p But I'm just so psyched to\lstart trainin', winnin', and\lbattlin'!\l\pWell, if you can't sleep you\lshould at least get ready for\ltomorrow. Here watch this.
#org 0x161DE1
= Prof Oak on TV: Good evening\nPallet. Tomorrow is the big day\lfor the newest class of Pokémon\lstudents. I'd like to introduce\lyou to Bulbasaur, Charmander, and\lSquirtle. Each one is available\lfor new trainers, which one shall\lyou choose.\pGo to bed when this\lis done\lAnd change into your pajamas okay?
'-----------
' Movements
'-----------
#org 0x161F0F
#raw 0xE 'Step Left (Slow)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0xF 'Step Right (Slow)
#raw 0xFE 'End of Movements
#org 0x161F17
#raw 0x3 'Face Right
#raw 0x62 'Exclamation Mark (!)
#raw 0xFE 'End of Movements
#org 0x161F1B
#raw 0xE 'Step Left (Slow)
#raw 0xD 'Step Up (Slow)
#raw 0xD 'Step Up (Slow)
#raw 0xD 'Step Up (Slow)
#raw 0xD 'Step Up (Slow)
#raw 0xF 'Step Right (Slow)
#raw 0xFE 'End of Movements
can anyone tell why this is happening is my script has any problem . ??????