ROM Hack WIP Pokemon Quest Save Editor (PQSE)

dalv03

Member
Newcomer
Joined
Jul 21, 2018
Messages
14
Trophies
0
Age
30
XP
85
Country
Vietnam
@xSillusx it seems there is a but, after some edits I start to play all fine in game, but then I came back to edit the save file again, but for some reason the PQSE when I try to export the program just close, it wont export my save file, any idea? I attach my save file so you can check just in case. In game works all ok the save I can play normally
I faced same problem. The program stoped while exporting save file. Still try to solve it.
 

skylex77

Well-Known Member
Newcomer
Joined
Dec 28, 2016
Messages
69
Trophies
0
Age
36
XP
109
Country
United States
Dude you shared your keys with me the other day on the other post. Go and delete them (the prefsdata).
The URL, yeah I delete that some days ago, after you reply me lol, but probably someone could download it, any way will wait until tomorrow and try to restore backup if no I will have to contact nintendo support
 

dalv03

Member
Newcomer
Joined
Jul 21, 2018
Messages
14
Trophies
0
Age
30
XP
85
Country
Vietnam
@xSillusx Hi, I just found what causes error export save file. The error is after import and export same save file several times, the program stop working when trying to export sav file. Don't know why but this line make the sav file grow larger than 512kb everytime export and make the program stop working. Yeah, there are something wrong with the PlayerName.
 

Attachments

  • Capture.PNG
    Capture.PNG
    8.5 KB · Views: 247

thethiny

Well-Known Member
Member
Joined
Jun 18, 2009
Messages
137
Trophies
0
XP
253
Country
United States
About adding Android support to the program natively:
You need to edit the main() and the Encryption.cs
this line ->
public static readonly byte[] Key = Encoding.UTF8.GetBytes("C7PxX4jPfPQ2SmzB");

do not make it static and do not make it read only.
Then in your main function (where you initialize the program), add the argv and argc arguemtns to the parameters (such as main(int argv, const char *c[])).
Then if argv is 2, byte[] Key = argc[2]. Else key = C7px...bla bla.
This way you enable Android Support without modifying your app.

Edit:
This is how it's done in C#:

byte[] Key;
public static void Main(string[] args)
{
if (args.Length >= 2)
{
byte[] Key = Encoding.UTF8.GetBytes(args[1]);
}
else
byte[] Key = Encoding.UTF8.GetBytes("C7PxX4jPfPQ2SmzB");
}

/*
Go on with your code then when you call the encryption function, pass the Key parameter or make it global.
Then remove this line from Encryption.cs
public static readonly byte[] Key = Encoding.UTF8.GetBytes("C7PxX4jPfPQ2SmzB");
...
*/


@xSillusx
 
Last edited by thethiny,

thethiny

Well-Known Member
Member
Joined
Jun 18, 2009
Messages
137
Trophies
0
XP
253
Country
United States
About the stone value, you made a table for the 93rd and 94th numbers. This is because you have to read the bytes in REVERSE order (Big Endian).

So:
The Number 65534 is 0xFFFE in hex.
In memory, it is stored as FE FF 00 00
you don't have to do math or anything to know the the value of the 93rd and 94th number. Just read bytes 93 94 95 96 and reverse them then convert to decimal.
Example (In C++)
for (int i = 0; i < 4; i++)
{
fin >> bytes[3-i];
}

int decimal = bytes[0];
for (int i = 1; i < 4; i++)
{
decimal <<=8;
decimal |= bytes;
}
Now you have 65534 in memory. (<<= Does Shift Left 8 bits, |= does ORing).

@noircchack @xSillusx
 
Last edited by thethiny,

skylex77

Well-Known Member
Newcomer
Joined
Dec 28, 2016
Messages
69
Trophies
0
Age
36
XP
109
Country
United States
@xSillusx Hi, I just found what causes error export save file. The error is after import and export same save file several times, the program stop working when trying to export sav file. Don't know why but this line make the sav file grow larger than 512kb everytime export and make the program stop working. Yeah, there are something wrong with the PlayerName.
@xSillusx Yeah thats the issue I got, lol, the good thing there is a solution in the other post from thethiny
 
  • Like
Reactions: xSillusx

thethiny

Well-Known Member
Member
Joined
Jun 18, 2009
Messages
137
Trophies
0
XP
253
Country
United States
@xSillusx Yeah thats the issue I got, lol, the good thing there is a solution in the other post from thethiny
Because the name is stored in a UNICODE format. So let's say your name is:
thethiny
in unicode your name is
t.h.e.t.h.i.n.y
so the program saves it as
t.h.e.t.h.i.n.y
then you save it, and load it again
it loads it as
t...h...e...t...h...i...n...y
then saves it as
t...h...e...t...h...i...n...y
then you load it again as
t.....h.....e.....t.....h.....i.....n.....y

so if your name is 1 letter, it will take you 5 tries before you hit the max character limit.
If your name is more than 1 letter, it will take less.
To fix this, once you load your save, just rename yourself correctly, as if if you see squares in your name, I think you have to remove them.

tl;dr @xSillusx fix the Unicode encoding in your save file.

