The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > ROM Hacking > Tools, Tutorials & Resources
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

Tools, Tutorials & Resources Various tools to help you develop your hacks can be found here.
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
  #376    
Old June 19th, 2009, 05:53 PM
darkninja333's Avatar
darkninja333
Beginning Trainer
 
Join Date: Jun 2009
Gender: Male

Advertise here
Okay so it pops up saying

Spoiler:
o Search for bytes

Bytes to look for 00 Or FF

Then Specify searched area from

[800000] to [ Blank]

Needed bytes 100

Then it pops up 5 offsets

$2E9804
$2E9868
$2E98CC
$2E9930
$2E9994


So then i copy the first offset and put in the Script Offset box for the event

Then i open the event and it looks like this

Spoiler:
#org 0x82E9804
'-----------------------------------
nop0 ' #raw 0x0<------- That continued on for like 500 lines
additem 0x4444 0x4244
additem 0x4444 0x4420
additem 0x24 0x4442
comparevars2 0x2000 0x224
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
callasm2 0x22000000
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
end



So then i used the Script Generator and selected person talking entered my message and set it as MSG_SIGN and hit generate. This pops up.

Spoiler:
#dyn 0x800000
#org @start
lock
faceplayer
msgbox @text ' LITTLEROOT GYM[.]
callstd MSG_SIGN
release
end

#org @text
= LITTLEROOT GYM[.]


I dont know what to do from there.
  #377    
Old June 19th, 2009, 05:57 PM
Samike360's Avatar
Samike360
Lover of May
 
Join Date: Mar 2009
Location: ATL
Gender:
Nature: Bold
^Nope, do it this way:

You messed up when you got this:
$2E9804
$2E9868
$2E98CC
$2E9930
$2E9994

Go back to the magnifying glass. Do you see where it says $6B0000 in a text-box? Change it to $800000. Then get your offsets and replace the @start with one of the five that you choose.
__________________





Please warm my eggs...I'll be sure to return the favor

From now one, if you haven't contacted me yet....I will not accept hacks unless they are at least in progressing hacks. So if you want my help, get some screenshots first.
  #378    
Old June 19th, 2009, 06:11 PM
darkninja333's Avatar
darkninja333
Beginning Trainer
 
Join Date: Jun 2009
Gender: Male
Okay I went back and did that then i get...

Spoiler:

$85D5B4
$869630
$8699D0
$869A34
$86A13C


So im gonna use $85D5B4

I put in the script offset

Spoiler:
#org 0x885D4B4
'-----------------------------------
comparevars2 0x3233 0x2233
comparevars2 0x1121 0xF010
setvar 0xFF0F 0xEFEF
#raw 0xEF
#raw 0xEF
#raw 0xEF
#raw 0xFF
#raw 0xFF
#raw 0xF0
writebytetooffset 0x11 0x11112111
writebytetooffset 0x10 0xFFFF0000
loadpointer 0xF0 0xFF0FFF
'Pointer not in ROM area
nop1 ' #raw 0x1
loadpointer 0xF1 0x33031723
'Pointer not in ROM area
compare 0xFE11 0xEDDD
#raw 0xDE
#raw 0xDE
#raw 0xEE
#raw 0xEF
#raw 0xEF
nop0 ' #raw 0x0
nop0 ' #raw 0x0
writebytetooffset 0x11 0x12121212
loadbytefrompointer 0x11 0xFF0F1011
CMD_FE 0xFF
#raw 0xFF
#raw 0xEF
#raw 0xF0
#raw 0xF0
#raw 0xF8
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop1 ' #raw 0x1
writebytetooffset 0x10 0x10101111
writebytetooffset 0xF 0xDCEE1100
#raw 0xDD
#raw 0xEE
#raw 0xFF
loadbytefrompointer 0x23 0x22323232
comparevars2 0x1111 0xFF00
#raw 0xFF
#raw 0xFF
#raw 0xEF
if 0xF jump 0xFFEFEFEF ' Unknown IF condition
'Jump not in ROM area
nop0 ' #raw 0x0
nop1 ' #raw 0x1
writebytetooffset 0x11 0x11111112
setbyte2 0x0 0x0
loadpointer 0xFF 0xFFFF00F
'Pointer not in ROM area
loadpointer 0xF0 0x12FF0001
'Pointer not in ROM area
playsound 0x2243 0x11
playsound 0xED0F 0xDE
#raw 0xDE
#raw 0xDE
#raw 0xEE
#raw 0xEE
#raw 0xFF
#raw 0xFF
#raw 0xF1
setbyte2 0x11 0x11
compare 0x1212 0x1112
writebytetooffset 0x11 0xFEFFFF1F
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xF0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
writebytetooffset 0xFC 0x1111100
nop1 ' #raw 0x1
setbyte2 0x0 0x0
nop0 ' #raw 0x0
#raw 0xFF
#raw 0xEE
#raw 0xEE
#raw 0xEE
#raw 0xFF
nop1 ' #raw 0x1
loadbytefrompointer 0x12 0x11212121
writebytetooffset 0x10 0xF0F0000
#raw 0xFF
loadpointer 0xFF 0xFB0FFF
'Pointer not in ROM area
#raw 0xF1
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop1 ' #raw 0x1
setbyte2 0x11 0x1
nop0 ' #raw 0x0
setbyte2 0x0 0x0
nop0 ' #raw 0x0
msgbox 0xFF000
'Pointer not in ROM area
#raw 0xF0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop1 ' #raw 0x1
nop1 ' #raw 0x1
nop0 ' #raw 0x0
nop0 ' #raw 0x0
comparefarbytetobyte 0x10 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
#raw 0xF0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
setbyte2 0x0 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop0 ' #raw 0x0
nop1 ' #raw 0x1
end


Thats what i got

Should i try the script generator again or is something still wrong? Im really srry im bad at his lol.

Thx for the help so far also.
  #379    
Old June 19th, 2009, 06:13 PM
Samike360's Avatar
Samike360
Lover of May
 
Join Date: Mar 2009
Location: ATL
Gender:
Nature: Bold
^Hmm..that's strange....no don't use the script gen, instead try downloading HackMew's FreeSpaceFinder and using that to find some offsets. Or maybe since it is a small script set the bytes needed to 10. I'll pm you another piece of advice.
__________________





Please warm my eggs...I'll be sure to return the favor

From now one, if you haven't contacted me yet....I will not accept hacks unless they are at least in progressing hacks. So if you want my help, get some screenshots first.
  #380    
Old June 20th, 2009, 07:37 AM
score_under's Avatar
score_under
I program the *other* ASM.
 
Join Date: Aug 2005
Location: Hertfordshire, England
Age: 21
Nature: Rash
Something is very wrong there - opening PKSV where AdvanceMap detects free space should result in #raw 0xFF repeatedly.

If you compiled to that offset beginning with 2E, it's likely you messed up some vital data in your ROM too, so it's best to re-download it.
__________________
Plz not to PM me, I don't come here often enough. Email if you need me
  #381    
Old June 21st, 2009, 10:53 AM
darkninja333's Avatar
darkninja333
Beginning Trainer
 
Join Date: Jun 2009
Gender: Male
Do you mean it should look like this?

Spoiler:
#org 0x8E3CF93
'-----------------------------------
checkobedience 0xD1C9
#raw 0xC8
nop0 ' #raw 0x0
hidecoins 0xD3 0xC7
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
'Decompiler stopped due to failsafe mechanism (too many #RAW 0xFF commands)


Okay nvm i did figure out what i was doing wrong i got it to where all it says is #RAW OxFF i had the bytes to look for set to 00 instead of FF. Now im trying to get it to complile right lol

EDIT AGAIN: I finally got everything working right. I made a new event and it works nothings messed up lol. Thanks alot everyone.

Last edited by darkninja333; June 21st, 2009 at 11:36 AM.
  #382    
