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
Test Subject
Original Poster
#1 Old 17th Aug 2020 at 5:15 PM Last edited by le_miau : 17th Aug 2020 at 6:36 PM.
Default Obtain localized string in Python
I've spent a couple of days trying to obtain the translated strings in Python, to no avail. I can create a LocalizedString instance (containing only the hash and tokens) and then open a dialog that shows the translated string in the game, so it seems that the actual translation happens in the C++ code. But what if I wanted to display the translated strings in the console, or a log file? Is there a way to get the values from the STBL in Python, has anyone had any success with this?

[UPDATE]

Using sims4.resources.list(), I was able to load all the resources of type STBL (570775514 / 0x220557DA). From there I can get the hashes + string values, which I can then output to the console or a file. But there's still a hitch: sims4.resources.list() only gives me the STBLs from mods, not those already in the game (e.g. for base game traits, skills etc). Any idea how to get to those?
Back to top