It is currently 15 Aug 2018, 03:24
   
Text Size

Adding sound and getting effect from named card?

Moderators: Xander9009, CCGHQ Admins

Adding sound and getting effect from named card?

Postby Sobol14 » 13 Feb 2016, 13:01

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.
Sobol14
 
Posts: 2
Joined: 09 Feb 2016, 13:17
Has thanked: 1 time
Been thanked: 0 time

Re: Adding sound and getting effect from named card?

Postby RiiakShiNal » 13 Feb 2016, 15:04

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>"
Problems with base game cards: DotP 2014 Core Fixes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
RiiakShiNal
Programmer
 
Posts: 2098
Joined: 16 May 2011, 21:37
Has thanked: 73 times
Been thanked: 462 times

Re: Adding sound and getting effect from named card?

Postby Sobol14 » 13 Feb 2016, 16:28

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.
Sobol14
 
Posts: 2
Joined: 09 Feb 2016, 13:17
Has thanked: 1 time
Been thanked: 0 time

Re: Adding sound and getting effect from named card?

Postby RiiakShiNal » 14 Feb 2016, 18:28

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
Problems with base game cards: DotP 2014 Core Fixes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
RiiakShiNal
Programmer
 
Posts: 2098
Joined: 16 May 2011, 21:37
Has thanked: 73 times
Been thanked: 462 times


Return to Programming Talk

Who is online

Users browsing this forum: No registered users and 2 guests


Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 10 minutes)
Most users ever online was 279 on 11 Jul 2013, 22:03

Users browsing this forum: No registered users and 2 guests

Login Form