A new Commands_Player.def has just been patched out by Deforian, that has some new commands.
Beware, many players might have a copy of this file in your /resources_override folder. You might have this from another mod, or just so you can do some other commands you might've learned about on forums or internet in general. So be sure to double check you don't have this file in your resources_override. If you do, then this recently patched file will not do anything. If you do have one, then you can look at /resources/Commands_Player.def to compare any possible copies in your /resources_override folder. The new commands are at the bottom of this file. You could just manually add the below entries to your file in the resources_override (if you have one). If you don't have one, then the previous statement doesn't apply to you.
Code:
//---- New commands added 2015.08.11
//idleAnimReload
{
string name = "idleAnimReload"
string abbrev = ""
string usage = ""
string description = "Reload the Idle Anim def file"
int numParams = 0
int minParams = 0
}
//idleAnimReload
{
string name = "idleAnimReset"
string abbrev = ""
string usage = ""
string description = "Reset the Idle Anim to begining"
int numParams = 0
int minParams = 0
}
//testAnimDefer
{
string name = "testAnimDefer"
string abbrev = "tad"
string usage = "<state name> [list blend factor, 0-1]"
string description = "Sets the current animator to the specified animation state, deferring if already busy."
int numParams = 2
int minParams = 1
}
//playSound
{
string name = "playSound"
string abbrev = "playSnd"
string usage = "<sound name>"
string description = "Plays back the specified sound."
int numParams = 1
int minParams = 1
}
//aghConvert
{
string name = "aghConvert"
string abbrev = "agh"
string usage = "<filename>"
string description = "Converts an image to AGH format"
int numParams = 1
int minParams = 0
}
//aghDDS
{
string name = "aghDDS"
string abbrev = "agd"
string usage = "<filename>"
string description = "Converts an image to AGH format with DDS compression"
int numParams = 1
int minParams = 0
}
//Set Time
{
string name = "setTime"
string abbrev = "st"
string usage = "<INT32 new current time, INT32 new length of day>"
string description = "Set the time of the day."
int numParams = 2
int minParams = 2
}
The first four commands are specifically to help with Idle Actions. The /aghConvert, /aghDDS and /setTime aren't related, but players should have these for general purpose.
/idleAnimReload - reloads all idle anim files from disk. This would also restart any PlayOnce sequences. If npc is currently walking he will return to starting location.
/idleAminReset - resets the idle animation sequence from beginning (does not restart any PlayOnce sequences). If npc is currently walking he will return to starting location).
Take note, that you normally want to test idle animation files in your resources_override folder. These commands will look for files that reside anywhere in /resources_override first, this is desirable as it's likely where your test files reside.
While using these two commands, be sure you are targetting the appropriate npc.
The reason why these two commands are so important is that you do NOT need to restart the game, every time you edit an Idle Action file (<firstname><lastname>.def). Whenever you edit these files, just issue one of the two commands and it will be refreshed immediately, without needing to restart the game. This lets you maximize the time you have, in your day, to tweak your files. Otherwise you'll get frustrated by having to restart the game for every little thing you change. Tip, add these commands to a hotkey.
---------------------------------------------------------
/testAnimDefer <animation name> (/tad also works, likely easier to to remember/use). Target NPC and type /tad <animation> to see the npc perform the animation. Note, not all races have the same animations. One race might not have an animation that another race has. Some genders (male/female) also don't always share the same emotes. A good example of Male/Female is only females have the Karate (Special) emote/animation. Officer Amonsu, by Kion Vault performs this. Amonsu is female.
Crash course on where to find valid animation names that a NPC can perform.
Look in /resources/definitions/characters. You'll see different race folders there.
The most common animations will reside in race_anim_standard.def (ie human_m_anim_standard.def or human_f_anim_standard.def). Look for entries of string name = "something".
string name = "warcry"
string name = "death"
string name = "crackneck_emote"
string name = "somethingonshoe_emote"
etc
With NPC targeted (or self) type /tad warcry or /tad death, etc. The NPC will perform that action. If it doesn't then you might've typed an animation from a specific race, but the targeted NPC does not have that animation.
You are not limited to peforming standard emotes and animations. You can actually use combat animations too. Look in the other .def files in this folder.
human_m_anim_combat_1hs_special.def
human_m_anim_magic.def
etc
Same thing, look for string name = "something"
Human Male examples:
string name = "1hp_magic_combat_directional01_prepare"
string name = "brewstirring00_release"
string name = "fishing00_release"
string name = "h2h_headbuttspecial"
Again, /tad fishing00_release, etc will peform the animation, while targeting an NPC.
If you look at the emote file (emote buttons on your client) they are slightly different, but still use commands from the race_anim_standard.def files.
The emote files will be race_emote.def , ie human_m_emote.def
When you look at files with the word "emote" in it, you'll want to look for
string animState = "please_emote_s"
string animState = "drink_emote_s"
Beware that any animations with _s means it also plays a sound. There should be two of each emote
please_emote (no sound)
please_emote_s (with sound)
drink_emote (no sound)
drink_emote_s (with sound)
---------------------------------------------------------
/playSound <sound name> This is similar to /tad except for sound files.
You can find sound names in the /resources/sound folder. View some of the .def files that and most subfolders
ie
/resources/sound/Sound_Misc.def
/resources/sound/characters/<race>/Sound_<race>.def
/resources/sound/combat/Sound_Combat.def
/resources/sound/spell/Sound_Magic.def
etc
Just like animations, look for string name = "something"
string name = "resurrect_other"
string name = "dragon_ancient_ascension"
string name = "dragona_u_death_n"
string name = "dragona_u_bite_n"
You'd type /playsound dragona_u_bite_n , etc to hear the sound (maybe twice to get cached)
NOTE: Not all sounds are cached! This means sometimes you will not hear anything the first time you type /playsound name. But it will then be cached and play the 2nd and subsequent times. A pre-cached file will have bool preCache = true in the sound_<name>.def file. Those will always play the first time. If a sound is missing this bool, then it will never play the first time.
This is where another very handy command /rep comes into play. This simply repeats anything you've recently typed in the chat bar. So instead of typing the same long /playsound name again, just do /rep (repeat). In fact, I have a hotkey of nothing but text command: /rep just for this reason.
-------------------
One last tip for Idle Action files. I generally begin a sequence with a long delay. This initial delay serves two purposes.
1) It gives time for players with Loading screen time to see the NPC start it. Without that delay, that might miss the beginning.
2) It is the delay in between loops. Without a long delay, the macro will loop back to back, non stop. That initial lengthy delay gives time for the NPC to stop and relax a bit, in between loops. I generally avoid the long delay at the end of the macro. If you told a NPC to walk around, then a delay at the end, will prevent him/her from walking back to their starting location, until that delay is satisfied. NPC will always walk back to their starting position when macro is done.