Source Filmmaker

Source Filmmaker

68 ratings
Autoinit Manager: Run scripts on start!
   
Award
Favorite
Favorited
Unfavorite
Script
Tags: SFM
File Size
Posted
Updated
44.321 KB
4 Jan @ 12:50pm
16 Jan @ 6:26pm
3 Change Notes ( view )

Subscribe to download
Autoinit Manager: Run scripts on start!

In 3 collections by KiwifruitDev
KiwifruitDev: SFM Scripts
8 items
KiwifruitDev: All Source Filmmaker Items
13 items
Autoinit Manager Compatible Scripts
12 items
Description
This script is designed to automatically run other scripts when Source Filmmaker is started. It also provides a window to manage these scripts and their settings.
Usage
The Autoinit Manager window will normally open automatically, but it can be opened manually through Scripts > kiwifruitdev > autoinit_manager.
Additionally, you can use "-nostartwizard" as a launch option to disable the session creation popup when starting SFM.
All script windows that are opened on startup will be given a button in the "Windows" menu so you can open them at any time. By default, these windows will be hidden until shown manually so that your layouts can stay consistent.
Patches
Some scripts will be dynamically patched to work without interruptions. The following changes have been made:
  • Any script that uses "sfmApp.RegisterTabWindow"
    • A "Show" button for this script will be added to the Autoinit Manager window.
    • The window that was registered will have an option added to the "Window" menu in SFM.
  • Any script that uses "sfmApp.ShowTabWindow"
    • No windows will be shown, this is to prevent custom windows from popping up when SFM starts.
    • You can still show the window by using the "Windows" menu in SFM or through the Autoinit Manager window.
  • Quick Menu Redux by Fames (quickmenu_v3.py)
    • Disabled showing the window on run since it does not use "sfmApp.ShowTabWindow".
    • Prevented writing to "sfm_init.py" because it is no longer needed.
    • Removed existing code that runs this script from "sfm_init.py" if it exists.
  • Directional Scale Controls (Stretching) by LLIoKoJIad (directional_scale_patch.py)
    • Disabled pop-up dialogs that normally appear when the script is run.
  • Facial Flex Unlocker by LLIoKoJIad (sfm_flex_unlocker.py)
    • Disabled pop-up dialogs that normally appear when the script is run.
  • Light Limit Patch by KiwifruitDev (light_limit_patch.py)
    • Disabled pop-up dialogs that normally appear when the script is run.
    • Added enhanced options to Autoinit Manager to allow you to set the light limit on startup.
You can view which patches have been applied to a script by right clicking on its entry in the Autoinit Manager window and hovering over the "Autoinit Patches" option.
Development
If you're a developer, add your script to a "scripts/sfm/autoinit" folder. The script will be executed when the SFM is started and users can enable or disable it in the Autoinit Manager window. You can then add Autoinit Manager as a dependency to your Workshop item.
This script is also available on GitHub[github.com].
License
This script is licensed under the MIT License. See the LICENSE[github.com] file for more information.
Funding
If you would like to support my work, you can check out Nonsensical Video Generator, buy me a coffee on Ko-fi[ko-fi.com], become a sponsor through GitHub Sponsors[github.com], or simply share my scripts with others. Thank you for your support!

Includes:
sfm\autoinit\autoinit_manager.py
sfm\mainmenu\kiwifruitdev\autoinit_manager.py
sfm\sfm_init_local.py
21 Comments
pepsi 22 May @ 10:13am 
uhhh i'm having the must be unicode not str on a fresh install, the console says

Traceback (most recent call last):
File "<string>", line 954, in _Autoinit_FirstBoot
File "<string>", line 713, in start_default
File "<string>", line 722, in setup_default
File "<string>", line 715, in load_default
File "<string>", line 738, in load_skipped_ini
KiwifruitDev  [author] 18 May @ 8:02am 
Do you have a different sfm_init.py? I think some other workshop addons do this
If you have an error in console or the script editor window's output I'd really appreciate it ^^
Proto_Star2st 17 May @ 7:22pm 
i having issues with the manager, now i can't open it though scripts and it doesn't start up when i open sfm
Roman 21 Apr @ 2:20pm 
error when click on script in sfm
Banni 22 Jan @ 5:40pm 
it says "line 958, in _Autoinit_FirstBoot
line 717, in start_default
line 726, in setup_default
line 721, in load_default
line 781, in load_light_limit_ini
theyre all strings
KiwifruitDev  [author] 22 Jan @ 1:55pm 
Hmm do you have a line number associated with it? Check console?
Banni 22 Jan @ 1:10pm 
do you know why its saying error must be unicode not str?
KiwifruitDev  [author] 16 Jan @ 6:27pm 
Version 1.2 was just pushed, this should solve the "Error: invalid literal for int() with base 10" issue.
I misspoke earlier, it was "autoinit_light_limit_patch.txt" that was causing the issue.
~•ʙʟᴏɴᴇ•~ 16 Jan @ 6:07pm 
i’m having the same problem as sybilregal even if i clear the sfm_init it still doesn’t work and i don’t have any of the extended things
KiwifruitDev  [author] 16 Jan @ 5:47pm 
Do you happen to have extended_*.txt files in "SourceFilmmaker/game"?