DavidW Posted April 19, 2022 Share Posted April 19, 2022 In addressing the unique items bug, I needed code that would take a string from one IE game and make it available in another. It was convenient to address this generally, and it might be useful elsewhere. The relevant function is get_strings_from_game, in eefixpack/files/tph/dw/get_strings_from_game.tph. You call it like this: LAF get_strings_from_game STR_VAR strings=[whatever] END Set 'strings' to the name of an array that stores the strings you want in the format [strref]=>[discard]. It collects the strings at those strrefs from every language installed on the game, and saves them in eefixpack/languages/[language]/copy_from_[game], where game is either 'sod' or the value of the 'game' variable. This is all done idempotently and doesn't get rolled back if you uninstall a component. (Obviously you shouldn't use this in live code; it's to be used in advance to get all the strings without tedious copy-paste.) Quote Link to comment
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.