The Sims 4 Mod Constructor V4: Test Release + Discussion

Discussion in 'Modding Corner' started by Zerbu, Oct 1, 2018.

  1. If you're not seeing your confirmation registration e-mail in your inbox, make sure you check your spam folder! Contact Us for further assistance or Resend confirmation e-mail !
  1. Zerbu
    Happy

    Zerbu Staff Member
    45/68

    Messages:
    95
    Likes Received:
    232
    Trophy Points:
    45
    #1 Zerbu, Oct 1, 2018
    Last edited: Oct 13, 2018 at 1:26 AM
    The Sims 4 Mod Constructor is a downloadable program that lets users create custom traits (and in the future, aspirations and other mods) for The Sims 4. It differs from other programs in that rather than editing files directly, it generates them based on data configuring with a user-friendly UI.


    This is a test version and may contain unknown bugs. Be sure to test any mods thoroughly, and if you find any bugs, please report them.

    I am currently working on a list of instructions on how to use certain features.

    History of Mod Constructor
    As you probably already know, this is my fourth time creating the same program...


    Mod Constructor is a successor to an older tool, Buff and Trait Factory, I released back in late 2014. BATF allowed users to create very simple custom traits with features like skill and decay modifiers. It was extremely simple, so Mod Constructor took it further and allowed for far more advanced traits, with features like Moodlets that spawn when a Sim meets a specified condition (such as being at a certain type of venue, or performing a certain interaction). The user creates "Elements" (formerly referred to as "Resources") that link together to generate a mod.

    The first version of Mod Constructor (V1) was an embarrassing disaster that was not only hard to use but nearly impossible to maintain. In this version, elements (then still known as resources) could only generate one tuning file each, so you'd need many just to add a simple condition-based Moodlet. Most people just stuck with BATF. The less said about this version, the better.

    The second version (V2) was a lot more user friendly, and allowed a single element/resource to generate multiple tuning files. It was a massive improvement over V1, but there was still room for improvement.

    The third version (V3) went back to a one-file-per-element formula, and introduced the Element Tree in place of generating multiple files. Elements could generate "child" elements based on the user configuration. The user could go into the element tree and change these child elements, allowing for more advanced changes than what V2 allowed. The main problem with it, is that it was set up in a way that made it extremely frustrating to maintain and add new features, to the point I almost gave up.

    It wasn't until after experimenting with game development tools that I got the inspiration to try one last time...

    Mod Constructor V4
    Mod Constructor V4 uses a tree system for elements, just like V3, but the way elements are configured has changed a lot. In previous versions, you'd have to navigate a giant form. In V4, the user adds "Components" to an Element, each of which serve a specific purpose. No longer do you have to find your way through a whole lot of features you don't even use. Components send instructions to the program for building the element tree and exporting the mod. This also makes the program a lot easier to maintain, as those instructions are no longer contained all in one big cluttered script.

    You can also drag and drop components in the order you prefer. For some element types, like loot actions, this will determine the order that actions are performed in game.

    Release 1.png Release 2.png Release 3.png Release 4.png

    Mod Constructor V4 also has other improvements:
    • In previous versions, you could only have one element open at once. Now you can have multiple, in the form of tabs! It uses the AvalonDock docking system, which allows you to reorder the tabs, and even create split screens!]
    • You no longer need to access the Element Tree part of the UI to open a non-root element. You just need to click the "Open <Name> Element" from where a reference is defined. Nevertheless, the Element Tree UI is still there for those who want to use it.
    • The "New Element" option is available for every reference field that references a type supported by Mod Constructor, rather than just some.
    • Custom icons have returned from V2! They hadn't been implemented into the test version of V3 yet, but are included in V4.
    • A more advanced system for generating labels. List items and generated element names are no longer represented by randomly generated strings like "be8zqsbxYh".
    • Test Conditions are now treated as their own elements, similar to how they were in V2. Even though they're not their own files in the game, it's easier for the user this way. It reduces clutter and allows test conditions to be reused multiple times.
    Change Log
    • 13rd October 2018
      • Fixed a problem with loot cooldowns that prevented them from working.
      • Added this fix for the previously mentioned assembly error to the download. While I still can't test it myself, it seems to have worked for most people.
    • 3rd October 2018
      • Added another potential fix for the previously mentioned assembly error. I still can't guarantee it will work.
      • Fixed a bug that prevented buff replacements from exporting.
        • Also, the type of "Original" will default to "Game Resource", and there is a form for the replacement like the ones in other parts of the program.
      • Trying to select presets for relationship bits or relationship tracks will now work and will no longer display an error.
    • 2nd October 2018
      • Update 1: Potential fix for the "An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework." error some people have been getting. I'm not able to reproduce the error myself, so I don't know if the fix works or not.
      • Update 2: Fixed a bug with the "Chance" option for loot actions that was preventing it from having any effect (loot actions would have an 100% chance of running regardless of the value).

    Instructions

    How to Create a Trait

    • When Mod Constructor launches, enter your Creator Name and a name for the mod. These two are combined together to prevent the mod from conflicting with others.
    • Click "Create Mod".
    • Click "Add Element" from the top menu.
    • Select "Trait" (this should be the default option)
    • Enter a name for the trait and click "Create Element"
    • You can now enter a name and description for your trait, choose an icon, choose which category it will appear in CAS, and set which ages the trait is available for.

    Always-Active Buffs
    One of the most common features of a trait is having a Sim react to being in a certain situation. For example, they can be Energized while in a Gym venue or Focused while fishing. These buffs will be added when the Sim meets a condition and removed once they no longer meet it.
    • Create a new trait, if you haven't already.
    • Click the "<Trait Name> Buff" item in the "Core Buffs" component.
    • Click "Open Value Element".
    • Add a "Continuous Loots" component.
    • Click the "+" icon under the "Values" list.
    • Add an "Always-Active Buff" item.
    • Enter the name, description, icon and emotion weight. Choose the emotion by clicking the drop down arrow next to the "Instance ID" field and selecting an emotion from the dialog.
    • Click the "+" icon under "Test Condition Sets".
    • Select the newly created item and click "Open Value Element".
    • You can define the condition by adding components to the test condition element. As an example, we'll add a test to see if the Sim is fishing. To do that, add an "Interaction Running Tests" component, located in the "Interactions" category.
    • Click the disc icon under "Interactions" (if you hover over it, it will say "Add Multiple Game Resource References").
    • Navigate to the "Fish" category (or whichever category you want to test for) and select the presets you want (in this case, all of them). Tip: You can quickly select all presets by pressing ALT+A.
    • Click "Select Preset".
    • All the interactions have now been added to the list. Assuming you followed the steps correctly, you can now test this in game. Any Sim with the trait will receive the buff you defined when they start fishing, and it will be removed once they stop.
    Modifiers
    Custom traits (and individual buffs associated with them) can make changes to statistics such as how quickly a Sim gains a skill, how quickly a Need decays, etc. These are simple to add.
    • Add any of the available components from the "Modifiers" category to the trait's Core Buff. For example, to add a skill boost, choose "Statistic Multipliers".
    • Click the drop down arrow next to either "Instance ID" or "Tag" (depending on the type of modifier), and select a value from the dialog. For example, when adding a skill modifier, select the skill you want to add a boost to.
    • Set the value of "Multiplier" or "Modifier" (depending on the type) to how much you want the rate to change by.
    Autonomy
    If you want your trait to feel "complete", you probably want to add some autonomy to it. Currently, you can only copy autonomy settings from existing traits (and other features like emotions), but this is simple to do.
    • Add a "Commodities" component to the trait's Core Buff. If you've previously added a Continuous Loot, Mod Constructor may have already generated one. If this is the case, expand it.
    • Click the disc icon under "Values".
    • Select one or more commodities from the "Autonomy" category. Any autonomy settings will be copied over to Sims with the trait.
    Whims
    You can have Sims with the trait spawn whims of your choice.
    • Add a "Whims" component to the trait itself (not the Core Buff).
    • Click the disc icon, and select which whims you want to add. All the available whims are categorized according to what would cause them without the trait. You can copy all the whims from another trait, or create a custom combination.
    • You can set the reason displayed in the UI. This will default to "(From Custom Trait)", but you'll probably want something different.
    Timed Buffs
    If you followed the steps above, you'll already know how to create an Always-Active buff. It's also possible to create a buff that spawns when the Sim meets a condition and lasts a certain amount of time.
    • Add a "Continuous Loots" component to the Core Buff, if you haven't already.
    • Add a "Continuous Loot" item.
    • Select it and click "Open Value Element".
    • Add a "Add Buff" component, available under the "Buff Actions" category. You can also select "Add Random Buff", which will spawn a random buff from a list.
    • Configure the buff and add the test condition. At this point, you should understand how to do that. Make sure "Ignore if the Sim Already Has the Buff" is checked.
    • You can also, optionally, add a "Cooldown" component to the loot, to prevent the Sim receiving the buff again too quickly after it's gone.
    More Features
    By now, you have an understanding of how the program works. So what next?
    • Occasional Events will run at random times. Moodlets like "Feeling Sad" are added to Sims with this kind of event.
    • Proximity Buffs are added to Sims when they're in the proximity of a Sim who meets a certain condition. The "Proximity Buffs" component has to be added directly to the trait element, not the Core Buff. When defining the test conditions, the participant will default to "TargetSim", which means they'll be applied to the other Sim who the Sim with the trait is in the proximity of.
    • Broadcasters can be used to add buffs or run loots on other Sims who are nearby. For example, you could create a scary Sim who broadcasts a "Tense" Moodlet onto other Sims.
     
    • Useful Useful x 2
    • Like Like x 1
    • Thank you! Thank you! x 1
  2. GTarinska

    GTarinska
    1/12

    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Getting some .NET errors, making the program unable to run.

    EDIT: The message I receive is:

    The Sims 4 Mod Constructor has encountered a programming error.

    Tentativa de carregar um assembly de um local de rede que faria com que o assembly ficasse em modo seguro em versões anteriores do .NET Framework. Esta versão do .NET Framework não habilita a política de CAS por padrão, portanto, esse carregamento pode ser perigoso. Se ele não tiver a intenção de colocar o assembly em área restrita, habilite a opção loadFromRemoteSources. Consulte -link I'm unable to post- para obter mais informações.


    Translating it, would be something close to this:

    Attempt to load an assembly from a network location that would cause the assembly to be in safe mode in earlier versions of the .NET Framework. This version of the .NET Framework does not enable CAS policy by default, so this load can be dangerous. If it does not intend to place the assembly in a restricted area, enable the loadFromRemoteSources option. See -link I'm unable to post- for more information.
     
    • Agree Agree x 1
  3. TenaciousV
    Very Inspired

    TenaciousV
    1/12

    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Thank you so much for giving us an update, I appreciate it immensely!

    I wanted to let you know that there are errors when requesting the list of Relationship Bits and Relationship Tracks, it points to a folder that no longer exists and may have just been overlooked at some point. I was not able to locate an alternative folder that was included in the ZIP anywhere either.

    Also, it may be beneficial to have it default to Friendship_Main for relationship tracks just because the option is so far down that it can be difficult to see if you aren't specifically looking to change the track (I'm assuming most users would want to use friendship and not romantic at first)

    EDIT: I wanted to mention that I LOVE the way v4 is set up. It's much more user friendly and cleaner than v3.
     
  4. Alistu

    Alistu
    1/12

    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    I've just downloaded the October 3rd updated version and I still cannot run the program, sadly.
    There is an additional error message this time.
    "Could not load file or assembly 'file:///C:\Users\[my name]\Desktop\Mod Constructor V4\Content\StandardContent.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
    An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See [microsoft website link] for more information."

    I'm running on Windows 10 and attempting to launch the program by double clicking the .exe found within the extracted archive file.
     
  5. TenaciousV
    Very Inspired

    TenaciousV
    1/12

    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Thank you for your fast update, I haven't encountered any other errors thus far.

    I was wondering if it would be simple to add the ability to make a trait purchasable (reward trait) instead of a CAS trait. I think I remember this feature being in previous versions of mod constructor, but I could also be remembering when we could create aspiration tracks using it.

    (Or if anyone could point me in the right direction for finding out how to do it without mod constructor, that would be great as well)

    EDIT: forgot, but I'm also looking for information on how to set it up to block selection of another trait if they have the trait that I'm creating.
     
    • Agree Agree x 1
  6. bryonyl

    bryonyl
    1/12

    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Thank you for creating these tools, they are great. I am a complete newbie, but so far everything seems to be working fine.

    I have one question I can't figure out: is it possible to create a standalone buff, not linked to a trait, on either v3 or v4? I've been able to successfully implement buffs as part of traits, but not independently, and I'm not sure if it's because that functionality doesn't exist (though v3 seems to have a buff option) or if I'm just doing something wrong.

    Thanks again!
     
    • Agree Agree x 1
  7. cranberry
    Focused

    cranberry
    1/12

    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Had same problem as @Alistu, while i haven't tried saving a mod yet, adding
    <runtime>
    <loadFromRemoteSources enabled="true"/>
    </runtime>
    to the .config file, after configSections block, at least let me open the mod constructor ^^
     
    • Useful Useful x 1
  8. Alistu

    Alistu
    1/12

    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Well, I haven't played about with it yet but adding that command to the config file has certainly stopped the error messages and allowed the program to start.
    Thank you, @cranberry !
     
  9. DemyxWaterton

    DemyxWaterton
    1/12

    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Hello!

    I resently started playing with the Mod Constructor - thank you so much for developing a program like this!

    I tried making my first trait today, which includes various types of buffs (a timed buff, an always-active buff for a location, a random event buff and a proximity buff).
    I made it work with everything except the proximity buff, but after making adjustments a third time the program started giving me an error, saying something like "The object reference is not set to an instance of an object" (it is translated to my language in the program when it occurs, so I'm not sure if the wording here is correct). I think it started appearing when I tried adding a cooldown to the timed buff and tried making the proximity buff work, but I can't figure out what it means, what makes it occur and how to fix it. Can anyone help with this?

    Also, the proximity buff I want to make should react to the Sim with the trait being near a parent, but I'm not sure how to do that. I might be able to figure it out with trial and error, if I can get the "object reference" message fixed, but if anyone has any ideas for it so it saves me time, that would be much appreciated!
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.