Author Topic: Characters folder Clean up tool  (Read 6773 times)

0 Members and 1 Guest are viewing this topic.

Offline polip1337

  • Newbie
  • *
  • Posts: 13
Characters folder Clean up tool
« on: August 08, 2018, 08:15:24 AM »
Based on my own example i found out that keeping the Characters folder clean is a pain. When i added /removed new girls I started getting characters in game with no pictures because i for example forgot to delete the rgirlsx file.

So i created a java tool that allows to manage the folder in a more friendly way than doing it manually in explorer.

Its a tool for my own use so dont expect any fireworks, the GUI is "functional" at best, no error handling, probably lots of bugs :D If there is any interest i might develop it further.

It finds all the .girlsx and .rgirlsx files and checks if the picture folders are available for them.

Functionalities:

- List all the .girlsx or .rgirlsx files
- Remove the specific
.girlsx or .rgirlsx file
- Remove the folder associated with the girlsx or .rgirlsx file
- Both of the above at the same time ! ???
- Has Auto cleanup option that first finds all girls with missing photos and (after confirmation) deletes them.

Known bugs :
- Does not recognize if there are multiple girls defined in one file
- I found girls with links to scripts in them, cleaner doesn't deal with that. Will throw a null pointer exception and give you a filename.

Changelog:
v0.3
    - Error popups now show the file that caused the problem along with the java error message.
    - Protected the cleaner against more mistakes in .girls files
v0.2
    -Added some bare bones error messages
    -Fixed a silent bug whne the girls files were missing parameters.

Mega link v0.3:
Mega
« Last Edit: August 29, 2018, 04:10:22 AM by polip1337 »

Offline Tyrgalon

  • Newbie
  • *
  • Posts: 45
Re: Characters folder Clean up tool
« Reply #1 on: August 10, 2018, 01:23:53 PM »
Now that is a handy tool, have often had the same problem :D

Offline renat

  • Newbie
  • *
  • Posts: 16
Re: Characters folder Clean up tool
« Reply #2 on: August 10, 2018, 05:24:45 PM »
For the girls directory would that be "Characters"? When i set it to that i don't get any errors but nothing shows either. Could it just be taking awhile to load? i have 1256 girls atm.

Offline aevojoey

  • Hero Member
  • *****
  • Posts: 1413
  • Thats ok, I'm used to disappointment.
Re: Characters folder Clean up tool
« Reply #3 on: August 10, 2018, 09:47:30 PM »
For the girls directory would that be "Characters"? When i set it to that i don't get any errors but nothing shows either. Could it just be taking awhile to load? i have 1256 girls atm.
Yes it is the Characters folder.You need to have both the .(r)girslx file and the folder containing the images directly in the Characters folder.zip/rar files need to be extracted.
 
Fixing the game is a better game than actually playing it.
Get the Current Version <|> Discuss the Game <|> Report a bug

Offline renat

  • Newbie
  • *
  • Posts: 16
Re: Characters folder Clean up tool
« Reply #4 on: August 11, 2018, 09:13:22 AM »
hmmn; well still nothing. I get no response from the tool. No popups or anything.  All the girls are self made so nothing is zipped. and there is both the girlsx files and folder for a vast majority of them. I was hoping to use this to find girls quickly that had half of their necessary files accidentally deleted or a spelling mismatch between the folder and file. Oh well.
« Last Edit: August 11, 2018, 02:29:27 PM by renat »

Offline polip1337

  • Newbie
  • *
  • Posts: 13
Re: Characters folder Clean up tool
« Reply #5 on: August 13, 2018, 07:23:54 AM »
I will add a logging function so i can see what went wrong.

If you want the solution faster, you can run the tool from command line and send me the text that shows after you point to your Characters folder.

Offline chilledflavor

  • Newbie
  • *
  • Posts: 2
Re: Characters folder Clean up tool
« Reply #6 on: August 13, 2018, 11:52:04 AM »
hmmn; well still nothing. I get no response from the tool. No popups or anything.  All the girls are self made so nothing is zipped. and there is both the girlsx files and folder for a vast majority of them. I was hoping to use this to find girls quickly that had half of their necessary files accidentally deleted or a spelling mismatch between the folder and file. Oh well.


I encountered a similar issue.  To test; I created a folder with about 20 folders and girlsx files; it worked fine.  But in the larger, real folder; it seemed to hang or stop the process.

