The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > ROM Hacking > ROM Hacking Hub
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

ROM Hacking Hub General discussions about ROM Hacking and Emulation. Not sure where to start? This is the place for you.
Posting links to ROMs is illegal and is not tolerated anywhere on the forum.
New threads in this forum are to be approved by a moderator before they are displayed.


Advertise here

Closed Thread
Click here to go to the first staff post in this thread.  
Thread Tools
  #7401    
Old November 1st, 2012, 01:24 PM
Pokedorkus
Zen Darumaka
 
Join Date: Oct 2012
Age: 17
Gender: Male

Advertise here
Quote:
Originally Posted by MrSandman64 View Post
how do I check which starter pokemon you picked so that the rival can pick the pokemon strong against it?
You can use Advance Starter if thats wat u mean google it

Last edited by DrFuji; November 1st, 2012 at 03:48 PM. Reason: Removing non-scripting question
  #7402    
Old November 2nd, 2012, 02:34 AM
Satoshi Ookami's Avatar
Satoshi Ookami
Memento Mori
Community Supporter
 
Join Date: Jul 2008
Location: Abyss of Time, Great Seal
Age: 22
Gender: Male
Nature: Calm
Quote:
Originally Posted by Pokedorkus View Post
You can use Advance Starter if thats wat u mean google it
That's not really it xD As he means in-game

As for the answer.

Assign a special flag to each starter that you will be checking in rival's scripts

I'll give you an example.

Let's have 3 starters: Treecko, Torchic, Mudkip.
In Treecko's giving script you put setflag 0x701
In Torchic's script you put setflag 0x702
And in Mudkip's you put setflag 0x703

And then, once battle with rival is about to happen you use this:

checkflag 0x701
compare 0x800D 0x1
if 0x1 goto @battle1

checkflag 0x702
compare 0x800D 0x1
if 0x1 goto @battle2

checkflag 0x702
compare 0x800D 0x1
if 0x1 goto @battle3

Those @battle will have trainerbattle with the starter that will be strong against player's one.
Of course, rival always need to have 3 versions of one battle.
__________________
ROM hacking FAQ - Read before asking how to play a hack. | Previous Sign 2 | Previous Sign

Anime List | PSN Trophy List
  #7403    
Old November 2nd, 2012, 07:50 AM
itman
Back to ROM hacking. :D
 
Join Date: May 2007
Age: 20
Nature: Adamant
Quote:
Originally Posted by Ash493 View Post

That's not really it xD As he means in-game ;)

As for the answer.

Assign a special flag to each starter that you will be checking in rival's scripts ;)

I'll give you an example.

Let's have 3 starters: Treecko, Torchic, Mudkip.
In Treecko's giving script you put setflag 0x701
In Torchic's script you put setflag 0x702
And in Mudkip's you put setflag 0x703

And then, once battle with rival is about to happen you use this:

checkflag 0x701
compare 0x800D 0x1
if 0x1 goto @battle1

checkflag 0x702
compare 0x800D 0x1
if 0x1 goto @battle2

checkflag 0x702
compare 0x800D 0x1
if 0x1 goto @battle3

Those @battle will have trainerbattle with the starter that will be strong against player's one.
Of course, rival always need to have 3 versions of one battle.
The "compare 0x800D 0x1" lines are unnecessary and just take up more room, it's best to take them out.
  #7404    
Old November 2nd, 2012, 08:29 AM
Pokedorkus
Zen Darumaka
 
Join Date: Oct 2012
Age: 17
Gender: Male
Help me So i was editing or hacking my map with A map when i opened A trainer to edit trainers and i added trainers and such when i closed it and came back the names of the pokemons were messed up they would have codes with europeen accents and stuff or they would be blank so it would say a wild appered WTF this has happened 2 times on pokemon emerald and i tested it out on saphire and i happened on it as well should i use PET but i need to add new trainers and these codes would affect every thing including in a map it would say the codes? what is happening any advice would be appreciated.
  #7405    
Old November 3rd, 2012, 05:45 PM
Herpahermaderp's Avatar
Herpahermaderp
I liek Mudkipz
 
Join Date: Jul 2012
Location: USA
Age: 16
Gender: Male
Nature: Relaxed
Send a message via Skype™ to Herpahermaderp
Does anybody know the ASM routine for naming the player? I'm making a script for my hack team and they need it so the player doesn't get named at the Prof. intro but later on in the game.
__________________
Y: Roak || 1177-8023-4387
  #7406    
Old November 4th, 2012, 05:29 AM
Rumille's Avatar
Rumille
Togepi
 
Join Date: Feb 2012
Gender: Male
Hi. So, I made this levelscript:
Code:
#dynamic 0x800000
#org @start
lock
compare 0x7006 0x1
if 0x0 goto @getpokemon
if 0x1 goto @checkgary

#org @checkgary
checkflag 0x828
if 0x1 goto @garystay
if 0x0 goto @end
release
end

#org @end
release
end

#org @garystay
movesprite2 0x02 0x10 0x5
spritebehave 0x02 0x9
setflag 0x903
release
end

#org @getpokemon
applymovement 0x02 @move1
waitmovement 0x0
applymovement 0xFF @move2
waitmovement 0x0
goto @messages

#org @messages
msgbox @1 0x5
compare LASTRESULT 0x0
if 0x1 goto @what
compare LASTRESULT 0x1
if 0x1 goto @getpokemon2
release
end

#org @what
msgbox @2 0x2
goto @getpokemon2
release
end

#org @getpokemon2
msgbox @3 0x2
msgbox @4 0x2
goto @test

#org @test
msgbox @5 0x5
compare LASTRESULT 0x1
if 0x1 goto @wrong
msgbox @6 0x5
compare LASTRESULT 0x0
if 0x1 goto @wrong
msgbox @7 0x5
compare LASTRESULT 0x1
if 0x1 goto @wrong
msgbox @8 0x5
compare LASTRESULT 0x0
if 0x1 goto @wrong
msgbox @9 0x5
compare LASTRESULT 0x1
if 0x1 goto @wrong0
msgbox @10 0x2
setvar 0x7006 0x1
applymovement 0xFF @move3
release
end

#org @wrong
msgbox @wrong1 0x2
goto @test

#org @wrong0
msgbox @wrong2 0x2
goto @test

#org @move1
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0x2
#raw 0xFE

#org @move2
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xFE

#org @move3
#raw 0x13
#raw 0xFE

#org @1
= Hello there! Did [rival] bring you?

#org @2
= [rival]: He is joking, Professor. I\nbrought him here.

#org @3
= OAK: Ah, that means you want to be\na Pokémon Trainer! Well, that can\lbe arranged. I have three Pokémon\lon this table. You can pick one.\lIf..... you pass my exam!

#org @4
= You see, raising a Pokémon is a\nbig responsibility. You have to\lprove to me you know enough about\lthese great creatures and what to\ldo with them. If you answer the\lfollowing five questions\lcorrectly, you will have passed\lthe exam. So, let's start!

#org @5
= OAK: First question: Your Pokémon\nis poisoned. You should use\lPROTEIN to get rid of this status\lailment. Correct?

#org @6
= OAK: Very good! ANTIDOTE is often\nused to cure a poisoned Pokémon.\lPROTEIN is used to increase the\lAttack Stat of a Pokémon. Question\lnumber two: If most of your\lPokémon fainted, you should try to\lfind a Pokémon Center. Correct?

#org @7
= OAK: Excellent! You could also use\nPOTIONs or other healing items,\lbut healing your Pokémon at a\lPokémon Center is free of charge.\lThird question: Using your Pokémon\lto attack other Pokémon Trainers\lis all fair game in a battle.\lCorrect?

#org @8
= OAK: Great work! Attacking other\nTrainers is strictly forbidden and\lin some cases extremely dangerous.\lYou're almost there! Question\lfour: Even Pokémon without wings\lcan sometimes use FLY. Correct?

#org @9
= OAK: Yeah. That's kind of messed\nup. How can a DODRIO use Fly? Does\lit transforms its three heads into\lsome sort of helicopter rotor? I\ldon't know, it's just weird.\lAnyway, the final question! In\lKanto, there is toooootally a Mew\lbehind the truck at the St. Anne's\lport. Like, totally for sure. I'm\lsuper serial.

#org @wrong1
= I am afraid you are mistaken.\nLet's start at the beginning\lagain, shall we?

#org @wrong2
= OAK: What? What is wrong with you?\nOf course there is no Mew. Idiot.\lBack to the first question with\lyou. Moron. You are worse than\lBatman.

#org @10
= OAK: You did great. You answered\nall my questions correctly. You\lare ready to go on a great\ladventure, accompanied by your\lPokémon. Go ahead, pick one!
It works perfectly at the start, I use 02 Validates Value, but when the script is supposed to finish I get this:


And I can't move or do anything. Only press 'A' and I get this message again and again and again and again and again...

What causes this? And how can I make sure I get 'set free' and move around?
  #7407    
Old November 4th, 2012, 07:02 AM
miksy91's Avatar
miksy91
A GB/C Rom Hacker since 2010
 
Join Date: Oct 2008
Location: A small country in the North
Gender: Male
Nature: Relaxed
Quote:
Originally Posted by Rumille View Post
Hi. So, I made this levelscript:
Code:
#dynamic 0x800000
#org @start
lock
compare 0x7006 0x1
if 0x0 goto @getpokemon
if 0x1 goto @checkgary
 
#org @checkgary
checkflag 0x828
if 0x1 goto @garystay
if 0x0 goto @end
release
end
 
#org @end
release
end
 
#org @garystay
movesprite2 0x02 0x10 0x5
spritebehave 0x02 0x9
setflag 0x903
release
end
 
#org @getpokemon
applymovement 0x02 @move1
waitmovement 0x0
applymovement 0xFF @move2
waitmovement 0x0
goto @messages
 
#org @messages
msgbox @1 0x5
compare LASTRESULT 0x0
if 0x1 goto @what
compare LASTRESULT 0x1
if 0x1 goto @getpokemon2
release
end
 
#org @what
msgbox @2 0x2
goto @getpokemon2
release
end
 
#org @getpokemon2
msgbox @3 0x2
msgbox @4 0x2
goto @test
 
