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
  #19951    
Old November 13th, 2011, 10:13 AM
Quickster's Avatar
Quickster
Dream or Drop?
 
Join Date: Oct 2007
Gender: Male
Nature: Quiet

Advertise here
Quote:
Originally Posted by Teh Blazer View Post
So, does anybody here have an idea about making a script work on one map and then changing maps but still have the script run fluently?

Pretty much, my dilemma is that I want to recreate the script on this:
http://www.youtube.com/watch?v=RWE41...feature=fvwrel
from 0:50-1:06

I can make the script work until it leaves the map to Route 1, then it stops. Level scripts don't work when I force the player to move to Route 1, and script tiles don't work by the same conditions either. Do you guys ave any idea?
What do you mean the script stops? I have made a level script, well technically three, that contiues across three masp without you controlling the player. Although it involved warping and not walking into the map, I believe it has the same concept. I used variables. Ill try to make a mock script and see what happens.

EDIT: Alright, so what I did was make a regular script I having my player walk two steps up along with another sprite. This would put us into the first tile of route 1. At the end of the NPC applymovement i had #raw 0x60 to hide sprite. I put another sprite, in the route 1 map, at the first tile the NPC would dissapear on, and once I entered route 1, the sprite automatically appears. There is a small point at wich both sprites are visible, but only a split second. In the tile script in Pallet Town, I set a variable for a level script to appear, and the level script in Route 1 activated right away. So it is possible, just a little gltichy in the one area. Sorry if this is hard to read, Im in a hurry. If you have questions just PM me.
__________________
I laugh looking at this.

But sometimes I want to come back to it...


Last edited by Quickster; November 13th, 2011 at 11:04 AM.
  #19952    
Old November 13th, 2011, 10:58 AM
Nate VonGrimm's Avatar
Nate VonGrimm
Mime Jr.
 
Join Date: Oct 2011
Location: Uxbridge
Age: 22
Gender: Male
Nature: Relaxed
Time for a script question!!
Now to try and explain it...
I'm not sure how so here it goes...

I'm trying to get scripts to counter-act one another.
It's a lot like the Ruby script where you can't exit the first village until you've been to the Rivals house and seen Professor Birch.
I'm trying to do the exact same thing but I can't seem to get one script to kill the other.
If someone could help me out here, it would be great.

I'm hacking Pokemon Ruby using Pokescript.
(If you only know how to do it in XSE, please dumb it down a bit as I only use XSE to view the script in A-Map and configure parts of the script).

Scripts:
#org $findprofoak
setvar 5004 0x0
checkflag 0x201
if b_false goto $notdone

