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
  #8376    
Old June 20th, 2013, 07:21 PM
GoGoJJTech's Avatar
GoGoJJTech
アルファ近く
 
Join Date: Nov 2012
Location: Earth
Age: 15
Gender: Male
Nature: Quiet

Advertise here
Get the offset you compiled to, then in advance map put that offset on the person's script offset.
__________________
  #8377    
Old June 20th, 2013, 07:21 PM
Sagiri's Avatar
Sagiri
 
Join Date: Mar 2007
Age: 20
Quote:
Originally Posted by pokefreake View Post
Ok I got xse and a fr rom, but what do I do after I compile the script?
Depends on what your script does. If I had to guess, it's just a talking script, in which case, you need to assign it to a particular person.

To do this, download a program called Advance Map. Don't go for the newest version (1.9.5), as it is very buggy and unstable. Download 1.9.2. Then, open your ROM in it, and go to whatever map you want your person (and the attached script) to be on.

Switch to the 'Event' tab, and scroll down. You will see some fields, such has Signpost. One of them will be Sprites, or something similar. Raise that number by one and they will appear in the map. It may be necessary to go into the View menu (in the top left of the window) and enable "Show sprites".

Move that sprite to where you want it to be (just drag it), and in the sidebar, you can assign how they walk (if they stand still, walk around, look around, etc). It should be labeled well enough to be fairly self-explanatory. You can also change their sprite.

Go to the field entitled 'script offset'. This is where your script will go. After compiling your script to the ROM, XSE should've had a small popup. At the bottom of it, it will list your script offset (or often, offsets). Just copy and paste the first one into the Script Offset in Advancemap, and save the map.

Sorry for the textwall.

Edit: Not overly surprised, but "beaten".
  #8378    
Old June 20th, 2013, 10:50 PM
destinedjagold's Avatar
destinedjagold
Oh Hai Thar~ 'ω'
Community Supporter
 
Join Date: May 2007
Location: Philippines
Gender: Male
Nature: Careful
Quote:
Originally Posted by pokefreake View Post
Ok I got xse and a fr rom, but what do I do after I compile the script?
Here's a link to my tutorial if you want visual aids. :3
__________________
  #8379    
Old June 21st, 2013, 08:48 AM
pokefreake's Avatar
pokefreake
 
Join Date: Nov 2012
Gender: Male
Thanks everyone! Advance map 1.95 was the problem. I'm using 1.92 now.
Also what's so special about xse?

Thanks everyone! Advance map 1.95 was the problem. I'm using 1.92 now.
Also what's so special about xse?

Last edited by pokefreake; June 21st, 2013 at 08:48 AM. Reason: Your double post has been automatically merged.
  #8380    
Old June 21st, 2013, 11:14 AM
karatekid552's Avatar
karatekid552
What happens if I push it?....
 
Join Date: Nov 2012
Location: Do you really want to know? Really?
Gender: Male
Nature: Bold
Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552 Send a message via Skype™ to karatekid552
Quote:
Originally Posted by pokefreake View Post
Thanks everyone! Advance map 1.95 was the problem. I'm using 1.92 now.
Also what's so special about xse?
Compared to Pokescript? Everything. It is sooo much better. Compared to PKSV, well, that is personal preference. I like XSE better, but they tend to be equal in capabilities.
__________________

Paired with Simba
  #8381    
Old June 22nd, 2013, 02:38 AM
QuartierGenerale
 
Join Date: Oct 2012
Hi!

I'm using PKSV for scripting, but i've some trouble with a script that start with a trainerbattle and then continue with some other things like msgboxes, applymovement and disappears.

My first idea is:

lockall
trainerbattle
copyvar PLAYERFACING 0x800C
jump @offset

in @offset do something other.

Then i put the person event as a trainer with a certain view radius. When i go in front of trainer, he saw me, a msgbox open and the game go in crash.

So i've moved the lockall under the trainerbattle. In this way the battle starts correctly, but at the end nothing happen and the player can continue the game....if return speaking with the trainer the second part of the script was executed...but it isn't what i want.

Some ideas?
  #8382    
Old June 22nd, 2013, 03:01 AM
tuna97's Avatar
tuna97
Togepi
 
Join Date: Jul 2010
Location: somewhere
Gender: Male
hello I need help with one of my scipts I dont know if its already answered , tryed to google it couldnt find any good help so I came here.
The problems is i set the person to disappear but when i re-entered the map the person would appear again