#org @test
msgbox @5 0x5
compare LASTRESULT 0x1
if 0x1 goto @wrong
msgbox @6 0x5
compare LASTRESULT 0x0
if 0x1 goto @wrong
msgbox @7 0x5
compare LASTRESULT 0x1
if 0x1 goto @wrong
msgbox @8 0x5
compare LASTRESULT 0x0
if 0x1 goto @wrong
msgbox @9 0x5
compare LASTRESULT 0x1
if 0x1 goto @wrong0
msgbox @10 0x2
setvar 0x7006 0x1
applymovement 0xFF @move3
release
end
 
#org @wrong
msgbox @wrong1 0x2
goto @test
 
#org @wrong0
msgbox @wrong2 0x2
goto @test
 
#org @move1
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0x2
#raw 0xFE
 
#org @move2
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xFE
 
#org @move3
#raw 0x13
#raw 0xFE
 
#org @1
= Hello there! Did [rival] bring you?
 
#org @2
= [rival]: He is joking, Professor. I\nbrought him here.
 
#org @3
= OAK: Ah, that means you want to be\na Pokémon Trainer! Well, that can\lbe arranged. I have three Pokémon\lon this table. You can pick one.\lIf..... you pass my exam!
 
#org @4
= You see, raising a Pokémon is a\nbig responsibility. You have to\lprove to me you know enough about\lthese great creatures and what to\ldo with them. If you answer the\lfollowing five questions\lcorrectly, you will have passed\lthe exam. So, let's start!
 
#org @5
= OAK: First question: Your Pokémon\nis poisoned. You should use\lPROTEIN to get rid of this status\lailment. Correct?
 
#org @6
= OAK: Very good! ANTIDOTE is often\nused to cure a poisoned Pokémon.\lPROTEIN is used to increase the\lAttack Stat of a Pokémon. Question\lnumber two: If most of your\lPokémon fainted, you should try to\lfind a Pokémon Center. Correct?
 
#org @7
= OAK: Excellent! You could also use\nPOTIONs or other healing items,\lbut healing your Pokémon at a\lPokémon Center is free of charge.\lThird question: Using your Pokémon\lto attack other Pokémon Trainers\lis all fair game in a battle.\lCorrect?
 
#org @8
= OAK: Great work! Attacking other\nTrainers is strictly forbidden and\lin some cases extremely dangerous.\lYou're almost there! Question\lfour: Even Pokémon without wings\lcan sometimes use FLY. Correct?
 
#org @9
= OAK: Yeah. That's kind of messed\nup. How can a DODRIO use Fly? Does\lit transforms its three heads into\lsome sort of helicopter rotor? I\ldon't know, it's just weird.\lAnyway, the final question! In\lKanto, there is toooootally a Mew\lbehind the truck at the St. Anne's\lport. Like, totally for sure. I'm\lsuper serial.
 
#org @wrong1
= I am afraid you are mistaken.\nLet's start at the beginning\lagain, shall we?
 
#org @wrong2
= OAK: What? What is wrong with you?\nOf course there is no Mew. Idiot.\lBack to the first question with\lyou. Moron. You are worse than\lBatman.
 
#org @10
= OAK: You did great. You answered\nall my questions correctly. You\lare ready to go on a great\ladventure, accompanied by your\lPokémon. Go ahead, pick one!
It works perfectly at the start, I use 02 Validates Value, but when the script is supposed to finish I get this:


And I can't move or do anything. Only press 'A' and I get this message again and again and again and again and again...

What causes this? And how can I make sure I get 'set free' and move around?
It's "impossible" to tell what's causing it but I'd advise you to check out the following:
1) You're using right ending commands (there are different scripting commands for ending level scripts and normal scripts in G/S/C, probably also for Firered).
2) You're calling "right" type of a level script
__________________
My Rom Hack



Hacks I support





Learn how to hack GB/C games:

Check my GameBoy/Color hacking videos in Youtube
-The video set uses Pokemon Silver (U) rom for demonstrations
  #7408    
Old November 4th, 2012, 08:10 AM
Renegade's Avatar
Renegade
Time for real life...
 
Join Date: Nov 2011
Location: United States
Gender: Male
Nature: Careful
Quote:
Originally Posted by Rumille View Post
Hi. So, I made this levelscript:
Code:
#dynamic 0x800000
#org @start
lock
compare 0x7006 0x1
if 0x0 goto @getpokemon
if 0x1 goto @checkgary

#org @checkgary
checkflag 0x828
if 0x1 goto @garystay
if 0x0 goto @end
release
end

#org @end
release
end

#org @garystay
movesprite2 0x02 0x10 0x5
spritebehave 0x02 0x9
setflag 0x903
release
end

#org @getpokemon
applymovement 0x02 @move1
waitmovement 0x0
applymovement 0xFF @move2
waitmovement 0x0
goto @messages

#org @messages
msgbox @1 0x5
compare LASTRESULT 0x0
if 0x1 goto @what
compare LASTRESULT 0x1
if 0x1 goto @getpokemon2
release
end

#org @what
msgbox @2 0x2
goto @getpokemon2
release
end

#org @getpokemon2
msgbox @3 0x2
msgbox @4 0x2
goto @test

