<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://silvematt.com/URPGCreationKitDocumentation/index.php?action=history&amp;feed=atom&amp;title=Adding_New_Animations_to_NPCs_dialogues</id>
	<title>Adding New Animations to NPCs dialogues - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://silvematt.com/URPGCreationKitDocumentation/index.php?action=history&amp;feed=atom&amp;title=Adding_New_Animations_to_NPCs_dialogues"/>
	<link rel="alternate" type="text/html" href="https://silvematt.com/URPGCreationKitDocumentation/index.php?title=Adding_New_Animations_to_NPCs_dialogues&amp;action=history"/>
	<updated>2026-06-10T01:09:43Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>https://silvematt.com/URPGCreationKitDocumentation/index.php?title=Adding_New_Animations_to_NPCs_dialogues&amp;diff=520&amp;oldid=prev</id>
		<title>Silvematt: Created the page</title>
		<link rel="alternate" type="text/html" href="https://silvematt.com/URPGCreationKitDocumentation/index.php?title=Adding_New_Animations_to_NPCs_dialogues&amp;diff=520&amp;oldid=prev"/>
		<updated>2023-06-14T17:54:42Z</updated>

		<summary type="html">&lt;p&gt;Created the page&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;In this tutorial we are going to see how to add a new animation that NPCs can play while using the dialogue system.&lt;br /&gt;
&lt;br /&gt;
The NPCs can use animations for both talking and listening, the process of adding each one of these is the same, as described here.&lt;br /&gt;
&lt;br /&gt;
I am going to add an animation taken from [https://www.mixamo.com/ Mixamo.com]&lt;br /&gt;
&lt;br /&gt;
== Import the animation ==&lt;br /&gt;
[[File:NAD 1.png|thumb|New Animation's import settings.]]&lt;br /&gt;
The first step is obviously to import the animation in your project.&lt;br /&gt;
&lt;br /&gt;
Make sure in the import settings to use as Animation Type '''&amp;quot;Humanoid&amp;quot;'''. You can choose &amp;quot;Create From This Model&amp;quot; as the avatar definition if you don't have any compatible skeleton with that one animation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also set in the &amp;quot;Animation Tab&amp;quot; whether the animation has to loop or not, for dialogue lines that will take more seconds than the animation time.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Add the animation to the NPCs Animator ==&lt;br /&gt;
Second step is even easier. Open the '''TPS_Base''' animator, which defines all the animations for NPCs and look at the left-bottom of the default state (Base Locomotion), you will find all the animations used by the NPCs to dialogue in the RCK.&lt;br /&gt;
&lt;br /&gt;
You just need to add your own to the list, '''name it meaningfully - as its name will be used later''' and make sure to add the '''return state''' to the default one.&lt;br /&gt;
&lt;br /&gt;
The return state should have &amp;quot;'''Has Exit Time'''&amp;quot; set to false, and as conditions the triggering of &amp;quot;'''CancelDialogueAnimation'''&amp;quot;, refer to the image below:&lt;br /&gt;
&lt;br /&gt;
I named my new animation &amp;quot;Talking_NewAnim&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[File:NDA 6.png|946x946px]]&lt;br /&gt;
&lt;br /&gt;
== Adding the Animation to the Dialogue Animations list ==&lt;br /&gt;
The last step is adding the new animation name to the Dialogue Animation List.&lt;br /&gt;
&lt;br /&gt;
Open the file '''&amp;quot;NPCDialogueLineNode.cs&amp;quot;''' and look for the array &amp;quot;'''DIALOGUE_ANIMATIONS&amp;quot;'''. &lt;br /&gt;
&lt;br /&gt;
All you have to do is to insert the name of the animation we just added, and '''remember that it must be the same as the name of the animation state you've set,''' in my case '''&amp;quot;Talking_NewAnim&amp;quot;:'''&lt;br /&gt;
&lt;br /&gt;
[[File:NDA 4.png]]&lt;br /&gt;
&lt;br /&gt;
== Using your animation ==&lt;br /&gt;
At this point it's all done!&lt;br /&gt;
&lt;br /&gt;
Next time you will open the Dialogue System, your new animation will be available to choose for both listening or talking;&lt;br /&gt;
[[File:NDA 7.png|thumb|312x312px|Tess using the new animation.]]&lt;br /&gt;
[[File:NDA 5.png]]&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
If you have any issues, like a warning &amp;quot;Invalid Layer Index '-1'&amp;quot;, it's very likely that you have a spelling error in either the Animator state or the DIALOGUE_ANIMATIONS array, double check and correct it if it is the case.&lt;/div&gt;</summary>
		<author><name>Silvematt</name></author>
	</entry>
</feed>