Advertiser Content

Tool PKSV - Pokémon Script Editor + GUI Page 2

Started by score_under November 19th, 2007 2:13 PM
  • 389110 views
  • 821 replies

score_under

I program the *other* ASM.

Age 26
Hertfordshire, England
Seen December 8th, 2015
Posted August 10th, 2010
525 posts
13.8 Years
This post... wait, no. This one is still valid.
This program edits scripts, whose offsets can be found using tools like advancemap or elitemap.

To add new pokemon, you need a program which will edit pokemon base stats, pokemon pokedex entries, pokemon sprites and pokemon cries.
Plz not to PM me, I don't come here often enough. Email if you need me
Age 26
Male
Wherever I am, I am
Seen October 9th, 2016
Posted April 2nd, 2011
70 posts
11.4 Years
For some reason the pokescript tutorial's scripts aren't recognized by the PKSV. I really need a tutorial on writing these scripts. Hope someone can write one sometime.

Berries Grow, Birds Fly, Sun Shines, and Brotha...I Splash People.

score_under

I program the *other* ASM.

Age 26
Hertfordshire, England
Seen December 8th, 2015
Posted August 10th, 2010
525 posts
13.8 Years
This post applies to an OLD version of the program only

If you need pokescript scripts converted into PKSV scripts, don't hesitate to contact me (PM).

MAJOR update
Now you can specify free space, eg.
#define some_space FREESPACE100 ' defines some_space as free-space
                                ' which is 0x100 (256) bytes long
#org some_space
' BLAH etc...
Or, you can specify it temporarily:
#org FREESPACEB0 ' sets file pointer to nearest free space of 0xB0 bytes.
'do stuff here
Or more practically:
#define CODE_SPACE FREESPACE10 '16 (0x10) bytes
#define TEXT1 FREESPACE10      '16 (0x10) bytes
#org CODE_SPACE
msgbox text1
callstd msg_normal
end
#org text1
= Message!
Edit: Sorry to all 5 people who downloaded the version before 200802211825. The FindFreeSpace() function had a serious glitch. It is now fixed :)
Edit yet again:
The file size of PKSV is smaller than the filesize of a BMP with dimensions of 300*200
Plz not to PM me, I don't come here often enough. Email if you need me

Danno

Formerly Meowth

Age 28
Male
New England
Seen February 21st, 2019
Posted November 18th, 2018
1,221 posts
12.5 Years
I understand how to work the program, but I'm not sure how to change the scripts.

When I open it it comes up with a strange black box, then gives a prompt to open the ROM.
After that it asks for an offset. So I put it in and it comes up with the offset I asked for. But then if I hit any button it clicks out.

Help?
Same here. Im having a hard time changing the scripts too, same thing for me.

score_under

I program the *other* ASM.

Age 26
Hertfordshire, England
Seen December 8th, 2015
Posted August 10th, 2010
525 posts
13.8 Years
Thank you man! You just alerted me to 2 different bugs - uploading the fixes:
1) Update bug
2) Decompiled code - unrecognised commands

Uploaded! All your auto-updates should have fired (v.1.1.2 onwards), although in the second-to-latest (v1.1.2) it is glitched - which I just fixed.

To MetalAggron:
Warning: HUGE
Spoiler:

#org 0x8169BAB
'-----------------------------------
lock
faceplayer
setvar 0x4001 0x0 '0x0 is left pokeball, 0x1 is middle and 0x2 is right
setvar 0x4002 0x1 'The pokemon in gary's pokeball
setvar 0x4003 0x4 'The pokemon in our pokeball
setvar 0x4004 0x7 'The one left over
compare 0x4055 0x3
if 0x4 jump 0x8169DE4 ' If they haven't started the event yet
compare 0x4055 0x2
if 0x1 jump 0x8169BE1 ' If the event hasn't finished yet
msgbox 0x818EA19 ' Those are POKé BALLS.\nThey contain POKéMON!
callstd MSG_NOCLOSE ' Non-closing msg
release
end

#org 0x8169DE4
'-----------------------------------
msgbox 0x818EA45 ' That's PROF. OAK's last POKéMON.
callstd MSG_NOCLOSE ' Non-closing msg
release
end

