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!
Quick Reply
Search this Thread
Field Researcher
#26 Old 3rd Jul 2009 at 7:36 PM
Wow, I go off for one day and this has broken wide open. Not only a possible way to add new books but the start of the possibility for new objects too.

Thanks for the script Echo. I'll have to give this a try later when I get a chance.
Advertisement
Mother Function
retired moderator
Original Poster
#27 Old 3rd Jul 2009 at 9:17 PM
I've got the key/value working...I think.....but it won't let me save it =.='
unless it supposed to not be a .groovy file?

Anyways I assume this is what you meant by having to wait for the new version of postal, yes?

"Holy Shift! Check out the asymptotes on that mother function!"
Field Researcher
#28 Old 3rd Jul 2009 at 9:47 PM
How did you make it work, apart from saving? It gave me a bunch of errors, I thought this meant I needed a new version? By the way, can't way for it, been checking every hour today :P

And I still can't understand, are we supposed to give it a random instanse number, isn't there a chance it will conflict, or do I miss something?
Mother Function
retired moderator
Original Poster
#29 Old 3rd Jul 2009 at 9:53 PM
Blackcat, I was going to try using that AABBB da da da da da format someone suggested earlier but I kinda got sidetracked...so as soon as I'm fully awake I'll give it another shot

"Holy Shift! Check out the asymptotes on that mother function!"
Field Researcher
#30 Old 3rd Jul 2009 at 10:04 PM
Oh, OK. Just one small question. How did you get key value and what path did you use?
Mother Function
retired moderator
Original Poster
#31 Old 3rd Jul 2009 at 10:20 PM Last edited by daluved1 : 4th Jul 2009 at 8:12 AM.
I got it from Echo but I'm not sure how/where she got it from

"Holy Shift! Check out the asymptotes on that mother function!"
Retired Duck
retired moderator
#32 Old 4th Jul 2009 at 8:03 AM Last edited by Echo : 4th Jul 2009 at 2:30 PM.
Thomas, the new version of Postal is out if you want to try the script now. (It's out, but I'm not announcing it officially until SourceForge stops being grumpy.)

You can get it here:
https://sourceforge.net/projects/po...aller-v0_6b.jar

daluved1, the key is the value which shows up in game if you *don't* have the STBL file set up correctly. In this case, ThomasRiordan was getting the "...MyNewBook" string. The string you use has to match the key the game is searching for in your particular mod. (Also, I'm a 'she' )

To the various others trying the script, this is just to fix the display string issue which Thomas was having. It doesn't make custom books, or objects, or anything like that. It just creates a single line STBL file.
Mother Function
retired moderator
Original Poster
#33 Old 4th Jul 2009 at 8:16 AM
Echo ma'am I've been waiting for the new version, thank you!

"Holy Shift! Check out the asymptotes on that mother function!"
Field Researcher
#34 Old 4th Jul 2009 at 9:16 AM
Echo, I'm having the same problem as Thomas, only I'm trying to add new ingredients (Adding new ingredients). Before trying to do something new, I wanted to check how it works and what exactly do I need to enter, so I went with "Cheese", it's also the ingredient and I know what path it has. I entered ToggleStringID to be sure, then it said insted of Cheese - Cheese|Gameplay/excel/Ingredients/Data:Cheese. I tried that, but it didn't match

Original: 0x987d91d4aa8bf390 Cheese
("Gameplay/excel/Ingredients/Data:Cheese")), "Cheese") 0xaa8bf390987d91d4 Cheese
("Cheese|Gameplay/excel/Ingredients/Data:Cheese")), "Cheese") 0xcdd51779739b7fff Cheese

I also tried ****Gameplay/excel/Ingredients/Data:Cheese****, that's how my ingredients show up in game, but it stil didn't match.

