Forum Discussion

OultimoDestroye's avatar
6 years ago

How do you activate templates based on whether a state is active?

I am creating a mod for the "More Views Video Station". The mod adds an addon called clickbait which when bought adds default video titles and descriptions for the different mods you can create.

So far I have set up the addon and you can buy it. Currently, I am working on adding default video names and descriptions when the addon bought state is active. I can do it when it is not active like so:





192637

True


0x47E1CCBE
0xE4B5FB41


0x47E1CCBE
0x85D6CEC6


0x47E1CCBE
0xD26D8C1


0x47E1CCBE
0xEFE6DCF






This will randomly select one of the above templates as the initial text when you record a beauty tips video but I tried to use a test based outcome to activate these templates when the correct state was active and it did not work:





192637

True









0x47E1CCBE
0xE4B5FB41


0x47E1CCBE
0x85D6CEC6


0x47E1CCBE
0xD26D8C1


0x47E1CCBE
0xEFE6DCF









5887582488641372904












The code was added to the object_videorecording_tips_beauty file.

Another problem I'll have to overcome is I have many possible states that are active when my addon is bought I am currently testing it with No Lights or Camera purchased but clickbait is purchased:


5887582488641372904


How would I make it so any of my states would activate the templates it like an or switch.

Thank you very much for any help! This is my first mod so please bear with me as everything is a struggle right now xd

Edit: Please also note that the templates are currently referring to non-fiction books when it is, in fact, beauty videos because I ripped it from the write book functionality and it is a placeholder at the moment. Thanks!
  • Anyone, know? I am basically just looking for how to do a conditional in the xml.

    e.g. If a state is active where you have bought my custom add on then activate templates for video names and descriptions else use default.

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.4,696 PostsLatest Activity: 9 hours ago