#org $notdone
lock
message $gotolab
$gotolab 1 =(No time for sightseeing,\nBetter go to Professor Oak's lab)
boxset 6
applymovement 0xFF $tolab
pausemove 0
release
end

#org $tolab
#raw 0x9
#raw 0xFE
This is the script that stops the player from going to a certain area.

#org $profnothere
lock
setvar 5005 0x1
message $nothere
$nothere 1 =(Professor Oak doesn't seem to be here,\nbetter ask his assistants)
boxset 6
setflag 0x201
release
end
This is the script that supposed to allow the player access to the next area.
What am I doing wrong?

Also, can someone tell me how to do the Spoiler thing? I have no idea how to do it lol
I'm new to any kind forums.
  #19953    
Old November 13th, 2011, 05:09 PM
DavidJCobb
RESIDENT RAAAAAAAAAAAAGEMASTER
 
Join Date: Jul 2010
Gender: Male
Nature: Lonely
Quote:
Also, can someone tell me how to do the Spoiler thing? I have no idea how to do it lol
I'm new to any kind forums.
[spoiler]Text[/spoiler]

Copy and paste that exactly as it appears.

Quote:
Originally Posted by Nate VonGrimm View Post
Scripts:
Spoiler:
Code:
#org $findprofoak
setvar 5004 0x0
checkflag 0x201
if b_false goto $notdone
PROBLEM EXPLAINED BELOW.

#org $notdone
lock
message $gotolab
$gotolab 1 =(No time for sightseeing,\nBetter go to Professor Oak's lab)
boxset 6
applymovement 0xFF $tolab
pausemove 0
release
end

#org $tolab
#raw 0x9
#raw 0xFE

This is the script that stops the player from going to a certain area.

Spoiler:
Code:
#org $profnothere
lock
setvar 5005 0x1
message $nothere
$nothere 1 =(Professor Oak doesn't seem to be here,\nbetter ask his assistants)
boxset 6
setflag 0x201
release
end

This is the script that supposed to allow the player access to the next area.
What am I doing wrong?
My suspicion is that your script breaks because there's no "end" at the part I added red text to -- you don't do anything after you check the flag, to handle the possibility of it being true. Depending on how PKSV compiles that, I would expect the game to reach the end of $findprofoak, and then continue right to the start of $notdone since there's nothing to separate them. This would result in $notdone being executed regardless of the result of checkflag.

"Release" and "end" at the end of $findprofoak should fix it.
__________________
  #19954    
Old November 13th, 2011, 07:50 PM
Nate VonGrimm's Avatar
Nate VonGrimm
Mime Jr.
 
Join Date: Oct 2011
Location: Uxbridge
Age: 22
Gender: Male
Nature: Relaxed
Quote:
My suspicion is that your script breaks because there's no "end" at the part I added red text to -- you don't do anything after you check the flag, to handle the possibility of it being true. Depending on how PKSV compiles that, I would expect the game to reach the end of $findprofoak, and then continue right to the start of $notdone since there's nothing to separate them. This would result in $notdone being executed regardless of the result of checkflag.

"Release" and "end" at the end of $findprofoak should fix it.
Found the issue. I over looked the whole process and realized that I was trying to clear a flag that I hadn't even set to begin with. I have now figured that instead of clearflag, I needed setflag. It's working fine now. Thanks for the help and thanks for telling me how to do Spoiler!
  #19955    
Old November 14th, 2011, 11:45 AM
Epitaph93's Avatar
Epitaph93
Intermediate Digidestined
 
Join Date: Oct 2011
Location: Texas
Age: 21
Gender: Male
Nature: Calm
I have an idea, but I'm not sure how to go about doing it or if it can be done. I want to use the daycare system to make a fusion system. I thought maybe I could use the "breeding only" form of evolution, but I'm not finding a full explanation of this term. However, if that works is there a way to add egg groups to the game? I'll keep checking this out, but any help would be fantastic.
__________________
I'm Epitaph and I plan on releasing the first full-fledged Digimon hack of Pokemon Fire Red. We're getting close to the first release so come check it out in the Progressing hacks, and see how you can help us with the project.
  #19956    
Old November 15th, 2011, 08:17 PM
Jay the penguin's Avatar
Jay the penguin
 
Join Date: Oct 2011
Gender: Male
Okay I'm having alot of trouble with this pokemart script..

#dynamic 0x80000
#org @start
lock
faceplayer
pokemart @values
release
end

#org @values
#raw word 0x2
#raw word 0x5
#raw word 0xD
#raw word 0xE
#raw word 0xF
#raw word 0x10
#raw word 0x11
#raw word 0x12
#raw word 0x15
#raw word 0x16
#raw word 0x17
#raw word 0x18
#raw word 0x0
#raw word 0x0
#raw word 0x0

I mean the script seems fine to me but when I was testing after I buy something or sell something it chages the heros sprite and position after ending the conversation.
It even leaves my original hero sprite.

What do you think is the problem?
__________________


My Hack!
Visit the thread!
  #19957    
Old November 16th, 2011, 12:27 PM
south69_dallas
Unhatched Egg
 
Join Date: Feb 2010
Gender: Male
Quote:
Originally Posted by shinyabsol1 View Post
Find the trainer you want to change in A-Map. Click on their sprite, then click "open script". This will open that trainer's script in xse.

Now look at the trainerbattle command in the script you just opened. The second hex number after it is the trainer's ID, which corresponds with the numbers in the "trainer selection" box of A-Trainer.

I think you can do the rest.
what is a hex number? thanks for the help

Also,is there a quicker way to edit maps? im currently clicking the left part of the tree setting it then the middle the the right the the left top etc etc, so to create a 100 trees its like 600 mouse clicks

Last edited by south69_dallas; November 16th, 2011 at 12:29 PM. Reason: add more text
  #19958    
Old November 16th, 2011, 03:48 PM
shinyabsol1's Avatar
shinyabsol1
Pokemon DarkJasper!?
 
Join Date: Aug 2010
Gender: Male
Nature: Calm
Quote:
Originally Posted by south69_dallas
what is a hex number? thanks for the help
Hexidecimal is a number system with a base of 16. Hackmew's Comprehensive Scripting Guide (which comes with XSE) has a section ("Math" Lesson) that explains it in full. Read that.

Quote:
Originally Posted by south69_dallas
Also,is there a quicker way to edit maps? im currently clicking the left part of the tree setting it then the middle the the right the the left top etc etc, so to create a 100 trees its like 600 mouse clicks
To copy a lot of tiles for pasting: hold ctrl, then right click and drag to select the tiles you want. Now you can paste whole trees instead of doing it tile by tile!
  #19959    
Old November 16th, 2011, 04:58 PM
south69_dallas
Unhatched Egg
 
Join Date: Feb 2010
Gender: Male
awesome....thanks.....that makes mapping alot easier...il find the guide later but thanks for the direction...im toying with firered ive only done to viridian forest and thats wo changing alot of scripts sigh like 4hrs work i changed an item on a signpost and wow had delete the sign cuz the sign made it very glitchy. The smallest change can freeze the game up didnt know that. Anyways thanks again
  #19960    
Old November 16th, 2011, 05:53 PM
Cold Ivory's Avatar
Cold Ivory
 
Join Date: Mar 2011
Gender: Male
Nature: Mild
Quote:
Originally Posted by Darthatron View Post
Not in an overly easy way, no. You can either implement some ASM code to store the level of a pokemon in a variable then use a script to display it, or you can do it ALL in a script. The ASM code is a much better option.

ASM Code option:
Code:
.align 2
.thumb

start:

	push {r0-r3, lr}
	
		ldr r0, Var_8004		/*load the pointer of variable 0x8004 into r0*/
		ldrh r1, [r0]			/*load the value of variable 0x8004 into r1*/
		
		cmp r1, #0x5			/*compares the value of r1 to 0x5*/
		bgt quit				/*if greater than 0x5, goto quit label*/
		
		mov r0, #0x64			/*set the value of r1 to 0x64*/
		mul r1, r0				/*multiply by r1 (0x64) to 'move' to that pokemon slot*/

		ldr r2, Party_Pointer	/*load the pointer for party data into r2*/
		add r2, #0x54			/*move to where the level is stored*/
		add r2, r1				/*add the value of r1 to r2*/
		
		ldrb r3, [r2]			/*load the level byte into r0*/

quit:

		ldr r1, Var_800D		/*load the pointer for variable 0x800D into r1*/
		strh r3, [r1]			/*store the (halfword) level value into var 0x800D*/
 
	pop {r0-r3, pc}

Party_Pointer: .word 0x02024284
Var_8004: .word 0x020370c0
Var_800D: .word 0x020370d0
Script option:
Code:
#dynamic 0x800000

#org @Pokemon1
setvar LASTRESULT 0x0000
copybyte 0x020370d0 0x020242D8
return
end

#org @Pokemon2
setvar LASTRESULT 0x0000
copybyte 0x020370d0 0x0202433C
return
end

#org @Pokemon3
setvar LASTRESULT 0x0000
copybyte 0x020370d0 0x020242A0
return
end

#org @Pokemon4
setvar LASTRESULT 0x0000
copybyte 0x020370d0 0x02024404
return
end

#org @Pokemon5
setvar LASTRESULT 0x0000
copybyte 0x020370d0 0x02024468
return
end

#org @Pokemon6
setvar LASTRESULT 0x0000
copybyte 0x020370d0 0x020244CC
return
end
Hope that helps.
I still remain somewhat confuzzled as to the operations occurring here. Are both options independent of each other?
If so, what is LASTRESULT referencing in the script option?

In either case, with the level of the pokemon loaded into variable, it is then possible to run a compare function and split the script dependent on the value the variable was set to, yes?
  #19961    
Old November 16th, 2011, 08:38 PM
DavidJCobb
RESIDENT RAAAAAAAAAAAAGEMASTER
 
Join Date: Jul 2010
Gender: Male
Nature: Lonely
Quote:
Originally Posted by Cold Ivory View Post
I still remain somewhat confuzzled as to the operations occurring here. Are both options independent of each other?
If so, what is LASTRESULT referencing in the script option?
They're completely independent. LASTRESULT is another name for Variable 0x800D, and in the script version, you're basically copying the data from the Pokemon section of RAM, to the RAM address used to store LASTRESULT's value. Think of it as a roundabout "setvar". (The "setvar" before the "copybyte" command works because LASTRESULT is a two-byte value. Copybyte only changes one byte. Setvar deals with the byte that Copybyte misses.)

Quote:
Originally Posted by Cold Ivory View Post
In either case, with the level of the pokemon loaded into variable, it is then possible to run a compare function and split the script dependent on the value the variable was set to, yes?
Yes. Just your standard compare/comparevar and if statements.
__________________
  #19962    
Old November 16th, 2011, 09:40 PM
Cold Ivory's Avatar
Cold Ivory
 
Join Date: Mar 2011
Gender: Male
Nature: Mild
Quote:
Originally Posted by DavidJCobb View Post
They're completely independent. LASTRESULT is another name for Variable 0x800D, and in the script version, you're basically copying the data from the Pokemon section of RAM, to the RAM address used to store LASTRESULT's value. Think of it as a roundabout "setvar". (The "setvar" before the "copybyte" command works because LASTRESULT is a two-byte value. Copybyte only changes one byte. Setvar deals with the byte that Copybyte misses.)

Yes. Just your standard compare/comparevar and if statements.
Awesome, thanks!

Where am I messing up here, then?

...
#org @start
lock
faceplayer
checkflag 0x6C
if 0x1 goto @other
setvar LASTRESULT 0x0000
copybyte 0x020370d0 0x020242D8
compare 0x800D 0x5
if 0x1 goto @weak
compare 0x800D 0x7
if 0x1 goto @strong
msgbox @fight 0x6
release
end
...

It seems to go right from faceplayer to release.
Perhaps I'm copying the wrong bytes? (I'm using Ruby)
  #19963    
Old November 17th, 2011, 10:47 AM
godsleftarm
Beginning Trainer
 
Join Date: Nov 2011
Gender: Male
Hello

Im trying to hack pokemon fire red for my personal use, and i was thinking about create some other islands with legendaries from other versions. What i want to know is the way to go to them with tickets like we go to birth island or navel rock. I also want to obtain rainbow/mystic... tickets without cheats (finding them on the wild or someone giving them to me) and make the sailor on virmilion recognise them. I've tryed this and he only recognise the tri-pass.

Thanks in advance
  #19964    
Old November 17th, 2011, 03:28 PM
Devinsparce's Avatar
Devinsparce
Beginning Trainer
 
Join Date: Jan 2011
Location: virginia beach
Gender: Male
Nature: Adamant
Hey guys. I have a couple of questions that have been asked before, but I couldn't seem to find any clear answers. Let me know if any of you have an idea how to accomplish these. Thanks in advance! - Devinsparce

I am working with Fire Red

1. After you press start at the intro, the game explains the controls. How can I completely remove this section.

2. After it shows you the controls, before Professor Oak comes on screen, there is a preface with Pikachu in the corner. I would like to either (1) get rid of pikachu, or (2) remove this part all together.

Thanks again everyone!
__________________
Devinsparce
Creator of Dunsparce Edition
  #19965    
Old November 17th, 2011, 03:56 PM
DavidJCobb
RESIDENT RAAAAAAAAAAAAGEMASTER
 
Join Date: Jul 2010
Gender: Male
Nature: Lonely
Quote:
Originally Posted by godsleftarm View Post
Im trying to hack pokemon fire red for my personal use, and i was thinking about create some other islands with legendaries from other versions. What i want to know is the way to go to them with tickets like we go to birth island or navel rock.
You'll need to create or modify items to function as tickets, and then write scripts that check for them.

Quote:
Originally Posted by godsleftarm View Post
I also want to obtain rainbow/mystic... tickets without cheats (finding them on the wild or someone giving them to me) and make the sailor on virmilion recognise them. I've tryed this and he only recognise the tri-pass.
If flags 0x84A and 0x84B are not set, then the Mystic and Aurora tickets, respectively, will be ignored even if the player has them in their Bag. I don't know when or how these flags get set, or what else they might affect, however.
__________________
  #19966    
Old November 18th, 2011, 05:44 AM
godsleftarm
Beginning Trainer
 
Join Date: Nov 2011
Gender: Male
Thanks for your help. Appreciated
  #19967    
Old November 18th, 2011, 02:13 PM
romancandle
 
Join Date: Oct 2009
Gender: Male
Nature: Adamant
Question:

Is there a Third Gen Casino prize editing program? I think I can figure it out by hand, but I always like tools to make it faster and coordinate it easier.
  #19968    
Old November 18th, 2011, 06:36 PM
DrFuji's Avatar
DrFuji
Helfen, Wehren, Heilen
 
Join Date: Sep 2009
Location: Upside-downia
Age: 21
Gender: Male
Nature: Jolly
Quote:
Originally Posted by Devinsparce View Post
Hey guys. I have a couple of questions that have been asked before, but I couldn't seem to find any clear answers. Let me know if any of you have an idea how to accomplish these. Thanks in advance! - Devinsparce

I am working with Fire Red

1. After you press start at the intro, the game explains the controls. How can I completely remove this section.

2. After it shows you the controls, before Professor Oak comes on screen, there is a preface with Pikachu in the corner. I would like to either (1) get rid of pikachu, or (2) remove this part all together.

Thanks again everyone!
If you want to remove those two screens from the game completely, you would have to use ASM, which far beyond the ability of a regular hacker. You can however, remove the Pikachu in the second screen.

In unLZ.GBA you can find parts of the moving Pikachu at 345, 346 and 2028 in an untouched FR ROM. Replace them with the transparent colour and it won't show up in-game.

Quote:
Originally Posted by romancandle View Post
Question:

Is there a Third Gen Casino prize editing program? I think I can figure it out by hand, but I always like tools to make it faster and coordinate it easier.
Nah, I don't think there is such a program. Though, to be honest, it isn't too hard to change manually.
__________________
  #19969    
Old November 19th, 2011, 11:25 AM
Adamina's Avatar
Adamina
Beginning Trainer
 
Join Date: Nov 2011
Gender: Female
Using a FireRom, in XSE version 1.0, whenever I go to compile a script that involves the 'giveitem' command, I am told:

Quote:
Error 13 'Type mismatch' on line 166. Missing #define or parameter. Line: giveitem2 0x4 0x5 0x101
(obv. the line number varies).

But this is even when I go to compile an entirely unaltered script (therefore I know it must work)! For example, the quote above is from when I have been trying to reset Professor Oak's script (by pasting the original script over my altered one). But, it will not accept the 'giveitem2' command. The same thing happens when I go to compile Brock's speech, when he gives you TM39.

Is this a problem with this version of XSE, or the ROM I'm using, or what? Please and thank you.


Nevermind. I found version 1.1 and it seems to compile it fine now.

Last edited by Adamina; November 19th, 2011 at 11:41 AM.
  #19970    
Old November 19th, 2011, 11:33 PM
Nate VonGrimm's Avatar
Nate VonGrimm
Mime Jr.
 
Join Date: Oct 2011
Location: Uxbridge
Age: 22
Gender: Male
Nature: Relaxed
I am in need of some help.

I need to know how to add 'crys' to a script.
And also how do I find out the cry number for each Pokemon?

If someone could help me in Pokescript format, that would be nice.
But I will accept XSE format as well.

Please help =]
__________________
Currently working on a new Pokemon Hack with an in-depth story line!
That's about as much as you're going to get for now...


  #19971    
Old November 19th, 2011, 11:50 PM
chrunch's Avatar
chrunch
 
 
Join Date: Oct 2009
Gender: Male
Send a message via Windows Live Messenger to chrunch
Quote:
Originally Posted by Nate VonGrimm View Post
I am in need of some help.

I need to know how to add 'crys' to a script.
And also how do I find out the cry number for each Pokemon?

If someone could help me in Pokescript format, that would be nice.
But I will accept XSE format as well.

Please help =]
Code:
cry 0xA1 1
nop
nop
in Pokescript, the 1 represents which Pokemon the cry is from (In my case, it's bulbasaur), so you just change the 1 to whatever Pokemon whose cry you want. you'll have to add two nops for it to work correctly.
----------------------------------------
On to my question, I know there's a command that makes the last sprite you talked to disappear (#raw 0x53 0x0F 0x80), but is there a way to make the last sprite you talked to move? This is using Pokescript. Thanks. :)
__________________
  #19972    
Old November 20th, 2011, 01:13 AM
DrFuji's Avatar
DrFuji
Helfen, Wehren, Heilen
 
Join Date: Sep 2009
Location: Upside-downia
Age: 21
Gender: Male
Nature: Jolly
Quote:
Originally Posted by chrunch View Post
On to my question, I know there's a command that makes the last sprite you talked to disappear (#raw 0x53 0x0F 0x80), but is there a way to make the last sprite you talked to move? This is using Pokescript. Thanks. :)
The variable 0x800F always refers to the person you spoke with last and can be used in a regular applymovement script in place of the person's number. It is quite useful and should hopefully be compatible with PokeScript :D
__________________
  #19973    
Old November 20th, 2011, 08:02 AM
MarcusZ321
Beginning Trainer
 
Join Date: Nov 2011
Gender: Male
how could i edit my ruby version title screen colour?who can help me?
  #19974    
Old November 20th, 2011, 11:02 PM
Nate VonGrimm's Avatar
Nate VonGrimm
Mime Jr.
 
Join Date: Oct 2011
Location: Uxbridge
Age: 22
Gender: Male
Nature: Relaxed
Quote:
Originally Posted by chrunch View Post
Code:
cry 0xA1 1
nop
nop
in Pokescript, the 1 represents which Pokemon the cry is from (In my case, it's bulbasaur), so you just change the 1 to whatever Pokemon whose cry you want. you'll have to add two nops for it to work correctly.
Thanks for that. I just want to know, what does the 0xA1 do in the script?
__________________
Currently working on a new Pokemon Hack with an in-depth story line!
That's about as much as you're going to get for now...


  #19975    
Old November 21st, 2011, 02:59 AM
Groudon93
Beginning Trainer
 
Join Date: Nov 2011
Gender: Male
Hi guys, I'm hacking Ruby/Emerald and I want to use rematchable trainers in my hack, but when I move them from the Route they were into to another place, it still requires me to walk in the original Route to trigger the rematch... is there a way to "move" also the required steps to the other Route?
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 09:31 AM.


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.