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 customizable actions #410

Merged

Conversation

Leidtier
Copy link
Contributor

@Leidtier Leidtier commented Sep 6, 2024

  • moves the definition of actions to JSON files located in .\data\actions
  • adding a new action is now as simple as adding a new JSON file to the folder which can also be done by mods
  • actions are now dynamically inserted into the prompts using the new {actions} variable and respect the language override
  • adds multi-select config values that support list[str]. Both for loading from and saving to the config.ini as well as displaying them in the UI
  • add active_actions config value that allows a user to turn actions on and off
  • language override config values for the keywords of actions are generated automatically

@art-from-the-machine
I was not able to trigger the inventory action in any way although I see a clear mantella_npc_inventory action going out as part of a sentence but on the Skyrim side nothing happens. The other actions all work correctly.
Did I miss something else that needs to be done for the inventory action to work in Skyrim? I activated it in the MCM.

- moves the definition of actions to JSON files located in `.\data\actions`
- adding a new action is now as simple as adding a new JSON file to the folder which can also be done by mods
- actions are now dynamically inserted into the prompts using the new `{actions}` variable
- adds multi-select config values that support `list[str]`. Both for loading from and saving to the `config.ini` as well as displaying them in the UI
- add `active_actions` config value that allows a user to turn actions on and off
- language override config values for the keywords of actions are generated automatically
@Leidtier
Copy link
Contributor Author

Leidtier commented Sep 7, 2024

Found the issue with the inventory mentioned above.
I tested it on an existing save and the way we register for action events on the side of MantellaSpell right now happens in the OnInit of the Actions quest script. As this is only executed once, my existing save game had event listeners for Offend, Forgiven and Follow set up but not for Inventory that was added late in the development cycle.

We should think about using another way to register the action event listeners, most likely from the method that is called on updating. But this is something for MantellaSpell.

This PR seems to be working fine as far as I can tell.

@art-from-the-machine art-from-the-machine merged commit a1b29b0 into art-from-the-machine:main Oct 22, 2024
@Leidtier Leidtier deleted the add-custom-actions branch January 2, 2025 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants