Adding loot event to AI NPC¶
This Add loot event to AI NPC assembler allows your configured AI APC to drop loot when triggered. For example, the NPC drops an item when her favor score hits 60%.
YAHAHA Studio version 0.3.66 or later
An AI NPC, created using the Create an AI NPC assembler and placed in the scene Visual Studio Code is installed and integrated with your Studio.
Set up the assembler¶
Find the Add loot event to AI NPC assembler from Asset Library and open it in the scene.
In the assembler setup window, populate its basic settings:a Set the item to drop: Select the item or equipment to be dropped. We select a custom item of money.b Set the AI NPC to trigger the event: Select the AI NPC to trigger the loot drop event. In our example, we select the AI NPC we created, Mio.c Select the trigger event: Choose one of the following events as a trigger:
d Set the trigger event name: Enter a name for the triggered event. For example, if you set the trigger event to Emotion 6 and the event to Drop loot, when the NPC's favor score hits 60%, the trigger event fires and the specified item or equipment will be dropped.
- Emotion 1-10 represents the AI NPC's favor score, ranging from 10% to 100%. It reflects the NPC's contentment level, with 10 being the least content and 100 being the most content.
- Chat Win indicates that the player wins the chat interaction with the AI NPC.
- Chat Lose indicates when the player loses the chat interaction with the AI NPC.
Click Assemble to start assembling this assembler. Once done, you can modify their properties in the Properties window.
Edit event-related properties¶
To adjust the loot drop settings, in the AI NPC's Properties window go to the Drop settings pane. For more information, see Loot drop.
To change the way that the player picks up an item or equipment, select it, go to its Properties window, and change the pick-up mode in the Loot pick-up pane. For more information, see Inventory. If you want to update the item or equipment, see Items and Equipment to learn more.
To edit the trigger event, update the properties located in the corresponding AiGameEventRelay pane. For more information on this component, see AiGameEventRelay.