Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
MTS has all free content, all the time. Find out how YOU can help to keep it running. Tell me how...

Postal Package Editor (and API)

by Echo Posted 9th Aug 2009 at 3:27 PM - Updated 27th Nov 2013 at 3:14 PM by Nysha
 
162 Comments / Replies (Who?) - 151 Feedback Posts, 10 Thanks Posts
Hide Thanks Posts for this thread (Show only feedback)
Page 5 of 7
Pettifogging Legalist!
retired moderator
#101 Old 24th Jan 2010 at 8:33 PM Last edited by plasticbox : 25th Jan 2010 at 1:41 PM.
I'm still seeing the issue that I've reported in post #40 (with an older version – hence why I repeat this): when Postal throws an error, all but the first dropdown menus disappear. Which means you can't save anymore or do anything else but quit by closing the window.

Also, "quit" shows up in the menu twice – once in the "com.lepidlama.packagegui.main" menu, once in the "File" menu –, the former is nonfunctional. The standard OS X key combo for "quit" (cmd-Q) doesn't work either (I suppose because it gets routed to the wrong menu entry?). What does work is selecting File > Quit from the menu (as long as you have that menu), or closing the window – the latter appears to be equivalent to killing the process though, since it doesn't throw any "Save?" or "Are you sure?" dialogs.


This is OS X 10.5.8; I'm attaching a screenshot with all the version numbers of all the Java stuff. There is one Java update and one Security update I haven't done yet (because I'm lazy and don't feel like rebooting), I could try that in case you think my issue might have to do with being oldversioned.

