Forum Discussion

TriplisTrip's avatar
8 years ago

Copying a bunch of strings from one STBL to another without overwriting the whole thing?

Maybe someone knows something about working with strings that will make this more efficient...

I'm down to basically the last thing before I release the next version of my Sorcerer mod, but due to how I've been doing things, I have a bunch of different ID STBL files with some of the strings for the mod and I want to compile them together into one set of STBL files (one set meaning one file for each language). Just so it's not sheer chaos for translators trying to go through a stupid number of STBL files to put together translations for one language.

Typically, I've been using Sims Studio when I want to combine stuff. In the past (before I had any actual translations) I could just compile the files once (in say, the English STBL file), then delete all of the other language STBL files and duplicate the English one, renaming the ID each time. Much more efficient, in other words, than adding a boatload of strings to 18 different files, one at a time.

But now that I have translations mixed in, that method only really works for files that are 100% English. For ones that are partly, or fully, translated, I can't just use a duplicate of an English file for it, or I'd lose the parts of it that are translated.

(Hopefully this makes sense. I'm really out of it right now and it seems a little confusing to me writing it lol.)

I think ideally, what I'm hoping for is some kind of tool where I can take an existing STBL file and copy/paste add a bunch of strings to it en masse.

Doing it manually for each is horribly inefficient, not to mention soul-crushing. Granted, only 6 of the files have actual translations, so most of them I could do with the duplication method. But the problem is only going to be worse the more translations that are made for the mod, if I ever add strings to it again beyond this update.

Edit: Oh and to give a sense of proportion of how horribly inefficient it is doing it for each one... I have something like 150 strings to add to the "main" files. :lol:
  • I've run into that resizing problem before (if it's what I think it is), just have to try to remember the fix. It works correctly for me but there's a rather obscure setting that's probably different between our computers. I'm also on Win10.

    As for editing the strings in the Language list, that's based on your primary language - by default English but you can change it in Settings - the list consists of the strings in the primary language with the corresponding strings in the translated language. Any translated language strings that are missing show as blank, and any that are not in the primary language won't show. The program really isn't intended to work with inconsistent sets of strings.
  • @Triplis - Fixed! New version is uploaded at MTS, let me know if it's working okay now. It's a DPI issue - I use large scaling - along with me forgetting to make sure the controls are anchored properly. This was an old app made before I understood how to handle this.
  • @cmarinetti Oh ok, thanks for clarifying that! Anywho, got it working with the fixed version, woot woot. :)

    Only thing I should probably mention, in case it means something to you... really kind of a big question mark on my end... is I had a package that I Mushed strings to. Everything worked fine on the functionality end as far as I can tell. Then I "saved as..." the package, extracted its STBLs (which is usual procedure for me when editing them, to edit outside of the main package file for the mod), imported them into the main package file, saved it as a new copy, etc.

    The weird part is, this gave me problems when Sims 4 tried to run. Just immediate crash without even loading at all. I still have the crash file and can PM it to you or something if you're curious and/or have any idea how to read those things.

    But anyway, I thought ok, maybe it's some kind of funkiness with how the files were saved. So on blind theory, I tried loading up a copy of the Mushed STBL package into Sims Studio, hit Save (with no changes made), then went through the process again of extracting (this time from the "saved in Sims Studio" version) and importing to my main package file, tried my main package file again, and this time no crash.

    Doesn't make a whole lot of sense to me, but it worked.

    Either way though, the strings are now "mushed" and seem to be working in-game so far. So thanks again! :)
  • Hmm, probably I messed something up in saving the files, something the game chokes on but S4S doesn't. What would help is if you could upload the same STBL, broken version and after S4S version.

    Oh, and did you edit using s4pe? I think I saw a bug in the code for saving after modification but I didn't test.
  • @cmarinetti Sure, I think I did it with copies. Here's what I'm pretty sure is the before and after:

    http://simfileshare.net/filedetails/261450/

    http://simfileshare.net/filedetails/261449/

    I use s4pe for the main importing/exporting/packaging everything together, etc., if that answers your question. I pretty much have only used Sims Studio in the past for editing strings.
  • Thanks. Never mind, I found the problem, fixing now. s4pe was right and I was wrong, of course.

    Edit: And it's fixed; edited STBLs no longer crash the game and hopefully work okay. Sorry about all the bugginess, doing something fast like this without enough testing is never good.