Home    Upload/Download Files

Idle Animations is a system that lets you add animations, sound, chat, movement, greets, etc to NPC's in the world.

Some of the advantages of this system:
  1. We can create a more lively environment with NPCs acting anims and movements appropriate to them. It could be a simple look around to a animation/action sequence.
  2. Can have individual greet anims as the wave anim is not the most appropriate for all NPCs
  3. Can set when anims should play, delay, player distance from NPC, etc.
  4. These animations are played locally, so we do not clog server traffic. If player edits the file locally, only that player will see the actions. A player standing beside us, will only see his own local action files. NPC's action will not be synched to a nearby player, since they are played locally.
  5. For moving NPCs, though the NPC position may differ from player to player (while the NPC is walking), each player would be oblivious to this except that another player is standing/idling at another location which is very normal.
To see some current examples of these Idle Actions files, look in your /resources/defintions/characters/idleactions

The correct format of the file is <firstname><lastname>.def . It does not care about case, but we prefer to keep it lowercased, so that it is more Linux friendly ;) Not all NPC's have a last name!

The client is setup so you can easily add or edit idle action files. If you want to edit a NPC that currently has an Idle Animation file, just copy it anywhere to /resources_override and edit that file.
If you want to add a new npc, just create a new <firstname><lastname>.def anywhere in /resources_override folder. To create a file, open Notepad (search Notepad in windows). You might need to right click, open as Administrator, if you have any issues saving the file. Some NPC's are a bit more difficult to determine the first and last name. If you are unsure, you can enable the Support (Debug) logs, from the Troubleshoot button on Launcher. If you forgot to enable on launcher and the game is running, you can turn it on by going to Options, Options tab, Enable Debug Logs checkbox. Upon checking the box and clicking Apply or OK, the logs will start logging extra information.

Once the support/debug logs are enabled, you'll see client_net_log_08-09-15_12_23_53.txt . The numbers will vary. The first part of numerical filename is the date, follow by the time HH:MM:SS in military time 0_00_00 = 12am, 12_00_00 = 12pm, 20_00_00 = 8pm. So this filename is August 9, 2015 @ 12:23:53 PM . Note while the game is running, it will show as 0 bytes. But it is indeed recording. You can open this file with notepad at anytime. Once you open with notepad, it will change from 0 bytes to current size. Or when you exit game, it will save correctly. So indeed, you can re-open this file multiple times, while game is running, to see the latest entries. Once you exit the game, the latest log files will be in /logs folder. But the next time you start the client, those files will be moved to the /logs_old folder!

Ok, back to determining the NPC's true first and last name from support logs:

As long as the NPC is in range and can be seen on your client, you'll have this type of message in your NET log:

----- Received message from server at Fri Aug 14 22:25:23.522 (Handled in 0.000 seconds)---------------------
seqID: 58
Message type: sc-char-info

ioriginid: 1379920
tbase/bfriendly: true
tbase/bgm: false
tbase/bharmless: true
tbase/bisnpc: true
tbase/dappearance/0/sappearancetype: hair-texture-1
tbase/dappearance/0/sfilename: saris_f_tex_hair_n_02.def
tbase/dappearance/0: 
tbase/dappearance/1/sappearancetype: body-texture-1
tbase/dappearance/1/sfilename: saris_f_tex_body_n_07.def
tbase/dappearance/1: 
tbase/dappearance/2/sappearancetype: tail-geometry-1
tbase/dappearance/2/sfilename: saris_f_geo_tail00_n.def
tbase/dappearance/2: 
tbase/dappearance/3/sappearancetype: head-geometry-1
tbase/dappearance/3/sfilename: saris_f_geo_head00_default.def
tbase/dappearance/3: 
tbase/dappearance/4/sappearancetype: hair-geometry-1
tbase/dappearance/4/sfilename: saris_f_geo_hair_u02s.def
tbase/dappearance/4: 
tbase/dappearance/5/sappearancetype: body-geometry-1
tbase/dappearance/5/sfilename: saris_f_geo_body_n_n.def
tbase/dappearance/5: 
tbase/dappearance: 
tbase/ebodystate: 0
tbase/iabsoluteflyheight: 0
tbase/ialignment: 1
tbase/ibiotedefgroupid: 32
tbase/icraftrating: 0
tbase/icuradventurelevel: 25
tbase/icuradventureschoolid: 405
tbase/icurcraftschoolid: 0
tbase/icurhealth: 170
tbase/iflyheight: 10
tbase/iflyspeed: 10
tbase/igender: 1
tbase/igravity: 0
tbase/imaxhealth: 170
tbase/imaxmana: 0
tbase/ipotentialrating: 25
tbase/iraceid: 9
tbase/irating: 25
tbase/irunspeed: 40
tbase/iwalkspeed: 14
tbase/nendowment: 0
tbase/nheight: 1
tbase/nmuscularity: 0
tbase/nportliness: 0
tbase/sfirstname: Assessor
tbase/shonorific: Imperial
tbase/slastname: of Wit
tbase/sracename: Saris
tbase/stitle: 
tbase/tscale: 
tbase: 