ETA: re. the quit issue, the standard location for "Quit" in the menu is the last position in the application menu, i.e. the first one. I am not exactly sure on how commands and menu entries are tied together on a technical level (I know they used to be in the classic MacOS, so maybe they've carried forward that idea). Apple have quite useful docs online (with tons of screenshots as well), if you ever want to know how stuff is supposed to / expected to work under OS X: http://developer.apple.com/Mac/libr.../XHIGMenus.html
Screenshots

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Retired Duck
retired moderator
Original Poster
#102 Old 26th Jan 2010 at 6:24 AM
plasticbox - does that happen for all errors, or just a specific one? I've been cleaning up a lot of the error messages so they don't make it all the way back into the menu, but there are probably a few I haven't trapped yet.

I've got a few fixes ready for the next version, which should be (hopefully!) next weekend. That includes the the STBL issue you reported a while back, and makes the resources pick up the correct TGI numbers from the file names. I haven't set it to remember file paths yet, but it's still on my list.
Pettifogging Legalist!
retired moderator
#103 Old 26th Jan 2010 at 9:03 AM Last edited by plasticbox : 26th Jan 2010 at 12:57 PM.
It's been happening for all errors that I got so far, which were mostly about Postal not finding the game files (because I had forgotten to edit the config after I renamed my app, duh).

ETA: it also just happend when I canceled something – I had accidentially selected "Search by TGI" (at least I think that's what it was .. a small boxy dialog of some sort), clicked "Cancel" and the menus were gone.


Sounds great about the STBLs. Looking forward =). I've been doing rather a lot of XML tuning lately, and it's so much more convenient to use Postal for that (seeing as S3PE only works on my windows box).

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Test Subject
#104 Old 26th Jan 2010 at 11:30 PM
Echo,
Yes to answer your question the thumb nail is blank in the game it self. And they are .Sims3packs that are showing blank. If it can be fixed I would appreciate instructions and help. Again thank you for your help and for responding so quickly.
Test Subject
#105 Old 31st Jan 2010 at 8:54 PM Last edited by Datch : 31st Jan 2010 at 8:55 PM. Reason: spelling
Hi Echo,
I am trying to make my own XML tuning mod using this tool and would like to know if you (or anyone) know of a tutorial. I have found a comprehensive tutorial at modthesims, but it's written for s3pe.

I am using mac OSX and thought I got Postal to run correctly (I am launching it through the console following the instructions you gave above). I successfully edited an existing mod using it, but am stuck when it comes to creating my own.

I have found how to open and read the GameplayData.package file, but I cannot figure out how to extract/export a specific xml instance into a separate package file to be used as a mod. I wanted to just copy-paste the text into a new package file, but am unable to paste or even write/create anything into the new package file opened with postal. Thanks in advance for your help.
Inventor
#106 Old 1st Feb 2010 at 2:58 PM Last edited by Cocomama : 4th Feb 2010 at 10:15 PM. Reason: add picture + question
First of all I want to thank you for this program.
Although I already use it for some time for exploring packages, I have never found any tutorial or help file explaning all of the possibilities.
There must be more information about it, as nobody seems to have trouble using Postal, but I just have not been able to locate that information.
Could someone please point me in the right direction?

Maybe it is me using the program wrong, but after 2 or 3 "export to Wes" meshes, I have to restart the program because the screen becomes all messed up and is unreadable.
Screenshots
Test Subject
#107 Old 8th Feb 2010 at 11:43 AM


Running updated XP, JRE 6.18, 4GB with 2,5GB+ of free memory, antivirus and firewall disabled... i tried all version, 0.7, 0.8, 0.9 and the latest 0.10.

And I always heard the Window´s error sound. Runnig the postal-debug.exe I receive the error showed above.

Any thoughts ?
Screenshots
Retired Duck
retired moderator
Original Poster
#108 Old 9th Feb 2010 at 1:13 AM
Hi mesher,

Can you try running this directly in the directory where you installed Postal?

java -Xmx1024m -jar "Postal-GUI.jar"
Test Subject
#109 Old 9th Feb 2010 at 1:24 PM Last edited by mesher : 9th Feb 2010 at 2:27 PM. Reason: adding info
Thanks for your reply, Echo.

I'm using the version 0.10, the Windows one.



Gosh, it seems that the file Postal-Gui.jar can't be located... i tried to call a fake file and got the same result.

In truth, i can't locate the Postal-GUI.jar myself, i scanned all directories and nothing. I know that jar files are containers with several files inside, and I looked for it inside some files. I also inspected the installer file. I just can't find it

EDITED :

Well, as i don't have a postal-gui.jar, i tried to do the same on the postal.exe file. Using -Xmx1024m i had the same problem. Then i tried :

java -Xmx512m -jar "Postal.exe"

and it WORKS

Thanks again for your help Echo !
Screenshots
Retired Duck
retired moderator
Original Poster
#110 Old 15th Feb 2010 at 11:13 PM
Hi Alan,

Do you know if you've ever been able to run java programs before on your computer? Also, what version of Windows are you running?
Retired Duck
retired moderator
Original Poster
#111 Old 16th Feb 2010 at 11:22 PM
Alan,
Are you having the problem running the installer, or running the program after it's installed?
Test Subject
#112 Old 17th Feb 2010 at 8:46 PM
hi 2 questions i'm sure you're gonna hit me with a stick
first of all postal runs fine but some items have an unhappy face and hex stuff. is this stuff not read or understood by this program?
also i'm trying to mod the sims 3 and blender and it seems milkshape both need the .geom file. i see mlod files that everyone refers to but extracting doesn't give anything with a .geom extension. where is this file?
thanks for answers sorry to bug you all
Test Subject
#113 Old 17th Feb 2010 at 8:56 PM
ah sorry ignore that i see my problem is with s3 object tool i will ask there
Retired Duck
retired moderator
Original Poster
#114 Old 17th Feb 2010 at 10:49 PM
No problems. For reference, yes, if you get a sad face and a hex view, it's because Postal currently doesn't know how to parse that file into something more human readable yet.
Pettifogging Legalist!
retired moderator
#115 Old 19th Feb 2010 at 10:56 AM
Two small things:

- it would be most useful if Postal displayed the name of the package that's currently open (e.g. in the window title bar)

- the "About" box is somehow .. weird .. it tells me I have version 12.3.something, but in post #1 the most recent release mentioned is 0.8? Which version is it talking about, and where can I find the one that corresponds to the one in post #1?

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Retired Duck
retired moderator
Original Poster
#116 Old 19th Feb 2010 at 11:38 AM
Point one should be easy enough to do.

The "About" box has me confused... There, er, isn't an about box as far as I know... The most recent version of Postal is actually 0.10, I just forgot about updating the front post. If you just download the default version from the sourceforge page here:
http://sourceforge.net/projects/postal-sims3/
It should always be the most up-to-date stable version.
Pettifogging Legalist!
retired moderator
#117 Old 19th Feb 2010 at 12:06 PM Last edited by plasticbox : 19th Feb 2010 at 12:24 PM.
Quote: Originally posted by Echo
There, er, isn't an about box as far as I know...

There, er, is =P -- but if you didn't put it there, perhaps it's provided by the OS? See screenshots. I have no idea how this works in detail, but every OS X app has the menu shown on the first pic, with standard functions like About, Hide, Quit .. maybe the version in the About box is the Java version or something like that?

(I realise you have no influence over what OS X does =) – the pics are just fyi. If this menu is system-generated, that would also explain the duplicate "Quit" that I'm seeing, I believe I posted about that before)


Another thing: would it be possible to put up some sort of progress bar or busy cursor when Postal needs to dig around in the game files for a while? I just force quit it a couple of times thinking it's hanging or has crashed, but at some point I just left it open and did somehting else .. and when I came back it displayed an XML from the game files (a material reskey), so I guess that's what was taking so long. I realise those packages are 2GB each, so it's not surprising that it takes a while .. but it would be good if there was some indication that things are happening. It's not obvious to the user that when double-clicking one of the TGI entires it'll actually go and open them (I was looking at an OBJD).
Screenshots

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Retired Duck
retired moderator
Original Poster
#118 Old 20th Feb 2010 at 5:09 AM
Hee

Well that entire menu is a surprise to me - when I run it, I get "File", "Plugin" and "Workspace"... So that's a macism.

The slowness, is this happening just the first time you go to open a file, or every time. When it first goes rifling through the game files, it should be bringing up a progress bar, letting you know which files it's hunting about in and an expected duration. After that, it shouldn't take more than a second to get any resource from any package, since it holds a database of the exact offsets into the files for all the resources it knows about.

Some resources just take a long time to parse - STBLs, for example, can be quite big. But you shouldn't be waiting longer than 2 seconds for anything. It also doesn't load resources from any other files unless you specifically click on something like a TGI reference *inside* a resource.

Do you remember which OBJD you were looking at when you had the problem?
Pettifogging Legalist!
retired moderator
#119 Old 20th Feb 2010 at 1:09 PM Last edited by plasticbox : 20th Feb 2010 at 2:10 PM.
Re. "slowness"/inresponsiveness: I do get the progress bar the first time it loads the game files, but not after that. I was clicking on the TGI blocks of material blocks, where game resources are referenced – I'm pretty sure the one yesterday must have been one of the many versions of a custom chair I made, but this has been happening before with other objects too .. maybe I'm terminally impatient, but I always killed the process and went to open it on the Windows box instead.

It's not slowness *per se* that is the issue – just that there's no indication that it's doing anything. I'm pretty sure if I'd time it, it would turn out Postal is much faster than S3PE (it's running on a 2.4GHz machine after all, 4GB RAM, while S3PE is on a historical Windows box that in general acts like an elderly lame duck).