So what do I need to enter?
Retired Duck
retired moderator
#35 Old 4th Jul 2009 at 9:26 AM
It should be exactly what is between the stars when you run ToggleStringID. I haven't really been following the food conversation. Did you put the new STBL file inside the package with the rest of your mod? Have you tried making the change to the original STBL file as an override first?
Field Researcher
#36 Old 4th Jul 2009 at 9:42 AM Last edited by BlackCat007 : 4th Jul 2009 at 10:00 AM.
When I use ToggleStringID I get exactly this for Cheese - Cheese|Gameplay/excel/Ingredients/Data:Cheese, no stars, nothing, just this string instead of a regular "Cheese" name.
I want to recreate the right hash key for cheese. I presumed, that if I enter the right path in the script I'll get the same hash key, as I see in the original STBL, which is 0x987d91d4aa8bf390 , but instead I get something completely different. So the logical conclusion is that I enter the wrong path. So, what is the right path? Is there any way to decode the origianl hash key to see what it holds inside?


I also tried this with my new ingredient. I see ****bla bla bla**** insted of its name, so I entered "bla bla bla" (without stars) in the script, got package file and put in with other mods, but it didn't work
Screenshots
Sir Not Appearing In This Film
#37 Old 4th Jul 2009 at 9:45 AM
From my experience, what the game displays when it can't find the STBL refrence, has absolutely nothing to do with the hash refrence itself. When my STBL's wern't working, my object's title would be "*** 4962179316281184682 ***", but that would change every time I tested it. The hashes inside the .object file, and the ones in the .stbl file DO match, but had absolutely nothing to do with what the game was displaying. And after I did get it to work, I proved that the hashes simply had to match, they could be completely random, as long as they were the same in both files.
Field Researcher
#38 Old 4th Jul 2009 at 10:01 AM Last edited by BlackCat007 : 4th Jul 2009 at 12:45 PM.
I think this is different. I didn't see big objects being described in XML files. Also i doubt that there is a new object file for every book.

EDIT: I deleted the cheese string from STBL file with hex editor. When I entered the game, there was this.
Screenshots
Field Researcher
#39 Old 4th Jul 2009 at 12:55 PM Last edited by BlackCat007 : 4th Jul 2009 at 1:14 PM.
I think I got this

Original 0x987d91d4aa8bf390 Cheese
Script 0xaa8bf390987d91d4 Cheese (String was "Gameplay/Excel/Ingredients/Data:Cheese")

as you see this is reversed.

I got value for Bread, in HEX view it looks like this a9 d5 3d c7 33 7b 06 6b 05

for Cheese it looks like this, in Origianl STBL: d4 91 7d 98 90 f3 8b aa 06
in generated: 90 f3 8b aa d4 91 7d 98 06

