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!
Mother Function
retired moderator
Original Poster
#1 Old 30th Jun 2009 at 1:47 AM
Default New books?
Has anyone figured out how to add new books into the game? I figured you'd just add a new texture, right?

Or is this just wishful thinking...

"Holy Shift! Check out the asymptotes on that mother function!"
Advertisement
Instructor
#2 Old 30th Jun 2009 at 1:49 AM
Mother Function
retired moderator
Original Poster
#3 Old 30th Jun 2009 at 2:12 AM
Eh...I see. But how do we get the original textures? Do we use that Sim3pe thing...or whatever it's called? I'm a loss when it comes to extracting things from the game -___-

"Holy Shift! Check out the asymptotes on that mother function!"
Eminence Grise
#4 Old 30th Jun 2009 at 10:53 AM
I assume it's just like this: http://www.modthesims.info/showthread.php?t=345670

Default replacements only though... so not really NEW books.
Field Researcher
#5 Old 30th Jun 2009 at 2:31 PM Last edited by ThomasRiordan : 1st Jul 2009 at 1:53 PM. Reason: Corrected spacing error for MyBook.
Technically, you can add books to the game but they just don't work perfectly. I've managed to do it but the book name ends up being ***Gamedata/Excel/MyNewBook*** in game. I've managed to do it by modifying the books.xml attached. All you do is add a selection of the following code...

Quote:
<BookGeneral>
<Title>Title</Title>
<Author>Sim</Author>
<Genre>None</Genre>
<Length>0</Length>
<Value>0</Value>
<PagesMinNorm>1</PagesMinNorm>
<PagesMinBW>2</PagesMinBW>
<NotInBookStore></NotInBookStore>
<GeometryState>BookSmallThin</GeometryState>
<MaterialState>bookToddlerFunny</MaterialState>
</BookGeneral>


or just copy one of the existing books and paste it between the <Books> and </Books> tags. But after the </BookGeneral> tag and before the <BookGeneral> tag. So using the first book OpenSeason-TheStoryOfGrantRodiek as our example you'd see the following in the xml.

Quote:
<BookGeneral>
<Title>OpenSeason-TheStoryOfGrantRodiek</Title>
<Author>WaylonWilsonoff</Author>
<Genre>Autobiography</Genre>
<Length>546</Length>
<Value>25</Value>
<GeometryState>BookLargeThick</GeometryState>
<MaterialState>bookBiography</MaterialState>
</BookGeneral>
You'd paste your new book here.
<BookGeneral>
<Title>PaladinsAndWarlocks</Title>
<Author>MattGoss</Author>
<Genre>Fantasy</Genre>
<Length>343</Length>
<Value>35</Value>
<GeometryState>BookMediumThick</GeometryState>
<MaterialState>bookFantasy</MaterialState>
</BookGeneral>


So your new xml would look like this.

Quote:
<BookGeneral>
<Title>OpenSeason-TheStoryOfGrantRodiek</Title>
<Author>WaylonWilsonoff</Author>
<Genre>Autobiography</Genre>
<Length>546</Length>
<Value>25</Value>
<GeometryState>BookLargeThick</GeometryState>
<MaterialState>bookBiography</MaterialState>
</BookGeneral>
<BookGeneral>
<Title>MyBook</Title>
<Author>Me</Author>
<Genre>Fiction</Genre>
<Length>1000</Length>
<Value>25</Value>
<PagesMinNorm>1</PagesMinNorm>
<PagesMinBW>2</PagesMinBW>
<NotInBookStore>False</NotInBookStore>
<GeometryState>BookSmallThin</GeometryState>
<MaterialState>bookToddlerFunny</MaterialState>
</BookGeneral>

<BookGeneral>
<Title>PaladinsAndWarlocks</Title>
<Author>MattGoss</Author>
<Genre>Fantasy</Genre>
<Length>343</Length>
<Value>35</Value>
<GeometryState>BookMediumThick</GeometryState>
<MaterialState>bookFantasy</MaterialState>
</BookGeneral>