Another thing – can you tell from this whether the export from Hex view is working like it should?: when I open userPresets.package in Postal (which is a plain XML resource, it holds colour/material options for CASTable stuff), and export from the Hex view, the resulting file is a bit funny. I can open and view it in BBEdit but in order to make it readable for the Windows "Editor" I need to "zap gremlins" first (remove control characters and non-ASCII) and then save as Unicode. I'm not sure if that's normal, or if something becomes garbled (maybe due to the fact I'm on OS X?) – I was thinking a Hex dump would have to be ASCII since it contains nothing but 0-F, but these are .. something else. Is this normal?

e: screenshot with gremlins attached

It's not a problem really, since all I want to do with these is read stuff, but I guess it would be difficult to reimport them (I don't have an "insert gremlins" function =P).

e2: also, hmmmmmm .. wouldn't this have to be TWO zeroes there? See the other screenshot, looking at the same file in Postal. Every other digit byte? thing? is one "0".

e3: i also can't open these as utf-8, since they're "damaged or malformed". utf-16 in all flavors gives me no such complaints, but doesn't result in a very useful-looking file either ..


e4: i also found the docs about that surpise menu, in case you want to know: http://developer.apple.com/mac/libr.../uid/TP40001909 "Any Java application that uses AWT/Swing or is packaged in a double-clickable application bundle is automatically launched with an application menu similar to native applications in Mac OS X. This application menu, by default, contains the full name of the main class as the title. This name can be changed using the -Xdock:name command-line property, or it can be set in the information property list file for your application as the CFBundleName value. For more on Info.plist files, see “A Java Application’s Information Property List File.” " (I do realise that your OS X user base is probably like three people =)


e5: another suggestion (that is hopefully easy) – I just realised it would be nice if it displayed the total count of resources in a package somewhere. I just had to compare a few different versions of something, where I had only added/removed a few resources, and it would have been helpful to see the total count at one glance.
Screenshots

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Retired Duck
retired moderator
Original Poster
#120 Old 21st Feb 2010 at 9:00 AM
pb, I'm about to go out so I'll respond to the rest tomorrow, but the xml one I can answer right now. Most of the unicode xml files in .package files come with a jaunty little header which marks the file type and run length. Have you got a hex editor? If so, open up the exported package, delete the first 8 bytes (ie, the first two integers) then open it as file type "UTF-16LE". That should cover most of them.

