Adding Custom Emotes

From OuroDev
  • Add your animation to data/player_library/animations/<gender>
    • Ideally one each in male, fem, huge


  • Create a file in data/sequencers/player called emotes_(yourname).inc
    • You can put multiple emotes in the same file
#############################################################
## Teabag Emote
#############################################################

Move Teabag_Pre
	Requires	EMOTE TEABAG
	Priority	2
	Interrupts	<IRQEmotesALL> <IRQEmotesCombat> #<IRQEmotesRighthand> <IRQEmotesLefthand> <IRQEmotesDualhand> <IRQEmotesShield>
	Include sequencers\Members\Emotes_Idle.inc
	NextMove	Teabag
	Flags		FIXARMREG

	Type		male
	  Anim          male\emote_teabag 1 10
	  PlayFX	generic\teabag.fx 0 CONSTANT
	TEnd

	Type		fem
	  Anim          fem\emote_teabag 1 10
	  PlayFX	generic\teabag.fx 0 CONSTANT
	TEnd

	Type		huge
	  Anim          huge\emote_teabag 1 10
	  PlayFX	generic\teabag.fx 0 CONSTANT
	TEnd
MEnd

Move Teabag
	Include sequencers\Members\Emotes_Idle.inc
	NextMove	Teabag_cycle
	Flags		FIXARMREG

	Type		male
	  Anim          male\emote_teabag 10
	  PlayFX	generic\teabag.fx 0 CONSTANT
	TEnd

	Type		fem
	  Anim          fem\emote_teabag 10
	  PlayFX	generic\teabag.fx 0 CONSTANT
	TEnd

	Type		huge
	  Anim          huge\emote_teabag 10
	  PlayFX	generic\teabag.fx 0 CONSTANT
	TEnd
MEnd

Move Teabag_cycle
	Include sequencers\Members\Emotes_Idle.inc
	Flags		CYCLE FIXARMREG

	Type		male
	  Anim          male\emote_teabag 1
	  PlayFX	generic\teabag.fx 0 CONSTANT
	TEnd

	Type		fem
	  Anim          fem\emote_teabag 1
	  PlayFX	generic\teabag.fx 0 CONSTANT
	TEnd

	Type		huge
	  Anim          huge\emote_teabag 1
	  PlayFX	generic\teabag.fx 0 CONSTANT
	TEnd
MEnd

In the first Move, the Requires line tells us what triggers this move, in this case the EMOTE flag AND the TEABAG flag, change TEABAG to something unique to your emote (this is your STATE BIT) (see notes on the sequence bits lower down for more details). NextMove tells us where we go after this move finishes. So we go Teabag_Pre -> Teabag -> Teabag_Cycle. The CYCLE flag tells us to not move on. To have a varying cycle, you can add CycleMove lines:

	Flags		FIXARMREG CYCLE
	CycleMove	Invention_cycle
	CycleMove	Invention_cycle
	CycleMove	Invention_examine
	CycleMove	Invention_ponder

Which, I assume, means a 50% chance to replay invention_cycle (where this came from), and a 25% chance of moving to each of the others.

There is a type entry for each gender, telling us where to find the anim and what fx to play.

  • Add your include file to the bottom of data/sequencers/player/emotes.inc
...
Include sequencers\player\emotes_SteampunkBooster.inc
Include sequencers\player\emotes_(yourname).inc

*Add your state bit to data/sequencers/statebits.statebits

...
StateBit	CRY
StateBit	YOURBITHERE

You can't add bits to the sequencer without recompiling the server. Easy enough long term, but it means you can't easily make an emote modpack to throw at any old random server.
Instead, try using combinations of existing bits, such as ONE and VARIATIONA for now.
  • Add your emote to data/defs/emotes.def
	Emote	CustomEmote	anim_EMOTE, anim_YOURBITHERE
	{
	}
  • Rebuild your bins, see which ones have updated and put those into your test server/client
    • data/server/bin/emotes.bin
    • data/bin/sequencers.bin