Hope it helps. Other than the annoying ***Gamedata/Excel/MyNewBook*** part it works perfectly. You can go to the bookstore and buy the book, read it, etc. All my other changes showed up except for the title being messed up.
Attached files:
File Type: zip  S3_00000000_C2D9D4BE5390D589_0333406C_Books.zip (6.8 KB, 122 downloads) - View custom content
Field Researcher
#6 Old 30th Jun 2009 at 2:33 PM
Since I'm getting an error while trying to edit I might add that the covers will still be the ones used by the game since I've found no way to do a replacement for a single book just yet.
Mother Function
retired moderator
Original Poster
#7 Old 30th Jun 2009 at 10:41 PM
ah, I guess I'll wait until more is figured out. ***Gamedata/Excel/MyNewBook*** isn't pretty enough for me :D

"Holy Shift! Check out the asymptotes on that mother function!"
Retired Duck
retired moderator
#8 Old 1st Jul 2009 at 12:26 AM
Quote: Originally posted by ThomasRiordan
I've managed to do it but the book name ends up being ***Gamedata/Excel/MyNewBook*** in game.


Get the fnv64 hash of "Gamedata/Excel/MyNewBook", then add it to the STBL file for English along with the text you want displayed.
Field Researcher
#9 Old 1st Jul 2009 at 2:43 AM Last edited by ThomasRiordan : 1st Jul 2009 at 3:18 AM.
Quote: Originally posted by Echo
Get the fnv64 hash of "Gamedata/Excel/MyNewBook", then add it to the STBL file for English along with the text you want displayed.


Let's pretend for a moment I don't know what a fmv64 hash is or where to get one. Okay, I'm not pretending. What's a fnv64 hash and where do I get one?

As far as the STBL goes. I've got that and I'm sure the STBL Editor like Postal will run on my laptop instead of the desktop so editing it shouldn't be much trouble.

Edit. Well that's a good sign. The site for Java linked to from the STBL editor actually installed correctly and Postal now opens correctly. Praise the Sim Gods I might be just one step away from actually getting this to work.

Edit again. Naturally. Got Postal working but now I get the same install problems for the STBL Editor.
Mother Function
retired moderator
Original Poster
#10 Old 1st Jul 2009 at 7:53 AM
I wish I knew what you guys were talking about

"Holy Shift! Check out the asymptotes on that mother function!"
Test Subject
#11 Old 1st Jul 2009 at 8:44 AM
Hm, I do not know if anyone else saw this, but the title for your "My Book" has a space between 'My' and 'Book' while all the other book titles appear to not have spaces, but where a space would be is followed by a capital letter, denoting the next word. Which is unusual because in book titles small words aren't capitalized usually, maybe that has something to do with it perhaps?
Sir Not Appearing In This Film
#12 Old 1st Jul 2009 at 9:34 AM
Quote: Originally posted by Echo
Get the fnv64 hash of "Gamedata/Excel/MyNewBook", then add it to the STBL file for English along with the text you want displayed.


Echo - Have you gotten the game to recognize new STBL files? Basically, I want to add new titles/descriptions to the posters I've posted here, but I'm running into a wall. I can't seem to figure out how to add a new STBL file that refrences my objects correctly, and I don't really want to overide the entire STBL file inside FullBuild0, nor do I want to change the title/description of the original object I 'cloned'. I've poked around objects gotten from the store, and still can't figure it out. Is there something I'm just missing here?
Field Researcher
#13 Old 1st Jul 2009 at 1:52 PM
Quote: Originally posted by darklord_avalon
Hm, I do not know if anyone else saw this, but the title for your "My Book" has a space between 'My' and 'Book' while all the other book titles appear to not have spaces, but where a space would be is followed by a capital letter, denoting the next word. Which is unusual because in book titles small words aren't capitalized usually, maybe that has something to do with it perhaps?


