Jump to content

Mod to extract the xml from a package?


Recommended Posts

Posted

All I want is a way to peek into packages so I can get the CAS/build category tags for each item from xml file. The goal being to pass that info to a powershell script which will move everything into subfolders more or less identical to the submenus in CAS/build. I don't know what format the packages are actually in, if powershell can read them directly.

 

I know Scumbumbo has a program that extracts xml from the game files. But I don't know if it will work on CC packages.

 

I'm really surprised nobody has come up with a folder organizer mod. All the info to do it is built right into the content. It's just a matter of getting at it. Is it that difficult to open a .package?

Posted

Yes it is. You could have read about the .package format in TS3/4 wiki pages. With s4pe one may extract the info but some c(++/#) skills woudn't hurt.

It should work for standalone packages but not for merged packages.

 

I thought of it and would like to extract also a thumbnail and metadata to allow searching by text or image viewer.

Anyhow I suggest to use use one place (directory and/or json) to store/search for data but to copy and rename the .package file to Mods/1/2/3/123456.package (md5sum) go keep the filenames simple and short as TS4 may have issues with long filenames with spaces and non-ASCII characters.

Posted

I'll check the wiki for the format info. Searching the internet didn't bring up anything about it. 

 

I hadn't thought about merged packages. That's definitely a problem.

 

Getting the metadata and thumbnail is a great idea. I'll have to learn more about that too.

Posted
16 hours ago, SouthernGorilla said:

I'll check the wiki for the format info. Searching the internet didn't bring up anything about it. 

 

I hadn't thought about merged packages. That's definitely a problem.

 

Getting the metadata and thumbnail is a great idea. I'll have to learn more about that too.

https://wiki.sc4devotion.com/index.php?title=DBPF

https://modthesims.info/d/561550/mod-conflict-detector-update-03-03-2018.html is the (closed source) conflict decetor which checks the item IDs and shows thumbnails. Anyhow this takes a lot of time even though it's multithreaded. Without a local 'database' or other store on want's to use an octa-core CPU ... 

Posted
5 hours ago, Oops19 said:

https://wiki.sc4devotion.com/index.php?title=DBPF

https://modthesims.info/d/561550/mod-conflict-detector-update-03-03-2018.html is the (closed source) conflict decetor which checks the item IDs and shows thumbnails. Anyhow this takes a lot of time even though it's multithreaded. Without a local 'database' or other store on want's to use an octa-core CPU ... 

Thanks for the link! The wiki I was looking at had nothing.

 

I found this; https://sourceforge.net/projects/dbpfextractor/

But I have no clue what to do with it. It's supposed to be a CLI tool for reading the files, which is exactly what I want. I'm just not anywhere near the level I need to be to make it work.

  • 3 weeks later...
Posted

Been piddling around a bit and found out S4PE will easily save the CASP (which I've learned is what I'm actually looking for) file as plain text. But doing this manually for over 4,000 files just doesn't appeal to me. The weird thing is that "export as text" produces gibberish. But "open in text editor" works perfectly. So I have to open each package individually, select the CASP file, open it in Notepad, and save it. If there's a way to automate this, I'd love to hear it. 

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...