Posts: 61
Thanks: 1193 in 25 Posts
7 Achievements
If you'd like to go full script mode you can extend the different SuperInteraction classes and override the method that runs the interaction.
Code:
from interactions.base.immediate_interaction import ImmediateSuperInteraction
class MyCustomImmediateSuperInteraction(ImmediateSuperInteraction):
def _run_interaction_gen(self, timeline):
super()._run_interaction_gen(timeline)
# do something here
now you can reference this new class in your xml files assuming your mod has the following folder structure: my_custom_mod > interactions > my_interactions.py
Code:
<I c="MyCustomImmediateSuperInteraction" i="interaction" m="my_custom_mod.interactions.my_interactions" n="my_name:my_custom_mod" s="123456789">
calling super()._run_interaction_gen within your method calls the original method so any of the existing loot or outcomes within the xml still occur. you can move it above or below your custom code depending on the order you want the interaction to occur.