#org 0x8740ED6
'-----------------------------------
lock
faceplayer
applymovement 0x1 0x8740F01 ' say_! walk_left walk...
pauseevent 0x0
message 0x8740F07 ' Good Morning son!\nI...
callstd MSG_NOCLOSE ' Non-closing message
pause 0xA
closemsg
applymovement 0x1 0x8740F74 ' walk_down walk_down ...
pauseevent 0x0
disappear 0x4
setflag 0x1004
setvar 0x6001 0x1
release
end


#org 0x8740F07
= Good Morning son!\nI see you read the letter\ldad send you.\lI know exactly what he wants\lfrom you...Take care!

#org 0x8740F01
M say_! walk_left walk_left walk_left look_up end

#org 0x8740F74
M walk_down walk_down walk_down walk_down walk_down walk_left walk_left walk_left walk_left walk_left walk_left walk_left end
__________________
  #8383    
Old June 22nd, 2013, 04:27 AM
karatekid552's Avatar
karatekid552
What happens if I push it?....
 
Join Date: Nov 2012
Location: Do you really want to know? Really?
Gender: Male
Nature: Bold
Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552 Send a message via Skype™ to karatekid552
Quote:
Originally Posted by tuna97 View Post
hello I need help with one of my scipts I dont know if its already answered , tryed to google it couldnt find any good help so I came here.
The problems is i set the person to disappear but when i re-entered the map the person would appear again

#org 0x8740ED6
'-----------------------------------
lock
faceplayer
applymovement 0x1 0x8740F01 ' say_! walk_left walk...
pauseevent 0x0
message 0x8740F07 ' Good Morning son!\nI...
callstd MSG_NOCLOSE ' Non-closing message
pause 0xA
closemsg
applymovement 0x1 0x8740F74 ' walk_down walk_down ...
pauseevent 0x0
disappear 0x4
setflag 0x1004
setvar 0x6001 0x1
release
end


#org 0x8740F07
= Good Morning son!\nI see you read the letter\ldad send you.\lI know exactly what he wants\lfrom you...Take care!

#org 0x8740F01
M say_! walk_left walk_left walk_left look_up end

#org 0x8740F74
M walk_down walk_down walk_down walk_down walk_down walk_left walk_left walk_left walk_left walk_left walk_left walk_left end
Unless you are using Jambo's glag hack, No Flags over 0x900.

Also, did you take the flag you set and out it as the Person ID in A-Map? If you did, then that means the RAM used by flag 0x1004 is temporary and is changed upon leaving or entering the map. Again, another reason why those flags aren't safe.

Quote:
Originally Posted by QuartierGenerale View Post
Hi!

I'm using PKSV for scripting, but i've some trouble with a script that start with a trainerbattle and then continue with some other things like msgboxes, applymovement and disappears.

My first idea is:

lockall
trainerbattle
copyvar PLAYERFACING 0x800C
jump @offset

in @offset do something other.

Then i put the person event as a trainer with a certain view radius. When i go in front of trainer, he saw me, a msgbox open and the game go in crash.

So i've moved the lockall under the trainerbattle. In this way the battle starts correctly, but at the end nothing happen and the player can continue the game....if return speaking with the trainer the second part of the script was executed...but it isn't what i want.

Some ideas?
This is the info about JPAN's trainer flag script running, but it has a lot of useful info in it:

Quote:
Originally Posted by JPAN
The trainer scripts have a few “myths” that must be cleared up in order to fully understand this modification:

First of all, no script is activated when the trainer spots you. That is the true reason why trying to place a normal script in that location (instead of a TrainerBattle starting one) would crash the game. The game, in fact, loads the second byte to find the type, the two following bytes for the trainer number, and so on, as activating a TrainerBattle command would normally do, even if the first bit is different. As the game error checking for the Trainer battles have been programmed to return badly if the trainer doesn’t exist, the game crashes because it loads an invalid command parameter.

Second, the Trainer flag is not really a flag. In fact, the game checks for only two possibilities in that byte: if it’s 1 or if it’s 3. 1 it’s the basic trainer activation, and the behavior we are used to see in-game. 3 is the reverse of 1, in the sense that it only detects you if you go behind the Overworld, and not facing it.

Third, the characteristic !, followed by walking to you, is not a in-game response, but rather one special, special 0x37. It usually does nothing, as when you can activate it in a script, it hasn’t got a person number, and when you have a person number, it’s because you talked to that person, and it doesn’t need to walk towards you. But the trainer routine deals with that, using a routine to set the last checked OW as the OW using the script.

Foruth, the trainer flag is checked not only when you are in front of them, but rather whenever the sprite is loaded into memory, but only runs when several conditions are met. Besides the obvious check for you in a clear path from them, it also checks for your pokémon number, and if you have at least one, it checks if you have at least one pokémon able to battle. If all conditions match, it tries to load the script data.