#org 0x8169BE1
'-----------------------------------
applymovement 0x4 0x81A75EF ' look_right end 
pauseevent 0x0
showpokepic 0x4002 0xA 0x3
textcolor 0x0 'Sets text color (Fire Red).
compare 0x4001 0x0
if 0x1 jump 0x8169C14 ' Equal To
compare 0x4001 0x1
if 0x1 jump 0x8169C33 ' Equal To
compare 0x4001 0x2
if 0x1 jump 0x8169C52 ' Equal To
end

#org 0x8169C14
'-----------------------------------
msgbox 0x818E272 ' I see! BULBASAUR is your choice.\nIt's very easy to raise.\pSo, \v\h01, you want to go with\nthe GRASS POKéMON BULBASAUR?
callstd MSG_YESNO ' Yes/No msg
compare LASTRESULT 0x1
if 0x1 jump 0x8169C74 ' Equal To
compare LASTRESULT 0x0
if 0x1 jump 0x8169C71 ' Equal To
end

#org 0x8169C74
'-----------------------------------
hidepokepic
disappear 0x800F
msgbox 0x818E2E5 ' This POKéMON is really quite\nenergetic!
callstd MSG_NOCLOSE ' Non-closing msg
call 0x81A6675
setflag 0x828
setflag 0x291
addpokemon 0x4002 0x5 0x0 0x0 0x0 0x0
copyvar 0x4031 0x4001
storepokemon 0x0 0x4002
message 0x818E30D ' \v\h01 received the \v\h02\nfrom PROF. OAK!
showmsg
fanfare 0x13E
waitfanfare
msgbox 0x81A56A7 ' Do you want to give a nickname to\nthis \v\h02?
callstd MSG_YESNO ' Yes/No msg
compare LASTRESULT 0x1
if 0x1 jump 0x8169CCC ' Equal To
compare LASTRESULT 0x0
if 0x1 jump 0x8169CDC ' Equal To
end

#org 0x81A6675
'-----------------------------------
copyvar 0x8012 0x8013
return

#org 0x8169C33
'-----------------------------------
msgbox 0x818E207 ' Hm! SQUIRTLE is your choice.\nIt's one worth raising.\pSo, \v\h01, you've decided on the\nWATER POKéMON SQUIRTLE?
callstd MSG_YESNO ' Yes/No msg
compare LASTRESULT 0x1
if 0x1 jump 0x8169C74 ' Equal To
compare LASTRESULT 0x0
if 0x1 jump 0x8169C71 ' Equal To
end

#org 0x8169C71
'-----------------------------------
hidepokepic
release
end

#org 0x8169C52
'-----------------------------------
msgbox 0x818E194 ' Ah! CHARMANDER is your choice.\nYou should raise it patiently.\pSo, \v\h01, you're claiming the\nFIRE POKéMON CHARMANDER?
callstd MSG_YESNO ' Yes/No msg
compare LASTRESULT 0x1
if 0x1 jump 0x8169C74 ' Equal To
compare LASTRESULT 0x0
if 0x1 jump 0x8169C71 ' Equal To
end

#org 0x8169CCC
'-----------------------------------
setvar 0x8004 0x0
call 0x81A74EB
jump 0x8169CDC

#org 0x81A74EB
'-----------------------------------
fadescreen 0x1 ' Fade screen to black
special 0x9E
waitspecial
return

#org 0x8169CDC
'-----------------------------------
closemsg2
compare 0x4001 0x0
if 0x1 jump 0x8169CFF ' Equal To
compare 0x4001 0x1
if 0x1 jump 0x8169D1F ' Equal To
compare 0x4001 0x2
if 0x1 jump 0x8169D0F ' Equal To
end

#org 0x8169CFF
'-----------------------------------
applymovement 0x8 0x8169D62 ' walk_down walk_down walk_right walk_right walk_right walk_right walk_right walk_up end 
pauseevent 0x0
jump 0x8169D2F

#org 0x8169D2F
'-----------------------------------
textcolor 0x0 'Sets text color (Fire Red).
msgbox 0x818DD34 ' \v\h06: I'll take this one, then!
callstd MSG_NOCLOSE ' Non-closing msg
disappear 0x4004
textcolor 0x3 'Sets text color (Fire Red).
storepokemon 0x0 0x4003
message 0x818DD52 ' \v\h06 received the \v\h02\nfrom PROF. OAK!
showmsg
fanfare 0x13E
waitfanfare
setvar 0x4055 0x3
checkflag 0x83E
if 0x1 call 0x8169D5C
release
end

#org 0x8169D5C
'-----------------------------------
setvar 0x4070 0x1
return

#org 0x8169D1F
'-----------------------------------
applymovement 0x8 0x8169D72 ' walk_down walk_right walk_right walk_right raw_2E end 
pauseevent 0x0
jump 0x8169D2F

#org 0x8169D0F
'-----------------------------------
applymovement 0x8 0x8169D6B ' walk_down walk_right walk_right walk_right walk_right raw_2E end 
pauseevent 0x0
jump 0x8169D2F


#org 0x818EA19
= Those are POKé BALLS.\nThey contain POKéMON!

#org 0x818EA45
= That's PROF. OAK's last POKéMON.

#org 0x818E272
= I see! BULBASAUR is your choice.\nIt's very easy to raise.\pSo, \v\h01, you want to go with\nthe GRASS POKéMON BULBASAUR?

#org 0x818E2E5
= This POKéMON is really quite\nenergetic!

#org 0x818E30D
= \v\h01 received the \v\h02\nfrom PROF. OAK!

#org 0x81A56A7
= Do you want to give a nickname to\nthis \v\h02?

#org 0x818E207
= Hm! SQUIRTLE is your choice.\nIt's one worth raising.\pSo, \v\h01, you've decided on the\nWATER POKéMON SQUIRTLE?

#org 0x818E194
= Ah! CHARMANDER is your choice.\nYou should raise it patiently.\pSo, \v\h01, you're claiming the\nFIRE POKéMON CHARMANDER?

#org 0x818DD34
= \v\h06: I'll take this one, then!

#org 0x818DD52
= \v\h06 received the \v\h02\nfrom PROF. OAK!

#org 0x81A75EF
M look_right end 

#org 0x8169D62
M walk_down walk_down walk_right walk_right walk_right walk_right walk_right walk_up end 

#org 0x8169D72
M walk_down walk_right walk_right walk_right raw_2E end 

#org 0x8169D6B
M walk_down walk_right walk_right walk_right walk_right raw_2E end
Plz not to PM me, I don't come here often enough. Email if you need me

score_under

I program the *other* ASM.

Age 26
Hertfordshire, England
Seen December 8th, 2015
Posted August 10th, 2010
525 posts
13.8 Years
You can find this script on any of the pokéballs in professor Oak's lab.
Just make sure to reset the first "setvar"s on each ball!
Plz not to PM me, I don't come here often enough. Email if you need me

metalaggron

Master of Ice Pokemon

Age 26
Slovenia
Seen March 1st, 2010
Posted March 27th, 2009
73 posts
11.8 Years
sorry that i keep bothering you, but how to reset the setvar
all i get from the script in the balls is this

#org 0x8169BAB
'-----------------------------------
lock
faceplayer
setvar 0x4001 0x0
setvar 0x4002 0x98
setvar 0x4003 0x60
setvar 0x4004 0x7
compare 0x4055 0x3
if 0x4 jump 0x8169DE4 ' Larger Than or Equal To
compare 0x4055 0x2
if 0x1 jump 0x8169BE1 ' Equal To
msgbox 0x818EA19 ' Those are POKé BALLS.\nThey contain POKéMON!
callstd MSG_NOCLOSE ' Non-closing msg
release
end

#org 0x8169DE4
'-----------------------------------
msgbox 0x818EA45 ' That's PROF. OAK's last POKéMON.
callstd MSG_NOCLOSE ' Non-closing msg
release
end

#org 0x8169BE1
'-----------------------------------
applymovement 0x4 0x81A75EF ' look_right end 
pauseevent 0x0
#raw 0x75
end


#org 0x818EA19
= Those are POKé BALLS.\nThey contain POKéMON!

#org 0x818EA45
= That's PROF. OAK's last POKéMON.

#org 0x81A75EF
M look_right end

score_under

I program the *other* ASM.

Age 26
Hertfordshire, England
Seen December 8th, 2015
Posted August 10th, 2010
525 posts
13.8 Years
Uploaded an update - for frontend and back-end.
GUI is now version 1.2.0 and PKSV is now 1.0.2

