Page 1 of 1

Adding sound and getting effect from named card?

PostPosted: 13 Feb 2016, 13:01
by Sobol14
I'm screwing around and making a few of my own cards for a personal use and I have a couple of questions.

1. Is it possible to add a sound without removing any vanilla sounds and making it play when one of the mobs is using it's activated ability?

2. It it possible to have an equipment than giving a effect if it attached to any creature and also a secondary effect if it attached to a named creature.

Thanks in advance.

Re: Adding sound and getting effect from named card?

PostPosted: 13 Feb 2016, 15:04
by RiiakShiNal
The answer to both of your questions is yes.
  1. You just need to add the sounds and the special fx entries to reference.
  2. You just need to partition off the extra effect(s) with if EffectSource():GetParent():GetCardName() == "<SPECIAL_CARD_NAME>"

Re: Adding sound and getting effect from named card?

PostPosted: 13 Feb 2016, 16:28
by Sobol14
Thank you. The equipment works like a charm =)

To clarify on the first question, will the sound play when any creature uses it's activated ability or can I just say which creature it should play for?
Also, I would be grateful if you write an example of what I need to write and where, I'm kinda lost of what I must do with specialfx.

Re: Adding sound and getting effect from named card?

PostPosted: 14 Feb 2016, 18:28
by RiiakShiNal
The SFX tag in the creature XML determines what Special Effects the creature uses for standard attacks (with specified min and max power so you can define it to use different special effects for different power ranges). The SFX tag can also be used in abilities to determine the special effects to use for a specific ability. The text used in the SFX tag specifies which of the defined special effects to use. Special Effects are defined in XML files in DATA_ALL_PLATFORMS\SPECIALFX\SPECIALFX in this format:
Code: Select all
<SFXSpecialFX>
  <!-- Typical Creature Attack SFX -->
  <SpecialFX name="<NameToUseInSFXTag>">
    <Emitter name="<EmitterFileNameWithoutExtension>" waitToFinish="1" playOnTarget="1" sound="<MP3FileNameWithoutExtension>" start="COMBAT_DAMAGE_PUSHED" watchStackForMove="1" />
  </SpecialFX>
  <!-- Ability Special Effect Entries will vary and for that you should look at other entries that are similar. -->
  <!-- Additional SpecialFX definitions go here -->
</SFXSpecialFX>
Emitters are found in: DATA_ALL_PLATFORMS\SPECIALFX\EMITTERS
Sounds are found in: DATA_ALL_PLATFORMS\SOUNDS