#org @test
msgbox @5 0x5
compare LASTRESULT 0x1
if 0x1 goto @wrong
msgbox @6 0x5
compare LASTRESULT 0x0
if 0x1 goto @wrong
msgbox @7 0x5
compare LASTRESULT 0x1
if 0x1 goto @wrong
msgbox @8 0x5
compare LASTRESULT 0x0
if 0x1 goto @wrong
msgbox @9 0x5
compare LASTRESULT 0x1
if 0x1 goto @wrong0
msgbox @10 0x2
setvar 0x7006 0x1
applymovement 0xFF @move3
release
end

#org @wrong
msgbox @wrong1 0x2
goto @test

#org @wrong0
msgbox @wrong2 0x2
goto @test

#org @move1
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0x2
#raw 0xFE

#org @move2
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xFE

#org @move3
#raw 0x13
#raw 0xFE

#org @1
= Hello there! Did [rival] bring you?

#org @2
= [rival]: He is joking, Professor. I\nbrought him here.

#org @3
= OAK: Ah, that means you want to be\na Pokémon Trainer! Well, that can\lbe arranged. I have three Pokémon\lon this table. You can pick one.\lIf..... you pass my exam!

#org @4
= You see, raising a Pokémon is a\nbig responsibility. You have to\lprove to me you know enough about\lthese great creatures and what to\ldo with them. If you answer the\lfollowing five questions\lcorrectly, you will have passed\lthe exam. So, let's start!

#org @5
= OAK: First question: Your Pokémon\nis poisoned. You should use\lPROTEIN to get rid of this status\lailment. Correct?

#org @6
= OAK: Very good! ANTIDOTE is often\nused to cure a poisoned Pokémon.\lPROTEIN is used to increase the\lAttack Stat of a Pokémon. Question\lnumber two: If most of your\lPokémon fainted, you should try to\lfind a Pokémon Center. Correct?

#org @7
= OAK: Excellent! You could also use\nPOTIONs or other healing items,\lbut healing your Pokémon at a\lPokémon Center is free of charge.\lThird question: Using your Pokémon\lto attack other Pokémon Trainers\lis all fair game in a battle.\lCorrect?

#org @8
= OAK: Great work! Attacking other\nTrainers is strictly forbidden and\lin some cases extremely dangerous.\lYou're almost there! Question\lfour: Even Pokémon without wings\lcan sometimes use FLY. Correct?

#org @9
= OAK: Yeah. That's kind of messed\nup. How can a DODRIO use Fly? Does\lit transforms its three heads into\lsome sort of helicopter rotor? I\ldon't know, it's just weird.\lAnyway, the final question! In\lKanto, there is toooootally a Mew\lbehind the truck at the St. Anne's\lport. Like, totally for sure. I'm\lsuper serial.

#org @wrong1
= I am afraid you are mistaken.\nLet's start at the beginning\lagain, shall we?

#org @wrong2
= OAK: What? What is wrong with you?\nOf course there is no Mew. Idiot.\lBack to the first question with\lyou. Moron. You are worse than\lBatman.

#org @10
= OAK: You did great. You answered\nall my questions correctly. You\lare ready to go on a great\ladventure, accompanied by your\lPokémon. Go ahead, pick one!
It works perfectly at the start, I use 02 Validates Value, but when the script is supposed to finish I get this:


And I can't move or do anything. Only press 'A' and I get this message again and again and again and again and again...

What causes this? And how can I make sure I get 'set free' and move around?
This problem is very common and the way to fix it is in here:

http://www.pokecommunity.com/showthr...ghlight=cooley

Go to the header tab in A-Map, click Ctrl + H, copy the map script offset, paste it into XSE and decompile it with "level script" checked. If you look down from there a few lines, you should see something like this:

#raw 0xFFFF

Change it so that it shows this:

#raw 0x0

From there, click compile and test it out in-game.
  #7409    
Old November 4th, 2012, 08:23 AM
Rumille's Avatar
Rumille
Togepi
 
Join Date: Feb 2012
Gender: Male
Quote:
Originally Posted by CrystalStatic View Post
This problem is very common and the way to fix it is in here:

http://www.pokecommunity.com/showthr...ghlight=cooley

Go to the header tab in A-Map, click Ctrl + H, copy the map script offset, paste it into XSE and decompile it with "level script" checked. If you look down from there a few lines, you should see something like this:

#raw 0xFFFF

Change it so that it shows this:

#raw 0x0

From there, click compile and test it out in-game.
Aaaaah. I knew this, but I was under the dumb impression that I had to change it to #raw 0x2, since it was a 02 Validate values-type level script. Thanks, it works now!
  #7410    
Old November 6th, 2012, 04:58 PM
thor348's Avatar
thor348
That's Oak to You
 
Join Date: Nov 2012
Location: Albion
Gender: Male
Nature: Calm
Hey i've made my own script for an Item called the Codec. I put it in the Scripts.rxdata and in the Items PBS. It was all made and I clicked 'Save'. It acted as if it saved. When I took out my flash drive containing both my RPG maker xp and Pokemon essentials stuff, then put it into another computer, my scripts.rxdata reverted back to the original info from the starter kit. What happened to my modified scripts? Please help
  #7411    
Old November 6th, 2012, 06:47 PM
SK3's Avatar
SK3
Pokemon Hacking Company™ CEO
 
