Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit)

This doesn't work on Linux (and I'm surprised if it works on Mac). I believe the problem is that it has a bunch of Windows path separators hardcoded. For instance, when constructing the paths where portraits are held, it has logic like this:

String bodies = packDirectory + "\\bodies\\";

Java is smart enough to convert forward slashes to system-specific separators, but it doesn't convert backslashes in the same way. This can be fixed by just using forward slashes or by intentionally using File.separator.

If this application is on source control somewhere, I'd consider submitting a patch.

Ah, gladly

This will be fixed shortly

And done

That was easier than I expected

First time I opened the code in a couple years ^.^;

(1 edit)

Wow you're quick!

There is still  a problem. You may have just missed a spot, because I'm getting filenames that look like this:

Human\Female\Mature+Adult+Teen\auburn+fairSkin+TitsF+AssT+Shoulder+Straight+eyeBlue+germaine.png


That's the whole filename, not the path.

The presence of the backslashes suggests there's still a hardcoded backslash in there somewhere.

K, I found it

It's in the settings.json file

Line 4

"FileNameTemplate": "{Races}\\{Genders}\\{Ages}\\{HairColors}{SkinColors}{TitSizes}{AssSizes}{PenisSizes}{HairLengths}{HairStyles}{EyeColors}{EyeShapes}{Horns}{Furs}{Heights}{Custom}{CRC}",

The double slashes get loaded directly

Now it converts the '\\' in the .json file into File.separator 

Let me know if I still missed one

The new logic seems to be treating the `/` as a kind of tag.

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: Cannot invoke "java.util.List.iterator()" because the return value of "java.util.Map.get(Object)" is null

    at com.CyanCorn.portrait.main.PortraitObject.doesThisCategoryHaveThisString(PortraitObject.java:355)

    at com.CyanCorn.portrait.main.PortraitObject.getMyTagsFromThisCategory(PortraitObject.java:347)

    at com.CyanCorn.portrait.main.PortraitObject.apply(PortraitObject.java:322)

    at com.CyanCorn.portrait.main.PortraitObject.setMetaData(PortraitObject.java:399)

    at com.CyanCorn.portrait.GUI.GUIFactory.applyButtonClicked(GUIFactory.java:1343)

Specifically, that line is looking for a key named `/` instead of one of the actual tag names (like `Races`). It's likely that PortraitObject.apply needs to be updated to handle `/` instead of `\\`. It also wouldn't hurt to throw a little null safety in there.

This bug might also affect Windows, now that I think about it.

OK, I think I fixed it 2.24 (should have checked email instead of gaming...)

but my confidence is shattered

Here is the source code if you're interested

https://www.mediafire.com/file/tyoekyhx4xzovyc/PortraitPackEditorRe_SRC.zip/file

It just needed a minor change. Here's a patch: https://pastebin.com/SUsNdKn6

The only important change is to GUIFactory. The other changes were just necessary to let me build and run the project in IntelliJ.

This should be compatible with all platforms, but I suggest you give it a quick spin on Windows, particularly paying attention to the save path when you press Apply.

Ok, I tried it in Windows

Works afaik

So if it works on your end, it's now compatible

Thank you

(this delay is why I was trying to fix it quickly before, I knew I'd be gone a few days)