----- End of received message ----------------------------------


Most of the info isn't needed. We want to pay attention to these lines:
tbase/sfirstname: Assessor
tbase/shonorific: Imperial //We ignore this. We only need sfirstname and slastname
tbase/slastname: of Wit - This one is an exception with a space. Most will not have a space. But we don't use the space. Lastname = "ofwit"

Remember, we use <firstname><lastname>.def . So in this example, the filename must be assessorofwit.def
Note: There are a handful of NPC's that have the same name, we can not create actions for those at this time. Examples are "Miltia Guard" near Kion Barracks and "Grove Sentinel" near Tower of Nature. There are more than one with the same name.

Multiple Greet/Idle actions can also have a hierarchy system, the first being the least important and each proceeding set higher in the hierarchy. Ex: A Greet set with (0)None can be the first default greet. The next Greet set could have a condition for Race(1) that will override the Default GreetAction set. The third could have a condition for QuestActive(3) that would override the previous and the fourth could have a condition for School(2) that will override all proceeding GreetAction sets.

Conditions:
0 = None
1 = Race
2 = School
3 = Quest Active (ID#)
4 = Quest Completed (ID#)
5 = PlayOnce
6 = Trade (you are trading a NPC)


Idle Action Format:
IdleActions
{
GreetActionSets List GreetActionSetsList =
{
{ 
int iCondition
Int iConditionalValue
String sConditionalValue
float fGreetTime 
string sGreetAnim
string sGreetSound
Bool bTurnToGreet	//Default is TRUE. Set to FALSE to prevent the NPC from turning and facing player, when greeted!
GreetActionSet List GreetActionSetList =
{
{
int Action 
float nValue1 
float nValue2
float nValue3
string sValue 
}
.
.
.
}
}
.
.
.
}
IdleActionSets List IdleActionSetsList =
{
{ 
int iCondition
Int iConditionalValue
String sConditionalValue
int iAnimDistance
IdleActionSet List IdleActionSetList =
{
{
int Action 
float nValue1 
float nValue2
float nValue3
string sValue 
}
.
.
.
}
}
.
.
.
}
}


There are currently 5 possible actions:
1 Wait/Pause (Do Nothing) for x seconds
2 Move to x,y
3 Play an animation
4 Say a message (this appears in your emote channel so we don't flood other near by players screens)
5 Play Sound
6 = Trade (you are trading a NPC)
Here are some variables you can use for #4 (Say a Message). ie "Hi there %n%" will say Hi there playername
%r% - Player's Rating
%n% - Player's First Name
%nn% - Player's Full Name 
%resp% - Player's Respectful Title (Sir, Miss, Master)
%l% - Player's current world position
%race% - Player's Race
%asch% - Player's Adventure School
%csch% - Player's Crafting School

Example using all 5 actions:
IdleActions
{
	GreetActionSets List GreetActionSetsList =
	{
		{	
			int iCondition = 0
			float fGreetTime = 15	//How many seconds the player will stop and look at you, when greeted, before continuing macro. Set to 0 if npc is too busy to stop.
			string sGreetAnim = "warcry"	//Animation to play when you greet an NPC. Default is wavehi emote, for all npcs. "none" is valid to disable greet emotes.
		}
	}


	IdleActionSets List IdleActionSetsList =
	{
		{	
			int iCondition = 0
			int iAnimDistance = 15
			
			IdleActionSet List IdleActionSetList =
			{
				{
					int Action = 0	//Wait/Pause in seconds
					float nValue1 = 10	//10 seconds 
					float nValue2 = 0
					float nValue3 = 0
					string sValue = ""
				}
				{
					int Action = 1	//Turn and face specified angle/rotation (degrees 0-359 is valid).
					float nValue1 = 90	//90 degrees.  Target yourself or NPC and type /printpos to see current rotation in degrees. rot (0, 0, 260). 260 is rotation in degrees. 
					float nValue2 = 0
					float nValue3 = 0
					string sValue = ""
				}
				{
					int Action = 2	//Move to x,y coordinates
					float nValue1 = 27405
					float nValue2 = 27109
					float nValue3 = 0	//Walk Speed - 0 will use same WalkSpeed defined in db. Average walk speed in db is 1.3. Use 4.0 to 'run' to a location. Use a lower value than 1.3 to slow your pace.
					string sValue = ""
				}
				{
					int Action = 3	//Play Animation - You can find animation names in some of the .def files in /resources/definition//*.def files. (Find string name= "something")	
					float nValue1 = 0
					float nValue2 = 0
					float nValue3 = 0
					string sValue = "lookaround_emote"
				}				
				{
					int Action = 4	//Say a message to chat screen
					float nValue1 = 0
					float nValue2 = 0
					float nValue3 = 0
					string sValue = "Ah, I just looked around, %n%!"
				}				
				{
					int Action = 5	//Play a sound
					float nValue1 = 100	//Initial Volume Level
					float nValue2 = 1	//Loops
					float nValue3 = 20	//Max distance - How far the sound will travel from NPC. If you are beside NPC, volume will be 100%. At half the distance, volume will be 50%
					string sValue = "harvest00"	//Play this sound
				}
				
			}
		}
	}
}

Current Conditions:
0 = None
1 = Race
2 = School
3 = Quest Active (ID#)
4 = Quest Completed (ID#)
5 = PlayOnce

Race Values (Condition = 1):

Race Notes
Dragon Adult Dragon
Dragona Ancient Dragon
Dragonj Juvenile Dragon
Dryad -
Dwarf -
Elf -
Fiend -
Giant Half-Giant
Gnome -
Human -
Khutit Adult or Ancient dragon in biped form, beware this is unique!
Saris -
Satyr -
Sslik -

Race Example:
IdleActions
{
	IdleActionSets List IdleActionSetsList =
	{
		{	
			int iCondition = 1 //Race
			string sConditionalValue = "dragona"	//Ancient Dragon
			int iAnimDistance = 15
			
			IdleActionSet List IdleActionSetList =
			{
				{
					int Action = 0  
					float nValue1 = 10 
					float nValue2 = 0
					float nValue3 = 0
					string sValue = ""
				}
				{
					int Action = 4  
					float nValue1 = 0 
					float nValue2 = 0
					float nValue3 = 0
					string sValue = "Ah, we have an Ancient Dragon in our presence!"
				}				
				{
					int Action = 3  
					float nValue1 = 0 
					float nValue2 = 0
					float nValue3 = 0
					string sValue = "bow_deep"	//Deep Bow emote
				}				
				
			}
		}		
	}
}

School ID#

ID# School Name
48 Alchemist
47 Armorer
13 Battle Mage
83 Berserker
43 Blacksmith
93 Blood Mage
50 Carpenter
96 Chaos Warrior
75 Cleric
51 Confectioner
77 Conjurer
94 Crossbowman
108 Dragon
107 Dragon Crafter
566 Dragon Crystalshaper
68 Dragon Lairshaper
66 Druid
95 Elemental Archer
102 Enchanter
59 Fitter
81 Flame Disciple
60 Fletcher
85 Gatherer
97 Guardian
3 Healer
87 Ice Disciple
53 Jeweler
91 Knight of Creation
2 Mage
61 Mason
84 Miner
8 Monk
44 Outfitter
6 Paladin
78 Ranger
79 Reaver
46 Scholar
4 Scout
17 Shaman
76 Sorcerer
80 Spearman
55 Spellcrafter
92 Spirit Disciple
7 Spiritist
86 Storm Disciple
56 Tailor
57 Tinkerer
1 Warrior
58 Weaponsmith
71 Weaver
74 Wizard


School Example:
IdleActions
{
	IdleActionSets List IdleActionSetsList =
	{
		{	
			int iCondition = 2 //School
			int iConditionalValue = 2 //ID# 2 is Mage
			int iAnimDistance = 15
			
			IdleActionSet List IdleActionSetList =
			{
				{
					int Action = 0  
					float nValue1 = 10 
					float nValue2 = 0
					float nValue3 = 0
					string sValue = ""
				}
				{
					int Action = 4  
					float nValue1 = 0 
					float nValue2 = 0
					float nValue3 = 0
					string sValue = "Test School: Welcome Mage!!!"
				}				
				
			}
		}		
	}
}


Play Once Example (This will only perform an action one time. Note if the npc becomes out of range and you re-visit the NPC, it will play again.
Play Once means only do an action one-time, but never again, while this npc is still in range.
IdleActions
{
	IdleActionSets List IdleActionSetsList =
	{
		{	
			int iCondition = 5 //PlayOnce
			int iAnimDistance = 15 //Dont execute below until player is within 15m of the npc
			
			IdleActionSet List IdleActionSetList =
			{
				{
					int Action = 0 //Wait/Pause 
					float nValue1 = 20 //Seconds
					float nValue2 = 0
					float nValue3 = 0
					string sValue = ""
				}
				{
					int Action = 4  
					float nValue1 = 0 
					float nValue2 = 0
					float nValue3 = 0
					string sValue = "I will only say this once, to your emote channel!"
				}				
				
			}
		}		
	}
}