--------------------- MERGED ---------------------------
 
Last edited by thethiny,
  • Like
Reactions: skylex77

skylex77

Well-Known Member
Newcomer
Joined
Dec 28, 2016
Messages
69
Trophies
0
Age
36
XP
109
Country
United States
Because the name is stored in a UNICODE format. So let's say your name is:
thethiny
in unicode your name is
t.h.e.t.h.i.n.y
so the program saves it as
t.h.e.t.h.i.n.y
then you save it, and load it again
it loads it as
t...h...e...t...h...i...n...y
then saves it as
t...h...e...t...h...i...n...y
then you load it again as
t.....h.....e.....t.....h.....i.....n.....y

so if your name is 1 letter, it will take you 5 tries before you hit the max character limit.
If your name is more than 1 letter, it will take less.
To fix this, once you load your save, just rename yourself correctly, as if if you see squares in your name, I think you have to remove them.

tl;dr @xSillusx fix the Unicode encoding in your save file.

--------------------- MERGED ---------------------------
For the moment I found the solution, with PqSave there is a .bat file to Export to JSON and then Import back from JSON to sav file, well it seems this process fix the issue and let me edit the save file again in PQSE, that simple process :)
 

dalv03

Member
Newcomer
Joined
Jul 21, 2018
Messages
14
Trophies
0
Age
30
XP
85
Country
Vietnam
For the moment I found the solution, with PqSave there is a .bat file to Export to JSON and then Import back from JSON to sav file, well it seems this process fix the issue and let me edit the save file again in PQSE, that simple process :)
lol I just comment the code that load player name in PQSE code and build new program with visual studio. That works for me.
 
  • Like
Reactions: xSillusx

thethiny

Well-Known Member
Member
Joined
Jun 18, 2009
Messages
137
Trophies
0
XP
253
Country
United States
For the moment I found the solution, with PqSave there is a .bat file to Export to JSON and then Import back from JSON to sav file, well it seems this process fix the issue and let me edit the save file again in PQSE, that simple process :)
That's because the Json format has specific slots only that you can't add / remove from.
 
  • Like
Reactions: skylex77

skylex77

Well-Known Member
Newcomer
Joined
Dec 28, 2016
Messages
69
Trophies
0
Age
36
XP
109
Country
United States
For the moment I found the solution, with PqSave there is a .bat file to Export to JSON and then Import back from JSON to sav file, well it seems this process fix the issue and let me edit the save file again in PQSE, that simple process :)
@thethiny Well today I edit my save, and well I just figure out that the method I told on my previous post, that Export to JSON fix the save file to edit it again on PQSE-GUI, well the issue now is, when I restore this save to my game it show the error the Save game is in other phone lol, so we need to find another solution or check the export to JSON what it change on the save file
 

Attachments

  • 2018-07-27_173031.jpg
    2018-07-27_173031.jpg
    20.3 KB · Views: 186

skylex77

Well-Known Member
Newcomer
Joined
Dec 28, 2016
Messages
69
Trophies
0
Age
36
XP
109
Country
United States
lol I just comment the code that load player name in PQSE code and build new program with visual studio. That works for me.
Hey bro can you share you file? the method I found the other day don't work after I return the save file to my game :( @dalv03

EDIT:
Thanks for the Screenshot, I manage to find the line and did the same, just in case someone else need the temp fix I attach the file :)
 

Attachments

  • PQSE-GUI-TEMP-ANDROID-FIX.zip
    282.5 KB · Views: 260
Last edited by skylex77,
  • Like
Reactions: thethiny

dalv03

Member
Newcomer
Joined
Jul 21, 2018
Messages
14
Trophies
0
Age
30
XP
85
Country
Vietnam
Hey bro can you share you file? the method I found the other day don't work after I return the save file to my game :( @dalv03

EDIT:
Thanks for the Screenshot, I manage to find the line and did the same, just in case someone else need the temp fix I attach the file :)

Sorry bro, I modified the file so that I can modify stone, bingo bonus like i want, so it's kind of a mess now haha. Nice to know you find it.
 
  • Like
Reactions: skylex77

skylex77

Well-Known Member
Newcomer
Joined
Dec 28, 2016
Messages
69
Trophies
0
Age
36
XP
109
Country
United States
Sorry bro, I modified the file so that I can modify stone, bingo bonus like i want, so it's kind of a mess now haha. Nice to know you find it.
oh really can edit Stone and Bingo? how is going with that? that will be very helpful
 

dalv03

Member
Newcomer
Joined
Jul 21, 2018
Messages
14
Trophies
0
Age
30
XP
85
Country
Vietnam
oh really can edit Stone and Bingo? how is going with that? that will be very helpful
Yeah, it's possible. @noircchack posted the value to edit in order to mod stone and bingo. Bingo code is different between pokemons, so that I only code to show the ID of bingo that pokemon has, and change it to other ID until I find the right bingo (quite time consuming), and for stone, I just copy Atk/Def gold stone template code and overwrite it to the stone I edit choose on UI, then choose bonus (with fixed value) I want. Still suck tho but it can make any perfect pokemon lol. If you want I can share it and show you correct way to use it. I just add features to use on my own.