Old June 22nd, 2009, 05:55 PM
IIMarckus's Avatar
IIMarckus
J946@5488AA97464
 
Join Date: Oct 2007
Gender:
score_under, do you plan on releasing PKSV (the command‐line version, at least) for Linux and similar operating systems? I hear it works with Wine, but that option isn’t available for all platforms, including mine.
__________________
iimarck.us / hax.iimarck.us

If you want me, please contact me by email. [email protected]

If you want to hack Pokémon RBY or GSC, read, read, and read some more. This has tons of valuable information.

Pokémon Red disassembly project

Rules that should be rethought: 25charlimit, bumping.
Bad posts are bad posts, regardless of how many words are in them or how old the thread is.
Good posts are good posts, regardless of how old the thread is—and brevity is underrated.
  #383    
Old June 23rd, 2009, 05:08 AM
score_under's Avatar
score_under
I program the *other* ASM.
 
Join Date: Aug 2005
Location: Hertfordshire, England
Age: 21
Nature: Rash
Quote:
Originally Posted by IIMarckus View Post
score_under, do you plan on releasing PKSV (the command‐line version, at least) for Linux and similar operating systems? I hear it works with Wine, but that option isn’t available for all platforms, including mine.
PKSV has a SVN repository - if you get the source code from there, you should be able to compile it with little problem.

If you do run into a problem, tell me.

I've also now compiled a new version of PKSV, look at the decompile dialog So much improvement it's not even funny, haha... also, the AssociateShell.bat bug has been fixed.

Chinese version is lagging behind in resources (seriously!), so moved that into "mlpksvui.exe" instead of the main "pksvui.exe".
__________________
Plz not to PM me, I don't come here often enough. Email if you need me

Last edited by score_under; June 23rd, 2009 at 05:56 AM.
  #384    
Old June 23rd, 2009, 06:14 AM
IIMarckus's Avatar
IIMarckus
J946@5488AA97464
 
Join Date: Oct 2007
Gender:
Quote:
Originally Posted by score_under View Post
If you do run into a problem, tell me.
Code:
…
#include <stdio.h>
#include <windows.h>
HANDLE LogFile;
#include "pokedef.h"
#include "golddef.h"
#include "textproc.h"
…
A lot of code uses it as well.
__________________
iimarck.us / hax.iimarck.us

If you want me, please contact me by email. [email protected]

If you want to hack Pokémon RBY or GSC, read, read, and read some more. This has tons of valuable information.

Pokémon Red disassembly project

Rules that should be rethought: 25charlimit, bumping.
Bad posts are bad posts, regardless of how many words are in them or how old the thread is.
Good posts are good posts, regardless of how old the thread is—and brevity is underrated.
  #385    
Old June 23rd, 2009, 02:46 PM
score_under's Avatar
score_under
I program the *other* ASM.
 
Join Date: Aug 2005
Location: Hertfordshire, England
Age: 21
Nature: Rash
Quote:
Originally Posted by IIMarckus View Post
Code:
…
#include <stdio.h>
#include <windows.h>
HANDLE LogFile;
#include "pokedef.h"
#include "golddef.h"
#include "textproc.h"
…
A lot of code uses it as well.
Hehe, I could have sworn I removed that...

Ah yes, you have to compile pksv2.c, not pksv.c... sorry.
__________________
Plz not to PM me, I don't come here often enough. Email if you need me
  #386    
Old June 24th, 2009, 11:26 AM
IIMarckus's Avatar
IIMarckus
J946@5488AA97464
 
Join Date: Oct 2007
Gender:
Turns out I was using an old version anyway. Just checked out version 2.0.4 from the SVN, and got these results:
Code:
$ gcc -o pksv.out pksv2.c
In file included from pksv2.c:26:
/usr/include/malloc.h:4:2: warning: #warning "<malloc.h> is obsolete, use <stdlib.h>"
In file included from sulib.h:4,
                 from pksv2.c:34:
/usr/include/malloc.h:4:2: warning: #warning "<malloc.h> is obsolete, use <stdlib.h>"
In file included from pksv2.c:55:
codeproc.h:370:21: gba_asm.h: No such file or directory
In file included from codeproc.h:371,
                 from pksv2.c:55:
decompiler.h: In function `DecodeProcLevel':
decompiler.h:3985: error: `VersionOverride' undeclared (first use in this function)
decompiler.h:3985: error: (Each undeclared identifier is reported only once
decompiler.h:3985: error: for each function it appears in.)
decompiler.h:4106: error: `asm_buf' undeclared (first use in this function)
decompiler.h: In function `DecodeProc':
decompiler.h:4135: error: `VersionOverride' undeclared (first use in this function)
decompiler.h:4221: error: `asm_buf' undeclared (first use in this function)
decompiler.h: In function `DecodeProcASM':
decompiler.h:4248: error: `VersionOverride' undeclared (first use in this function)
decompiler.h:4285: error: `asm_buf' undeclared (first use in this function)
$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-unknown-openbsd4.5/3.3.5/specs
Configured with: 
Thread model: single
gcc version 3.3.5 (propolice)
$
Platform: OpenBSD i386
__________________
iimarck.us / hax.iimarck.us

If you want me, please contact me by email. [email protected]

If you want to hack Pokémon RBY or GSC, read, read, and read some more. This has tons of valuable information.

Pokémon Red disassembly project

Rules that should be rethought: 25charlimit, bumping.
Bad posts are bad posts, regardless of how many words are in them or how old the thread is.
Good posts are good posts, regardless of how old the thread is—and brevity is underrated.
  #387    
Old June 24th, 2009, 03:14 PM
score_under's Avatar
score_under
I program the *other* ASM.
 
Join Date: Aug 2005
Location: Hertfordshire, England
Age: 21
Nature: Rash
Okay, NOT my lucky day I forgot to add one of the files to the SVN - will do that now.

EDIT-Done. Tell me if I missed yet more XD
__________________
Plz not to PM me, I don't come here often enough. Email if you need me
  #388    
Old June 24th, 2009, 07:41 PM
IIMarckus's Avatar
IIMarckus
J946@5488AA97464
 
Join Date: Oct 2007
Gender:
It does compile fine now. What are the command‐line options?
__________________
iimarck.us / hax.iimarck.us

If you want me, please contact me by email. [email protected]

If you want to hack Pokémon RBY or GSC, read, read, and read some more. This has tons of valuable information.

Pokémon Red disassembly project

Rules that should be rethought: 25charlimit, bumping.
Bad posts are bad posts, regardless of how many words are in them or how old the thread is.
Good posts are good posts, regardless of how old the thread is—and brevity is underrated.
  #389    
Old June 25th, 2009, 11:47 AM
score_under's Avatar
score_under
I program the *other* ASM.
 
Join Date: Aug 2005
Location: Hertfordshire, England
Age: 21
Nature: Rash
They're pretty much strictly fixed, but here they are:
Code:
pksv -e ScriptFile.txt RomFile.gba        -- Debug compile
pksv -r ScriptFile.txt RomFile.gba        -- Compile
pksv RomFile.gba HexOffset OutputFile.txt -- Decompile
Yes, this means that before I used a DLL, PKSVUI would just read the file, "_d_.pks.tmp"...

Even though you compiled it as command-line, I've done as much as I can to make it work just as well as PKSV in Windows (dynamic offsets, THUMB, pokemarts ...)

EDIT: - Slightly unrelated This script will work in the soon-to-come v2.0.5, it's a slightly modified version of the "move-to-place" script I mentioned earlier:
Code:
#dyn 0x800000
#define safe-val 0x100
'Safe-val is a value definitely larger than the X and Y coords on the map, which is to avoid unsigned integer overflow.
#org @start
lockall
getplayerxy 0x8000 0x8001
addvar 0x8000 safe-val
addvar 0x8001 safe-val
subtractvar 0x8000 0xA ' Position X to move to
subtractvar 0x8001 0x9 ' Position Y to move to - try this one in Pallet Town.
compare 0x8000 safe-val
if < jump :loop2
:loop
if == jump :loop3_s
applymovement PLAYER @run-left
pauseevent 0x0
subtractvar 0x8000 1
compare 0x8000 safe-val
jump :loop
:loop2
compare 0x8000 safe-val
if == jump :loop3_s
applymovement PLAYER @run-right
pauseevent 0x0
addvar 0x8000 1
jump :loop2
:loop3_s
compare 0x8001 safe-val
if < jump :loop4
:loop3
if == jump :endloops
applymovement PLAYER @run-up
pauseevent 0x0
subtractvar 0x8001 1
compare 0x8001 safe-val
jump :loop3
:loop4
compare 0x8001 safe-val
if == jump :endloops
applymovement PLAYER @run-down
pauseevent 0x0
addvar 0x8001 1
jump :loop4
:endloops
releaseall
end

#org @run-left
m run_left end
#org @run-right
m run_right end
#org @run-up
m run_up end
#org @run-down
m run_down end
Edit - "Soon to come"? What the hell was I talking about?
__________________
Plz not to PM me, I don't come here often enough. Email if you need me

Last edited by score_under; July 26th, 2009 at 01:40 PM.
  #390    
Old June 25th, 2009, 01:31 PM
iTAIYO
Beginning Trainer
 
Join Date: Jun 2009
Gender: Male
Nature: Relaxed
MY code messed up please help

i put in this code
Code:
#org 0x8800638
'-----------------------------------
checkflag 0x9999
if 0x1 jump 0x88006F6 ' Equal To
msgbox 0x8800657 ' I found this helples...
callstd MSG_NORMAL ' Normal message
addpokemon 0x4 0xB 0x0 0x0 0xF000000 0xC300C300
setflag 0x9999

#org 0x88006F6
'-----------------------------------
msgbox 0x88006FF ' Please take it away.
callstd MSG_NORMAL ' Normal message
end


#org 0x8800657
= take this Charmander.

#org 0x88006FF
= Please take it away.
Then it turned into this after i compiled it
Code:
#org 0x8800638
'-----------------------------------
checkflag 0x9999
if 0x1 jump 0x88006F6 ' Equal To
msgbox 0x8800657 ' I found this helples...
callstd MSG_NORMAL ' Normal message
addpokemon 0x4 0xB 0x0 0x0 0xF000000 0xC300C300
nop0 ' #raw 0x0
#raw 0xDA
#raw 0xE3
#raw 0xE9
#raw 0xE2
#raw 0xD8
nop0 ' #raw 0x0
#raw 0xE8
#raw 0xDC
#raw 0xDD
#raw 0xE7
nop0 ' #raw 0x0
#raw 0xDC
#raw 0xD9
#raw 0xE0
#raw 0xE4
#raw 0xE0
#raw 0xD9
#raw 0xE7
#raw 0xE7
CMD_FE 0x0
#raw 0xBD
updatecoins 0xBB 0xCC
textcolor 0xBB 'Sets text color (Fire Red).
#raw 0xC8
#raw 0xBE
#raw 0xBF
checkobedience 0x0 0xE0D5
#raw 0xE3
#raw 0xE2
#raw 0xD9
CMD_FB 0xE2DD00
#raw 0xE9
#raw 0xE4
nop0 ' #raw 0x0
#raw 0xDC
#raw 0xD9
#raw 0xE6
#raw 0xD9
setdoorclosed 0xC300 0xE800
#raw 0xDC
#raw 0xDD
#raw 0xE2
#raw 0xDF
CMD_FE 0x0
#raw 0xDD
#raw 0xE8
nop0 ' #raw 0x0
#raw 0xDA
#raw 0xD9
#raw 0xE0
#raw 0xE0
nop0 ' #raw 0x0
#raw 0xDA
#raw 0xE6
#raw 0xE3
#raw 0xE1
nop0 ' #raw 0x0
#raw 0xE9
#raw 0xE4
nop0 ' #raw 0x0
#raw 0xDC
#raw 0xD9
#raw 0xE6
#raw 0xD9
setdoorclosed 0xC3FB 0xE7E8
nop0 ' #raw 0x0
#raw 0xDC
#raw 0xD9
#raw 0xD5
#raw 0xE0
#raw 0xE8
#raw 0xDC
#raw 0xED
nop0 ' #raw 0x0
#raw 0xE4
#raw 0xE0
#raw 0xD9
#raw 0xD5
#raw 0xE7
#raw 0xD9
nop0 ' #raw 0x0
#raw 0xE8
#raw 0xD5
#raw 0xDF
#raw 0xD9
nop0 ' #raw 0x0
#raw 0xDD
#raw 0xE8
CMD_FE 0x0
#raw 0xEB
#raw 0xDD
#raw 0xE8
#raw 0xDC
nop0 ' #raw 0x0
#raw 0xED
#raw 0xE3
#raw 0xE9
setdoorclosed 0xCAFF 0xD9E0
#raw 0xD5
#raw 0xE7
#raw 0xD9
nop0 ' #raw 0x0
#raw 0xDB
#raw 0xDD
#raw 0xEA
#raw 0xD9
nop0 ' #raw 0x0
#raw 0xBD
updatecoins 0xBB 0xCC
textcolor 0xBB 'Sets text color (Fire Red).
#raw 0xC8
#raw 0xBE
#raw 0xBF
checkobedience 0x0 0xD5FE
nop0 ' #raw 0x0
#raw 0xDB
#raw 0xE3
#raw 0xE3
#raw 0xD8
nop0 ' #raw 0x0
#raw 0xDC
#raw 0xE3
#raw 0xE1
#raw 0xD9
setdoorclosed 0xFFF 0xFF00
if 0x80 jump 0x2060908 ' Unknown IF condition
          'Jump not in ROM area
msgboxsign
#raw 0xE0
#raw 0xD9
#raw 0xD5
#raw 0xE7
#raw 0xD9
nop0 ' #raw 0x0
#raw 0xE8
#raw 0xD5
#raw 0xDF
#raw 0xD9
nop0 ' #raw 0x0
#raw 0xDD
#raw 0xE8
nop0 ' #raw 0x0
#raw 0xD5
#raw 0xEB
#raw 0xD5
#raw 0xED
setdoorclosed 0xFFFF 0xFFFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
#raw 0xFF
'Decompiler stopped due to failsafe mechanism (too many #RAW 0xFF commands)

#org 0x88006F6
'-----------------------------------
msgbox 0x88006FF ' Please take it away.
callstd MSG_NORMAL ' Normal message
end


#org 0x8800657
= I found this helpless\n CHARMANDER alone\p in up here. I think\n it fell from up here.\pIts healthy please take it\n with you.

#org 0x88006FF
= Please take it away.
  #391    
Old June 25th, 2009, 09:44 PM
DJ91990's Avatar
DJ91990
Beginning Trainer
 
Join Date: Oct 2007
Location: Dyvania Region
Age: 23
Gender: Male
Nature: Relaxed
Wow, this could become very useful to me and my Gen III hackings.
I'm gonna download this now and give it a try!
__________________

Spoiler:




Pokemon Limestone Creator|NO RELEASE YET!
  #392    
Old June 26th, 2009, 02:52 AM
score_under's Avatar
score_under
I program the *other* ASM.
 
Join Date: Aug 2005
Location: Hertfordshire, England
Age: 21
Nature: Rash
Quote:
Originally Posted by iTAIYO View Post
MY code messed up please help

i put in this code
Code:
#org 0x8800638
'-----------------------------------
checkflag 0x9999
if 0x1 jump 0x88006F6 ' Equal To
msgbox 0x8800657 ' I found this helples...
callstd MSG_NORMAL ' Normal message
addpokemon 0x4 0xB 0x0 0x0 0xF000000 0xC300C300
setflag 0x9999

#org 0x88006F6
'-----------------------------------
msgbox 0x88006FF ' Please take it away.
callstd MSG_NORMAL ' Normal message
end


#org 0x8800657
= take this Charmander.

#org 0x88006FF
= Please take it away.
Then it turned into this after i compiled it
5 problems with that code:
  • 0x9999 is not a valid flag, if I recall correctly. Try 0x200, 0x500, 0x250, or something similar.
  • Your #orgs are too close together - first erase the script by replacing all #org with #eorg and compiling the original script, then replace all #eorg with #org again and use dynamic offsets instead.
  • You're missing an "end" after the setflag
  • He says "Please take it away" if you talk to him *after* you take it away.
  • No Lock/Faceplayer/Release


The script to erase your current script:
Code:
#eorg 0x8800638
'-----------------------------------
checkflag 0x9999
if 0x1 jump 0x88006F6 ' Equal To
msgbox 0x8800657 ' I found this helples...
callstd MSG_NORMAL ' Normal message
addpokemon 0x4 0xB 0x0 0x0 0xF000000 0xC300C300
setflag 0x9999

#eorg 0x88006F6
'-----------------------------------
msgbox 0x88006FF ' Please take it away.
callstd MSG_NORMAL ' Normal message
end


#eorg 0x8800657
= take this Charmander.

#eorg 0x88006FF
= Please take it away.
The script with dynamic offsets:
Code:
#dynamic 0x800000
#org @start
'-----------------------------------
lock
faceplayer
checkflag 0x251
if true jump @already-have
msgbox @take-this
callstd MSG_NORMAL
addpokemon CHARMANDER 0xB 0x0 0x0 0x0000000 0x00000000
setflag 0x251
release
end

#org @already-have
'-----------------------------------
msgbox @take-it-away
callstd MSG_NORMAL
release
end


#org @take-this
= take this Charmander.

#org @take-it-away
= Please take it away.
Notice that you can also use "CHARMANDER" in "addpokemon".

It would be better if you checked if you had enough party space first, and changed the "Please take it away" message to "How's my CHARMANDER doing?" or something.
If this is the first pokémon you get in the game, you have to add another setflag, "setflag FR_POKEMON" (if you're hacking fire red) or "setflag RS_POKEMON" (if you're hacking R/S). This tells the game that you are allowed to access the "Pokémon" item on the pause menu.
__________________
Plz not to PM me, I don't come here often enough. Email if you need me

Last edited by score_under; June 26th, 2009 at 05:23 AM.
  #393    
Old June 26th, 2009, 07:41 AM
IIMarckus's Avatar
IIMarckus
J946@5488AA97464
 
Join Date: Oct 2007
Gender:
Quote:
Originally Posted by score_under View Post
They're pretty much strictly fixed, but here they are:
Code:
pksv -e ScriptFile.txt RomFile.gba        -- Debug compile
pksv -r ScriptFile.txt RomFile.gba        -- Compile
pksv RomFile.gba HexOffset OutputFile.txt -- Decompile
It might be a good idea to make these display when run with no arguments (or --help). Also, the program segfaults when called with any fewer arguments—you might want to fix that. A -v flag for checking the version would be nice too.

I do prefer the command‐line version, because I already have a text editor.

You mentioned THUMB—are you planning support for GB‐Z80 in the future?
__________________
iimarck.us / hax.iimarck.us

If you want me, please contact me by email. [email protected]

If you want to hack Pokémon RBY or GSC, read, read, and read some more. This has tons of valuable information.

Pokémon Red disassembly project

Rules that should be rethought: 25charlimit, bumping.
Bad posts are bad posts, regardless of how many words are in them or how old the thread is.
Good posts are good posts, regardless of how old the thread is—and brevity is underrated.
  #394    
Old June 26th, 2009, 09:50 AM
score_under's Avatar
score_under
I program the *other* ASM.
 
Join Date: Aug 2005
Location: Hertfordshire, England
Age: 21
Nature: Rash
Quote:
Originally Posted by IIMarckus View Post
It might be a good idea to make these display when run with no arguments (or --help). Also, the program segfaults when called with any fewer arguments—you might want to fix that. A -v flag for checking the version would be nice too.

I do prefer the command‐line version, because I already have a text editor.

You mentioned THUMB—are you planning support for GB‐Z80 in the future?
No, I was only planning to implement THUMB and ARM. Would it be desirable to implement GB-Z80?
Oh, and the SVN source supports the ":label" syntax already
__________________
Plz not to PM me, I don't come here often enough. Email if you need me
  #395    
Old June 26th, 2009, 12:20 PM
IIMarckus's Avatar
IIMarckus
J946@5488AA97464
 
Join Date: Oct 2007
Gender:
Quote:
Originally Posted by score_under View Post
No, I was only planning to implement THUMB and ARM. Would it be desirable to implement GB-Z80?
It would be for me, as the GBA games are the ones I don’t hack.
__________________
iimarck.us / hax.iimarck.us

If you want me, please contact me by email. [email protected]

If you want to hack Pokémon RBY or GSC, read, read, and read some more. This has tons of valuable information.

Pokémon Red disassembly project

Rules that should be rethought: 25charlimit, bumping.
Bad posts are bad posts, regardless of how many words are in them or how old the thread is.
Good posts are good posts, regardless of how old the thread is—and brevity is underrated.
  #396    
Old June 27th, 2009, 03:33 PM
Podifo's Avatar
Podifo
The Village Pirate Cat
 
Join Date: Sep 2008
Location: Norway
Age: 17
Gender: Male
Nature: Lonely
I am a beginner to scripting but I just don't get it! Can someone make a video about everything about how to get the scrpit in the game? Please?
__________________
Click to visit Jiggmin's Village
  #397    
Old June 27th, 2009, 03:57 PM
Samike360's Avatar
Samike360
Lover of May
 
Join Date: Mar 2009
Location: ATL
Gender:
Nature: Bold
^Read scripting tutorials in the Documents and Tutorials section.
__________________





Please warm my eggs...I'll be sure to return the favor

From now one, if you haven't contacted me yet....I will not accept hacks unless they are at least in progressing hacks. So if you want my help, get some screenshots first.
  #398    
Old July 6th, 2009, 03:00 PM
Hacker_Noobie
Beginning Trainer
 
Join Date: Jul 2009
Gender: Male
Ive made a new script with this prog. and how can i give this script now in the pokemon game?
Its the first time ive done any script :D
  #399    
Old July 7th, 2009, 07:58 AM
score_under's Avatar
score_under
I program the *other* ASM.
 
Join Date: Aug 2005
Location: Hertfordshire, England
Age: 21
Nature: Rash
Quote:
Originally Posted by Hacker_Noobie View Post
Ive made a new script with this prog. and how can i give this script now in the pokemon game?
Its the first time ive done any script :D
Make sure that it's either using a clean offset or a #dynamic offset, and then load it and the ROM into the script editor (you can do both via drag'n'drop) then press F9 inside PKSV.
__________________
Plz not to PM me, I don't come here often enough. Email if you need me
  #400    
Old July 7th, 2009, 10:57 AM
Hacker_Noobie
Beginning Trainer
 
Join Date: Jul 2009
Gender: Male
Thx
How can i figure the flag number of my pokemon out?

When i press F9 it shows this text:

Opened file.
#ORG
-> 0x0
CHECKFLAG
-> 0x800
IF
Unknown value in IF (Value must be integer)

Whats wrong with my script?
I copied a script from this forum to check if my script is wrong and it also shows this text

Last edited by Hacker_Noobie; July 7th, 2009 at 11:05 AM.
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:11 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.