[#beta-bugs] [modding] FR: Insert a mod hook immediately after `AfterGameLoadedEvent.Send();`...

Issue #1888 resolved
Freehold Games Bot Account created an issue

Marked for crossposting by: dilute bloody helado

Message (jump):

<exsanguination microtubules> [modding] FR: Insert a mod hook immediately after AfterGameLoadedEvent.Send(); in XRL.Game.LoadGame. This could function similarly to PlayerMutator. Right now, there is no straightforward way for a mod to easily take action when the player object first exists after loading a saved game. (PlayerMutator only works for a new game)

Comments (4)

  1. exsanguination microtubules

    Since this is doing essentially the same thing as PlayerMutator, it might make sense to simply extend the functionality of PlayerMutator by adding a “MutateOnEachLoad” field to the PlayerMutator attribute (similar to the “CreateInstance” field on GameBasedStaticCacheAttribute). “MutateOnSaveLoad” could be false by default, but if a modder specifies [PlayerMutator(MutateOnEachLoad = true)], the game could callback the mod’s mutate function at the aforementioned place in XRL.Game.LoadGame.

  2. Log in to comment