- 16
- Posts
- 14
- Years
- Seen May 21, 2015
Hello there, good people of PokéCommunity. :]
I recently got into ROM hacks (mainly by playing great ones like the Ruby Destiny series and Prism), and I became interested in how they were made.
I looked more into it a few days ago, and from then on became set on beginning to teach myself.
So, I downloaded the tools, played with them, looked up some tutorials, yada yada.
The mapping basics came quickly, but scripting is giving me a bit of a problem when it comes to combining certain factors, and I would like to know if I can get some help.
The test script I'm trying to figure out is basically: Initiate trainer battle, battle finishes, trainer gives you a level 5 pokemon for defeating him. When it came to writing the script for the trainer battle,
I did just fine by following simple tutorials and came up with this TTGL reference trainer:
That code works just fine. He spots me, says his text in the correct blue color, and the battle begins. His name is correct, he has the Pokémon I gave him, and he says the correct ending/after text.
Here are some quick screenshots I took:
(Sorry about the horrible resizing of the screenshots. >_> I'll play with that later when I actually need to make them pretty, lol.)
So, that worked out okay. The thing I'm having a problem with is combining the trainerbattle and givepokemon commands.
I wasn't about to just give up and not try it, so here's my attempted text from everything I've learned:
What did I get as soon as he spotted me?
A funny text saying something like, "eeeee!!!!%%%&^#&&***...." and so on and so forth. It was endless.
So, I attempted to have him initiate the battle, say his thing, fight me, lose, and after the battle when I talk to him again, he gives me a level 5 rhyhorn. After that, I wanted him to just keep repeating,
"Don't believe in yourself. Believe in me who believes in you" every time I talk to him, but I obviously didnt' get to see how that worked out.
Other components I wanted to factor in but had absolutely no idea where to put them were:
And that wraps up that portion of my question...
----------~----------~----------~----------~----------~
Another question I had is one concerning events that kind of confused me.
For example, say there was an event that was going on in which a raging venasaur attacked my home village. The only two maps involved are the home village and route 1.
I go downstairs, my mom stops me and, in short, says, "Something's going on. Take my Pokémon to protect you." and gives me her guardian friend, Latios.
So, I go outside, eerie music is playing and it's heavily raining/thunderstorming. There is an elderly man outside of my house that's laying on the ground
and a young child at the top of the map before route 1. The elderly man says something like, "...A Pokémon attacked the village...It fled to route 1," and the young girl says something like,
"Mommy ran after daddy when he chased the weird Pokémon to route 1! Please, help them!"
Screenshots:
So, I go to route 1 (which is also rainy with other dreary music), an event of some kind plays, I fight and faint the venasaur, it flees. Then...I pass out or something and script a fadescreen command.
When I "come to" is where my question lies. How do I make it so that the village and route 1 is back to normal? I.E.: Sunny weather, the old man is no longer laying down, the young girl is running around with her parents, route 1 is cloudy, and everyone has completely different scripts...? That completely puzzled me, and I've seen it done on other games many times before.
In short, how to go from:
[Event]
Dreary rainy village with scared/hurt villagers
Route 1 with fighting event and rainy weather
Pass out/Fade screen, maybe warp back to home
to
Sunny village with normal villagers with different messages/scripts
Route 1 is cloudy/sunny/normal.
----------~----------~----------~----------~----------~
Thank you so much in advance, everyone. I would really appreciate any help I can get! I'm really interested in ROM hacking and all of its components! It's fascinating, in my opinion.
I looked more into it a few days ago, and from then on became set on beginning to teach myself.
So, I downloaded the tools, played with them, looked up some tutorials, yada yada.
The mapping basics came quickly, but scripting is giving me a bit of a problem when it comes to combining certain factors, and I would like to know if I can get some help.
The test script I'm trying to figure out is basically: Initiate trainer battle, battle finishes, trainer gives you a level 5 pokemon for defeating him. When it came to writing the script for the trainer battle,
I did just fine by following simple tutorials and came up with this TTGL reference trainer:
Code:
#dynamic 0x71AC00
#org @start
lock
faceplayer
trainerbattle 0x0 0x2E2 0x0 @challenge @defeat
msgbox @talk1 0x6
textcolor 0x01
end
#org @challenge
= A trainer?!\nEAT THIS.\p\v\h01: NEVER.
#org @defeat
= ...Wow, kid.\nYou're not half bad!
#org @talk1
= Y'know, kid, you're not half bad.\nI'll give you this...\pLET THIS BE THE DRILL THAT\n PIERCES THE HEAVENS.\p\v\h01 has recieved a RHYHORN!
#org @done
lock
faceplayer
release
end
That code works just fine. He spots me, says his text in the correct blue color, and the battle begins. His name is correct, he has the Pokémon I gave him, and he says the correct ending/after text.
Here are some quick screenshots I took:
Spoiler:
![[PokeCommunity.com] A question about scripting, if I may ask... [PokeCommunity.com] A question about scripting, if I may ask...](https://i52.tinypic.com/hs3zfc.png)
![[PokeCommunity.com] A question about scripting, if I may ask... [PokeCommunity.com] A question about scripting, if I may ask...](https://i54.tinypic.com/14cqjwk.png)
![[PokeCommunity.com] A question about scripting, if I may ask... [PokeCommunity.com] A question about scripting, if I may ask...](https://i54.tinypic.com/2gt1yx2.png)
![[PokeCommunity.com] A question about scripting, if I may ask... [PokeCommunity.com] A question about scripting, if I may ask...](https://i51.tinypic.com/1249cwk.png)
![[PokeCommunity.com] A question about scripting, if I may ask... [PokeCommunity.com] A question about scripting, if I may ask...](https://i55.tinypic.com/2n8qy6q.png)
![[PokeCommunity.com] A question about scripting, if I may ask... [PokeCommunity.com] A question about scripting, if I may ask...](https://i53.tinypic.com/2v0flgl.png)
![[PokeCommunity.com] A question about scripting, if I may ask... [PokeCommunity.com] A question about scripting, if I may ask...](https://i53.tinypic.com/2mmufk.png)
![[PokeCommunity.com] A question about scripting, if I may ask... [PokeCommunity.com] A question about scripting, if I may ask...](https://i55.tinypic.com/2zg6x54.png)
(Sorry about the horrible resizing of the screenshots. >_> I'll play with that later when I actually need to make them pretty, lol.)
So, that worked out okay. The thing I'm having a problem with is combining the trainerbattle and givepokemon commands.
I wasn't about to just give up and not try it, so here's my attempted text from everything I've learned:
Code:
#dynamic 0x71AC00
#org @start
lock
faceplayer
trainerbattle 0x0 0x2E2 0x0 @challenge @defeat
msgbox @talk1 0x2
checkflag 0x1019
if 0x1 call @nomore
givepokemon 0x6F 0x5 0x0 0x0 0x0 0x0
setflag 0x1019
end
#org @challenge
= A trainer?!\nEAT THIS.\p\v\h01: NEVER.
#org @defeat
= ...Wow, kid!
#org @talk1
= Y'know, kid, you're not half bad.\nI'll give you this...\pLET THIS BE THE DRILL\nTHAT PIERCES THE HEAVENS.\p\v\h01 has recieved a RHYHORN!
#org @nomore
msgbox @msg 0x2
end
#org @msg
= Don't believe in yourself.\nBelieve in me who believes in you.
What did I get as soon as he spotted me?
A funny text saying something like, "eeeee!!!!%%%&^#&&***...." and so on and so forth. It was endless.
So, I attempted to have him initiate the battle, say his thing, fight me, lose, and after the battle when I talk to him again, he gives me a level 5 rhyhorn. After that, I wanted him to just keep repeating,
"Don't believe in yourself. Believe in me who believes in you" every time I talk to him, but I obviously didnt' get to see how that worked out.
Other components I wanted to factor in but had absolutely no idea where to put them were:
Code:
fanfare 0x13E
waitfanfare
Some way to nickname it...?
And that wraps up that portion of my question...
----------~----------~----------~----------~----------~
Another question I had is one concerning events that kind of confused me.
For example, say there was an event that was going on in which a raging venasaur attacked my home village. The only two maps involved are the home village and route 1.
I go downstairs, my mom stops me and, in short, says, "Something's going on. Take my Pokémon to protect you." and gives me her guardian friend, Latios.
So, I go outside, eerie music is playing and it's heavily raining/thunderstorming. There is an elderly man outside of my house that's laying on the ground
and a young child at the top of the map before route 1. The elderly man says something like, "...A Pokémon attacked the village...It fled to route 1," and the young girl says something like,
"Mommy ran after daddy when he chased the weird Pokémon to route 1! Please, help them!"
Screenshots:
Spoiler:
![[PokeCommunity.com] A question about scripting, if I may ask... [PokeCommunity.com] A question about scripting, if I may ask...](https://i53.tinypic.com/30m1kew.png)
![[PokeCommunity.com] A question about scripting, if I may ask... [PokeCommunity.com] A question about scripting, if I may ask...](https://i51.tinypic.com/2sbae0n.png)
![[PokeCommunity.com] A question about scripting, if I may ask... [PokeCommunity.com] A question about scripting, if I may ask...](https://i52.tinypic.com/i2sow4.png)
So, I go to route 1 (which is also rainy with other dreary music), an event of some kind plays, I fight and faint the venasaur, it flees. Then...I pass out or something and script a fadescreen command.
When I "come to" is where my question lies. How do I make it so that the village and route 1 is back to normal? I.E.: Sunny weather, the old man is no longer laying down, the young girl is running around with her parents, route 1 is cloudy, and everyone has completely different scripts...? That completely puzzled me, and I've seen it done on other games many times before.
In short, how to go from:
[Event]
Dreary rainy village with scared/hurt villagers
Route 1 with fighting event and rainy weather
Pass out/Fade screen, maybe warp back to home
to
Sunny village with normal villagers with different messages/scripts
Route 1 is cloudy/sunny/normal.
----------~----------~----------~----------~----------~
Thank you so much in advance, everyone. I would really appreciate any help I can get! I'm really interested in ROM hacking and all of its components! It's fascinating, in my opinion.