Offline renat

  • Newbie
  • *
  • Posts: 16
Re: Characters folder Clean up tool
« Reply #7 on: August 14, 2018, 07:14:31 PM »
I will add a logging function so i can see what went wrong.

If you want the solution faster, you can run the tool from command line and send me the text that shows after you point to your Characters folder.


Ok i put it in a txt file to not post a wall of text. Thank you for taking a look.

Offline polip1337

  • Newbie
  • *
  • Posts: 13
Re: Characters folder Clean up tool
« Reply #8 on: August 19, 2018, 01:52:04 PM »
Uploaded v0.2 check the first post. :) The problem was not the amount of files opened but that some .girlsx or rgirlsx files were missing parameters and i didnt check for that.
For example it was Charisma = "" and not Charisma ="0" and Java crashed when trying to cast it to a number. Sorry about the delay i was on vacation :D

Offline chilledflavor

  • Newbie
  • *
  • Posts: 2
Re: Characters folder Clean up tool
« Reply #9 on: August 20, 2018, 08:40:40 AM »
Still getting an error on a big folder full of them:


"class java.lang.IllegalArguementException.bound must be greater than origin"


followed by:


"No girls added, the folder you pointed to (<the path here>) might not contain .girlsx or .rgirls files.  If a previous error message was shown polip1337 screwed something up."


It is working for a smaller folder with about 10 in it.

Offline polip1337

  • Newbie
  • *
  • Posts: 13
Re: Characters folder Clean up tool
« Reply #10 on: August 20, 2018, 10:04:15 AM »
Ugh the girlsx and rgirlsx files have errors in them. I just dont have enough test data to catch all of these so i guess you guys became my guinea pigs :D

The problem this time was that when generating rgirls the .rgirlsx files provide a minimum and maximum values, apparently some min values are higher than max for some rgirls. Cleaner is now protected against that mistake.

I've also added a more specific error message that will tell you which file generated a problem along with the java exception being thrown. I updated the link above

Removing the double popup when you get a mistake is planed for v0.4 ;)

Offline jrok

  • Jr. Member
  • **
  • Posts: 54
Re: Characters folder Clean up tool
« Reply #11 on: August 21, 2018, 09:06:17 AM »
Also remember the tool needs to know some of the minimums are hard-coded in the programming.  IE - min age is 18.  Some copies of the early released .rgirls files had min age of 12.


With the issue of the larger folders or files numbers.  I am wondering what is the tool's settings for number of files to be examined?  Does it look for .rgirls and folders separately,  there are .rgirls listing several folders?  In my Characters folder I have over 6k files, when I select all. 
The direct link to my Ladies gifted to you:  https://mega.nz/#F!fDxxDYoZ!JM1UmSrTPmIg3nHbVcogmw

Offline polip1337

  • Newbie
  • *
  • Posts: 13
Re: Characters folder Clean up tool
« Reply #12 on: August 21, 2018, 09:41:02 AM »
I dont check for minimum Age, whatever is written in the .girl file I read.

As for the inner working of the cleaner :
1. It scans the directory supplied by the user for .girlsx and rgirlsx files
2. For .girlsx  files it just checks if a folder is present with the same name as the girlsx  file (eg. it finds Girl.girlsx and checks if a folder Girl is present in the same directory)
3. For .rgirlsx file it reads the file and gets the name property and checks if a folder containing that name is present in the directory.

Im not sure i understand the question but:
There is no maximum for the number of files examined. Your girls list will just be very long, you can sort by clicking on the table headers.
The
.rgirlsx dont list folders, there is a <Girl Name="Some Name" ... > tag so i just matched the folder names with girl name.

I hope i answered your questions, if not feel free to clarify ;)


Offline jrok

  • Jr. Member
  • **
  • Posts: 54
Re: Characters folder Clean up tool
« Reply #13 on: August 21, 2018, 10:44:13 AM »
Thank you for the explanation.  Now I understand the packs with several named girls is not causing an issue with the tool.
The direct link to my Ladies gifted to you:  https://mega.nz/#F!fDxxDYoZ!JM1UmSrTPmIg3nHbVcogmw

Offline renat

  • Newbie
  • *
  • Posts: 16
Re: Characters folder Clean up tool
« Reply #14 on: August 24, 2018, 07:17:22 AM »
So if i understand this correctly, the reason nothing is showing up is because i leave certain skills and mana blank if they aren't applicable to the character and java doesn't know what to do with null values?