Jump to content

Recommended Posts

Posted

Hello, I was looking to start a project and found this post while searching around on Google for a start, in the replies was posted a LINQPad script from Kaphotics but it for some reason doesn't work for me, the only changes I made was replacing all mentions of PB7 with PK2 as I'm working with pk2 files but to my understanding that change shouldn't be significant but I could be wrong.

Basically my issue is I think the script is turning an empty slot in the PC into a Pokemon rather than turning the imported .pk2 data into one, instead of a Celebi I'm instead receiving a really messed up Bulbasaur with various weird things such as a blank nickname and 34560 Atk EVs, the only info from my Celebi pk2 file that transferred over is the 1st move Leech Seed which now appears as the 4th move on the Bulbasaur.

I still have a lot to learn about writing scripts so any help at all would be greatly appreciated and sorry for my lack of knowledge, here's the current script:

string path = @"F:\pkmn\1\Pokemon - Crystal Version (UE) (V1.1) [C][!].sav";
var sav = SaveUtil.GetVariantSAV(path);
var all = sav.BoxData;

var pathPK2 = @"F:\pkmn\1\251.pk2";
var dataPK2 = File.ReadAllBytes(pathPK2);
var pk2 = new PK2(dataPK2);
all[0] = pk2;

sav.BoxData = all;

File.WriteAllBytes(path, sav.Write());

And below I'll attach the .pk2 files for the Celebi, and the results from the script that I got off the .sav file.

result.pk2 251.pk2

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...