I would recommend reimplementing this mod as it's own script instead of providing an edited version of my existing code, since implementing the change this way will break whenever I update KCP.
You could register a uiActivated event filtered to "KCP:LevelUPFlavorText" to grab the label element that stores the flavor text, then compare to tes3.player.object.level to grab the appropriate text. This would make it so the mod will continue to work no matter what updates I make to the mod.
Alternatively if that method doesn't work register a uiActivated event for menuLevelUp with a priority of -1(so it runs after my code runs), then manually grab the element with tes3ui.findMenu("KCP:LevelUPFlavorText").
Hello. Thank you for suggestion. I'm afraid it's too complicated for me, since I never worked with events. I would appreciate more detailed explanation in PM and I'll see what I can do. As a temporary solution, I will mention in description that my addon is compatible with the current version of your mod, but this may change with an update.
4 comments
You could register a uiActivated event filtered to "KCP:LevelUPFlavorText" to grab the label element that stores the flavor text, then compare to tes3.player.object.level to grab the appropriate text. This would make it so the mod will continue to work no matter what updates I make to the mod.