But, if it accesses a script, there must be a way to make it run it. As such, this hack came to be. Basically, what was done was add one extra option, where it checks if the Person event last two bytes as a flag number. If 0, it’s a normal trainer sprite, but if it’s greater than that, then it’s a flag, and it will check if it’s active. If not, runs the script asked. If it’s set, it ignores the person script. The real reason there is a flag here now is to prevent staying in a loop, where you would be constantly “harassed” by the OW. The flag is automatically set as soon as the script is placed to run, so you don’t need to place a setflag in the start of every script. Also, as an added bonus, the game will also perform automatically run a small “pre-script” that has the specials needed, making it look just like a regular trainer event.
Trainer battles do not work the way you wish. You can try trainer battle type 0x3 which usually continues the script, but it may not. The best way to get around your problem is to use a script tile.
__________________

Paired with Simba

Last edited by karatekid552; June 22nd, 2013 at 04:40 AM. Reason: Your double post has been automatically merged.
  #8384    
Old June 22nd, 2013, 11:04 AM
tuna97's Avatar
tuna97
Togepi
 
Join Date: Jul 2010
Location: somewhere
Gender: Male
hi again, Im confused while using green script boxes. here is a simple script I made:
#dyn 0x740000
#org @main
lock
faceplayer
message @talk
callstd MSG_NORMAL
setvar 0x8001 0x1
release
end

#org @talk
= \v\h01: Good Morning.

First of all what does setvar do and what does 0x8001 mean and 0x1 I know that they are the var number and var value but i dont know what they do and how to use them properly.
Second everytime i step on the script box I trigger it. How can I make it trigger only once? Do I need a second script box for that. Please explain, anyone. Thanks in advance
__________________
  #8385    
Old June 22nd, 2013, 11:24 AM
pokefreake's Avatar
pokefreake
 
Join Date: Nov 2012
Gender: Male
I've been experimenting with a few scripts and I've gotten the hang of things. One thing I'm still wondering about are the codes. I know of the \n, \p, and \e. Are there any others?
  #8386    
Old June 22nd, 2013, 01:04 PM
karatekid552's Avatar
karatekid552
What happens if I push it?....
 
Join Date: Nov 2012
Location: Do you really want to know? Really?
Gender: Male
Nature: Bold
Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552 Send a message via Skype™ to karatekid552
Quote:
Originally Posted by tuna97 View Post
hi again, Im confused while using green script boxes. here is a simple script I made:
#dyn 0x740000
#org @main
lock
faceplayer
message @talk
callstd MSG_NORMAL
setvar 0x8001 0x1
release
end

#org @talk
= \v\h01: Good Morning.

First of all what does setvar do and what does 0x8001 mean and 0x1 I know that they are the var number and var value but i dont know what they do and how to use them properly.
Second everytime i step on the script box I trigger it. How can I make it trigger only once? Do I need a second script box for that. Please explain, anyone. Thanks in advance
I wrote a tutorial on this.... Google "Flags, Vars, & Script Tiles".

Quote:
Originally Posted by pokefreake View Post
I've been experimenting with a few scripts and I've gotten the hang of things. One thing I'm still wondering about are the codes. I know of the \n, \p, and \e. Are there any others?
\l is like \p but it doesn't create a new page, it just goes one more line when you hit A.
__________________

Paired with Simba

Last edited by karatekid552; June 22nd, 2013 at 01:05 PM. Reason: Your double post has been automatically merged.
  #8387    
Old June 22nd, 2013, 08:23 PM
xboxmandude's Avatar
xboxmandude
 
Join Date: Jun 2013
Location: Pakistan
Age: 18
Gender: Male
Nature: Lonely
Look I've read the rules... And I'm not asking for a script.
I want a tutorial on how to make oak give you the national dex.
I know what I have to put its some specialx something. I just don't know how or what else I have to type. Yes.. I am infact a noob.
I know how to make someone else give the national dex.
But I want oak to give it.
If anyone van help me please pm me I will give credit when my hack is completed
__________________
MY Current TEAM (Pokemon Ultra Violet)


Traded to emerald
Favourite pokemon game
Fire red.(Ultra violet) + emerald

Oh yeah I hate the newer gen..
Anything after gen 3 sucks
  #8388    
Old June 23rd, 2013, 12:50 AM
QuartierGenerale
 
Join Date: Oct 2012
But if i use a script tile, and i want a trainer with view radius = 7, i need to apply seven different movement depending on where the hero is...or is there a better way to do this?
  #8389    
Old June 23rd, 2013, 05:04 AM
karatekid552's Avatar
karatekid552
What happens if I push it?....
 
Join Date: Nov 2012
Location: Do you really want to know? Really?
Gender: Male
Nature: Bold
Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552 Send a message via Skype™ to karatekid552
Quote:
Originally Posted by QuartierGenerale View Post
But if i use a script tile, and i want a trainer with view radius = 7, i need to apply seven different movement depending on where the hero is...or is there a better way to do this?
Yes, that is how it would need to be done, or you could simply put some obstacles in the way and limit the amount of places the player could be when he/she is seen by the trainer.
__________________

Paired with Simba
  #8390    
Old June 24th, 2013, 07:40 PM
awipe1's Avatar
awipe1
 
Join Date: Aug 2012
Gender: Male
Anyone help me with this scripting problem? I put this script on a 'script' in advanced map

Spoiler:
'---------------
#org 0x804083
lock
textcolor 0x0
msgbox 0x88040B3 MSG_NORMAL '"Hey! Wait!"
pause 0x1E
applymovement MOVE_PLAYER 0x8804135
waitmovement 0x0
pause 0x1E
msgbox 0x88040C0 MSG_NORMAL '"Team Rocket has been spotted\nin t..."
applymovement MOVE_PLAYER 0x8804132
waitmovement 0x0
release
end


'---------
' Strings
'---------
#org 0x8040B3
= Hey! Wait!

#org 0x8040C0
= Team Rocket has been spotted\nin this area.\pNo one is allowed to pass until\nwe are sure they have left the\larea.


'-----------
' Movements
'-----------
#org 0x804135
#raw 0x1 'Face Up
#raw 0xFE 'End of Movements

#org 0x804132
#raw 0x12 'Step Left (Normal)
#raw 0xFE 'End of Movements


and when I add the var value and var number, I just walk through it and the script doesn't activate. I made sure I was using the right variable and such, but no matter what the script doesnt activate. (the var number is 4010 and the var value is 4)

Why isn't the script activating?
__________________
Check out my Pokemon Rom! Click the Image Below!


Also I'm currently looking for a spriter for my ROM. Someone who can make OWs and possibly trainer sprites (I might make those myself). Message me if you would like to be a part of Pokemon Battle Brown!
NOTE: You wouldn't be designing your own sprites, I would be telling you what I needed, and you would make it for me ... as appealing as that sounds. I know it doesn't sound like a fun task, but if you want to be a part of this ROM, then that's what will happen. Also I would like to see some stuff you have made before I accept your offer.
  #8391    
Old June 25th, 2013, 04:45 AM
GoGoJJTech's Avatar
GoGoJJTech
アルファ近く
 
Join Date: Nov 2012
Location: Earth
Age: 15
Gender: Male
Nature: Quiet
This is a problem because variable 4010 Does not equal 4. You need a script to setvar 4010 To 4 before this could run.
__________________

Last edited by GoGoJJTech; June 25th, 2013 at 04:51 AM.
  #8392    
Old June 25th, 2013, 06:34 AM
karatekid552's Avatar
karatekid552
What happens if I push it?....
 
Join Date: Nov 2012
Location: Do you really want to know? Really?
Gender: Male
Nature: Bold
Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552 Send a message via Skype™ to karatekid552
Quote:
Originally Posted by gogojjtech View Post
This is a problem because variable 4010 Does not equal 4. You need a script to setvar 4010 To 4 before this could run.
Var 4010 is temporary. Of course it won't stay at 0x4.
__________________

Paired with Simba
  #8393    
Old June 25th, 2013, 12:24 PM
pokefreake's Avatar
pokefreake
 
Join Date: Nov 2012
Gender: Male
I've been experimenting with a few scripts and I was wondering what numbers should I use for the var number? Like in flags I can use 200 and up.

Last edited by pokefreake; June 25th, 2013 at 01:50 PM.
  #8394    
Old June 27th, 2013, 06:30 AM
avaramoon
Mirage Of Tales
 
Join Date: Dec 2011
Location: Sogen Suburb, Avlar
Gender: Female
Nature: Brave
In my hack I want to include a sort of tournament type thing, but I want only certain pokemon to be able to be used in it.

Would I just do this by repeating a lot of checkpokemon commands containing the desired pokemon's hex numbers? I didn't know if this would work because you can only have six in your party, and I want more than just six pokemon to be eligible to enter.

I'm (obviously) new to this. I have read all the scripting tutorials out there and tried to write a script for this myself but when I test it it doesn't work. I'm not requesting a script, I just want to know IF it can be done and if so, how.

Another thing I need help with is that my warps coming out of your room at the very start of the game are not working!! I cannot get out of the first screen you go to after the intro, unless I use a warp script, any more experienced people know what the problem might be?

Thanks
  #8395    
Old June 27th, 2013, 09:45 AM
karatekid552's Avatar
karatekid552
What happens if I push it?....
 
Join Date: Nov 2012
Location: Do you really want to know? Really?
Gender: Male
Nature: Bold
Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552 Send a message via Skype™ to karatekid552
Quote:
Originally Posted by pokefreake View Post
I've been experimenting with a few scripts and I was wondering what numbers should I use for the var number? Like in flags I can use 200 and up.
I wrote a tutorial on this. Google "Flags, Vars, & Script Tiles".

Quote:
Originally Posted by avaramoon View Post
In my hack I want to include a sort of tournament type thing, but I want only certain pokemon to be able to be used in it.

Would I just do this by repeating a lot of checkpokemon commands containing the desired pokemon's hex numbers? I didn't know if this would work because you can only have six in your party, and I want more than just six pokemon to be eligible to enter.

I'm (obviously) new to this. I have read all the scripting tutorials out there and tried to write a script for this myself but when I test it it doesn't work. I'm not requesting a script, I just want to know IF it can be done and if so, how.

Another thing I need help with is that my warps coming out of your room at the very start of the game are not working!! I cannot get out of the first screen you go to after the intro, unless I use a warp script, any more experienced people know what the problem might be?

Thanks
Checkpokemon, is, unfortunately, not a real command. You will need to use a series of specials to do this. (Now that I think about it, how freaking useful would that be? I think I may just write a new command for that.) I can't remember exactly which specials, but I know that I found them by breaking down the script used in HackMew's remove specific pokemon tutorial/research.

I can't help with your second problem unless I see what's going on.
__________________

Paired with Simba

Last edited by karatekid552; June 27th, 2013 at 09:52 AM. Reason: Your double post has been automatically merged.
  #8396    
Old June 27th, 2013, 01:30 PM
LocksmithArmy's Avatar
LocksmithArmy
Mew!
 
Join Date: Feb 2013
Age: 25
Gender: Male
Quote:
Originally Posted by avaramoon View Post
Another thing I need help with is that my warps coming out of your room at the very start of the game are not working!! I cannot get out of the first screen you go to after the intro, unless I use a warp script, any more experienced people know what the problem might be?

Thanks
I am assuming you changed the room at the start of the game, if this is the case,
you probably put a warp on a tile that was not a "door"... a screenshot would help the diagnosis tho... or atleast some more info
__________________
  #8397    
Old June 27th, 2013, 05:25 PM
YogiBerra
 
Join Date: Oct 2010
Gender: Male
I'm having a problem with a map connection. Going through is fine, then if I try to go back, the connection is blocked off as if there is a 1 movement permission there, but there isn't. It also shows a block of tiles to the left on the original route that are the border block for both maps. I do not have any tiles in either map, within the first 7 of the connection, that are not present in the tileset of both maps.
  #8398    
Old June 27th, 2013, 05:51 PM
GoGoJJTech's Avatar
GoGoJJTech
アルファ近く
 
Join Date: Nov 2012
Location: Earth
Age: 15
Gender: Male
Nature: Quiet
Your map connections are messed up do to am 1.95. That's why you should NOT use am 1.95. Plus this is the script help thread, so only scripting problems go here.
__________________
  #8399    
Old June 27th, 2013, 08:46 PM
LocksmithArmy's Avatar
LocksmithArmy
Mew!
 
Join Date: Feb 2013
Age: 25
Gender: Male
Quote:
Originally Posted by YogiBerra View Post
I'm having a problem with a map connection. Going through is fine, then if I try to go back, the connection is blocked off as if there is a 1 movement permission there, but there isn't. It also shows a block of tiles to the left on the original route that are the border block for both maps. I do not have any tiles in either map, within the first 7 of the connection, that are not present in the tileset of both maps.
go to the header tab... hit ctrl+h then scroll down to the "connection" offset... and overwrite it with all 00000s...

change maps and make sure you save the maps changes

go back to the map with the issues...

then make all new map connections...

I had similar issues in the past and just clearing them out and redoing them always worked...
__________________
  #8400    
Old June 28th, 2013, 05:29 PM
YogiBerra
 
Join Date: Oct 2010
Gender: Male
Thank you, terribly sorry I posted in the wrong thread, for some reason I thought I was in the simple questions thread.
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 03:52 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.