If you want to import over the top again, you'll need to put these pieces back. The first four bytes should stay the same as they were in the original. The second integer (bytes 4 through 8) should be the number of characters to in the file (ie, the byte-length of the file, divided by 2).
Pettifogging Legalist!
retired moderator
#121 Old 24th Feb 2010 at 2:26 PM
Thanks for the info, echo. I have a hex editor; I'll try opening it like you said the next time I do this.

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Pettifogging Legalist!
retired moderator
#122 Old 1st Mar 2010 at 6:03 PM Last edited by plasticbox : 1st Mar 2010 at 6:18 PM.
I just saw that when looking at ObjectThumbnails.package, several resources will show up as UNK 0xad366f95 or 0xad366f96 or 0x0589dc47, but when I change them to 0x0580a2b5 or 0x0580a2b6 (PNG) and commit, they show up fine as PNGs. From what I've seen so far, ththe UNK ones all seem to be either "mobile" objects, like a seed (was 0xad366f95), a plate with a sandwich (was 0xad366f96); or wallpaper textures (was 0x0589dc47).

It doesn't seem to make a difference whether I change them to 0x0580a2b5 or 0x0580a2b6, both show up as PNG. The ones that are already considered PNG are all 0x0580a2b5 or 0x0580a2b6 – I can't see a pattern as to what the difference is). I don't know too much about the PNG format though, no idea about the finer differences (colour depth? size? alpha? byte order somethingorother?).

So yeah – would you be able to use a PNG preview for these things by default (or is there a reason you don't?)? That would make it much easier to see what is what.



Oh, and re. the XML thing: I've meanwhile seen that this particular resource (userPresets.package, in Documents) looks just as garbled in s3pe, with lots and lots of <NUL> characters that are in no other XML (those in the actual game resources look neat). I'm beginning to think that this is the game writing out garbage … possibly because it's writing to a file in a non-Windows environment? It wouldn't be the first time that EA can't handle that (and there are still encoding issues aplenty between Windows and *nix). OS, game, Postal, and text editor are all en-US so i guess that rules out actual language problems.

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Test Subject
#123 Old 12th Mar 2010 at 3:38 AM
Hi, I've read through this entire thread twice to make sure I haven't missed it. And I am sorry for posting with such a basic question. I run sims 3 on Mac OS X (v. 10.5.8) recently have gotten into downloading package files for my game. Mostly just objects, CAS stuff, and simple mods like sliders and the food overhaul one. Something like 130 in all, and now Buy mode is extremely laggy and slow. I just want to design houses, and have spent days trying to make sense of S3PE (only to discover it is near impossible to run on a mac). I was about to give up and borrow a friends old HP laptop for the Windows box method, till I saw in the comments on plasticbox's article a note about Postal. I've got it working (well opening at least, console as well), I just don't know how to use it. All I want to do is merge my package files into a few larger files because it seems like that is the thing to do. I've tried messing around with opening the packages in Postal, I just figured you could open a bunch at the same time (then save it as a new package), but this doesn't appear to be an option.

Am I missing something? A guide, or import button/tab or something? I feel like a literal baby when it comes to this stuff, especially when I know that what I want to do is so low on the food chain (or... complexity chain). Any input would be greatly appreciated.

Thank you so much, Echo, for creating this program, I hope I can master it soon. And thank you plasticbox for your solutions for os x users article, and continued input. You two make a good team.
Lab Assistant
#124 Old 29th Apr 2010 at 11:10 PM Last edited by groovilicious : 13th May 2010 at 5:32 PM.
Default Can I use this tool to re-categorize some patterns?
I downloaded some patterns from a Russian site, and there's a bunch of printy things in the paint category that should be in fabrics... In general I just have a lot of patterns I'd like to move to other categories. So... I opened up one of the downloaded patterns with Postal, and I can definitely see all those innards! Is it possible for me to change the catalog category where these patterns appear in game with this tool, and if so, how do I do that?!?
Thank you Echo for all your time and contributions to the community! I appreciate you!!

Edit to Add: Hugelunatic has done a tutorial on this that I missed, and she graciously pointed me to. Find it here:
http://www.modthesims.info/showthread.php?t=363669
Test Subject
#125 Old 6th Jun 2010 at 10:25 PM
Is this compatible with all the Ambitions changes?
Especially the Script/Core mod format changes.
Page 5 of 7