ModUtil & Events โ
Events in Elin can be registered via BaseModManager.SubscribeEvent<T>(EventId, Action<T>). Some of them also offer attribute usages allowing automatic subscription.
Mod โ
EVENT.ModsActivated
No parameter. Published after all mod packages have been activated.
Game IO โ
EVENT.PreLoad,[ElinPreLoad]EVENT.PostLoad,[ElinPostLoad]EVENT.NewGame,[ElinPostLoad]// <- Same attributeEVENT.PreSave,[ElinPreSave]EVENT.PostSave,[ElinPostSave]
Parameter: GameIOContext
[ElinGameIOProperty("chunkName")]
Marks a static property to be automatically saved to and loaded from the save file under the given chunk name. The property must have both a static getter and a static setter. Chunk names are scoped to the declaring type, so two classes can both use "my_data" without clashing.
The recommended shape is a single class holding everything your mod saves, exposed as one nullable static instance:
public class MySaveData {
public int Counter;
[ElinGameIOProperty("my_data")]
public static MySaveData? Singleton { get; set; }
}Game System โ
EVENT.CharaCreated,[ElinCharaOnCreate]EVENT.ThingCreated,[ElinThingOnCreate]
Parameter: Chara or Thing
EVENT.ActPerformed,[ElinActPerform]
Parameter: Act that just performed
EVENT.FeatApply
Parameter: EVENT.ElinFeatApplyEventArgs (feat, owner, hint), published when a feat is being applied.
EVENT.ReligionImporting
Parameter: List<Religion> that is being registered.
ModUtil.AddContextMenuEntry,[ElinContextMenuEntry]
Attribute parameter: string langEntry, string langDisplay = "" Manual API: ModUtil.AddContextMenuEntry(Action onClick, string menuEntry, string displayName = "") Registers a context menu entry, such as SubGroup/ModButton1.
EVENT.PreSceneInit,[ElinPreSceneInit]EVENT.PostSceneInit,[ElinPostSceneInit]
Parameter: Scene.Mode
Source โ
EVENT.SourceImportingEVENT.SourceImported
No parameter. Published before/after importing source sheets.
EVENT.SourceLangSet
Parameter: string langCode
Drama โ
[ElinDramaActionInvoke][ElinDramaActionParser]
See Drama API