In other words:
- Skill (attack) edit: make your pokemon always has 1 skill (you have to choose skill type id and skill id on @noircchack post)
- Bingo edit: only show bingo bonus id (you have to figure out the right one you want by yourself)
- Stone edit: always make stone become gold, you can choose which combo of bonus you want and you MUST enter the value higher than 900 before save stone (like 999) otherwise program will crash. And DONT change stone category (it just make the stone ingame look illegal)
 

Attachments

  • bingo.PNG
    bingo.PNG
    5.4 KB · Views: 252
  • skill.PNG
    skill.PNG
    2.9 KB · Views: 247
  • stone.PNG
    stone.PNG
    5.7 KB · Views: 245
  • PQSE-GUI-changed.rar
    531.1 KB · Views: 181
Last edited by dalv03,

hans_meier

Member
Newcomer
Joined
Apr 4, 2018
Messages
6
Trophies
0
Age
32
XP
75
Country
Germany
I love you mate <3

Anywhoops, the correct Bingo Bonus combination can be found here:
docs . google . com/spreadsheets/d/1UTudD9CA-ysSiYNX6iYIBEWmBbvvJiFgUCuZCm3ppWU/edit#gid=1401943665
and here for the codes:
gbatemp . net/threads/pokemon-quest-save-editor-pqse.506944/page-9#post-8134289
 
Last edited by hans_meier,
  • Like
Reactions: skylex77

thethiny

Well-Known Member
Member
Joined
Jun 18, 2009
Messages
137
Trophies
0
XP
253
Country
United States
I love you mate <3

Anywhoops, the correct Bingo Bonus combination can be found here:
docs[dot]google[dot]com/spreadsheets/d/1UTudD9CA-ysSiYNX6iYIBEWmBbvvJiFgUCuZCm3ppWU/edit#gid=1401943665
Excellent! BTW replace the dot with SPACE DOT SPACE instead of [dot]. Less annoying
 

hans_meier

Member
Newcomer
Joined
Apr 4, 2018
Messages
6
Trophies
0
Age
32
XP
75
Country
Germany
Edited :)
Sadly the editor @dalv03 posted crashes, as soon as I want to change the stone values.
Might be only because I'm using a android save file though. Happens with Life and Strength stones.
Don't even have to change anything. As soon as I hit "save" it crashes.
 
Last edited by hans_meier,

thethiny

Well-Known Member
Member
Joined
Jun 18, 2009
Messages
137
Trophies
0
XP
253
Country
United States
Edited :)
Sadly the editor @dalv03 posted crashes, as soon as I want to change the stone values.
Might be only because I'm using a android save file though. Happens with Life and Strength stones.
Don't even have to change anything. As soon as I hit "save" it crashes.
Edit through memory. It's way easier. Use Game Guardian, search for the pokemon's name (UTF-16) and then you will find your save loaded into memory and decrypted. Do what you want there.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • K3Nv2 @ K3Nv2:
    Damn power went out
  • BigOnYa @ BigOnYa:
    Ok xdqwerty, your little bro prob tripped On the cord and unplugged you
  • K3Nv2 @ K3Nv2:
    Ya I'm afraid of the dark hug me
  • BigOnYa @ BigOnYa:
    Grab and hold close your AncientBoi doll.
  • K3Nv2 @ K3Nv2:
    Damn didn't charge my external battery either
  • BigOnYa @ BigOnYa:
    Take the batteries out of your SuperStabber3000... Or is it gas powered?
  • K3Nv2 @ K3Nv2:
    I stole batteries from your black mamba
    +1
  • K3Nv2 @ K3Nv2:
    My frozen food better hold up for an hour I know that
  • BigOnYa @ BigOnYa:
    Or else gonna be a big lunch and dinner tomorrow.
  • BigOnYa @ BigOnYa:
    Did you pay your power bill? Or give all yo money to my wife, again.
  • K3Nv2 @ K3Nv2:
    Oh good the estimated time is the same exact time they just said
    +1
  • BigOnYa @ BigOnYa:
    Load up your pc and monitor, and head to a McDonalds dining room, they have free WiFi
  • K3Nv2 @ K3Nv2:
    Sir please watch your porn in the bathroom
    +2
  • BigOnYa @ BigOnYa:
    No sir we can not sell you anymore apple pies, after what you did with the last one.
  • K3Nv2 @ K3Nv2:
    We ran out
  • HiradeGirl @ HiradeGirl:
    for your life
    +1
  • K3Nv2 @ K3Nv2:
    My life has no value my fat ass is staying right here
  • K3Nv2 @ K3Nv2:
    Nearly 4 hours without power :(
  • Veho @ Veho:
    SO POWERLESS
  • K3Nv2 @ K3Nv2:
    Tell Kanye I need power
  • DinohScene @ DinohScene:
    Better start running in your hamster wheel
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Meth addicts on a treadmill connected to a generator "Unlimited POWER!!!'
    Psionic Roshambo @ Psionic Roshambo: Meth addicts on a treadmill connected to a generator "Unlimited POWER!!!'