Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to give out same kind pokemon but with different pid #11

Open
Tobyheiam opened this issue Oct 19, 2017 · 8 comments
Open

how to give out same kind pokemon but with different pid #11

Tobyheiam opened this issue Oct 19, 2017 · 8 comments

Comments

@Tobyheiam
Copy link

i want to give out unique one not copy of one. i make several ditto with different pid, drag these files to giveawaydeatil and set the count to 1, but this doesn't work. only the first row, the pokemon will be given out

@olliz0r
Copy link
Owner

olliz0r commented Oct 20, 2017

You are right, sadly adding the same pokemon several times to the giveaway list won't work (as it uses the dex number as key, and the key has to be unique), that's why it is ignoring the other inputs... I'll have to see what I can do about that.

@SteveCookTU
Copy link
Collaborator

If the latest update still has the folder capabilities, there should be a folder generated alongside the pk file you selected. Within that folder, you put in the different variations of that pokemon species. Based on what they name their deposit, it will select the specific variation. Ex. If someone names their deposit Adamant, it will gift them the pokemon named Adamant.pk7 within the folder, otherwise it delivers the fault.

@SteveCookTU
Copy link
Collaborator

An option to fix this is having a PID reroll option that rerolls the PID before injecting into the game.

@olliz0r
Copy link
Owner

olliz0r commented Oct 20, 2017

yea I was thinking of that, too, if you want to make sure that the pokemon is not a total clone a pid reroll function would be sweet and probably not too hard to implement. Same with encryption constant.

The only issue I see is retaining shiny status, so we might have to reroll tid and then determine the pid based on that.

@k20stitch
Copy link
Contributor

Guys I’ve already built a modpkm class and include the pkhex.core project as part of the solution. You can reroll pids, change stats, check legality, etc... let me know if it’s something you’re interested in

@SteveCookTU
Copy link
Collaborator

I don't think the OP means being able to edit the pk7s from within ledybot. He wants the PID to change per trade. This can easily be taken from pkhex without adding at a dependency. I'd prefer to keep minimal dependencies with a project like this as it is supposed to be standalone application.

@Bappsack
Copy link
Contributor

Bappsack commented Jan 30, 2018

PKHeX dump = new PKHeX();
 dump.Data = PKHeX.decryptArray(cloneshort);
dump.setRandomPID();
byte[] pkmnEdit = dump.Data;
byte[] pkmnEdited = PKHeX.encryptArray(pkmnEdit);
byte[] chkSum = BitConverter.GetBytes(PKHeX.getCHK(pkmnEdit));
Array.Copy(chkSum, 0, pkmnEdited, 6, 2);
cloneshort = pkmnEdited;

Should do what he want.

//Edit if it need to be Shiny, use .setShinyPid();

@Rinkoss
Copy link

Rinkoss commented Nov 22, 2019

@k20stitch Hi, can you still provide that modpkm class ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants