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

[Question] Psbuild with multiple image files(or compiling non image attached json) #65

Closed
lsg97 opened this issue Aug 8, 2021 · 9 comments
Labels
emote question https://github.com/betaseeker/How-To-Ask-Questions

Comments

@lsg97
Copy link

lsg97 commented Aug 8, 2021

Hi, I've been trying to use FreeMote to convert pure psb with my json files but It doesn't work right.
I think it is because of multiple image files that I have, doesn't work with your FreeMote.
But your Psbdecompile which I made json files seems work right.
Could you examine my json file that I could convert it to pure psb using Psbcompile.cs.
I think it is because my json file isn't combined with 2 image files.

ps. I've tried modding resx.json file to direct image files adding scripts like "Resources": {0}, "tex#000.png";
and renaming image files but Psbbuild.exe keeps saying "[warn] [0] is not used"

c00570.zip

@UlyssesWu
Copy link
Owner

UlyssesWu commented Aug 8, 2021

Your json didn't specify the resources correctly. I have no idea what you modified.
You should have provided the original PSB, so that I can confirm whether it's a bug of FreeMote, or it's just your bad manual modification.

Did you changed "ExternalTextures" from true to false? Where did you get tex#0.png files? (from PsbDecompile or extracted from other resource files?) Have you read wiki?

@UlyssesWu
Copy link
Owner

UlyssesWu commented Aug 8, 2021

image

  1. PsBuild.exe c00570.json Get a PSB without textures.
  2. PsBuild.exe link c00570.pure.psb tex#000.png tex#001.png Get PSB with textures using link feature.

This is an external texture PSB (textures not in PSB), if you want to view it in FreeMoteViewer, you must link it. This is already noted in wiki. I guess you didn't read that.

@UlyssesWu UlyssesWu added question https://github.com/betaseeker/How-To-Ask-Questions emote labels Aug 8, 2021
@lsg97
Copy link
Author

lsg97 commented Aug 8, 2021

Geez, thanks.
I've read wiki but I've been linking sources psb to image and it keeps saying System.NullReferenceException error.
Now that I've tried after converting json to pure.psb and linking it to image it works!
You saved my day. What a great program!
Thanks again.

@lsg97 lsg97 closed this as completed Aug 8, 2021
@UlyssesWu
Copy link
Owner

UlyssesWu commented Aug 8, 2021

I've read wiki but I've been linking sources psb to image and it keeps saying System.NullReferenceException error.

I have no idea about that error but if your source PSB is encrypted (not pure) it could happen. Anyway I can only confirm with complete error message.

@lsg97
Copy link
Author

lsg97 commented Aug 8, 2021

Uh-oh, if I click motion buttons FreeMoteViewer crashes.
I guess there's something wrong with my source files like you've said.
I hope this error does some help to FreeMote(sending you the source files).
Thanks.
c00570.zip

@lsg97
Copy link
Author

lsg97 commented Aug 8, 2021

And this is what I get when I link directly with source psb.

E:\FreeMote>psbuild link c00570.psb c00570_tex000.png c00570_tex001.png
FreeMote PSB Compiler
by Ulysses, [email protected]
12 Plugins Loaded.

System.NullReferenceException: Object reference not set to an instance of an object.
at FreeMote.Psb.PSB.LoadFromDullahan(Stream stream, Int32 detectSize, Nullable1 namePosition) at FreeMote.Psb.PSB..ctor(String path) at FreeMote.Tools.PsBuild.Program.Link(String psbPath, List1 texPaths, PsbLinkOrderBy order)
Link c00570 done.
Done.

@UlyssesWu
Copy link
Owner

The only crash I met so far, is clicking a specific motion's button for many times. If you just click once (waiting for it to play), it should be OK?

And this is what I get when I link directly with source psb.

Just checked your PSB. Your "PSB" is not started with "PSB\0" file signature (not actually a PSB file), that caused this problem. It seems that the game prepended some file name info into that file, or it's your extraction tool's issue.

@lsg97
Copy link
Author

lsg97 commented Aug 8, 2021

My bad, my bad... haha.
Powerful tool you've made.
Thanks.

@UlyssesWu
Copy link
Owner

The only crash I met so far, is clicking a specific motion's button for many times.

It's still a thing, just got it fixed. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
emote question https://github.com/betaseeker/How-To-Ask-Questions
Projects
None yet
Development

No branches or pull requests

2 participants