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

[Archive] psb.m with "scenario" id: Json is not an ArchiveInfo PSB / seems not to be an ArchiveInfo type #82

Closed
ArtoriaPendragon0 opened this issue Jun 8, 2022 · 12 comments
Assignees
Labels
enhancement psb.m about xxx_info.psb.m and xxx_body.bin question https://github.com/betaseeker/How-To-Ask-Questions
Milestone

Comments

@ArtoriaPendragon0
Copy link

I decompiled a file named scenario_info.psb.m in order to translate a game. A scenario_info.psb.m.json was generated with a folder named scenario containing many .txt.scn files. I decompiled the .txt.scn files, edited the text then used PsBuild to have txt.scn files again then I replaced them with the original ones in the scenario folder. Then, I used PsBuild on the scenario_info.psb.m.json file and when I put the new .psb file in the game, there are no changes in the game and when I decompiled the .psb file again I didn't find the changes in the new scenario folder either. I'm assuming that I'm doing something wrong when trying to compile. I tried everything possible but I'm stuck. What am I doing wrong?

@UlyssesWu
Copy link
Owner

UlyssesWu commented Jun 9, 2022

You should provide some screenshots about your "scenario" folder. But for the first guess, you may have left the unmodified "xxx.txt.scn.m.json" file in "scenario" folder (you can also call it as project folder or source folder).

If you read the instructions in PsBuild info-psb -h, it tells you:

If there are both a.psb.m and a.psb.m.json in the source folder, .json will be used (unless using --packed).

So, if your xxx.txt.scn.m.json file is not modified and not deleted, and you just put a modified xxx.txt.scn.m file in it, nothing will change.
You should either leave a modified xxx.txt.scn.m.json file (and its resource folder and resx.json if exists) in "scenario" folder, and delete the xxx.txt.scn.m file (in fact you don't have to; just to confirm), then PsBuild will compile xxx.txt.scn.m.json to xxx.txt.scn.m when building (this will not modify the exist xxx.txt.scn.m file in "scenario" folder; the compiled result is just packed into the final body.bin file);
Or you should make sure there is a modified xxx.txt.scn.m file in "scenario" folder and there is no json files about it (since json is preferred than PSB for the same name), then PsBuild will just use the xxx.txt.scn.m when building.

It's just intuitive isn't it?

@UlyssesWu UlyssesWu added question https://github.com/betaseeker/How-To-Ask-Questions psb.m about xxx_info.psb.m and xxx_body.bin labels Jun 9, 2022
@ArtoriaPendragon0
Copy link
Author

No, I made sure to not leave the unmodified .json file. I just replaced the modifed .txt.scn file with the unmodified one and deleted the .json (the modified and the unmodified one). I even deleted the .txt.scn I wanted to modify from the scenario folder and then used PsBuild but the text present in the .txt.scn I deleted appeared in the game. I uploaded the screenshot of the scenario folder and I uploaded a screenshot of the folder in which info_scenario.psb.m.json file is present (it's not in the scenario folder, although it's the same result even when I put it in the scenario folder).
2022-06-09
Capture

@UlyssesWu
Copy link
Owner

UlyssesWu commented Jun 9, 2022

It seems that you didn't use PsBuild info-psb command to build the PSB with body.bin.
You just compiled a scenario_info.psb.m (use PsBuild scenario_info.psb.m.json), but the scenario_body.bin is not modified (see Date modified).

If you used PsbDecompile info-psb to extract, you should have thought using PsBuild info-psb to repack, that's what called "intuitive", and it's already described in wiki. (Added more description here.)

@ArtoriaPendragon0
Copy link
Author

I did this from the very start but this message popped up: "Json is not an ArchiveInfo PSB."

@UlyssesWu
Copy link
Owner

Attach screenshots (include your input command and program output), and attach the scenario_info.psb.m.json and scenario_info.psb.m.resx.json file.

@ArtoriaPendragon0
Copy link
Author

2022-06-09 (3)
FreeMoteToolkit.zip

@UlyssesWu UlyssesWu self-assigned this Jun 9, 2022
@UlyssesWu
Copy link
Owner

OK, this is a special PSB, not identified by FreeMote as an "ArchiveInfo" type. I will try to fix it soon.

@ArtoriaPendragon0
Copy link
Author

OK, this is a special PSB, not identified by FreeMote as an "ArchiveInfo" type. I will try to fix it soon.

Thank you very much!

@UlyssesWu
Copy link
Owner

Try again with this dev version: https://ci.appveyor.com/project/UlyssesWu/freemote/build/artifacts

You have to unpack with this version first, do not use the old jsons. But you can use the modified .txt.scn file.

@UlyssesWu UlyssesWu changed the title Compiling the .json files. [Archive] psb.m with "scenario" id: Json is not an ArchiveInfo PSB / seems not to be an ArchiveInfo type Jun 9, 2022
@UlyssesWu UlyssesWu added this to the v4.0 milestone Jun 9, 2022
@ArtoriaPendragon0
Copy link
Author

I tried with the freemote you uploaded here. That's what I got:
2022-06-09 (4)

UlyssesWu added a commit that referenced this issue Jun 9, 2022
@UlyssesWu
Copy link
Owner

Try again: ci.appveyor.com/project/UlyssesWu/freemote/build/artifacts (same url)

Just try PsBuild info-psb, no need to extract again this time.

@ArtoriaPendragon0
Copy link
Author

Worked like a charm! Thank you very much I really appreciate it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement psb.m about xxx_info.psb.m and xxx_body.bin question https://github.com/betaseeker/How-To-Ask-Questions
Projects
None yet
Development

No branches or pull requests

2 participants