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!
Scholar
Original Poster
#1 Old 17th Sep 2014 at 3:04 AM
A way to mod string tables without stomping on the main string table.
Inspired by the recent mod - http://modthesims.info/download.php?t=533779 - I decided to come up with a guide to make string mods not stomp on the entire string table.

You will need a hex editor.

In the hex editor, search the original string table for the string you want to mod. It will look something like this (my Peeved Pee example):

38 6A BE AC 00 11 00 54 61 6B 65 20 61 20 50 65 65 76 65 64 20 50 65 65

8j¾¬...Take a Peeved Pee

The first four bytes are the address of the string you want to replace, but byte-reversed. The address in this case will be 0xACBE6A38 (which was originally the infamous Angry Poop). The next three are 00, the size of the string, and 00 again. We don't need to worry about this because we won't be making the changes in the hex editor.

Then, download my string table template. I made the table myself in the hex editor to save myself the effort of deleting thousands of rows to get a blank string table.

In S4PE grid view, delete my Peeved Pee line in the string table's dictionary, then add key-value pairs. The keys are the addresses of the strings to change (search through the original string table for these), and the values are the new strings you want.

Then after committing, change the instance number to something a little higher - make sure the first non-zero digit is more than 5. This way, you don't get stomped on by the original string table. To be safe, maybe change a few other digits so you don't stomp on others' string mods.


If "Peeved Pee" is popular, I might consider submitting it.
Attached files:
File Type: zip  PeevedPeeAndEmptyStringTable.zip (265 Bytes, 266 downloads) - View custom content

1/8/2016: New avatar! Pre-censored for EA's approval.
3/19/2015: Teens are too close to YAs. EA needs to either shorten the teens, or add preteens and make YAs look older.
Advertisement
Lab Assistant
#2 Old 17th Sep 2014 at 4:21 PM
Another way to use this is as follows:

Extract the stbl from DrChillgood's package with s4pe.
Open it in the TS4 Stbl Editor.
Add your new key/string pair, making sure to use the right key for the string you want to replace in the Strings_ENG_US.package included with the game.
Save the stbl with the two entries.
Import the stbl resource into s4pe, overriding the peeved pee stbl.
Using the grid view, delete the peeved pee entry from the dictionary (x01).

Save the package. Voila.

thanks for the almost empty stbl package DrChillgood!

Edit: Make sure to change the instance using the fnv64 hash so you have a unique entry.
Scholar
Original Poster
#3 Old 17th Sep 2014 at 4:36 PM
The reason I didn't make it completely empty is because I was afraid a fully empty STBL file wouldn't work. I know the first time I tried to make a completely empty STBL, it refused to open in grid view (and would probably blow up c_major's TS4 STBL editor).

1/8/2016: New avatar! Pre-censored for EA's approval.
3/19/2015: Teens are too close to YAs. EA needs to either shorten the teens, or add preteens and make YAs look older.
Lab Assistant
#4 Old 18th Sep 2014 at 7:52 PM
Does this work for new string tables too? If I created a career mod, for example, and I needed entirely new addresses instead of a replacement, what would I have to do differently?
Mad Poster
#5 Old 20th Oct 2014 at 9:34 PM
Thanks for this info.
I've given creating a text replacement a go now that I've had time to take another look at this.
As I am a UK player, I've replaced all instances of "chips" to "crisps" instead. (except for fish and chips obviously) Oh, also Chips and Salsa was altered to Nachos and Salsa.
Would anyone else be willing to see if it works in their games?
The only thing that still confused me slightly was altering the Instance number. When I used s4pe's fnv generator thing the first code it gave me caused my game to hang when I directed a Sim to the fridge to prepare Nachos and Salsa. The first two digits weren't 0s. I altered them to 0s and now it seems, in my game at least, to run fine.
Attached files:
File Type: zip  MM_ChipTextReplacementTEST.zip (987 Bytes, 68 downloads) - View custom content

My deviantART, MTS Yearbook Origin ID = Alistu
Back to top