Join Date: Apr 2011
Location: Johto
Age: 19
Gender: Male
Nature: Quirky
Send a message via Windows Live Messenger to SK3
Spoiler:
#dynamic 0x2A3900
#org @start
msgbox @talk1 0x6
playsong 0x013B 0x0
applymovement 0x04 @walk1
waitmovement 0x0
applymovement 0xFF @walk2
waitmovement 0x0
msgbox @talk2 0x6
applymovement 0x04 @walk3
waitmovement 0x0
hidesprite 0x04
fadesong 0x0151
setvar 0x6002 0x1
setflag 0x1207
release
end

#org @walk1
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12


#org @walk2
#raw 0x62
#raw 0x3

#org @walk3
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13


#org @talk1
= Hey! [player]! Wait!

#org @talk2
= Finally woke up huh?\pDo you not realize what day\nit is?\pWell at least you are up now,\nwe've got to get down to the lab!\pI'll see you there.


This script always stops after the first applymovement....what's wrong?
__________________

Pokemon
Daydream White version


Want to help out? Just PM or VM me!

  #7412    
Old November 6th, 2012, 07:09 PM
Naruto200's Avatar
Naruto200
Togepi
 
Join Date: Oct 2012
Location: In a freaking house, where else lol
Gender: Male
Nature: Brave
I'm no expert but try putting the playsong before the textbox command. Also fadedefault unless you're trying to make it fade to a different song than the original.

Also make the text #org's before the movement #orgs.

That might help.
(Sorry I can't help more, but I'm just getting into this and making my creepypasta)
  #7413    
Old November 6th, 2012, 07:17 PM
Renegade's Avatar
Renegade
Time for real life...
 
Join Date: Nov 2011
Location: United States
Gender: Male
Nature: Careful
Quote:
Originally Posted by SK3 View Post
Spoiler:
#dynamic 0x2A3900
#org @start
msgbox @talk1 0x6
playsong 0x013B 0x0
applymovement 0x04 @walk1
waitmovement 0x0
applymovement 0xFF @walk2
waitmovement 0x0
msgbox @talk2 0x6
applymovement 0x04 @walk3
waitmovement 0x0
hidesprite 0x04
fadesong 0x0151
setvar 0x6002 0x1
setflag 0x1207
release
end

#org @walk1
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12


#org @walk2
#raw 0x62
#raw 0x3

#org @walk3
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13


#org @talk1
= Hey! [player]! Wait!

#org @talk2
= Finally woke up huh?\pDo you not realize what day\nit is?\pWell at least you are up now,\nwe've got to get down to the lab!\pI'll see you there.


This script always stops after the first applymovement....what's wrong?
After all of your movement strings, you need a #raw 0xFE.
So after every one of your @walk #raw commands, you need #raw 0xFE.
That tells the game that the movement is over.

Quote:
Originally Posted by Naruto200 View Post
I'm no expert but try putting the playsong before the textbox command. Also fadedefault unless you're trying to make it fade to a different song than the original.

Also make the text #org's before the movement #orgs.

That might help.
(Sorry I can't help more, but I'm just getting into this and making my creepypasta)
Please try not to post solutions if you don't think they are valid... It's kinda annoying.

Last edited by Renegade; November 6th, 2012 at 07:21 PM. Reason: Your double post has been automatically merged.
  #7414    
Old November 6th, 2012, 07:52 PM
Naruto200's Avatar
Naruto200
Togepi
 
Join Date: Oct 2012
Location: In a freaking house, where else lol
Gender: Male
Nature: Brave
Well they've worked so far for me, and I can't help if I don't know what's causing the problem :/ and nobody else can help if they don't understand it either.

<_<
After looking at the movement stuff, I could've said that too...
  #7415    
Old November 6th, 2012, 09:02 PM
crystalmole
Unhatched Egg
 
Join Date: Nov 2012
Gender: Male
How do I make a trigger script?
Im not sure if this i the right place to post this and I hope im not requesting a script, but I want to know the basics of making a trigger script like one that prevents you from advancing in an area until a certain flag is set.
  #7416    
Old November 6th, 2012, 10:00 PM
itman
Back to ROM hacking. :D
 
Join Date: May 2007
Age: 20
Nature: Adamant
Quote:
Originally Posted by crystalmole View Post
How do I make a trigger script?
Im not sure if this i the right place to post this and I hope im not requesting a script, but I want to know the basics of making a trigger script like one that prevents you from advancing in an area until a certain flag is set.
Basically, in a part of your trigger your script, you are going to want to check if a separate event happened first before it activates: then it goes to the right script depending on whether the event happened or not.

So somewhere in your trigger script, you'll need to put a:
checkflag 0x200 (or any other flag number)
if 0x1 goto @done (or any pointer)


It'll make the script check if another event has happened yet. Therefore, in a separate event, you'll need to put a:
setflag 0x200 (the same flag number we are checkign for above)
When that flag is set, the trigger script will check and see that the event already happened, and allow you to do anything you want (advance into next area, etc..)
  #7417    
Old November 6th, 2012, 10:21 PM
SK3's Avatar
SK3
Pokemon Hacking Company™ CEO
 
Join Date: Apr 2011
Location: Johto
Age: 19
Gender: Male
Nature: Quirky
Send a message via Windows Live Messenger to SK3
Thanks, the script finally continued! However, the hidesprite command doesn't seem to work?
__________________

