PHO - Pokémon Hackers Online
Go Back   PHO - Pokémon Hackers Online > Discussion Board > Archive

Notices

Archive Old threads that serve no purpose are here.

 
 
Thread Tools Display Modes
Old 9th June 2010, 12:47 PM   #11
Alignment
Newbie
 
Join Date: May 2010
Posts: 9
Alignment is on a distinguished road
Default

Quote:
Originally Posted by full metal View Post
thanks :)
also, to anybody who's not a fraid to admit their a noob:
1) Good job.
2) Scripting isn't that scary ;)
3) If you are serious about things, put up with the crap from the 'legendaries' that are jerks. they rarely mean any harm or offense, and the advice they give you is true. (albeit, a little harsh, but true none the less)
4) Don't advertise your hack right off the bat; get a good basis going first, then leave it alone for a while. if you come back one day and want to work on it, thats when i reccomend creating a thread.
Is there anything you would like to see in this thread thats not covered?
Yes, actually I'd like to see how to use buffer commands, I know how to do it in XSE but the commands aren't the same nor is the syntax, I've done my research by decompiling scripts, but I only know how to do basic buffer scripts on PKSV a little push would be helpful :D....

Also if you have some time, a setmaptile script would be nice :D

Is it OK if I just post mini tuts on this thread? I don't want to make another thread when there is a main one up already....
Alignment is offline  
Sponsored Links
Old 9th June 2010, 06:46 PM   #12
Full Metal ★
Unstable?
Ex-StaffPHO VIP
 
Full Metal ★'s Avatar
 
Join Date: Oct 2012
Posts: 312
Full Metal ★ Full Metal ★
Default

lol, no need to ask my permission (sorry, would have replied sooner, but was on DSI)
and yea, i'll work on those
for buffers, just change the word 'bufferx' to 'storex' if i remember right. i'll add some examples for that. and setmaptiles huh? I'll look into that for you :)
__________________

★ full metal.

#busy
Full Metal ★ is offline  
Old 9th June 2010, 09:35 PM   #13
Alignment
Newbie
 
Join Date: May 2010
Posts: 9
Alignment is on a distinguished road
Default

Quote:
Originally Posted by full metal View Post
lol, no need to ask my permission (sorry, would have replied sooner, but was on DSI)
and yea, i'll work on those
for buffers, just change the word 'bufferx' to 'storex' if i remember right. i'll add some examples for that. and setmaptiles huh? I'll look into that for you :)
Goodies :D
__________________________________________________ ____________

What I'm about to show you guys is the 'checkplayer X Y' command in XSE but in PKSV its much different (easier I would think).

Before you continue, make sure you know how an if statement works and you know what 'compare' does, if you don't go learn. Most of this is common sense, however.


Spoiler:


Alright, I'm going to expose you to what the script would look like. Don't worry its pretty short.

Spoiler:

#dyn 0x740000
#org @start
lock
faceplayer
compare PLAYERFACING UP
if == jump @below
msgbox @not
callstd MSG_NORMAL
release
end

#org @below
= Dude: Your below me

#org @not
= Dude: Your not below me


The magical command here is 'PLAYERFACING'



From what I believe, 'PLAYERFACING' is an pointer which is pre-loaded with the direction the player is facing at the start of every script (could be more than the start of every script, but start of every script seems more logical).
Basically in this script what we're doing is checking if the player is facing upwards or looking up, and if he/she is we jump to #org @below, and if he/she is not, then the script continues.


PLAYERFACING is an easy command to use. Basically its like this:

Compare PLAYERFACING [Direction]
if == jump @[whatever...]

Everything is pretty straight forward from here, direction can change between up, down, left or right. If you don't understand how this works, I suggest you do one of three things:

1) Learn how to use an If statement
2) Get some common sense
3) Ask away!


I'll try posting new things that I think are useful as I go on :D
Alignment is offline  
Old 9th June 2010, 09:53 PM   #14
Full Metal ★
Unstable?
Ex-StaffPHO VIP
 
Full Metal ★'s Avatar
 
Join Date: Oct 2012
Posts: 312
Full Metal ★ Full Metal ★
Default

you bet ^-^
can you PM me with the code for that?
i could re-make it, but typing things like that is a pain...
*edit* nvm, i found out i can just quote ur post :P
__________________

★ full metal.

#busy
Full Metal ★ is offline  
Old 9th June 2010, 11:00 PM   #15
Alignment
Newbie
 
Join Date: May 2010
Posts: 9
Alignment is on a distinguished road
Default

Just to add...

setmaptile X Y tile movement-permission

That's the formatting I'm pretty sure there is a special that comes after/before it as well :/

EDIT: Another something :D

__________________________________________________ ____________
More stuff :D
__________________________________________________ _____

Warps. There are many different ways to do warp scripts (two in PKSV that I've seen and discovered). I guess I'll show you the easier one, and maybe later the harder version if you're curious.

OK, I'm going to use an example script from 'Pokemon Redemption', a hack by a friend of mine, course with permission. The script itself is about 80 lines long without the strings and such BUT you only have to pay attention to 2 lines, the rest should be simple :D

Spoiler:
#org 0x880601F
'-----------------------------------
checkflag 0x201
if true jump 0x880603A ' Flag is set
applymovement PLAYER 0x880603D ' walk_down look_right...
pauseevent 0x0
call 0x8800A72
release
end

#org 0x880603A
'-----------------------------------
release
end

#org 0x8800A72
'-----------------------------------
checkflag 0x201
if true jump 0x8800B8F ' Flag is set
applymovement PLAYER 0x8800B92 ' look_right end
pauseevent 0x0
msgbox 0x8800B95 ' \c\h01\h08Grandpa: R...
callstd MSG_LOCK ' Built-in lock command
applymovement 0xA 0x8800CEA ' look_up end
applymovement 0x9 0x8800CED ' look_down end
pauseevent 0x0
msgbox 0x8800CF0 ' \c\h01\h02\v\h06: Ho...
callstd MSG_LOCK ' Built-in lock command
applymovement 0xA 0x8800EFE ' look_left say_! end
applymovement 0x9 0x8800F02 ' look_left say_! end
pauseevent 0x0
pause 0x40
applymovement 0x9 0x8800F06 ' walk_left look_down ...
applymovement PLAYER 0x8800F0A ' look_up end
pauseevent 0x0
msgbox 0x8800F0D ' \c\h01\h02\v\h06: He...
callstd MSG_LOCK ' Built-in lock command
applymovement PLAYER 0x8800F95 ' look_right end
applymovement 0x9 0x8800F98 ' look_right end
pauseevent 0x0
msgbox 0x8800F9B ' \c\h01\h08Grandpa: W...
callstd MSG_LOCK ' Built-in lock command
applymovement PLAYER 0x88010AF ' look_up end
applymovement 0x9 0x88010B2 ' say_! look_right end
pauseevent 0x0
msgbox 0x88010B6 ' \c\h01\h02\v\h06: Di...
callstd MSG_LOCK ' Built-in lock command
applymovement PLAYER 0x88010FF ' look_right end
applymovement 0x9 0x8801102 ' run_left run_left ru...
pauseevent 0x0
msgbox 0x880110C ' \c\h01\h08Grandpa: Y...
callstd MSG_LOCK ' Built-in lock command
lockall
special CAMERA_START
applymovement CAMERA 0x880116F ' walk_up walk_down wa...
applymovement PLAYER 0x8801153 ' walk_up walk_down wa...
applymovement 0xA 0x8801161 ' walk_left walk_left ...
applymovement 0xC 0x8801187 ' look_up look_left lo...
applymovement 0xB 0x88011A3 ' look_up look_left lo...
pauseevent 0x0
pause 0x120
msgbox 0x88011BE ' \c\h01\h04Grunt 1: H...
callstd MSG_LOCK ' Built-in lock command
applymovement 0xC 0x880125A ' walk_left walk_left ...
applymovement 0xB 0x8801261 ' walk_left walk_left ...
applymovement CAMERA 0x8801268 ' walk_left walk_left ...
pauseevent 0x0
fadescreen FADEOUT_BLACK
special CAMERA_END
releaseall
disappear 0xA
disappear 0x9
disappear 0xFF
disappear 0xB
disappear 0xC
setflag 0x201
clearflag 0x200
warp 0x4 0x0 0x1
jumpstd 0x0


#org 0x8800B8F
'-----------------------------------
release
end


OK in case you missed the bold letters this is the part you should pay attention to...

warp 0x4 0x0 0x1
jumpstd 0x0


Basically this command gets executed in a script and it warps you to the specified warp. Its a really flashy in-game script, but it's really simple to get working.

OK, the way this works is like this:

warp [map bank] [map number] [warp number]
jumpstd 0x0 'is just like pauseevent 0x0 in a movement script, just prevents crashing and ends the script, its actually a built in function but that was an easier explanation :P
Once you use the warp command and jumpstd 0x0 your script must end, there cannot be anything after those two (however you can continue whatever through a levelscript from the map you warp to). Once again pretty self explanitory, you can get the variables you need from Advance Map. Feel free to ask questions if you don't understand.

-------------------------------------
If you just barely understood don't read on because this is the second way to do it, and its more different...and longer...


OK I'm going to cut the script down this time, just to prevent you from having to scroll too much, but here it is:
Spoiler:

warp 0x8 0x2 0xFF 0x4 0x7
waitspecial
release
end


Yea, it is longer, but it works in similar fashion.

warp 0x8 0x2 0xFF 0x4 0x7 ' Ok there are 5 real variables and 4 of which I know how to explain
waitspecial ' Like "jumpstd" in the other one
release ' Yes you need the release and end
end ' read above

explanation:

warp [Map bank] [Map number] [Idk, but I think it doesn't change] [x-position of the warp] [y-position of the warp]
waitspecial 'one of those things you just need there.
release
end

I would always keep the middle number as 0xFF all the time in this script if I were you. If this isn't really working for you the first one is much simpler :D

Questions and suggestions are welcome :D
Alignment is offline  
Old 22nd August 2010, 12:34 AM   #16
RedShinobies
Newbie
 
Join Date: Aug 2010
Posts: 2
RedShinobies is on a distinguished road
Default

I'm sorta new to hacking, tried to learn pokescript but it didn't work properly so now I'm trying to learn PKSV...

So basically I know the basics and stuff (I can program in Visual Basic and in Delphi). In the practice hack I'm trying to make, I want to have a person ask the player a question. If the player responds with yes, they will get certain dialogue, and vice-versa. I tried doing what was shown, but I'm guessing I made a mistake somewhere. The person just gives me the same answer no matter what I press (yes or no). I was hoping someone could quickly jot me down a script of this particular scenario to see where I have made a mistake.

-RedShinobies
RedShinobies is offline  
Old 22nd August 2010, 05:31 PM   #17
Team Fail
Balance and Ruin
Ex-StaffStyle AdminstratorPHO VIP
 
Team Fail's Avatar
 
Join Date: Jul 2010
Posts: 564
Team Fail Team Fail Team Fail Team Fail Team Fail
Default

This is hurting my brain. I'm starting off with PokeScript. I might try this later.

I admit, I am a n00b at scripting! And I am not afraid!
__________________
twitter | dropbox | youtube | bro

Thank you for your time, PHO. I won't soon forget it.
Team Fail is offline  
Old 22nd August 2010, 07:48 PM   #18
Full Metal ★
Unstable?
Ex-StaffPHO VIP
 
Full Metal ★'s Avatar
 
Join Date: Oct 2012
Posts: 312
Full Metal ★ Full Metal ★
Default

NEOOOOO DONT USE POKESCRIPT :O
getting the pokescript out of people seems to be a challenge >.<
__________________

★ full metal.

#busy
Full Metal ★ is offline  
Old 22nd August 2010, 09:17 PM   #19
Team Fail
Balance and Ruin
Ex-StaffStyle AdminstratorPHO VIP
 
Team Fail's Avatar
 
Join Date: Jul 2010
Posts: 564
Team Fail Team Fail Team Fail Team Fail Team Fail
Default

Quote:
Originally Posted by Full Metal View Post
NEOOOOO DONT USE POKESCRIPT :O
getting the pokescript out of people seems to be a challenge >.<
Well, it's easy to learn, and is very basic, unless there is some kind of superamazing script generator out there. I may use that.
__________________
twitter | dropbox | youtube | bro

Thank you for your time, PHO. I won't soon forget it.
Team Fail is offline  
Old 23rd August 2010, 12:05 AM   #20
RedShinobies
Newbie
 
Join Date: Aug 2010
Posts: 2
RedShinobies is on a distinguished road
Default

It's good that PKSV has a script generator but sometimes you just can't get more complex stuff out of it.
RedShinobies is offline  
 

Tags
pksv, scripting, tutorial, [Tutorial]

Thread Tools
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
tajaros' Xtreme Scripting Tutorial tajaros Archive 13 12th February 2013 10:36 PM
Complete ROM Hacking Guide - Scripting Part 1: Introduction To Scripting Linkandzelda Archive 0 11th October 2012 04:23 PM


All times are GMT. The time now is 10:10 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2018, vBulletin Solutions, Inc. User Alert System provided by Advanced User Tagging (Lite) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Lite) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Pokémon characters and images belong to Pokémon USA, Inc. and Nintendo.
Pokémon Hackers Online (PHO) is in no way affiliated with or endorsed by Nintendo LLC, Creatures, GAMEFREAK inc,
The Pokémon Company, Pokémon USA, Inc., The Pokémon Company International, or Wizards of the Coast.
All forum/site content (unless noted otherwise) and site designs are © 2006-2013 Pokémon Hackers Online (PHO).
Green Charizard Christos TreeckoLv100

"Black 2" by ARTPOP. Kyurem artwork by XOUS.

no new posts