Forum Discussion

ForestNinja0's avatar
10 years ago

Need Field List and Attribute Functions

           

6 Replies

  • SimGuruEugi's avatar
    SimGuruEugi
    Icon for EA Staff (Retired) rankEA Staff (Retired)
    9 years ago
    You want to be able to set the text and title to hard-coded strings? If so, you can set them to:

    text=lambda **_: LocalizationHelperTuning.get_raw_text("Hello!")


    You can find an example of triggering UI dialogs from code in ui_commands.py (ui_dialog_notification_test)
  • SimGuruEugi's avatar
    SimGuruEugi
    Icon for EA Staff (Retired) rankEA Staff (Retired)
    9 years ago
    "Forest_Ninja;15029666" wrote:
    "SimGuruEugi;15017871" wrote:
    You want to be able to set the text and title to hard-coded strings? If so, you can set them to:

    text=lambda **_: LocalizationHelperTuning.get_raw_text("Hello!")


    You can find an example of triggering UI dialogs from code in ui_commands.py (ui_dialog_notification_test)


    Is there any way to get an instance of TunableLocalizedString by hash?


    Use
    _create_localized_string(string_id, *tokens)
  • SimGuruEugi's avatar
    SimGuruEugi
    Icon for EA Staff (Retired) rankEA Staff (Retired)
    9 years ago
    No. If you have a reference to a tunable, you can use the reference. If all you have is a hash, you have to create the string. You can't find a tunable using just the hash.

About The Sims 4 Mods & Custom Content

Find expert tips, troubleshooting help, tutorials for mods and custom content, and The Sims 4 patch files in our forum.15,554 PostsLatest Activity: 7 hours ago