Adding Custom Emotes

From OuroDev
Revision as of 13:16, 26 May 2019 by BubbleWrap (talk | contribs) (Created page with "<pre>Caveat: This hasn't yet been tested, it is based off reading the defs</pre> *Add your animation to data/player_library/animations/<gender> **Ideally one each in male, fe...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Caveat: This hasn't yet been tested, it is based off reading the defs
  • 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). 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
  • 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