Hi there, I have a question about exposing parameters in the editor similar to how you do when setting parameters in an interaction or action asset. I can't seem to post a screenshot here, but when I expose List I receive a regular list item but the ActionParameter is fully exposed label, Description etc. In my current use case I want to set an objective which I can do from the Parameter Type dropdown but but when selecting objective do I need to type the objective name in the label field? Is there a way to clean this up so I can select the objective from a drop down like you do in the use parameters section of an interaction?
Any help here would be greatly appreciated, also one other problem I have run into is that I created an action list asset to set an objective state using parameters so that I can call this from my script without setting up new ones for each objective and state. The issue I've run into is that I can set the objective using a parameter but I don't seem to be able to set the state id using a parameter even though I have a parameter set up for it. Any ideas or workarounds?
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Welcome to the community, @jg1509.
As you're covering a few different parts of AC's editor windows, screenshots would be best if you can share them. The forum doesn't support direct image hosting, but you can upload images to e.g. imgur.com, and then share their links.
The "Label" field of a parameter is only to assist with making things clear to the user - it won't affect the value.
When defining Objectives parameters, you should be presented with a dropdown list of Objectives - which version of AC are you using, and are you referring to AC's own editor, or a custom script?
When affecting the state of an Objective set via parameter, you'll need to specify the state's ID, as the Objective is unknown at this point. The ID is the number beside it in the Inventory Manager. If you can clarify with screenshots, however, I can point things out in more detail.
Hi @ChrisIceBox thank you for your reply. Okay so what I am looking to do with the parameters is set them via a custom script which is looking for keywords in text (I am using an LLM for NPC responses) but I want this to be dynamic in what it can trigger, so it's not always just an objective or an item etc. Here is what the action parameter looks like when I currently expose it in the editor.
I was hoping it was possible to get a cleaner solution for this like you have in the AC scripts. Is this possible? Something like this, where when I select an inventory item I can set the value to charm or any other item from a drop down.
For the second part of my question I was referring to the set state action, I was hoping to be able to dynamically set the state id with an integer parameter outside of the action editor, the same way I am setting the objective parameter below. I have managed to work around this by editing the current set state action to use a parameter.
My edited version
Thank you for the help, really enjoying the package thanks for all the work you've put into it.
You'd need a custom Editor script for your class, but the ActionRunActionList contains public static functions that provide dropdowns for Variables, Documents, Inventory items, and Objectives. Example use:
That's a fair addition - I'll look into providing a similar change to the Action as part of v1.82, thanks.
Outside of ActionLists / parameters, you can set the state of an objective with the SetObjectiveState function.