Version Manager V0.9

Version Manager V0.9

Version Manager is a lightweight Papyrus-based system designed to help modders manage script updates in Starfield without requiring users to start a new save. It allows quest scripts to detect version changes and automatically stop and restart, ensuring that new script logic is applied seamlessly.
This system was created to handle updates for my own A.C.T., MORPH, and MORPH Effects mods, ensuring they could update cleanly without forcing users to restart their game or manually stop and restart quests.

How It Works

  • Your quest script defines a GetModVersion function that returns a string representing the mod’s current version.
  • Your quest registers itself with VersionManager using the RequestVersionManagement function during OnQuestInit and OnPlayerLoadGame.
    • If unchanged, nothing happens.
    • If changed, the quest is stopped and restarted to apply the latest script logic.VersionManager checks if the version has changed:

This means your quest must be designed to handle being restarted properly in OnQuestInit.

How to Use

1. Add a Property for VersionManagerIn your quest script, add a property that references VersionManager:
papyrus

VersionManagerQuestScript Property VersionManager Auto
2. Implement GetModVersionYour script must include a function that returns a version string. This should be updated whenever you release a new version of your mod.
papyrus

String Function GetModVersion() return "1.0.0" ; Update this every time your mod changes
EndFunction

3. Register for Version Management in OnQuestInit and OnPlayerLoadGameYour quest script should register itself with VersionManager when it initializes and when the player loads a save.
papyrus

Event OnQuestInit() RegisterForRemoteEvent(Game.GetPlayer(), "OnPlayerLoadGame")
VersionManager.RequestVersionManagement(self, GetModVersion())
EndEvent

Event Actor.OnPlayerLoadGame(Actor akSender)
VersionManager.RequestVersionManagement(self, GetModVersion())
EndEvent

What Happens When a Version Change is Detected?

If the version string returned by GetModVersion does not match the last registered version, VersionManager will stop and restart the quest.

  • Quest stops (Stop())
  • Quest restarts (Start())

This ensures that the latest script logic is always applied.
Important Considerations

  • Quest state resets – Since the quest is stopped and restarted, any progress stored inside the quest script will be lost unless properly reloaded in OnQuestInit.
    • Your quest must be designed to reload any necessary data when restarted.
  • Not recommended for complex progression quests – If your quest has multiple stages that must persist across updates, VersionManager is not a good fit. Consider storing progress in global variables or an external save system instead.

Why Use This?

  • Ensures users always get the latest script logic when updating mods
  • Prevents users from needing a new save when updating
  • Simple to implement with just a few lines of Papyrus
  • No SFSE or external dependencies – pure Papyrus solution
  • Works for gameplay mods that need periodic updates without save issues

Compatibility

  • Works with all Starfield quest scripts
  • No SFSE dependency – fully Papyrus-based
  • Compatible with other mods (as long as they don’t interfere with stopping or restarting the quest)

Installation & Usage

  • Add VersionManager to your mod as a dependency.
  • Implement the GetModVersion() function in your quest script.
  • Register for version tracking during OnQuestInit and OnPlayerLoadGame.

That’s it. VersionManager will now handle version updates automatically.
Final NotesIf your mod requires persistent quest progression, do not use VersionManager. Instead, handle version updates manually.
However, if your mod’s scripts can safely restart, VersionManager ensures users always get the latest logic without requiring them to start a new save.
I originally created VersionManager to support A.C.T., MORPH, and MORPH Effects, but it can be used for any mod that needs automatic script updates. Let me know if you have any questions or need help integrating it into your mod.

Credits:

EphemeralSagacity

Download mod

File File size
zip Version Manager-0-9 4 KB
Share mod:

Leave a Reply

Your email address will not be published. Required fields are marked *