So I reversed Bread value, like this: 33 7b 06 6b a9 d5 3d c7 05, and copied it instead Cheese value, all except last two digits (if I copy them too files becomes corrupted and the game won't load)
so now it look like this in original STBL :

90 f3 8b aa d4 91 7d 98 06 00 00 00 43 00 68 00 65 00 65 00 73 00 65 00 (the bold selection means Cheese in ASCII, didn't change this).

No when I enter the game cheese has no name and my Bread is called Cheese! Whoop!!

Next thing I'm gonna try and see if I can add a string to STBL file, instead overwriting existing one. I hope there is a way to just put a package file with yours one string without editing big STBL, but I couldn't make it work. Every time script generates a package it gives it the same instance number, and it still doesn't work in game. So for now I edit big STBL and put it in package folder and it overrides the old one.
Field Researcher
#40 Old 4th Jul 2009 at 1:09 PM Last edited by BlackCat007 : 7th Jul 2009 at 10:11 AM.
IT WORKED!!! I added this string with HEX Editor "33 7b 06 6b a9 d5 3d c7 05 00 00 00 42 00 72 00 65 00 61 00 64 00" between other strings (included the last two digites this time) and it WORKED!!!

Now i wonder how to make it work without the need to edit the big STBL files.
I'll try to play with instance number. right now script always gives this instance 0BA8342E000F16B0
Screenshots
Retired Duck
retired moderator
#41 Old 4th Jul 2009 at 1:20 PM
Ah, gotcha!

Try extracting this in C:\Program Files\Postal (or wherever you installed it) then try again. (It should overwrite the file libs\Postal-API.jar)

That should make them line up properly.

Echo
Attached files:
File Type: zip  libs.zip (75.9 KB, 48 downloads) - View custom content
Description: Updated API
Field Researcher
#42 Old 4th Jul 2009 at 1:33 PM Last edited by BlackCat007 : 4th Jul 2009 at 8:30 PM.
Thank you very very much Echo!!!

Custom packages work . I just changed the instance number from 0BA8342E000F16B0 to 00A8342E000F16B0, as I play in English and it all worked out!!! I guess all the other digits are really random. I hope there won't be conflicts when other people will also make custom STBL files. We need online instance number giver or something, I guess.
Now I'm off to making new ingredients, plants and what not. Did you know we have meshes for oranges, melons and eggplants

EDIT: With update everything works great, just not to forget to change first two digits to appropriate language.
Sir Not Appearing In This Film
#43 Old 4th Jul 2009 at 10:29 PM
Ok, I see now, and I got it to work as well (see attached.)

Echo - I don't know enough about coding to do this, but I would like to see that script you wrote have the ability to do at least 2 strings in one STBL (most things will need 2, objects have name/description, books have title/author, etc...) And I also noticed it gives the same instance number for the new stbl everytime you run, this should be random, starting with 0x00. Or better yet, make it add 17 of them, one for each language code (they are listed here: http://www.sims2wiki.info/wiki.php?...:STBL_Languages ) Also, a nice addition to Postal would be that when you save your package file, to have it automatically append .package to the end of the filename so you don't have to type it each time. If you don't feel like doing any of these, that's fine, they're simply on my 'wish list.'
Screenshots
Eminence Grise
#44 Old 5th Jul 2009 at 12:23 AM
that's awesome blackcat looking forward to stray veggies for kitchen clutter!
Retired Duck
retired moderator
#45 Old 5th Jul 2009 at 1:26 AM
Snaitf, the first one I can do for you right now. You know the line you have to edit, with the key/values in it? Copy and paste that line as many times as you need rows, they'll all show up in the resulting STBL.

The others are all very doable, but they'll probably have to wait until I can put them into the STBL plugin proper rather than just a quick and dirty script to get it working. I'll add them to my to-do list!
Sir Not Appearing In This Film
#46 Old 5th Jul 2009 at 2:47 AM
Echo - tyvm

Anyone - Any ideas of a way of doing this without overiding the whole books.xml file? I tried just making a new .xml file with my just my book, and when I used the same instance number, my book was the only one in the game, and when I tried using a new instance #, it wouldn't show at all.
Field Researcher
#47 Old 6th Jul 2009 at 2:37 PM
I finally got a chance to test this out today. It worked great. My Sim was able to purchase 99 copies of the newly released Echo Is Awesome book.

I'm guessing to make multiple books I'd just keep copy and pasting stbl.strings.put(new Long(Checksum.fnv64("[STRING KEY]")), "[STRING VALUE]")
as many times as needed and just keep changing the book and author title since Gameplay/Excel/Books/BookGeneral: seems to always remain the same except for the title.

Thanks everyone for their work on getting this to go right. It'll be nice not to have every Sim in town reading Murder In Pleasantview by someone who doesn't even exist yet.
Screenshots
Field Researcher
#48 Old 6th Jul 2009 at 3:20 PM
You can also override existing books with custom titles
Retired Duck
retired moderator
#49 Old 7th Jul 2009 at 12:29 AM
Oh, I would *so* buy that book... 500 pages? That's quite a lot of awesome.

Yep, just copy and paste that line as many times as you need rows in the STBL file. Congrats on being the first modder to make new books! :D
Mother Function
retired moderator
Original Poster
#50 Old 7th Jul 2009 at 2:00 AM Last edited by daluved1 : 7th Jul 2009 at 2:21 AM.
Echo, when I finish with the Groovy console, what do I save the file as? .stbl? .package?

EDIT: nvm, I figured it out

"Holy Shift! Check out the asymptotes on that mother function!"
Page 2 of 4
Back to top