Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2012-03-20 22:29:47

FireSlasher
Member
From: massachusetss
Registered: 2011-06-24
Post 109/178
Website

PKSV

Could someone explain to me possibly how to impliment scripts written in the PKSV program into your hack? I found the program today and almost freaked out cause it would help me so much with scripting, but I couldn't figure out how to load them into the rom.


I'm working on Sterling Silver: Cry of Celebi, if you have any questions, suggestions, or comments, feel free to email me

Offline

#2 2012-03-23 18:47:12

FireSlasher
Member
From: massachusetss
Registered: 2011-06-24
Post 111/178
Website

Re: PKSV

I've been trying to figure it out all week and I still cant, do you take the scripts and write them into the game somehow manually?


I'm working on Sterling Silver: Cry of Celebi, if you have any questions, suggestions, or comments, feel free to email me

Offline

#3 2012-03-23 20:06:18

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 1,303/3,512

Re: PKSV

Well, when I use it I have Johtomap send the scripts to it, but you would have to load the rom with it, and tell it to compile the script to a certain location, and then manually have your event point to it.

Offline

#4 2012-03-23 21:18:54

FireSlasher
Member
From: massachusetss
Registered: 2011-06-24
Post 112/178
Website

Re: PKSV

=0 I always loaded up the rom and used Johtomap, but yeah, that sounds goood! Would I tell it to compile the script to the offset I decompiled from Johtomap?


I'm working on Sterling Silver: Cry of Celebi, if you have any questions, suggestions, or comments, feel free to email me

Offline

#5 2012-03-23 23:31:52

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 1,304/3,512

Re: PKSV

Unless you make it longer, you should be able to just hit "compile" and it will save it back where it loaded it from. If you made it longer, you would need to edit the offset in the first line to some free sapce, then change his script pointer to point to the new offset.

Offline

#6 2012-03-24 00:36:33

FireSlasher
Member
From: massachusetss
Registered: 2011-06-24
Post 113/178
Website

Re: PKSV

How might I change the script pointer? Actually, how might I do both things you mentioned with the pointers, should I put the offset from Johtomap or the new offset in Pointer Berechner?


I'm working on Sterling Silver: Cry of Celebi, if you have any questions, suggestions, or comments, feel free to email me

Offline

#7 2012-03-24 04:27:27

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 1,305/3,512

Re: PKSV

You would put the new offset in pointer berechner, then you would put the pointer it gives you in johtomap. But you would need to swap the last 2 bytes. Pointer berechner gives you the pointer in a format you can type in directly to the rom in a hex editor, and johtomap thinks its cool and swaps it. Thats actually why I've had crashing trainers in the past, because I typed it in like it was a hex editor forgetting johtomap makes me swap it.

Offline

#8 2012-03-24 11:06:41

FireSlasher
Member
From: massachusetss
Registered: 2011-06-24
Post 115/178
Website

Re: PKSV

I actually tried that last night and did the same error you do occasionally haha. When I fixed the pointer though, I tried putting in an edited script and I actually finally got a script working, but the script itself didn't work properly. I was editing the Cyndaquil script in Elms lab so that it would only give you Cyndaquil and Elm wouldn't talk to you after, but it screwed up cause now when I click on it, it acts as if you already picked the Pokemon, saying "This is a Pokemon Prof Elm caught" or something of that sort. I think I've come to notice that I'm lousy at script writing :P


I'm working on Sterling Silver: Cry of Celebi, if you have any questions, suggestions, or comments, feel free to email me

Offline

#9 2012-03-24 13:09:59

Miksy91
Member
Registered: 2010-10-16
Post 830/2,317

Re: PKSV

Mateo wrote:

You would put the new offset in pointer berechner, then you would put the pointer it gives you in johtomap. But you would need to swap the last 2 bytes. Pointer berechner gives you the pointer in a format you can type in directly to the rom in a hex editor, and johtomap thinks its cool and swaps it. Thats actually why I've had crashing trainers in the past, because I typed it in like it was a hex editor forgetting johtomap makes me swap it.

The pointers in the rom are backwards because pokemon GB/C games use little-endian format pointers. Big endian is clearer though because it as itself shows the ram area where it points to.
Basically when a little-endian pointer in rom is 20 62, it points to $6220 in ram. The rom bank (if not bank 0) which is accessed, at the time, is always copied to rom bank 1 in ram (between $4000 and $7FFF). That's also why you can't point to other rom banks without having another byte as the rom bank.

Last edited by Miksy91 (2012-03-24 13:12:05)

Offline

#10 2012-03-24 17:14:16

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 1,306/3,512

Re: PKSV

I mean, I understand that swapping them shows the actual ram address, but it is still confusing when you are used to one way and then switch to having to do it the other way. :p

Offline

Board footer

Powered by FluxBB