Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

The Sim: Free Play

Featured Replies

  • Author
  • Localization

hackspeedok, posted Sat Apr 04, 2015 1:58 pm (4331)


Have any tools for this file ? Thanks for helping. :D
  • Author
  • Localization

hackspeedok, posted Wed Apr 08, 2015 4:03 pm (4394)


Anyone can help ? :(
  • Author
  • Localization

puggsoy, posted Thu Apr 09, 2015 2:26 am (4407)


I know how to make a script to extract the strings, I don't think it would support reimporting though. I could probably make a script that has separate parts for extraction and importing though, depending on whether you give it a .sb file or a .txt file.
  • Author
  • Localization

puggsoy, posted Thu Apr 09, 2015 6:14 am (4410)


Hmm, some issues are arising. One of the strings is 0x9C0 bytes long, which first of all seems to be too large for the QuickBMS string variable. Secondly, that string is also multilined, which would break my reimporting script.

I can probably still do it but it will take a bit more time.
  • Author
  • Localization

puggsoy, posted Thu Apr 09, 2015 7:35 am (4413)


Here it is, finally:
Code:
# The Sims: FreePlay .sb file extraction and re-insertion
#
# Written by puggsoy
# script for QuickBMS http://quickbms.aluigi.org

get EXT extension

if EXT == "sb"
   callfunction SBEXTRACT
elif EXT == "txt"
   callfunction REIMPORT
endif

startfunction SBEXTRACT
   findloc CHDROFF string "CHDR"
   findloc CDATOFF string "CDAT"
   
   goto CDATOFF
   idstring "CDAT"
   get CDATSZ long
   get DUMMY long
   savepos STRINGSOFF
   
   goto CHDROFF
   idstring "CHDR"
   get CHDRSZ long
   get DUMMY long
   
   log MEMORY_FILE 0 0
   
   append
   for POS = 0 < CHDRSZ
      get OFFSET long
      get SIZE long
      math OFFSET = STRINGSOFF
      
      log MEMORY_FILE OFFSET SIZE
      
      goto 0 MEMORY_FILE SEEK_END
      put 0xFF byte MEMORY_FILE
      put 0x0D byte MEMORY_FILE
      put 0x0A byte MEMORY_FILE
      
      math POS = 8
   next
   append
   
   get MSIZE asize MEMORY_FILE
   log "sbextracted.txt" 0 MSIZE MEMORY_FILE
endfunction

startfunction REIMPORT
   open "." "sims3_deluxe_ios.sb" 1 EXISTS
   findloc CHDROFF string "CHDR" 1
   set SIZE CHDROFF
   math SIZE = 0x0C
   
   log MEMORY_FILE 0 SIZE 1
   goto 0 MEMORY_FILE SEEK_END
   
   log MEMORY_FILE2 0 0
   
   get FILESIZE asize
   set STRNUM 0
   set OFFSET 0
   
   append
   for POS = 0 < FILESIZE
      findloc DELOFF byte 255
      set SIZE DELOFF
      math SIZE -= POS
      
      put OFFSET long MEMORY_FILE
      put SIZE long MEMORY_FILE
      
      log MEMORY_FILE2 POS SIZE
      goto 0 MEMORY_FILE2 SEEK_END
      put 0x00 byte MEMORY_FILE2
      goto 0 MEMORY_FILE2 SEEK_END
      savepos OFFSET MEMORY_FILE2
      
      math DELOFF = 3
      goto DELOFF
      savepos POS
      
      math STRNUM = 1
   next
   append
   
   goto CHDROFF MEMORY_FILE
   idstring "CHDR" MEMORY_FILE
   set CHDRSZ STRNUM
   math CHDRSZ *= 8
   put CHDRSZ long MEMORY_FILE
   
   findloc CDATOFF string "CDAT" 1
   set SIZE 0x0C
   
   append
   log MEMORY_FILE CDATOFF SIZE 1
   goto 0 MEMORY_FILE SEEK_END
   
   get MSIZE asize MEMORY_FILE2
   log MEMORY_FILE 0 MSIZE MEMORY_FILE2
   append
   
   get MSIZE asize MEMORY_FILE
   log "newstrings.sb" 0 MSIZE MEMORY_FILE
endfunction

There are a number of things you need to keep in mind:

First of all, when you extract the file, it will create a .txt file containing all of the strings. Each string ends with the "y" character, and then a newline. Do not remove this character (or the newline) when editing the text because it is essential for re-importing.
Secondly, to re-import the strings, choose the edited .txt file as the input file. It is also necessary that "sims3_deluxe_ios.sb" is in the output folder. It will not overwrite this file, but instead create a new file called "newstrings.sb" that contains your edited strings.

I am unable to test this with the game myself (since I don't own it), but if I extract and then re-import without changing anything, the resulting .sb file is identical to the original. So I assume that you should be able to edit strings and re-import them to mod or translate the game.
  • Author
  • Localization

hackspeedok, posted Thu Apr 09, 2015 11:26 am (4415)


puggsoy wrote:
Here it is, finally:
Code:
# The Sims: FreePlay .sb file extraction and re-insertion
#
# Written by puggsoy
# script for QuickBMS http://quickbms.aluigi.org

get EXT extension

if EXT == "sb"
   callfunction SBEXTRACT
elif EXT == "txt"
   callfunction REIMPORT
endif

startfunction SBEXTRACT
   findloc CHDROFF string "CHDR"
   findloc CDATOFF string "CDAT"
   
   goto CDATOFF
   idstring "CDAT"
   get CDATSZ long
   get DUMMY long
   savepos STRINGSOFF
   
   goto CHDROFF
   idstring "CHDR"
   get CHDRSZ long
   get DUMMY long
   
   log MEMORY_FILE 0 0
   
   append
   for POS = 0       get OFFSET long
      get SIZE long
      math OFFSET = STRINGSOFF
      
      log MEMORY_FILE OFFSET SIZE
      
      goto 0 MEMORY_FILE SEEK_END
      put 0xFF byte MEMORY_FILE
      put 0x0D byte MEMORY_FILE
      put 0x0A byte MEMORY_FILE
      
      math POS = 8
   next
   append
   
   get MSIZE asize MEMORY_FILE
   log "sbextracted.txt" 0 MSIZE MEMORY_FILE
endfunction

startfunction REIMPORT
   open "." "sims3_deluxe_ios.sb" 1 EXISTS
   findloc CHDROFF string "CHDR" 1
   set SIZE CHDROFF
   math SIZE = 0x0C
   
   log MEMORY_FILE 0 SIZE 1
   goto 0 MEMORY_FILE SEEK_END
   
   log MEMORY_FILE2 0 0
   
   get FILESIZE asize
   set STRNUM 0
   set OFFSET 0
   
   append
   for POS = 0       findloc DELOFF byte 255
      set SIZE DELOFF
      math SIZE -= POS
      
      put OFFSET long MEMORY_FILE
      put SIZE long MEMORY_FILE
      
      log MEMORY_FILE2 POS SIZE
      goto 0 MEMORY_FILE2 SEEK_END
      put 0x00 byte MEMORY_FILE2
      goto 0 MEMORY_FILE2 SEEK_END
      savepos OFFSET MEMORY_FILE2
      
      math DELOFF = 3
      goto DELOFF
      savepos POS
      
      math STRNUM = 1
   next
   append
   
   goto CHDROFF MEMORY_FILE
   idstring "CHDR" MEMORY_FILE
   set CHDRSZ STRNUM
   math CHDRSZ *= 8
   put CHDRSZ long MEMORY_FILE
   
   findloc CDATOFF string "CDAT" 1
   set SIZE 0x0C
   
   append
   log MEMORY_FILE CDATOFF SIZE 1
   goto 0 MEMORY_FILE SEEK_END
   
   get MSIZE asize MEMORY_FILE2
   log MEMORY_FILE 0 MSIZE MEMORY_FILE2
   append
   
   get MSIZE asize MEMORY_FILE
   log "newstrings.sb" 0 MSIZE MEMORY_FILE
endfunction

There are a number of things you need to keep in mind:

First of all, when you extract the file, it will create a .txt file containing all of the strings. Each string ends with the "y" character, and then a newline. Do not remove this character (or the newline) when editing the text because it is essential for re-importing.
Secondly, to re-import the strings, choose the edited .txt file as the input file. It is also necessary that "sims3_deluxe_ios.sb" is in the output folder. It will not overwrite this file, but instead create a new file called "newstrings.sb" that contains your edited strings.

I am unable to test this with the game myself (since I don't own it), but if I extract and then re-import without changing anything, the resulting .sb file is identical to the original. So I assume that you should be able to edit strings and re-import them to mod or translate the game.

Thanks so much :D It's very very ok
  • Author
  • Localization

hackspeedok, posted Thu Apr 09, 2015 4:42 pm (4419)


Puggsoy, something wrong ? When i edited some strings that didn't have "y" at the end of string, the game crashed. Can you help me ?
http://i.imgur.com/kFMFrTO.png

P/S: And can you help me for editing with longer strings than orginal ? Example: Old string: "New Game", i want to replace with "Choi m?i" (more characters). Reimport will error if i do that.
  • Author
  • Localization

puggsoy, posted Fri Apr 10, 2015 3:43 am (4427)


I can see that you're using Notepad in UTF-8 mode. You need to use it in ANSI mode (go to Encoding -> Encode in ANSI). That might help.
Also, I don't think unicode characters will work. For example "Choi m?i" cannot be saved as ANSI.

That said, there is a lot of the file format I am still unfamiliar with and that probably is used by the game, so even if you use ANSI strings it might not work. Try it though, just changing one or two simple words without unicode characters.
  • Author
  • Localization

hackspeedok, posted Fri Apr 10, 2015 4:51 am (4429)


puggsoy wrote:
I can see that you're using Notepad in UTF-8 mode. You need to use it in ANSI mode (go to Encoding -> Encode in ANSI). That might help.
Also, I don't think unicode characters will work. For example "Choi m?i" cannot be saved as ANSI.

That said, there is a lot of the file format I am still unfamiliar with and that probably is used by the game, so even if you use ANSI strings it might not work. Try it though, just changing one or two simple words without unicode characters.

It still work with Unicode characters in encoding UTF 8 :) But it will crash if i edit the strings that don't have "y" at the end of string. And crash when i replace the original string by longer new string, too. Do you have any idea ?
  • Author
  • Localization

puggsoy, posted Fri Apr 10, 2015 7:37 am (4431)


That's very strange indeed. I have no idea why that would be happening, I tested that and the resulting .sb file is what I would expect, so I don't think it's importing them incorrectly. What about if the string is shorter than original?
  • Author
  • Localization

hackspeedok, posted Fri Apr 10, 2015 12:46 pm (4436)


Shorter is ok but crash if longer than original :(
  • Author
  • Localization

puggsoy, posted Fri Apr 10, 2015 1:19 pm (4437)


That's very strange... I'm not sure what it could be then. Maybe just some sort of restriction in the game engine.

I apologise but I don't think I can help you further :?
  • Author
  • Localization

hackspeedok, posted Fri Apr 10, 2015 5:06 pm (4438)


puggsoy wrote:
That's very strange... I'm not sure what it could be then. Maybe just some sort of restriction in the game engine.

I apologise but I don't think I can help you further :?


Anyway, thanks you so much
  • Author
  • Localization

hackspeedok, posted Tue Nov 24, 2015 7:16 am (10050)


Can you update script for the new version ? Thanks
  • Author
  • Localization

puggsoy, posted Tue Nov 24, 2015 7:37 am (10051)


It appears to work fine with the existing script. Are you experiencing issues?
  • Author
  • Localization

hackspeedok, posted Tue Nov 24, 2015 8:39 am (10053)


puggsoy wrote:
It appears to work fine with the existing script. Are you experiencing issues?

Sorry, my failed :D It is still working
  • Author
  • Localization

hackspeedok, posted Fri Mar 17, 2017 6:14 am (21549)


Hi, this game has new update and the old script does not work. When i modding, the game didn't work
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.