Adding Custom Emotes: Difference between revisions

From OuroDev
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..."
 
BubbleWrap (talk | contribs)
No edit summary
Line 1: Line 1:
<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>
*Add your animation to data/player_library/animations/<gender>
**Ideally one each in male, fem, huge
**Ideally one each in male, fem, huge
Line 78: Line 76:
</pre>
</pre>


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).
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 <s>(this is your STATE BIT)</s> (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:
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:
<pre>
<pre>
Line 99: Line 97:
</pre>
</pre>


*Add your state bit to data/sequencers/statebits.statebits
<s>*Add your state bit to data/sequencers/statebits.statebits
<pre>
<pre>
...
...
StateBit CRY
StateBit CRY
StateBit YOURBITHERE
StateBit YOURBITHERE
</pre>
</s>
<pre>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.
</pre>
</pre>


Line 114: Line 117:


*Rebuild your bins, see which ones have updated and put those into your test server/client
*Rebuild your bins, see which ones have updated and put those into your test server/client
** data/server/emotes.bin
** data/sequencers.bin


[[Category:Bubble's Notes]]
[[Category:Bubble's Notes]]

Revision as of 17:47, 26 May 2019

  • 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/emotes.bin
    • data/sequencers.bin