Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added instructions and examples to SCS Hooks doc. #354

Merged
merged 4 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Introduced in SML3.5, Blueprint Simple Construction Script hooks allow adding mo
https://docs.unrealengine.com/5.1/en-US/components-in-unreal-engine/[Components]
to any blueprint-based actor.

Mods can define Blueprint SCS in their
xref:Development/ModLoader/ModModules.adoc#_game_instance_bound_module_ugameinstancemodule[Game Instance Module].
Mods can define Blueprint SCS Hooks in their
xref:Development/ModLoader/ModModules.adoc#_game_instance_bound_module_ugameinstancemodule[Game Instance Module] under Class Defaults -> Advanced -> Hooks -> Blueprint SCSHooks

This system is very flexible and it is difficult to summarize its capabilities.
Here are some example usages:
Expand All @@ -14,4 +14,6 @@ Here are some example usages:
** Example Mod uses this to add a hat to the player if they have an Example Item in their inventory.
Note that the component is always spawned, but custom logic controls if the hat is visible to the player.
* Easily track (and potentially store with the save file) per-player data that is guaranteed to exist by hooking the construction of BP_PlayerState
** An example of this can be found in the open-source https://ficsit.app/mod/FreeSamples[Free Samples] mod.
** The open-source https://ficsit.app/mod/FreeSamples[Free Samples] mod
attaches a FreeSampleDataComponent to each BP_PlayerState with this configuration on its RootInstance_FreeSamples blueprint:
image:ModLoader/SCSHook_Example_FreeSamples.png[FreeSamples SCS Hook Example]