Pokemon
Daydream White version


Want to help out? Just PM or VM me!

  #7418    
Old November 7th, 2012, 12:52 AM
Satoshi Ookami's Avatar
Satoshi Ookami
Memento Mori
Community Supporter
 
Join Date: Jul 2008
Location: Abyss of Time, Great Seal
Age: 22
Gender: Male
Nature: Calm
Quote:
Originally Posted by SK3 View Post
Thanks, the script finally continued! However, the hidesprite command doesn't seem to work?
Hidesprite is a buggy command.
It's best to use another applymovement which will have "hidden" movement command.
__________________
ROM hacking FAQ - Read before asking how to play a hack. | Previous Sign 2 | Previous Sign

Anime List | PSN Trophy List
  #7419    
Old November 7th, 2012, 07:25 AM
crystalmole
Unhatched Egg
 
Join Date: Nov 2012
Gender: Male
Quote:
Originally Posted by itman View Post
Basically, in a part of your trigger your script, you are going to want to check if a separate event happened first before it activates: then it goes to the right script depending on whether the event happened or not.

So somewhere in your trigger script, you'll need to put a:
checkflag 0x200 (or any other flag number)
if 0x1 goto @done (or any pointer)


It'll make the script check if another event has happened yet. Therefore, in a separate event, you'll need to put a:
setflag 0x200 (the same flag number we are checkign for above)
When that flag is set, the trigger script will check and see that the event already happened, and allow you to do anything you want (advance into next area, etc..)
Ok so I tried doing that and came up with this script.
Spoiler:
#dynamic 0x800000
#org @start
lock
faceplayer
checkflag 0x828
if 0x1 goto @done
applymovement 0x4 @move
waitmovement 0x4
msgbox @1 0x6
applymovement 0x4 @move2
waitmovement 0x4
release
end

#org @done
msgbox @2 0x6
release
end

#org @1
= Wait! You cant go out\pWithout a Pokemon!

#org @2
= Yay!

#org @move
#raw 0x62
#raw 0x0
#raw 0x10

#org @move2
#raw 0x1
#raw 0x11



It made the game freeze as soon as I stepped on the tile
Do you know what I did wrong?
  #7420    
Old November 7th, 2012, 03:10 PM
itman
Back to ROM hacking. :D
 
Join Date: May 2007
Age: 20
Nature: Adamant
Quote:
Originally Posted by crystalmole View Post
Ok so I tried doing that and came up with this script.
Spoiler:
#dynamic 0x800000
#org @start
lock
faceplayer
checkflag 0x828
if 0x1 goto @done
applymovement 0x4 @move
waitmovement 0x4
msgbox @1 0x6
applymovement 0x4 @move2
waitmovement 0x4
release
end

#org @done
msgbox @2 0x6
release
end

#org @1
= Wait! You cant go out\pWithout a Pokemon!

#org @2
= Yay!

#org @move
#raw 0x62
#raw 0x0
#raw 0x10

#org @move2
#raw 0x1
#raw 0x11