You're right the space shouldn't be there, but it does it with non spaced titles as well. That was a typo on my part since I'm so used to proper spacing when typing.
Retired Duck
retired moderator
#14 Old 2nd Jul 2009 at 1:49 AM
Thomas, as far as I know there's no complete GUI for it. I've got a Postal script at home which lets you do it though. I'll try to remember to post/send it to you when I get back home this evening. Failing that, you can do it with a hex editor.

Quote: Originally posted by Snaitf
Echo - Have you gotten the game to recognize new STBL files?
I haven't personally, but I believe Karybdis successfully made the game recognize a custom STBL file. I'm not sure how it works for overriding existing STBL records, but for completely new strings it went something like:
- Create a new, empty STBL
- Add the new hash key and display string
- Give the new STBL a new instance. The format is 0xAABBBBBBBBBBBBBB where AA=language code, (00 for English, you can look at the existing STBLs to find the rest) and B's are apparently random.
- Save the STBL into the mod package.
Sir Not Appearing In This Film
#15 Old 2nd Jul 2009 at 2:54 AM Last edited by Snaitf : 2nd Jul 2009 at 3:24 AM.
Quote: Originally posted by Echo
Thomas, as far as I know there's no complete GUI for it. I've got a Postal script at home which lets you do it though. I'll try to remember to post/send it to you when I get back home this evening. Failing that, you can do it with a hex editor.

I haven't personally, but I believe Karybdis successfully made the game recognize a custom STBL file. I'm not sure how it works for overriding existing STBL records, but for completely new strings it went something like:
- Create a new, empty STBL
- Add the new hash key and display string
- Give the new STBL a new instance. The format is 0xAABBBBBBBBBBBBBB where AA=language code, (00 for English, you can look at the existing STBLs to find the rest) and B's are apparently random.
- Save the STBL into the mod package.


Ahh, I was completely unaware of the instance format, I'll give this a try, tyvm

EDIT: I can't believe it, it actually worked! (Screenshot attached.) You, my friend, are a genius. I was able to clone an object and give it a new title without altering the title of the original. Now I can give any new objects I create unique titles and descriptions. I am so mad at myself for letting two little zero's get in the way! I never would have guessed the format of the instace id # actually had any effect on the results. TYTYTY
Screenshots
Retired Duck
retired moderator
#16 Old 2nd Jul 2009 at 7:40 AM
Very cool.
Eminence Grise
#17 Old 2nd Jul 2009 at 9:21 AM
yay that opens the door to a lot of object mods besides books, right?
Retired Duck
retired moderator
#18 Old 2nd Jul 2009 at 11:56 AM
Quote: Originally posted by Echo
I've got a Postal script at home which lets you do it though. I'll try to remember to post/send it to you when I get back home this evening.


Okay, here's the script. Problem is that it's using a bit of functionality which I haven't released officially yet, so you'll have to wait until about this time tomorrow (when the next version of Postal should be available) before you can actually run it.

For then, here's how you run it:
- Extract the script from the attached zip file
- Start Postal
- Go to "Plugins", then "Open Console"
- In the window which pops up, go to "File", then "Open", then select the script file
- Find the line which looks like this:
stbl.strings.put(new Long(Checksum.fnv64("[STRING KEY]")), "[STRING VALUE]")
then put your key/value in where it says
- Go to "Script" then "Run"

