Main
Documentation
Download
Mod version
1.3.0
Last updated
July 15, 2019
Game Version
1.52.100.1020
Overview Files Requirements Issues Changes Development

Main is a mod that contains a set of tools that other mods may well rely on to function. Previously this tool set was only available for use by NeonOcean, but at this point, it is now open to everyone. Main would potentially reduce the amount of work that is necessary to make complex mods, as they would no longer need to create their own systems for things like saving data.

If you are a mod creator, you should check out the documentation for a bit of explanation of the parts of this mod. The source code is also available for use as a reference in the files tab.

Note: The features listed below are mostly directed toward creators. If you are not a mod creator, the biggest feature of Main is that it allows other mods to function.

Features

  • Optionally allow Main to control the loading of your mod, which will permit greater control over how it happens.
  • Adds the ability to write custom save game data.
  • Easy to use system for patching functions.
  • Tools for saving simple persistent data such as settings.
  • Pre-made framework for handling settings and displaying dialogs to change the setting in-game.
  • Ability to automatically register interactions to game objects through tuning.
  • Allows you to reference localization strings with named identifiers instead of just numbers in certain situations.
  • Ability to notify players of mod updates through in-game notifications, with settings included in Main that allow the users to disable this.

Mod Links

Documentation - https://doc.mods.neonoceancreations.com/s4/main
Sources Repository - https://github.com/NeonOcean/Main

Installer (Windows Only)
Download
An executable to automatically place this mod in The Sims 4 mod folder. You would want to use the installer if you want to expend minimal effort to setup this mod. It can do some nifty stuff like uninstalling any old versions, and automatically enabling mods if you wish. This can currently only run on Windows computers.
Files (Manual Installation)
Download
The mod files contained in a zip folder. Download this if you would like to install the mod manually or you can't use the installer. If you need assistance installing this mod, a guide can be found in the mod's documentation.
Sources
Download
The source code and other raw files used to make this mod. You should only download this if you know what you are doing.
If you would like to download outdated versions of this mod you can do so here:
Previous versions

This mod has no requirements.

This mod has no known bugs or incompatibilities.


Reporting Issues

If you are experiencing unexpected problems with this mod you can report your troubles via this mod's Github page. Be sure to check this mod's documentation to learn the proper procedure for reporting bugs.

https://github.com/NeonOcean/Main/issues
Bug reporting guide

Change Log


v1.3.0 (July 15, 2019)

New Features

  • New systems now allow for the saving of data that is tied to a Sims 4 save file.
  • The director's announcer now has a bunch more announcement capabilities.
  • It is now possible to patch a function directly, meaning can you input the original and target callables and receive the patch as the output.
  • The interaction object registration system now supports the ability to determine what each object is and should run much faster.
  • Mod information files now allow for specification of version display strings. These are only used for display, this will not allow for an internal version number outside the standard Major.Minor.Patch.Build format.
  • The distribution system now also supports version display strings, these will be shown on mod update notifications as the next version number if the value exists.

Changes

  • All of Main's interactions will now only show up when clicking on Sims instead of everything.
  • Changed the way persistent files are formatted, this will likely cause settings to reset.
  • The persistent class changed to become more extendable, you will also now need to specify the class as "PersistentFile" instead of just "Persistent" to save data to a file.
  • Made distribution system's version and promotion file reading is more forgiving; if sections of the files cannot be read they will be ignored instead.
  • Setting dialogs now take setting wrapper objects instead of the setting directly.
  • Mod Information Files

    • The values "Rating", "ScriptPaths", "Requirements" and "Compatibility" in the mod file's root are no longer required to exist.
    • 'ScriptPaths' values can now be dictionaries along with strings. Using a dictionary will allow you to specify the root of the script path. Check the documentation for details, if the page exists yet.

Fixed bugs

  • Patching now correctly preserves the original callable's parameters. Previously, in certain cases such as using the "getfullargspec" function in the inspect module, it would incorrectly show the wrapper's parameters instead of the original's.
  • Modules named __init__ are no longer imported twice.

v1.2.0 (June 12, 2019)

New Features

  • The distribution system is now available as a tool instead being only usable by this mod.
  • Completely reworked setting dialogs system to be far more versatile.
  • Changed settings related to the distribution system to allow users to disable update checking for individual mods.

Changes

  • The debug system now logs exceptions automatically without their required input.
  • Added an icon to the root NeonOcean pie menu category.
  • Changed this mod's license to CC BY, this change was mostly intended to make the parts of this mod available for reuse in other creator's projects.
  • Mod Information Files

    • Mod information files can now be prefixed with "NeonOcean-Mod" instead of having a forced, uniform name.
    • Multiple word keys in the mod file no longer use spaces between the words.
    • The "LoadController" value is now optional, not including it is a much better way of telling Main you don't want it to load the mod, opposed to the old option of leaving it blank.
    • "Distribution" is optional as well, not including it signal distributions systems to not check for the mod's updates, it will also not appear in Main's settings meant to enable or disable the update checking.
    • The "LowestVersion" and "HighestVersion" values in mod compatibility data are also, now optional.

Fixed Bugs

  • Mods are now correctly loaded without the mod Order by NeonOcean being installed.
  • Fixed problem where NeonOcean update notifications sent users to the mod's documentation page instead the mod page.
  • The notification showing that some mods have compatibility problems now correctly lists the mods in question.
  • Invalid setting input notifications now correctly display mod name and input information.
  • The timer tool no longer erroneously warns of oversleep when changing from a high interval to a low interval while the timer is running.
  • Debug session files now display certain information correctly.
  • Fixed potential bugs in the debug system related to threads.
  • Debug write failure notifications now correctly display the error information.

v1.1.0 (March 26, 2019)

During the development of this version I realized that it might be a good idea to open this mod up from being a toolkit for just my mods, to being a toolkit for potentially many mods. Some of the largest changes made reflect this.

  • The names and paths of mods supposed to be loaded by Main are no longer hard coded, it will instead look through the mod folder for supporting mods.
  • Mod information is now stored in a single JSON file, These files are also required for Main to detect or load the mod.
  • A new system for handling settings is now in place.
  • Added tools for interactions, for example, interactions using Main can specify which objects they would like to be available on through tuning.
  • New tools for in-game settings dialogs now allow a mod's settings to be changed far more easily.
  • In-game notifications will now appear telling you when an update is available or to display promotions from NeonOcean.
  • Interactions now exist that can direct you to web pages relevant to this mod, such as the documentation.
  • Addition and removal of this mod are can now be facilitated through an installer or uninstaller. These currently are only usable on windows computers.

v1.0.0 (July 26, 2018)

  • Initial release

Plans

Object finder For Interactions (Status: Framework Implemented)

  • Find all objects of a type specified by the interaction's tuning and add the interaction to it.
  • Examples of object types you could set the interaction to would be all beds or all computers and more.
  • This system could potentially allow for the support of new content with out updating mods, and support for custom content automatically.