Also, added a check to make Lucida console the default font and Courier New the fallback. Mainly because on my PC courier new can't not be italic.
Plz not to PM me, I don't come here often enough. Email if you need me
Seen January 27th, 2014
Posted July 22nd, 2008
10 posts
11 Years
Okay, you know that girl in pallet town that when you talk to her, she moves one step away from you and tells you about trainer tips? I want to replicate that, but every time I do, the test subject says the right things, but doesn't move. what gives?

Here is the exact script:

#org 0x816575C
'-----------------------------------
lock
compare 0x4070 0x2
if 0x1 jump 0x81657ED ' Equal To
compare 0x4070 0x1
if 0x1 jump 0x8165815 ' Equal To
compare 0x4002 0x1
if 0x1 jump 0x81658C2 ' Equal To
checkflag 0x2
if 0x1 jump 0x8165801 ' Equal To
msgbox 0x871B904 ' It appears to be a statue of\na rare POKéMON.\pHmm.... There seems to be something\nstrange about it.
callstd MSG_NOCLOSE ' Non-closing msg
applymovement 0x1 0x81A75E1 ' faceplayer end 
pauseevent 0x0
sound 0x15
applymovement 0x1 0x81A75DB ' say_! end 
pauseevent 0x0
applymovement 0x1 0x81A75DD ' raw_1C raw_1C raw_1C end 
pauseevent 0x0
msgbox 0x871B345 ' Oh!\pA secret stair case appeared!
callstd MSG_NOCLOSE ' Non-closing msg
closemsg
compare 0x800C 0x4
if 0x1 call 0x81657D7
compare 0x800C 0x4
if 0x5 call 0x81657E2
#raw 0x64
nop1 ' #raw 0x1
nop0 ' #raw 0x0
setflag 0x2
release
end
#org 0x81657ED
'-----------------------------------
applymovement 0x1 0x81A75E1 ' faceplayer end 
pauseevent 0x0
msgbox 0x817D7C8 ' I'm raising POKéMON, too.\pWhen they get strong, they can\nprotect me.
callstd MSG_NOCLOSE ' Non-closing msg
release
end
#org 0x8165815
'-----------------------------------
applymovement 0x1 0x81A75E1 ' faceplayer end 
pauseevent 0x0
msgbox 0x81B1CEC ' Signs are useful, aren't they?
callstd MSG_NOCLOSE ' Non-closing msg
release
end
#org 0x81658C2
'-----------------------------------
applymovement 0x1 0x81A75E1 ' faceplayer end 
pauseevent 0x0
call 0x8165894
release
end
#org 0x8165894
'-----------------------------------
textcolor 0x1 'Sets text color (Fire Red).
msgbox 0x81B1D0B ' Look, look!\pI copied what it said on one of\nthose TRAINER TIPS signs!
callstd MSG_NOCLOSE ' Non-closing msg
closemsg
pause 0x14
textcolor 0x3 'Sets text color (Fire Red).
setflag 0x83E
setvar 0x4070 0x1
setvar 0x4002 0x0
special 0x170
special 0x171
#raw 0xCA
msgbox 0x81B1D51 ' TRAINER TIPS!\pPress START to open the MENU!
callstd MSG_NOCLOSE ' Non-closing msg
#raw 0xCB
return
#org 0x8165801
'-----------------------------------
applymovement 0x1 0x81A75E1 ' faceplayer end 
pauseevent 0x0
msgbox 0x871BDC9 ' The eerie glow has disappeared.
callstd MSG_NOCLOSE ' Non-closing msg
release
end
#org 0x81657D7
'-----------------------------------
applymovement 0x1 0x8165829 ' walk_right raw_2F end 
pauseevent 0x0
return
#org 0x81657E2
'-----------------------------------
applymovement 0x1 0x816582C ' walk_left raw_30 end 
pauseevent 0x0
return

#org 0x871B904
= It appears to be a statue of\na rare POKéMON.\pHmm.... There seems to be something\nstrange about it.
#org 0x871B345
= Oh!\pA secret stair case appeared!
#org 0x817D7C8
= I'm raising POKéMON, too.\pWhen they get strong, they can\nprotect me.
#org 0x81B1CEC
= Signs are useful, aren't they?
#org 0x81B1D0B
= Look, look!\pI copied what it said on one of\nthose TRAINER TIPS signs!
#org 0x81B1D51
= TRAINER TIPS!\pPress START to open the MENU!
#org 0x871BDC9
= The eerie glow has disappeared.
#org 0x81A75E1
M faceplayer end 
#org 0x81A75DB
M say_! end 
#org 0x81A75DD
M raw_1C raw_1C raw_1C end 
#org 0x8165829
M walk_right raw_2F end 
#org 0x816582C
M walk_left raw_30 end ' Write script here, or press Script Generator to do it automatically.

score_under

I program the *other* ASM.

Age 26
Hertfordshire, England
Seen December 8th, 2015
Posted August 10th, 2010
525 posts
13.8 Years
This post applies to an OLD version of the program only
Eh. I believe you forgot faceplayer right under lock at the beginning of the script is what you're referring to.
No, I hadn't compiled the movement recompilation support into PKSV :(
It's done now, so you can all update!

I tested for bugs (and found some, and fixed all that I could find) with the script:
' Use on a blank ROM, not a real Pokemon ROM, due to 0x0 offsets.
#org 0
applymovement 0 0x10
end

#org 0x10
M waLk_right raw_05 rAw_05 RAW_0000 <censored...> walk_up say_:) enD
'The theory is that it will compile only:
' m walk_right raw_05 raw_05 walk_up say_:) end
Thanks to MYSTERIOUS MISSINGNO for reminding me of that rather large, gaping hole in my program, and for catching my thought train at EXACTLY the right time to make the process less daunting with the use of Regex find-and-replace to touch up on the source code.
Plz not to PM me, I don't come here often enough. Email if you need me

score_under

I program the *other* ASM.

Age 26
Hertfordshire, England
Seen December 8th, 2015
Posted August 10th, 2010
525 posts
13.8 Years
This post applies to an OLD version of the program only
That's most likely a memory access violation.
There should be a link on the dialog. Click it and it will open another.
On that box, click the link that says "To view technical information about this error report click here".
Just tell me (right at the top of the text box in the next dialog):
The code (usually 0x8000Something), the flags and the address.

And thanks for filing a bug :)
Plz not to PM me, I don't come here often enough. Email if you need me

frostyfuz

Cheeko, Cheeko

Age 27
In my House.
Seen June 24th, 2010
Posted September 1st, 2008
12 posts
11 Years
That's most likely a memory access violation.
There should be a link on the dialog. Click it and it will open another.
On that box, click the link that says "To view technical information about this error report click here".
Just tell me (right at the top of the text box in the next dialog):
The code (usually 0x8000Something), the flags and the address.

And thanks for filing a bug :)
The code is 0xc0000005
Flag: 0x00000000
Address: 0x00000000004081af


EDIT: I keep getting an error whenever coming to this page.

score_under

I program the *other* ASM.

Age 26
Hertfordshire, England
Seen December 8th, 2015
Posted August 10th, 2010
525 posts
13.8 Years
This post applies to an OLD version of the program only
Yeah, actually this doesn't seem to work (the GUI) on Windows XP..
It just doesn't load. Setting the compatibility to Windows 95 or NT fixes this, but as soon as you try to load a ROM, program exits :s
I use windows XP... so I don't have a clue what's going on there.

@lljtsj: They're blocking SF at the GFW now? It must really suck for internet users in china ATM. Uploading.... http://www.fs2you.com/files/e459091e-4ebd-11dd-8dac-001143e7b41c/
PS. The updates system requires SF. Therefore, I haven't updated the version number info on this version - it is compiled straight from my working-copy source code.

@FrostyFuz: Sorry, I forgot to ask what version you were using when this happened :s But I'll fix it!

For some reason, this thing does not open on my PC. All I see is a small window for like 1/4 of a second and it disappears. I don't know if there's something wrong with your tool, my PC, or my head?
Most likely a combination of your PC not liking the programming in my tool. I'll see if when I fix D-Trogh's error if it will fix yours.

@D-Trogh: Will contact you via MSN.
Plz not to PM me, I don't come here often enough. Email if you need me

score_under

I program the *other* ASM.

Age 26
Hertfordshire, England
Seen December 8th, 2015
Posted August 10th, 2010
525 posts
13.8 Years
This post applies to an OLD version of the program only
Whoa... That must be difficult to have to do that every time in China.

Anyway, crashing bug was fixed. Then I ran into an icon bug. That was fixed. Then I ran into an updating bug.
That was fixed. Phew!
Latest version is 1.4.3stop_pointlessly_updating, but you can call it 1.4.3 for short!
Plz not to PM me, I don't come here often enough. Email if you need me
Advertiser Content