You should get a nice new package in Postal, with one STBL, with your one line in it, ready for saving. (But like I said, you can't do this until I release the next version of Postal tomorrowish, because there's one bit which doesn't work with the old version of Postal. )
Attached files:
File Type: zip  new_stbl.zip (532 Bytes, 590 downloads) - View custom content
Mother Function
retired moderator
Original Poster
#19 Old 3rd Jul 2009 at 6:57 AM
Quote: Originally posted by Echo
- Find the line which looks like this:
stbl.strings.put(new Long(Checksum.fnv64("[STRING KEY]")), "[STRING VALUE]")
then put your key/value in where it says


I've been following along until I get to the fnv64 part. Where does one get that Sting Key/Value?

"Holy Shift! Check out the asymptotes on that mother function!"
Retired Duck
retired moderator
#20 Old 3rd Jul 2009 at 7:22 AM
The string key/values should be whatever you intend to display. In Thomas' case, the key should be "Gamedata/Excel/MyNewBook" and the value could be something like "Thomas' cool new book of coolness". Then, every time there's a place in the game where it looks for Gamedata/Excel/MyNewBook, the game will look up that line in the STBL and display "Thomas' cool new book of coolness".
Mother Function
retired moderator
Original Poster
#21 Old 3rd Jul 2009 at 7:31 AM
So if I was making a book would I always use "Gamedata/Excel/MyNewBook" as the key or would I put "Gamedata/Excel/[Inset title]"

"Holy Shift! Check out the asymptotes on that mother function!"
Field Researcher
#22 Old 3rd Jul 2009 at 8:32 AM Last edited by BlackCat007 : 3rd Jul 2009 at 9:04 AM.
Can there be any conflicts with instance number, like there were with guid number in Sims 2?

Quote: Originally posted by daluved1
So if I was making a book would I always use "Gamedata/Excel/MyNewBook" as the key or would I put "Gamedata/Excel/[Inset title]"


I've got the same problem and I think it should be like this: Gameplay/Excel/Books/BookGeneral:MyBook. That's how it looks in my game at least.
Test Subject
#23 Old 3rd Jul 2009 at 8:59 AM
Sorry to burst your bubble.. but the way you guys are trying to edit is not going to work!

By extracting the XML files and just adding new code for a new book wont work and you get the name error because you need to edit the STBL file properly, which you can do with Namethiefs STBL editor. But for adding a new book you need to find the coding for a bookshelf and also add it to that... or you wont see any new books in game. For adding a new book you would also need to find the code that determines how much fun, skill pace etc the book gives.

Im sure alot of this is not moddable yet as the filles are GRANNYRIG and other weird formats that im not sure anyone has figured out yet.

You can just replace the texture of an existing book... but if its a skill book its still going to learn the old skill.

Its the same for adding a career... ive editied all the existing careers but when it comes down to adding a complete new one its a total arse.
Field Researcher
#24 Old 3rd Jul 2009 at 9:07 AM
Are you sure? I think all the additional values like skill and fun are tied to the genre and not to the specific book. Also he added his book to the store, so what are you saying, that he can't store it in the bookshelf after he buys it, it'll just disappear?
Retired Duck
retired moderator
#25 Old 3rd Jul 2009 at 10:11 AM
Creon,

Yes, the STBL issue was being discussed. At length. That is thoroughly solvable.

The bookshelf does not appear to have any knowledge of the books in it. Books are independent objects which can be bought, read, and disposed of completely without bookshelves. The bookshelf itself is simply an inventory for book type objects, much like the fridge is an inventory for food type objects, and the sim's inventory is an inventory for carryable type objects. I don't see why the bookshelf would need hacking to create custom books.

GRANNYRIG files are related to custom mesh and animations, which is not relevant to creating a new book. It can re-use existing meshes and animations without attempting to alter them in any way.

There's nothing wrong with sharing information, but perhaps it would be wise for you to actually read the thread properly, particularly the parts which say what has already been done, before saying that what is being discussed is impossible.

Careers are, of course, an entirely different kettle of fish. They interact with specific building objects, have custom opportunities, and can change the way all other sims in the world interact with your sim. A custom career is, without a doubt, something very difficult which will require core modding skills to make happen (even if it doesn't end up being a core mod, it will still require custom signed assemblies).
Page 1 of 4
Back to top