It made the game freeze as soon as I stepped on the tile :(
Do you know what I did wrong?
Try it now.

Spoiler:
#dynamic 0x800000
#org @start
faceplayer
checkflag 0x828
if 0x1 goto @done
applymovement 0x4 @move
waitmovement 0x0
msgbox @1 0x6
applymovement 0x4 @move2
waitmovement 0x0
release
end

#org @done
msgbox @2 0x6
release
end

#org @1
= Wait! You cant go out\pWithout a Pokemon!

#org @2
= Yay!

#org @move
#raw 0x62
#raw 0x0
#raw 0x10
#raw 0xFE

#org @move2
#raw 0x1
#raw 0x11
#raw 0xFE


You can't put "lock" in a trigger script: it'll lock everything.
Also, at the end of your movements, you need to put "#raw 0xFE"

Lastly, just use "waitmovement 0x0", it's the "perfect pause".

Also in A-map, you need to set a variable and an unknown.
So set the first unknown to 0003 and teh first variable to 4052 (it can be anything really, but that's just what I use).
  #7421    
Old November 7th, 2012, 04:25 PM
papayaperson's Avatar
papayaperson
Intermediate Hackker
 
Join Date: Dec 2011
Location: United States
Age: 16
Gender: Male
Nature: Relaxed
Game: FireRed
Type: BPR

I've been having some problems with my scripts, and there is one that I haven't been able to fix. Here's the script in the spoiler:
Spoiler:
#org 0x8165465
'-----------------------------------
setworldmapflag 0x890
movesprite2 0x3 0x1A 0xB
checkflag 0x291
if true jump 0x87402CA ' Flag is set
checkflag 0x258
if true jump 0x874026F ' Flag is set
end

#org 0x87402CA
'-----------------------------------
end

#org 0x874026F
'-----------------------------------
lockall
movesprite 0x3 0xB 0xF
applymovement 0x3 0x81654A2 ' walk_up walk_up walk...
pauseevent 0x0
msgbox 0x81654BD ' Oak: Hello! You look...
callstd MSG_NOCLOSE ' Non-closing message
closemsg
setflag 0x291
applymovement 0x3 0x81654A8 ' walk_up walk_up walk...
applymovement PLAYER 0x87400F7 ' walk_right raw_FD wa...
pauseevent 0x0
msgbox 0x87401F4 ' \v\h01, I would like...
callstd MSG_NOCLOSE ' Non-closing message
closemsg
applymovement 0x3 0x87400F9 ' walk_right walk_righ...
pauseevent 0x0
disappear 0x3
releaseall
end


#org 0x81654BD
= Oak: Hello! You look like\nyou have great potential!\pFor what you ask?\lCome to my lab so that\nI can show you!

#org 0x87401F4
= \v\h01, I would like\nyou to\ntake a journey for me,\lall the way across Pykao.\pPlease tell your mother,\nand then come to my lab.

#org 0x81654A2
M walk_up walk_up walk_up walk_up walk_up walk_up walk_up walk_up walk_left walk_left end

#org 0x81654A8
M walk_up walk_up walk_left walk_left end

#org 0x87400F7
M walk_right raw_FD walk_right walk_right walk_up walk_up walk_up walk_up walk_up walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right end

#org 0x87400F9
M walk_right walk_right walk_up walk_up walk_up walk_up walk_up walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right end

That's my script for entering into the first town, type 03 On entering map/not on menu close. I'm not sure if the problem is that one or this one:
Spoiler:
#org 0x8168DB9
'-----------------------------------
lock
faceplayer
checkflag 0x258
if true jump 0x81A7AE0 ' Flag is set
msgbox 0x818DBDD ' Roberta: Oh, hey \v\...
callstd MSG_NOCLOSE ' Non-closing message
closemsg
setflag 0x258
release
end

#org 0x81A7AE0
'-----------------------------------
msgbox 0x818DA16 ' Roberta: I'm not sur...
callstd MSG_NOCLOSE ' Non-closing message
closemsg
release
end


#org 0x818DBDD
= Roberta: Oh, hey \v\h01.\pWhatcha doing here?\p...\pOh, sorry.\n\v\h06 left a while ago.

#org 0x818DA16
= Roberta: I'm not sure where \v\h06\nwent, but he was excited!


Okay here's what happens:
The 'on entering map' script is supposed to make prof. oak walk to the player, take him halfway to his lab, tell the player about the journey and ask him to tell his mother, and then oak goes to his lab (and his sprite disappears), however this only happens after flag 0x258 is set, which is set when you talk to Roberta (second script, she is inside). But when I leave Roberta's house, the screen just turns black. The music continues normally, but the screen is completely black, making it unplayable. Any ideas as to what the problem is? Not totally sure if it's the scripts or something wrong with my rom, but this doesnt happen before the flag 0x258 is set. I've tried it with different flags and it still won't work. Does anyone know how to fix this?
  #7422    
Old November 8th, 2012, 03:53 PM
crystalmole
Unhatched Egg
 
Join Date: Nov 2012
Gender: Male
Thank you so much for this, I finally got it to work!
One last question, what are the move player commands, and how do you get them to work at the same time as the move NPC commands?
Also what is the best hiding NPC command? I heard hidesprite was buggy.
  #7423    
Old November 8th, 2012, 05:02 PM
hashtag's Avatar
hashtag
the man in black
Community Supporter
 
Join Date: Nov 2008
Location: Salisbury, England
Age: 19
Gender: Male
Quote:
Originally Posted by papayaperson View Post
Game: FireRed
Type: BPR

I've been having some problems with my scripts, and there is one that I haven't been able to fix. Here's the script in the spoiler:
Spoiler:
#org 0x8165465
'-----------------------------------
setworldmapflag 0x890
movesprite2 0x3 0x1A 0xB
checkflag 0x291
if true jump 0x87402CA ' Flag is set
checkflag 0x258
if true jump 0x874026F ' Flag is set
end

#org 0x87402CA
'-----------------------------------
end

#org 0x874026F
'-----------------------------------
lockall
movesprite 0x3 0xB 0xF
applymovement 0x3 0x81654A2 ' walk_up walk_up walk...
pauseevent 0x0
msgbox 0x81654BD ' Oak: Hello! You look...
callstd MSG_NOCLOSE ' Non-closing message
closemsg
setflag 0x291
applymovement 0x3 0x81654A8 ' walk_up walk_up walk...
applymovement PLAYER 0x87400F7 ' walk_right raw_FD wa...
pauseevent 0x0
msgbox 0x87401F4 ' \v\h01, I would like...
callstd MSG_NOCLOSE ' Non-closing message
closemsg
applymovement 0x3 0x87400F9 ' walk_right walk_righ...
pauseevent 0x0
disappear 0x3
releaseall
end


#org 0x81654BD
= Oak: Hello! You look like\nyou have great potential!\pFor what you ask?\lCome to my lab so that\nI can show you!

#org 0x87401F4
= \v\h01, I would like\nyou to\ntake a journey for me,\lall the way across Pykao.\pPlease tell your mother,\nand then come to my lab.

#org 0x81654A2
M walk_up walk_up walk_up walk_up walk_up walk_up walk_up walk_up walk_left walk_left end

#org 0x81654A8
M walk_up walk_up walk_left walk_left end

#org 0x87400F7
M walk_right raw_FD walk_right walk_right walk_up walk_up walk_up walk_up walk_up walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right end

#org 0x87400F9
M walk_right walk_right walk_up walk_up walk_up walk_up walk_up walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right end

That's my script for entering into the first town, type 03 On entering map/not on menu close. I'm not sure if the problem is that one or this one:
Spoiler:
#org 0x8168DB9
'-----------------------------------
lock
faceplayer
checkflag 0x258
if true jump 0x81A7AE0 ' Flag is set
msgbox 0x818DBDD ' Roberta: Oh, hey \v\...
callstd MSG_NOCLOSE ' Non-closing message
closemsg
setflag 0x258
release
end

#org 0x81A7AE0
'-----------------------------------
msgbox 0x818DA16 ' Roberta: I'm not sur...
callstd MSG_NOCLOSE ' Non-closing message
closemsg
release
end


#org 0x818DBDD
= Roberta: Oh, hey \v\h01.\pWhatcha doing here?\p...\pOh, sorry.\n\v\h06 left a while ago.

#org 0x818DA16
= Roberta: I'm not sure where \v\h06\nwent, but he was excited!


Okay here's what happens:
The 'on entering map' script is supposed to make prof. oak walk to the player, take him halfway to his lab, tell the player about the journey and ask him to tell his mother, and then oak goes to his lab (and his sprite disappears), however this only happens after flag 0x258 is set, which is set when you talk to Roberta (second script, she is inside). But when I leave Roberta's house, the screen just turns black. The music continues normally, but the screen is completely black, making it unplayable. Any ideas as to what the problem is? Not totally sure if it's the scripts or something wrong with my rom, but this doesnt happen before the flag 0x258 is set. I've tried it with different flags and it still won't work. Does anyone know how to fix this?
You seem to be having problems with your level scripts, follow this tutorial:

http://www.pokecommunity.com/showthread.php?t=191500

If you're still having problems, don't hesitate to post again.
__________________
"i am the hero pokécommunity deserves, but not the one it needs right now"

paired with christos
  #7424    
Old November 9th, 2012, 04:02 PM
thediabeetusking
Unhatched Egg
 
Join Date: Feb 2012
Alright. Kinda frustrated here. I am attempting to hack Pokemon Gold. I am using JohtoMap, PKSV, and Translhextion. I am attempting to do things through hex editing, not scripting. Here's my question: Why is it that I can edit pre-placed events text and functions for the most part, but whenever I try to edit in another event of my own, the game just melts down? For example:

Selected: 3
Picture: 1
Face/Type: 3
Movement: 10
Time Type: FF
Time Value: FF
Sight Range: 0
Palette: 0
Type: 0
Script: 65A0
Flag Index: FF
Flag Bit: FF

This is the info that JohtoMap shows for my person that I added to New Bark Town that I want to say "Hi." Next is a my hex editing that I did to make this happen. On the start of offset x1225A0:

51 A4 65 00 87 A8 E8 57 00 00 00 00 00 00 00 00

That is all that I've edited. That is starting at the beginning of offset x1225A0, and finishes halfway through. All i want him to do is turn to you and say "Hi." And then let the game resume. This is what his script looks like in PKSV:

#org 0x1225A0
'--------------------------------------------
jumptextfaceplayer 0x65A4 ' 0x1225A4


#org 0x1225A4
#raw 0x87
#raw 0xA8
#raw 0xE8
#raw 0x57
= \h00\h00\h00\h00\h00\h00\h00\h00\h00\h00\h00\h00\h00\h00

It repeats the \h00 part over and over forever. I don't understand. Whenever I try to do anything text related, the infinite \hoo comes up, along with the #raw. I just have no idea what to do. I've tried tutorials, but I guess I'm just inept. Any help please? Thanks in advance.
  #7425    
Old November 9th, 2012, 04:15 PM
The1337Spriter's Avatar
The1337Spriter
Pokemon Master
 
Join Date: Jul 2012
Location: U.S.A.
Gender: Male
Nature: Brave
Pokemon Firered
Guys,for some reason,my script wont insert into the game,I cant find the offset in it and everytime I try to insert it with xse,it says:Too less paremeters on line 1.The correct is 2.Here is my script to make a person give you a lugia,talk to you,then run away:
#dyn 0x740000
#org @start
lock
checkflag 0x200
if 0x1 jump :end
setflag FR_POKEMON
countpokemon
compare LASTRESULT 6
if == jump @noroom
addpokemon LUGIA 0xA EONTICKET 0 0 0
setflag 0x200
storepokemon 0 LUGIA
message @get-msg
fanfare 0x101
showmsg
waitfanfare
waitbutton
:end
release
end

#org @noroom
msgbox @noroom-msg
callstd MSG_NOCLOSE
release
end

#org @noroom-msg
= You don't have enough room in your party.
#org @get-msg
= ???:Oh no,it's the fuzz!It's your curse now!It'll
probably kill you!!!
m walk_up walk_up walk_up walk_up walk_up walk_up

walk_up walk_up walk_up walk_up walk_up walk_up walk_up

walk_up walk_up walk_up walk_up end




What is wrong with the script?
__________________
The1337Spriter

Last edited by The1337Spriter; November 9th, 2012 at 04:21 PM.
Closed Thread
Quick Reply

Sponsored Links


Advertise here
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
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 10:26 PM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 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 - 2014 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.