tModLoader Dust and Sound Catalogue 2

Flashkirby99

Skeletron
UQt9XHz.png
Dust & Sound 2
ALotPKO.png

v0.10, for tModLoader v0.10.0.1

PSA: Modder's Toolkit has a much larger, nicer inspector for gettings dusts exactly how you want it.

vO8siC4.png

(!) and (.) indicate dusts that emit light and dusts that just glow, respectively

-1: (!)grey rectangles, no light !WARNING: Unused graphic
0: brown dirt
1: grey stone
2: thick green grass
3: thin green leaves
4: grey slime
5: red blood
6: (!)orange fire, emits orange light !WARNING: Ignores Y velocity
7: brown wood
8: iron
9: copper
10: gold
11: silver/platinum
12: red crystal heart
13: glass cyan
14: purple corruption particle (no grav)
15: (!)white amd blue magic fx (no grav), emits pale blue light
16: bluish white clouds like hermes boots (no grav)
17: thin grey mushroom material
18: thin grey green stucco
19: thin yellow gold
20: (!)white lingering (no grav), emits cyan light
21: (!)purple lingering (no grav), emits purple light
22: brown clay
23: orange piggybank
24: thin brown material
25: copper
26: iron
27: (!)purple fx (no grav), emits bright purple light
28: dull copper
29: (!)dark blue, emits pale pink light !WARNING: Ignores Y velocity
30: silver material
31: yellowish white cloud material (no grav)
32: yellow sand (no grav)
33: blue water, highly transparent
34: white and blue bubbles !WARNING: Only works underwater
35: (!)red fx, emits red light !WARNING: Ignores Y velocity, behaves unexpectedly with gravity enabled
36: muddy pale brown material
37: dark grey material
38: muddy brown material
39: bright green jungle grass
40: bright green thin grass
41: (!)dark blue wandering circles (no grav), emits bright cyan light !WARNING: Ignores all velocity
42: thin teal material
43: The Shiny Particle

Particle colour and scale appears to influence the intensity and colour of light emitted. The particle doesn't show unless at least one colour value is set to 255.
Initially spawns with light currently available on that tile, meaning it won't appear in darkness (like Mithril Armour's effects).
Usually used with Main.dust[dustIndex].fadeIn with a smaller inital scale, to due to lighting.

Gravity Enabled:
Doesn't slow down, ignores gravity.
Gravity Disabled:
Slows down and disappears faster.

44: (!)bright green spores that lingers for a while (no grav), emits light green light
45: (!)light blue circles (no grav), emits purple light
46: green material (no grav)
47: thin cyan hallow grass
48: cobalt
49: mithril
50: adamantite
51: snow
52: pink water, highly transparent
53: grey material
54: black material
55: (!)bright orange thick fx (no grav), emits yellow light
56: (!)cyan fx (no grav), emits pale blue light
57: (!)small yellow hallowed fx (no grav), emis yellow light
58: (!)hot and pale pink magic fx (no grav), emits pink light
59: (!)blue torch, emits pure blue light !WARNING: Ignores Y velocity
60: (!)red torch, emits pure red light !WARNING: Ignores Y velocity
61: (!)green torch, emits pure green light !WARNING: Ignores Y velocity
62: (!)purple torch, emits purple light !WARNING: Ignores Y velocity
63: (!)white torch, emits bright white light !WARNING: Ignores Y velocity
64: (!)yellow torch, emits deep yellow light !WARNING: Ignores Y velocity
65: (!)demon torch, emits pulsating pink/purple light !WARNING: Ignores Y velocity
66: (!)White transparent (no grav) !WARNING: Possibly undesirable behaviour when gravity is enabled
67: (!)cyan ice crystals, emits cyan light
68: (.)dark cyan ice crystals, emits very faint blue light, glows in disabled gravity
69: thin pink material
70: (.)thin transparent purple material, emits faint purple light, glows in disabled gravity
71: (!)transparent pink fx (no grav), emits faint pink light
72: (!)solid pink fx (no grav), emits faint pink light
73: (!)solid bright pink fx (no grav), emits pink light
74: (!)solid bright green fx (no grav), emits green light
75: (!)green cursed torch !WARNING: Ignores Y velocity
76: snowfall (no grav), lasts a long time
77: grey ebonwood
78: brown rich mahogany, pearlwood
79: thin yellow material
80: blue ice block material
81: tin
82: lead
83: tungsten
84: platinum
85: thin sandy yellow materiial
86: (!)transparent pink material, emits pink light
87: (!)transparent yellow material, emits yellow light
88: (.)transparent blue material, glows in the dark
89: (!)transparent green material, emits green light
90: (!)transparent red material, emits red light
91: (!)transparent white material, emits white light
92: (!)transparent cyan material, emits cyan light
93: thin green moss
94: thin yellow moss
95: thin red moss
96: thin blue moss
97: thin purple moss
98: purple water, highly transparent
99: cyan water, highly transparent
100: pink water, highly transparent
101: cyan water, highly transparent
102: orange water, highly transparent
103: dark blue water, highly transparent
104: hot pink water, highly transparent
105: red water, highly transparent
106: (.)transparent red/green/blue material, glows in the dark
107: (!)short green powder (no grav), emits green light
108: light pale purple round material
109: black material
110: (.)bright green bubbles (no grav), emits very faint green light
111: (.)bright cyan bubbles (no grav), emits very faint cyan light
112: (.)bright pink bubbles (no grav), emits very faint pink light
113: (.)blue ice crystals (no grav), glows in the dark
114: (.)bright pink/yellow bubbles (no grav), emits very faint pink light
115: red circles
116: blueish green circles
117: crimtane brick
118: purple ice
119: pink ice
120: red ice
121: thin grey material
122: thin iron material
123: hot pink bubble material
124: yellowish white bubbles
125: red crimson plants
126: thin grey shadewood
127: (!)reddish orange fire, emits orange light
128: green chlorophyte
129: thin brown rope
130: (!)trailing red falling fireworks, emits red light
131: (!)trailing green rising fireworks (no grav), emits green light
132: (!)trailing cyan falling fireworks, emits cyan light
133: (!)trailing yellow falling fireworks, emits cyan light
134: trailing pink falling fireworks
135: (!)cyan ice torch, emits cyan light !WARNING: Ignores Y velocity
136: red material
137: bright blue/cyan material
138: bright orange/brown material
139: cyan lingering confetti
140: green lingering confetti
141: pink lingering confetti
142: yellow lingering confetti
143: light grey stone
144: palladium
145: orichalcum
146: titanium
147: orange hive
148: red lihzahrd blocks
149: white slush
150: black/yellow/bluishwhite material
151: thin white material
152: bright orange bubbles !WARNING: Doesn't appear in gravity
153: bright orange honey
154: pale blue thin material
155: thin dark brown material
156: (.)bright blue/white bubble material, emits pale blue light
157: (.)thin green fx, glows in the dark
158: (!)orange fire, emits red light !WARNING: Ignores Y velocity
159: (!)wandering yellow fx (no grav), emits yellow light !WARNING: Possibly undesirable behaviour when gravity is disabled
160: (!)shortlived cyan fx (no grav), emits bright cyan light
161: cyan material
162: (!)shortlived orange fx (no grav), emits bright orange light
163: (.)bright green thin material, glows in the dark
164: (!)wandering pink fx (no grav), emits hot pink light !WARNING: Possibly undesirable behaviour when gravity is disabled
165: white/blue bubble material
166: thin bright pink material
167: thin green material
168: !wandering bright pink bubbles (no grav) !WARNING: Possibly undesirable behaviour when gravity is enabled
169: (!)yellow fx, emits deep yellow light !WARNING: Ignores Y velocity
170: (.)thin orange fx, emits faint white light
171: bright purple bubble material
172: (.)light blue particles, emits faint blue light
173: (!)shortlived purple fx (no grav), emits bright purple light
174: (!)bright orange bubble material, emits reddish orange light
175: (.)shortlived white fx (no grav), glows in the dark
176: light blue particles
177: light pink particles
178: light green particles
179: light purple particles
180: (.)light cyan particles, glows in the dark
181: (.)light cyan/pink bubble material, glows in the dark
182: (.)light red bubble material, barely emits red light
183: (.)transparent red bubble material, glows in the dark
184: sickly pale greenish grey particles that stay in place (no grav)
185: (!)light cyan crystal material, emits cyan light
186: pale dark blue smoke
187: (!)light cyan particles, emits cyan light
188: bright green bubbles (no grav)
189: thin orange pumpkin
190: thin yellow hay
191: black spooky wood
192: snow material
193: green material
194: thin brown material
195: thin black material
196: thin green material
197: (.)thin bright cyan material, glows in the dark
198: black/white particles
199: pale purple/black/grey particles
200: pink particles
201: light pink particles
202: light cyan particles
203: grey particles
204: (.)white particles (no grav), glows in the dark
205: (.)thin pink material, barely emits pink light
206: (!)shortlived cyan fx (no grav), barely emits blue light
207: thin brown dynasty wood
208: red shingles
209: blue shingles
210: off white material
211: bright blue particles
212: white particles
213: (.)shortlived tiny white fx, barely emits white light
214: thin pale brown material
215: thin brown palm wood
216: pale pink material
217: cyan particles
218: hot pink particles (no grav)
219: (!)trailing red flying fireworks, emits orange light
220: (!)trailing green flying fireworks, emits green light
221: (!)trailing blue flying fireworks, emits pale blue light
222: (!)trailing yellow flying fireworks, emits yellow light
223: (.)trailing red flying fireworks, glows in the dark
224: thin blue material
225: orange coralstone
226: (!)trailing cyan electricity, emits cyan light
227: thin solid purple material
228: (!)yellow fire, emits yellow light !WARNING: Ignores Y velocity
229: (!)thin solid cyan material (no grav), emits cyan light
230: (!)cyan cross fx, emits light that scales size with intensity !WARNING: Possibly undesirable behaviour with gravity enabled
231: (!)orange lingering particles (no grav), emits orange light
232: yellow stone
233: yellow material
234: (!)cyan and pink fx, emits pink light
235: (.)pure red fx, glows in the dark
236: white marble
237: thin orange material
238: off white-green material
239: thin pale purple silk rope
240: granite material
241: grey yellow material
242: (!)pink lingering nebula, emits deep pink light
243: pink slime
244: (!)orange fx (no grav), emits red light
245: (!)yellow fx (no grav), emits pale greenish yellow light
246: (!)yellow fx (no grav), emits orange light
247: (!)yellow fx (no grav), emits white light
248: pink debris
249: purple debris
250: thin pale orange material
251: thin strong red material
252: thin blue material
253: blue material
254: (.)bright pink bubbles, emits very faint pink light
255: (.) bright pink fx, glows in the dark
256: green jungle grass like material
257: bright white and blue bubbles
258: (.)deep red lava moss fx (no grav), glows in the dark
259: (.)bright orange circles, glows in the dark
260: (.)shortlived tiny red fx, barely emits white light
261: (.)white fx, emits faint greenish white light
262: (!)bright orange circles, emits orange light
263: (.)half transparent white fx, glows in the dark
264: (.)semi transparent white fx, glows in the dark
265: green/brown material
266: red water, highly transparent
267: unknown, used by Rainbow Explosion projectile
268: yellow sand, collides with blocks !WARNING: Ignores Y velocity
269: (!)yellow floating fire (no grav), emits white light
Sounds in Terraria have a sound effect number and sometimes also a style type, such as sounds in SE number 2. As of tmodLoader v0.9+, you're supposed to use SoundID instead of this system which is now under LegacySoundStyle. See this list.

0: tile hit
1: male hit
2:
2 : 1: generic swing
2 : 2: crunchy eating
2 : 3: swallow drink
2 : 4: life crystal ping
2 : 5: bow shot
2 : 6: magic mirror whizz
2 : 7: low, quiet swing
2 : 8: magic cast
2 : 9: astral magic noise
2 : 10: bullet impact/harpoon
2 : 11: basic gun shot
2 : 12: laser beam
2 : 13: magic spray
2 : 14: explosion
2 : 15: phaseblade
2 : 16: whoopie cushion
2 : 17: dart shot
2 : 18: generic lower swing
2 : 19: throwing swing
2 : 20: fire cast
2 : 21: water cast
2 : 22: motor tool loop
2 : 23: motor tool activation
2 : 24: spectre boots
2 : 25: fairy bell
2 : 26: harp note
2 : 27: crystal smash
2 : 28: rising magic cast
2 : 29: mana crystal
2 : 30: ice materialise
2 : 31: clockwork burst shot
2 : 32: wing flap
2 : 33: boss laser beam
2 : 34: flamethrower
2 : 35: bell ding
2 : 36: pump shotgun
2 : 37: anvil clang
2 : 38: heavy shot
2 : 39: multi throw swing
2 : 40: sniper shot
2 : 41: revolver shot
2 : 42: flaming wood
2 : 43: staff magic cast
2 : 44: summon minion
2 : 45: inferno fork
2 : 46: summon hydra
2 : 47: the axe
2 : 48: mine snow/slush
2 : 49: mine snow/slush 2
2 : 50: mine ice
2 : 51: snowball impact
2 : 52: minecart track place
2 : 53: minecart land on track
2 : 54: bubble pop
2 : 55: minecart brake
2 : 56: minecart track bumper
2 : 57: cat meow
2 : 58: cat howl
2 : 59: pig chest
2 : 60: terra beam
2 : 61: grenade launcher
2 : 62: grenade explosion
2 : 63: blowpipe
2 : 64: blowgun
2 : 65: blow weapon?
2 : 66: nimbus rod
2 : 67: rainbow gun
2 : 68: rainbow gun alt?
2 : 69: staff of earth
2 : 70: staff of earth alt?
2 : 71: death sickle
2 : 72: shadowbeam staff
2 : 73: inferno fork
2 : 74: inferno explosion
2 : 75: pulse bow
2 : 76: summon hornet
2 : 77: summon imp
2 : 78: summon portal/crystal
2 : 79: spawn rabbit mount
2 : 80: spawn pigron mount
2 : 81: spawn slime mount
2 : 82: summon twin eyes
2 : 83: summon spider
2 : 84: razorblade typhoon
2 : 85: bubble gun
2 : 86: bubbles?
2 : 87: bubbles 2?
2 : 88: meteor staff
2 : 89: metoer crash
2 : 90: spawn scutlix mount
2 : 91: scutlix laser
2 : 92: electrosphere launch
2 : 93: electric zap
2 : 94: electrosphere stop
2 : 95: xenopopper
2 : 96: xenopopper burst
2 : 97: the bee's knees
2 : 98: dart pistol
2 : 99: dart rifle
2 : 100: cursed firewall
2 : 101: crystal vilethorn
2 : 102: shadowflame bow
2 : 103: shadowflame hex
2 : 104: shadowflame sound?
2 : 105: starfury
2 : 106: throwing flask
2 : 107: flask shatter
2 : 108: nailgun
2 : 109: crystal serpent fire
2 : 110: crystal serpent split
2 : 111: toxikcarp bubble
2 : 112: bubble noise?
2 : 113: summon deadly sphere
2 : 114: open blue portal (high)
2 : 115: open orange portal (low)
2 : 116: solar eruption swing
2 : 117: conjure arcanum
2 : 118: crystal serpent pop
2 : 119: phantasm dragon roar
2 : 120: ice mist
2 : 121: cultist lightning orb
2 : 122: lightning strike
2 : 123: cultist chant
2 : 124: phantasmal bolt fire
2 : 125: phantasmal bolt fire 2
3:
3 : 1: organic
3 : 2:bone
3 : 3:magic intercept
3 : 4:metal
3 : 5: pixie/ice
3 : 6:beast
3 : 7:wood, rock, wyvern
3 : 8:wall of flesh
3 : 9:leech
3 : 10: old unicorn
3 : 11:snow
3 : 12:horses
3 : 13:squishy crimson
3 : 14: fishron squeal
3 : 15: target dummy
3 : 16: target dummy 2
3 : 17: target dummy 3
3 : 18: blood zombie
3 : 19: drippler/dutchman/crawltipede
3 : 20: blood crawler
3 : 21: demon
3 : 22: derpling
3 : 23: flying snake
3 : 24: tortoise
3 : 25: jellyfish
3 : 26: lihzahrd
3 : 27: pigron
3 : 28: vulture
3 : 29: spider
3 : 30: nimbus
3 : 31: antlion, charger
3 : 32: antlion swarmer
3 : 33: crawdad
3 : 34: deadly sphere
3 : 35: dr. man fly
3 : 36: dungeon spirit
3 : 37: desert ghoul
3 : 38: giant shelly
3 : 39: gigazapper
3 : 40: goblin summoner
3 : 41: granite golem
3 : 42: martian drone
3 : 43: martians
3 : 44: mothron
3 : 45: mushi ladybug
3 : 46: parrot
3 : 47: the possessed
3 : 48: psycho
3 : 49: reaper
3 : 50: salamander
3 : 51: scutlix
3 : 52: shadowflame apparition
3 : 53: tesla turret
3 : 54: wraith
3 : 55: cultist
3 : 56: phantasm dragon
3 : 57: moonlord grunt
4:
4 : 1: slime
4 : 2: undead
4 : 3: magic destroy
4 : 4: bat/mouse
4 : 5: large foe
4 : 6: etheral gasp
4 : 7: hallow creature
4 : 8: beast grunt
4 : 9: spit
4 : 10: wall of flesh scream
4 : 11: the hungry split
4 : 12: the hungry destroy
4 : 13: wall of flesh belch
4 : 14: mechanical explosion
4 : 15: snow
4 : 16: insect
4 : 17: pigron
4 : 18: unicorn
4 : 19: squishy crimson
4 : 20: fishron scream
4 : 21: blood zombie
4 : 22: drippler/dutchman/crawltipede
4 : 23: blood crawler
4 : 24: demon
4 : 25: derpling
4 : 26: flying snake
4 : 27: tortoise
4 : 28: jellyfish
4 : 29: lihzahrd
4 : 30: pigron
4 : 31: spider
4 : 32: bug squash?
4 : 33: nimbus
4 : 34: antlion, charger
4 : 35: antlion swarmer
4 : 36: crawdad
4 : 37: deadly sphere
4 : 38: dr. man fly
4 : 39: dungeon spirit
4 : 40: desert ghoul
4 : 41: giant shelly
4 : 42: goblin summoner
4 : 43: heavy impact?
4 : 44: martian drone
4 : 45: martians
4 : 46: mothron
4 : 47: mushi ladybug
4 : 48: parrot
4 : 49: the possessed
4 : 50: psycho
4 : 51: reaper
4 : 52: wraith
4 : 53: saladmander
4 : 54: scutlix
4 : 55: shadowflame apparition
4 : 56: tesla turret
4 : 57: gigazapper
4 : 58: solar tower
4 : 59: cultist
4 : 60: phantasm dragon
4 : 61: moonlord final death and explosion
4 : 62: moonlord defeat
5: player death
6: grass/web cut
7: pickup noise
8: open door
9: close door
10: open menu
11: close menu
12: scroll/chat tick noise
13: pot breaking
14: zombie growl
15:
15 : 0: boss summon laughter
15 : 1: worm dig noise
15 : 2: scream
16: double jump
17: running
18: pay money
19:
19 : 0:large splash for npcs
19 : 1:small splash for items
20: female hit
21: stone tile hit
22: hotbar lock/unlock
23: drown
24: open npc chat window
25: mana full charge
26: low monster groan
27: pixie shimmer
28: wire mechanisms toggle noise
29:
29 : 1: undead moan
29 : 2: undead rawr
29 : 3: undead gurgle
29 : 4: beast low gurgle
29 : 5: beast low gurgle2
29 : 6: beasy medium noise
29 : 7: high gasp
29 : 8: low gasp
29 : 9: beast belch
29 : 10: duck quak
29 : 11: duck quack
29 : 12: 'quack'
29 : 13: frog ribbit
29 : 14: bird tweet
29 : 15: mouse squeak
29 : 16: bluejay tweet
29 : 17: cardinal tweet long
29 : 18: bird tweet slow
29 : 19: cardinal tweet
29 : 20: fishron bubbles belch
29 : 21: blood zombie moan
29 : 22: blood zombie rawr
29 : 23: blood zombie gurgle
29 : 24: blood crawler chitter
29 : 25: blood crwaler chatter
29 : 26: demon growl
29 : 27: demon growl 2
29 : 28: demon growl 3
29 : 29: demon growl 4
29 : 30: leech cry
29 : 31: leech groan
29 : 32: snake hiss
29 : 33: giant toirtoise
29 : 34: jellyfish propel
29 : 35: jellyfish swim
29 : 36: lihzahrd rawr
29 : 37: lihzahrd ohno
29 : 38: pigron cry
29 : 39: pigron moan
29 : 40: pigron groan
29 : 41: nimbus growl
29 : 42: nimbus draw
29 : 43: nimbus breath
29 : 44: antlions chitter
29 : 45: antlion swarmer flicker
29 : 46: antlion swarmer buzz
29 : 47: crawdad chitter
29 : 48: deadly sphere whizz
29 : 49: deadly sphere whirr
29 : 50: dr. man fly buzzy
29 : 51: dr. man fly buzz
29 : 52: dr. man fly loud
29 : 53: spirit ah
29 : 54: spirit yeah
29 : 55: ghoul stutter
29 : 56: ghoul mutter
29 : 57: shelly whirr
29 : 58: shelly burr
29 : 59: gigazapper yayay
29 : 60: gigazapper ayayay
29 : 61: goblin summoner chant
29 : 62: goblin summoner rant
29 : 63: granite golem grumble
29 : 64: granite golem cough
29 : 65: granite golem belch
29 : 66: martian drone fly
29 : 67: martian drone beeps
29 : 68: martian drone boost
29 : 69: martian walker attention
29 : 70: martian walker beep
29 : 71: martian walker boop
29 : 72: martian walker bop
29 : 73: mothron sing
29 : 74: mushi ladybug chit
29 : 75: mushi ladybug chat
29 : 76: mushi ladybug chitter
29 : 77: mushi ladybug click
29 : 78: parrot call
29 : 79: the possessed laugh
29 : 80: the possessed sputter
29 : 81: reaper gasp
29 : 82: reaper sigh
29 : 83: reaper wheeze
29 : 84: salamander gurgle
29 : 85: salamander babble
29 : 86: scutlix bzzt
29 : 87: scutlix growl
29 : 88: cultist mumble
29 : 89: cultist mantra
29 : 90: cultist chant
29 : 91: cultist evoke
29 : 92: phantasm dragon roar
29 : 93: moonlord exhale
29 : 94: moonlord moan
29 : 95: moonlord grpan
29 : 96: moonlord wheeze
29 : 97: moonlord breath
29 : 98: moonlord growl
29 : 99: moonlord inhale
29 : 100: true eye cry
29 : 101: true eye whirr
29 : 102: true eye scream
29 : 103: phantasmal eye launch
29 : 104: phantasmal deathray
29 : 105: cultist laugh
30: duck
31: frog
32: npc idle far noises - see 29
33: mouse squeaks
34: [VOL]running water
35: [VOL]running lava
36: copy of 15?
37: [VOL]meowmere explosion
38: coin pickup
39:
39 : 0: medium drip
39 : 1: light drip
39 : 2: heavy drip
40: camera screenshot
41: boss death

Some of you may remember the super useful Dust and Sound Catalog Mod by Romulan Paladin as well as my tAPI followup, back in the tConfig/tAPI days, and if you've visited those links you'll notice that I'm just copy-pasting at this point - but that's not what you're here for anyway! So this is the same mod, for tModLoader which has yet more interesting dust types, such as multi-coloured dusts! Additionally there are a waaaaaaaaaaaaaay more sounds that took some extra code digging to find their usage (and even then I still couldn't find them all), and they are also available in catalogue form. See book tooltips for details.

kdcROYP.png


Download
via MediaFire
or
via Mod Browser
Reminder: You don't need this mod to use any of the dusts and sounds, it only shows you what's already in the game. But you knew that already, didn't you.

For dusts, once you have the type, you need to spawn the particles in code using:
Code:
Dust.NewDust(Vector2 Position, int Width, int Height, int Type, float SpeedX = 0f, float SpeedY = 0f, int Alpha = 0, Color newColor = default(Color), float Scale = 1f)

//or one of the various alternatives, whichever is more appropriate, found in Dust.cs
Dust.NewDust(Vector2 Position, Vector2 Size, int Type, Vector2 Velocity = default(Vector2), int Alpha = 0, Color newColor = default(Color), float Scale = 1f)
Dust.NewDust(Rectangle rect, int Type, Vector2 Velocity = default(Vector2), int Alpha = 0, Color newColor = default(Color), float Scale = 1f)
The NewDust method returns the index value of the dust you just created, which you can reference using Main.dust[indexNumber]. In code it would look something like this:
Code:
//say you wanted to add particles that stay mostly still to leave a trail behind a projectile
int num1 = Dust.NewDust(
         projectile.position,
         projectile.width,
         projectile.height,
         6, //lazy number 6 for fire particles
         projectile.velocity.X,
         projectile.velocity.Y,
         100f, //alpha goes from 0 to 255
         default(Color),
         1f
         );

Main.dust[num1].noGravity = true;
Main.dust[num1].velocity *= 0.1f;
For sounds, some sound effects are used by variables by default as listed above (see sound group 2 for items, 3 and 4for npcs). Alternatively, you can play the effect using the example below.
Code:
PlaySound(int type, int x = -1, int y = -1, int Style = 1)

//but if you really need to, there are other method signatures that do various things, found in Main.cs
PlaySound(SoundEffect effect, float X = -1f, float Y = -1f, bool useInstance = false, Main.ShouldPlayDelegate shouldPlayDel = null, float panMod = float.NaN, float volumeMod = float.NaN, float pitchMod = float.NaN)
PlaySound(SoundEffect effect, float X, float Y, bool useInstance, float panMod, float volumeMod, float pitchMod)
PlaySound(SoundEffect effect, float X, float Y, bool useInstance, Main.ShouldPlayDelegate shouldPlayDel)
PlaySound(string name, float X = -1f, float Y = -1f, bool useInstance = false, Main.ShouldPlayDelegate shouldPlayDel = null, float panMod = float.NaN, float volumeMod = float.NaN, float pitchMod = float.NaN)
PlaySound(string name, float X, float Y, bool useInstance, float panMod, float volumeMod, float pitchMod)
PlaySound(string name, float X, float Y, bool useInstance, Main.ShouldPlayDelegate shouldPlayDel)
Note: The method PlaySound returns a SoundEffectInstance, but as of yet I still haven't had to use it so most likely neither do you :guidegrin:
So in practice the the code for playing a sound looks something like this:
Code:
Main.PlaySound(effectNumber, (int)p.position.X, (int)p.position.Y, styleNumber);

How to use Custom Sounds:
Custom sound, not vanilla sound. I already figured it out anyways: Main.PlaySound(SoundLoader.customSoundType, (int)position.X, (int)position.Y, mod.GetSoundSlot(SoundType.Custom, "Sounds/Custom/[INSERTSOUNDEFFECTHERE]"));
 
Last edited:
UQt9XHz.png
Dust & Sound 2
ALotPKO.png


vO8siC4.png

(!) and (.) indicate dusts that emit light and dusts that just glow, respectively

-1: (!)grey rectangles, no light !WARNING: Unused graphic
0: brown dirt
1: grey stone
2: thick green grass
3: thin green leaves
4: grey slime
5: red blood
6: (!)orange fire, emits orange light !WARNING: Ignores Y velocity
7: brown wood
8: iron
9: copper
10: gold
11: silver/platinum
12: red crystal heart
13: glass cyan
14: purple corruption particle (no grav)
15: (!)white amd blue magic fx (no grav), emits pale blue light
16: bluish white clouds like hermes boots (no grav)
17: thin grey mushroom material
18: thin grey green stucco
19: thin yellow gold
20: (!)white lingering (no grav), emits cyan light
21: (!)purple lingering (no grav), emits purple light
22: brown clay
23: orange piggybank
24: thin brown material
25: copper
26: iron
27: (!)purple fx (no grav), emits bright purple light
28: dull copper
29: (!)dark blue, emits pale pink light !WARNING: Ignores Y velocity
30: silver material
31: yellowish white cloud material (no grav)
32: yellow sand (no grav)
33: blue water, highly transparent

35: (!)red fx, emits red light !WARNING: Ignores Y velocity, behaves unexpectedly with gravity enabled
36: muddy pale brown material
37: dark grey material
38: muddy brown material
39: bright green jungle grass
40: bright green thin grass
41: (!)dark blue wandering circles (no grav), emits bright cyan light !WARNING: Ignores all velocity
42: thin teal material

44: (!)bright green spores that lingers for a while (no grav), emits light green light
45: (!)light blue circles (no grav), emits purple light
46: green material (no grav)
47: thin cyan hallow grass
48: cobalt
49: mithril
50: adamantite
51: snow
52: pink water, highly transparent
53: grey material
54: black material
55: (!)bright orange thick fx (no grav), emits yellow light
56: (!)cyan fx (no grav), emits pale blue light
57: (!)small yellow hallowed fx (no grav), emis yellow light
58: (!)hot and pale pink magic fx (no grav), emits pink light
59: (!)blue torch, emits pure blue light !WARNING: Ignores Y velocity
60: (!)red torch, emits pure red light !WARNING: Ignores Y velocity
61: (!)green torch, emits pure green light !WARNING: Ignores Y velocity
62: (!)purple torch, emits purple light !WARNING: Ignores Y velocity
63: (!)white torch, emits bright white light !WARNING: Ignores Y velocity
64: (!)yellow torch, emits deep yellow light !WARNING: Ignores Y velocity
65: (!)demon torch, emits pulsating pink/purple light !WARNING: Ignores Y velocity
66: (!)White transparent (no grav) !WARNING: Possibly undesirable behaviour when gravity is enabled
67: (!)cyan ice crystals, emits cyan light
68: (.)dark cyan ice crystals, emits very faint blue light, glows in disabled gravity
69: thin pink material
70: (.)thin transparent purple material, emits faint purple light, glows in disabled gravity
71: (!)transparent pink fx (no grav), emits faint pink light
72: (!)solid pink fx (no grav), emits faint pink light
73: (!)solid bright pink fx (no grav), emits pink light
74: (!)solid bright green fx (no grav), emits green light
75: (!)green cursed torch !WARNING: Ignores Y velocity
76: snowfall (no grav), lasts a long time
77: grey ebonwood
78: brown rich mahogany, pearlwood
79: thin yellow material
80: blue ice block material
81: tin
82: lead
83: tungsten
84: platinum
85: thin sandy yellow materiial
86: (!)transparent pink material, emits pink light
87: (!)transparent yellow material, emits yellow light
88: (.)transparent blue material, glows in the dark
89: (!)transparent green material, emits green light
90: (!)transparent red material, emits red light
91: (!)transparent white material, emits white light
92: (!)transparent cyan material, emits cyan light
93: thin green moss
94: thin yellow moss
95: thin red moss
96: thin blue moss
97: thin purple moss
98: purple water, highly transparent
99: cyan water, highly transparent
100: pink water, highly transparent
101: cyan water, highly transparent
102: orange water, highly transparent
103: dark blue water, highly transparent
104: hot pink water, highly transparent
105: red water, highly transparent
106: (.)transparent red/green/blue material, glows in the dark
107: (!)short green powder (no grav), emits green light
108: light pale purple round material
109: black material
110: (.)bright green bubbles (no grav), emits very faint green light
111: (.)bright cyan bubbles (no grav), emits very faint cyan light
112: (.)bright pink bubbles (no grav), emits very faint pink light
113: (.)blue ice crystals (no grav), glows in the dark
114: (.)bright pink/yellow bubbles (no grav), emits very faint pink light
115: red circles
116: blueish green circles
117: crimtane brick
118: purple ice
119: pink ice
120: red ice
121: thin grey material
122: thin iron material
123: hot pink bubble material
124: yellowish white bubbles
125: red crimson plants
126: thin grey shadewood
127: (!)reddish orange fire, emits orange light
128: green chlorophyte
129: thin brown rope
130: (!)trailing red falling fireworks, emits red light
131: (!)trailing green rising fireworks (no grav), emits green light
132: (!)trailing cyan falling fireworks, emits cyan light
133: (!)trailing yellow falling fireworks, emits cyan light
134: trailing pink falling fireworks
135: (!)cyan ice torch, emits cyan light !WARNING: Ignores Y velocity
136: red material
137: bright blue/cyan material
138: bright orange/brown material
139: cyan lingering confetti
140: green lingering confetti
141: pink lingering confetti
142: yellow lingering confetti
143: light grey stone
144: palladium
145: orichalcum
146: titanium
147: orange hive
148: red lihzahrd blocks
149: white slush
150: black/yellow/bluishwhite material
151: thin white material
152: bright orange bubbles !WARNING: Doesn't appear in gravity
153: bright orange honey
154: pale blue thin material
155: thin dark brown material
156: (.)bright blue/white bubble material, emits pale blue light
157: (.)thin green fx, glows in the dark
158: (!)orange fire, emits red light !WARNING: Ignores Y velocity
159: (!)wandering yellow fx (no grav), emits yellow light !WARNING: Possibly undesirable behaviour when gravity is disabled
160: (!)shortlived cyan fx (no grav), emits bright cyan light
161: cyan material
162: (!)shortlived orange fx (no grav), emits bright orange light
163: (.)bright green thin material, glows in the dark
164: (!)wandering pink fx (no grav), emits hot pink light !WARNING: Possibly undesirable behaviour when gravity is disabled
165: white/blue bubble material
166: thin bright pink material
167: thin green material
168: !wandering bright pink bubbles (no grav) !WARNING: Possibly undesirable behaviour when gravity is enabled
169: (!)yellow fx, emits deep yellow light !WARNING: Ignores Y velocity
170: (.)thin orange fx, emits faint white light
171: bright purple bubble material
172: (.)light blue particles, emits faint blue light
173: (!)shortlived purple fx (no grav), emits bright purple light
174: (!)bright orange bubble material, emits reddish orange light
175: (.)shortlived white fx (no grav), glows in the dark
176: light blue particles
177: light pink particles
178: light green particles
179: light purple particles
180: (.)light cyan particles, glows in the dark
181: (.)light cyan/pink bubble material, glows in the dark
182: (.)light red bubble material, barely emits red light
183: (.)transparent red bubble material, glows in the dark
184: sickly pale greenish grey particles that stay in place (no grav)
185: (!)light cyan crystal material, emits cyan light
186: pale dark blue smoke
187: (!)light cyan particles, emits cyan light
188: bright green bubbles (no grav)
189: thin orange pumpkin
190: thin yellow hay
191: black spooky wood
192: snow material
193: green material
194: thin brown material
195: thin black material
196: thin green material
197: (.)thin bright cyan material, glows in the dark
198: black/white particles
199: pale purple/black/grey particles
200: pink particles
201: light pink particles
202: light cyan particles
203: grey particles
204: (.)white particles (no grav), glows in the dark
205: (.)thin pink material, barely emits pink light
206: (!)shortlived cyan fx (no grav), barely emits blue light
207: thin brown dynasty wood
208: red shingles
209: blue shingles
210: off white material
211: bright blue particles
212: white particles
213: (.)shortlived tiny white fx, barely emits white light
214: thin pale brown material
215: thin brown palm wood
216: pale pink material
217: cyan particles
218: hot pink particles (no grav)
219: (!)trailing red flying fireworks, emits orange light
220: (!)trailing green flying fireworks, emits green light
221: (!)trailing blue flying fireworks, emits pale blue light
222: (!)trailing yellow flying fireworks, emits yellow light
223: (.)trailing red flying fireworks, glows in the dark
224: thin blue material
225: orange coralstone
226: (!)trailing cyan electricity, emits cyan light
227: thin solid purple material
228: (!)yellow fire, emits yellow light !WARNING: Ignores Y velocity
229: (!)thin solid cyan material (no grav), emits cyan light
230: (!)cyan cross fx, emits light that scales size with intensity !WARNING: Possibly undesirable behaviour with gravity enabled
231: (!)orange lingering particles (no grav), emits orange light
232: yellow stone
233: yellow material
234: (!)cyan and pink fx, emits pink light
235: (.)pure red fx, glows in the dark
236: white marble
237: thin orange material
238: off white-green material
239: thin pale purple silk rope
240: granite material
241: grey yellow material
242: (!)pink lingering nebula, emits deep pink light
243: pink slime
244: (!)orange fx (no grav), emits red light
245: (!)yellow fx (no grav), emits pale greenish yellow light
246: (!)yellow fx (no grav), emits orange light
247: (!)yellow fx (no grav), emits white light
248: pink debris
249: purple debris
250: thin pale orange material
251: thin strong red material
252: thin blue material
253: blue material
254: (.)bright pink bubbles, emits very faint pink light
255: (.) bright pink fx, glows in the dark
256: green jungle grass like material
257: bright white and blue bubbles
258: (.)deep red lava moss fx (no grav), glows in the dark
259: (.)bright orange circles, glows in the dark
260: (.)shortlived tiny red fx, barely emits white light
261: (.)white fx, emits faint greenish white light
262: (!)bright orange circles, emits orange light
263: (.)half transparent white fx, glows in the dark
264: (.)semi transparent white fx, glows in the dark
265: green/brown material
266: red water, highly transparent
Sounds in Terraria have a sound effect number and sometimes also a style type, such as sounds in SE number 2.

0: tile hit
1: male hit
2:
2 : 1: generic swing
2 : 2: crunchy eating
2 : 3: swallow drink
2 : 4: life crystal ping
2 : 5: bow shot
2 : 6: magic mirror whizz
2 : 7: low, quiet swing
2 : 8: magic cast
2 : 9: astral magic noise
2 : 10: bullet impact/harpoon
2 : 11: basic gun shot
2 : 12: laser beam
2 : 13: magic spray
2 : 14: explosion
2 : 15: phaseblade
2 : 16: whoopie cushion
2 : 17: dart shot
2 : 18: generic lower swing
2 : 19: throwing swing
2 : 20: fire cast
2 : 21: water cast
2 : 22: motor tool loop
2 : 23: motor tool activation
2 : 24: spectre boots
2 : 25: fairy bell
2 : 26: harp note
2 : 27: crystal smash
2 : 28: rising magic cast
2 : 29: mana crystal
2 : 30: ice materialise
2 : 31: clockwork burst shot
2 : 32: wing flap
2 : 33: boss laser beam
2 : 34: flamethrower
2 : 35: bell ding
2 : 36: pump shotgun
2 : 37: anvil clang
2 : 38: heavy shot
2 : 39: multi throw swing
2 : 40: sniper shot
2 : 41: revolver shot
2 : 42: flaming wood
2 : 43: staff magic cast
2 : 44: summon minion
2 : 45: inferno fork
2 : 46: summon hydra
2 : 47: the axe
2 : 48: mine snow/slush
2 : 49: mine snow/slush 2
2 : 50: mine ice
2 : 51: snowball impact
2 : 52: minecart track place
2 : 53: minecart land on track
2 : 54: bubble pop
2 : 55: minecart brake
2 : 56: minecart track bumper
2 : 57: cat meow
2 : 58: cat howl
2 : 59: pig chest
2 : 60: terra beam
2 : 61: grenade launcher
2 : 62: grenade explosion
2 : 63: blowpipe
2 : 64: blowgun
2 : 65: blow weapon?
2 : 66: nimbus rod
2 : 67: rainbow gun
2 : 68: rainbow gun alt?
2 : 69: staff of earth
2 : 70: staff of earth alt?
2 : 71: death sickle
2 : 72: shadowbeam staff
2 : 73: inferno fork
2 : 74: inferno explosion
2 : 75: pulse bow
2 : 76: summon hornet
2 : 77: summon imp
2 : 78: summon portal/crystal
2 : 79: spawn rabbit mount
2 : 80: spawn pigron mount
2 : 81: spawn slime mount
2 : 82: summon twin eyes
2 : 83: summon spider
2 : 84: razorblade typhoon
2 : 85: bubble gun
2 : 86: bubbles?
2 : 87: bubbles 2?
2 : 88: meteor staff
2 : 89: metoer crash
2 : 90: spawn scutlix mount
2 : 91: scutlix laser
2 : 92: electrosphere launch
2 : 93: electric zap
2 : 94: electrosphere stop
2 : 95: xenopopper
2 : 96: xenopopper burst
2 : 97: the bee's knees
2 : 98: dart pistol
2 : 99: dart rifle
2 : 100: cursed firewall
2 : 101: crystal vilethorn
2 : 102: shadowflame bow
2 : 103: shadowflame hex
2 : 104: shadowflame sound?
2 : 105: starfury
2 : 106: throwing flask
2 : 107: flask shatter
2 : 108: nailgun
2 : 109: crystal serpent fire
2 : 110: crystal serpent split
2 : 111: toxikcarp bubble
2 : 112: bubble noise?
2 : 113: summon deadly sphere
2 : 114: open blue portal (high)
2 : 115: open orange portal (low)
2 : 116: solar eruption swing
2 : 117: conjure arcanum
2 : 118: crystal serpent pop
2 : 119: phantasm dragon roar
2 : 120: ice mist
2 : 121: cultist lightning orb
2 : 122: lightning strike
2 : 123: cultist chant
2 : 124: phantasmal bolt fire
2 : 125: phantasmal bolt fire 2
3:
3 : 1:guideeek:rganic
3 : 2:bone
3 : 3:magic intercept
3 : 4:metal
3 : 5:guidetongue:ixie/ice
3 : 6:beast
3 : 7:wood, rock, wyvern
3 : 8:wall of flesh
3 : 9:leech
3 : 10:guideeek:ld unicorn
3 : 11:snow
3 : 12:horses
3 : 13:squishy crimson
3 : 14: fishron squeal
3 : 15: target dummy
3 : 16: target dummy 2
3 : 17: target dummy 3
3 : 18: blood zombie
3 : 19: drippler/dutchman/crawltipede
3 : 20: blood crawler
3 : 21: demon
3 : 22: derpling
3 : 23: flying snake
3 : 24: tortoise
3 : 25: jellyfish
3 : 26: lihzahrd
3 : 27: pigron
3 : 28: vulture
3 : 29: spider
3 : 30: nimbus
3 : 31: antlion, charger
3 : 32: antlion swarmer
3 : 33: crawdad
3 : 34: deadly sphere
3 : 35: dr. man fly
3 : 36: dungeon spirit
3 : 37: desert ghoul
3 : 38: giant shelly
3 : 39: gigazapper
3 : 40: goblin summoner
3 : 41: granite golem
3 : 42: martian drone
3 : 43: martians
3 : 44: mothron
3 : 45: mushi ladybug
3 : 46: parrot
3 : 47: the possessed
3 : 48: psycho
3 : 49: reaper
3 : 50: salamander
3 : 51: scutlix
3 : 52: shadowflame apparition
3 : 53: tesla turret
3 : 54: wraith
3 : 55: cultist
3 : 56: phantasm dragon
3 : 57: moonlord grunt
4:
4 : 1: slime
4 : 2: undead
4 : 3: magic destroy
4 : 4: bat/mouse
4 : 5: large foe
4 : 6: etheral gasp
4 : 7: hallow creature
4 : 8: beast grunt
4 : 9: spit
4 : 10: wall of flesh scream
4 : 11: the hungry split
4 : 12: the hungry destroy
4 : 13: wall of flesh belch
4 : 14: mechanical explosion
4 : 15: snow
4 : 16: insect
4 : 17: pigron
4 : 18: unicorn
4 : 19: squishy crimson
4 : 20: fishron scream
4 : 21: blood zombie
4 : 22: drippler/dutchman/crawltipede
4 : 23: blood crawler
4 : 24: demon
4 : 25: derpling
4 : 26: flying snake
4 : 27: tortoise
4 : 28: jellyfish
4 : 29: lihzahrd
4 : 30: pigron
4 : 31: spider
4 : 32: bug squash?
4 : 33: nimbus
4 : 34: antlion, charger
4 : 35: antlion swarmer
4 : 36: crawdad
4 : 37: deadly sphere
4 : 38: dr. man fly
4 : 39: dungeon spirit
4 : 40: desert ghoul
4 : 41: giant shelly
4 : 42: goblin summoner
4 : 43: heavy impact?
4 : 44: martian drone
4 : 45: martians
4 : 46: mothron
4 : 47: mushi ladybug
4 : 48: parrot
4 : 49: the possessed
4 : 50: psycho
4 : 51: reaper
4 : 52: wraith
4 : 53: saladmander
4 : 54: scutlix
4 : 55: shadowflame apparition
4 : 56: tesla turret
4 : 57: gigazapper
4 : 58: solar tower
4 : 59: cultist
4 : 60: phantasm dragon
4 : 61: moonlord final death and explosion
4 : 62: moonlord defeat
5: player death
6: grass/web cut
7: pickup noise
8: open door
9: close door
10: open menu
11: close menu
12: scroll/chat tick noise
13: pot breaking
14: zombie growl
15:
15 : 0: boss summon laughter
15 : 1: worm dig noise
15 : 2: scream
16: double jump
17: running
18: pay money
19:
19 : 0:large splash for npcs
19 : 1:small splash for items
20: female hit
21: stone tile hit
22: hotbar lock/unlock
23: drown
24: open npc chat window
25: mana full charge
26: low monster groan
27: pixie shimmer
28: wire mechanisms toggle noise
29:
29 : 1: undead moan
29 : 2: undead rawr
29 : 3: undead gurgle
29 : 4: beast low gurgle
29 : 5: beast low gurgle2
29 : 6: beasy medium noise
29 : 7: high gasp
29 : 8: low gasp
29 : 9: beast belch
29 : 10: duck quak
29 : 11: duck quack
29 : 12: 'quack'
29 : 13: frog ribbit
29 : 14: bird tweet
29 : 15: mouse squeak
29 : 16: bluejay tweet
29 : 17: cardinal tweet long
29 : 18: bird tweet slow
29 : 19: cardinal tweet
29 : 20: fishron bubbles belch
29 : 21: blood zombie moan
29 : 22: blood zombie rawr
29 : 23: blood zombie gurgle
29 : 24: blood crawler chitter
29 : 25: blood crwaler chatter
29 : 26: demon growl
29 : 27: demon growl 2
29 : 28: demon growl 3
29 : 29: demon growl 4
29 : 30: leech cry
29 : 31: leech groan
29 : 32: snake hiss
29 : 33: giant toirtoise
29 : 34: jellyfish propel
29 : 35: jellyfish swim
29 : 36: lihzahrd rawr
29 : 37: lihzahrd ohno
29 : 38: pigron cry
29 : 39: pigron moan
29 : 40: pigron groan
29 : 41: nimbus growl
29 : 42: nimbus draw
29 : 43: nimbus breath
29 : 44: antlions chitter
29 : 45: antlion swarmer flicker
29 : 46: antlion swarmer buzz
29 : 47: crawdad chitter
29 : 48: deadly sphere whizz
29 : 49: deadly sphere whirr
29 : 50: dr. man fly buzzy
29 : 51: dr. man fly buzz
29 : 52: dr. man fly loud
29 : 53: spirit ah
29 : 54: spirit yeah
29 : 55: ghoul stutter
29 : 56: ghoul mutter
29 : 57: shelly whirr
29 : 58: shelly burr
29 : 59: gigazapper yayay
29 : 60: gigazapper ayayay
29 : 61: goblin summoner chant
29 : 62: goblin summoner rant
29 : 63: granite golem grumble
29 : 64: granite golem cough
29 : 65: granite golem belch
29 : 66: martian drone fly
29 : 67: martian drone beeps
29 : 68: martian drone boost
29 : 69: martian walker attention
29 : 70: martian walker beep
29 : 71: martian walker boop
29 : 72: martian walker bop
29 : 73: mothron sing
29 : 74: mushi ladybug chit
29 : 75: mushi ladybug chat
29 : 76: mushi ladybug chitter
29 : 77: mushi ladybug click
29 : 78: parrot call
29 : 79: the possessed laugh
29 : 80: the possessed sputter
29 : 81: reaper gasp
29 : 82: reaper sigh
29 : 83: reaper wheeze
29 : 84: salamander gurgle
29 : 85: salamander babble
29 : 86: scutlix bzzt
29 : 87: scutlix growl
29 : 88: cultist mumble
29 : 89: cultist mantra
29 : 90: cultist chant
29 : 91: cultist evoke
29 : 92: phantasm dragon roar
29 : 93: moonlord exhale
29 : 94: moonlord moan
29 : 95: moonlord grpan
29 : 96: moonlord wheeze
29 : 97: moonlord breath
29 : 98: moonlord growl
29 : 99: moonlord inhale
29 : 100: true eye cry
29 : 101: true eye whirr
29 : 102: true eye scream
29 : 103: phantasmal eye launch
29 : 104: phantasmal deathray
29 : 105: cultist laugh
30: duck
31: frog
32: npc idle far noises - see 29
33: mouse squeaks
34: [VOL]running water
35: [VOL]running lava
36: copy of 15?
37: [VOL]meowmere explosion
38: coin pickup
39:
39 : 0: medium drip
39 : 1: light drip
39 : 2: heavy drip
40: camera screenshot
41: boss death

Some of you may remember the super useful Dust and Sound Catalog Mod by Romulan Paladin as well as my tAPI followup, back in the tConfig/tAPI days, and if you've visited those links you'll notice that I'm just copy-pasting at this point - but that's not what you're here for anyway! So this is the same mod, for tModLoader which has yet more interesting dust types, such as multi-coloured dusts! Additionally there are a waaaaaaaaaaaaaay more sounds that took some extra code digging to find their usage (and even then I still couldn't find them all), and they are also available in catalogue form. See book tooltips for details.

Download Here or through the mod browser (maybe).
Reminder: You don't need this mod to use any of the dusts and sounds, it only shows you what's already in the game. But you knew that already, didn't you.

For dusts, once you have the type, you need to spawn the particles in code using:
Code:
Dust.NewDust(Vector2 Position, int Width, int Height, int Type, float SpeedX = 0f, float SpeedY = 0f, int Alpha = 0, Color newColor = default(Color), float Scale = 1f)

//or one of the various alternatives, whichever is more appropriate, found in Dust.cs
Dust.NewDust(Vector2 Position, Vector2 Size, int Type, Vector2 Velocity = default(Vector2), int Alpha = 0, Color newColor = default(Color), float Scale = 1f)
Dust.NewDust(Rectangle rect, int Type, Vector2 Velocity = default(Vector2), int Alpha = 0, Color newColor = default(Color), float Scale = 1f)
The NewDust method returns the index value of the dust you just created, which you can reference using Main.dust[indexNumber]. In code it would look something like this:
Code:
//say you wanted to add particles that stay mostly still to leave a trail behind a projectile
int num1 = Dust.NewDust(
         projectile.position,
         projectile.width,
         projectile.height,
         6, //lazy number 6 for fire particles
         projectile.velocity.X,
         projectile.velocity.Y,
         100f, //alpha goes from 0 to 255
         default(Color),
         1f
         );

Main.dust[num1].noGravity = true;
Main.dust[num1].velocity *= 0.1f;
For sounds, once you have the type, you can put it in the .json under "useSound": insertItemSoundidHere, which only uses sounds from sound effect 2 (and its styles). Alternatively, if you want it in code you use:
Code:
PlaySound(int type, int x = -1, int y = -1, int Style = 1)

//but if you really need to, there are other method signatures that do various things, found in Main.cs
PlaySound(SoundEffect effect, float X = -1f, float Y = -1f, bool useInstance = false, Main.ShouldPlayDelegate shouldPlayDel = null, float panMod = float.NaN, float volumeMod = float.NaN, float pitchMod = float.NaN)
PlaySound(SoundEffect effect, float X, float Y, bool useInstance, float panMod, float volumeMod, float pitchMod)
PlaySound(SoundEffect effect, float X, float Y, bool useInstance, Main.ShouldPlayDelegate shouldPlayDel)
PlaySound(string name, float X = -1f, float Y = -1f, bool useInstance = false, Main.ShouldPlayDelegate shouldPlayDel = null, float panMod = float.NaN, float volumeMod = float.NaN, float pitchMod = float.NaN)
PlaySound(string name, float X, float Y, bool useInstance, float panMod, float volumeMod, float pitchMod)
PlaySound(string name, float X, float Y, bool useInstance, Main.ShouldPlayDelegate shouldPlayDel)
Note: The method PlaySound returns a SoundEffectInstance, but as of yet I still haven't had to use it so most likely neither do you :guidegrin:
So in practice the the code for playing a sound looks something like this:
Code:
Main.PlaySound(effectNumber, (int)p.position.X, (int)p.position.Y, styleNumber);
Dust type 34 is bubbles and is only activated underwater
upload_2016-4-10_15-50-6.png
 
UQt9XHz.png
Dust & Sound 2
ALotPKO.png


vO8siC4.png

(!) and (.) indicate dusts that emit light and dusts that just glow, respectively

-1: (!)grey rectangles, no light !WARNING: Unused graphic
0: brown dirt
1: grey stone
2: thick green grass
3: thin green leaves
4: grey slime
5: red blood
6: (!)orange fire, emits orange light !WARNING: Ignores Y velocity
7: brown wood
8: iron
9: copper
10: gold
11: silver/platinum
12: red crystal heart
13: glass cyan
14: purple corruption particle (no grav)
15: (!)white amd blue magic fx (no grav), emits pale blue light
16: bluish white clouds like hermes boots (no grav)
17: thin grey mushroom material
18: thin grey green stucco
19: thin yellow gold
20: (!)white lingering (no grav), emits cyan light
21: (!)purple lingering (no grav), emits purple light
22: brown clay
23: orange piggybank
24: thin brown material
25: copper
26: iron
27: (!)purple fx (no grav), emits bright purple light
28: dull copper
29: (!)dark blue, emits pale pink light !WARNING: Ignores Y velocity
30: silver material
31: yellowish white cloud material (no grav)
32: yellow sand (no grav)
33: blue water, highly transparent

35: (!)red fx, emits red light !WARNING: Ignores Y velocity, behaves unexpectedly with gravity enabled
36: muddy pale brown material
37: dark grey material
38: muddy brown material
39: bright green jungle grass
40: bright green thin grass
41: (!)dark blue wandering circles (no grav), emits bright cyan light !WARNING: Ignores all velocity
42: thin teal material

44: (!)bright green spores that lingers for a while (no grav), emits light green light
45: (!)light blue circles (no grav), emits purple light
46: green material (no grav)
47: thin cyan hallow grass
48: cobalt
49: mithril
50: adamantite
51: snow
52: pink water, highly transparent
53: grey material
54: black material
55: (!)bright orange thick fx (no grav), emits yellow light
56: (!)cyan fx (no grav), emits pale blue light
57: (!)small yellow hallowed fx (no grav), emis yellow light
58: (!)hot and pale pink magic fx (no grav), emits pink light
59: (!)blue torch, emits pure blue light !WARNING: Ignores Y velocity
60: (!)red torch, emits pure red light !WARNING: Ignores Y velocity
61: (!)green torch, emits pure green light !WARNING: Ignores Y velocity
62: (!)purple torch, emits purple light !WARNING: Ignores Y velocity
63: (!)white torch, emits bright white light !WARNING: Ignores Y velocity
64: (!)yellow torch, emits deep yellow light !WARNING: Ignores Y velocity
65: (!)demon torch, emits pulsating pink/purple light !WARNING: Ignores Y velocity
66: (!)White transparent (no grav) !WARNING: Possibly undesirable behaviour when gravity is enabled
67: (!)cyan ice crystals, emits cyan light
68: (.)dark cyan ice crystals, emits very faint blue light, glows in disabled gravity
69: thin pink material
70: (.)thin transparent purple material, emits faint purple light, glows in disabled gravity
71: (!)transparent pink fx (no grav), emits faint pink light
72: (!)solid pink fx (no grav), emits faint pink light
73: (!)solid bright pink fx (no grav), emits pink light
74: (!)solid bright green fx (no grav), emits green light
75: (!)green cursed torch !WARNING: Ignores Y velocity
76: snowfall (no grav), lasts a long time
77: grey ebonwood
78: brown rich mahogany, pearlwood
79: thin yellow material
80: blue ice block material
81: tin
82: lead
83: tungsten
84: platinum
85: thin sandy yellow materiial
86: (!)transparent pink material, emits pink light
87: (!)transparent yellow material, emits yellow light
88: (.)transparent blue material, glows in the dark
89: (!)transparent green material, emits green light
90: (!)transparent red material, emits red light
91: (!)transparent white material, emits white light
92: (!)transparent cyan material, emits cyan light
93: thin green moss
94: thin yellow moss
95: thin red moss
96: thin blue moss
97: thin purple moss
98: purple water, highly transparent
99: cyan water, highly transparent
100: pink water, highly transparent
101: cyan water, highly transparent
102: orange water, highly transparent
103: dark blue water, highly transparent
104: hot pink water, highly transparent
105: red water, highly transparent
106: (.)transparent red/green/blue material, glows in the dark
107: (!)short green powder (no grav), emits green light
108: light pale purple round material
109: black material
110: (.)bright green bubbles (no grav), emits very faint green light
111: (.)bright cyan bubbles (no grav), emits very faint cyan light
112: (.)bright pink bubbles (no grav), emits very faint pink light
113: (.)blue ice crystals (no grav), glows in the dark
114: (.)bright pink/yellow bubbles (no grav), emits very faint pink light
115: red circles
116: blueish green circles
117: crimtane brick
118: purple ice
119: pink ice
120: red ice
121: thin grey material
122: thin iron material
123: hot pink bubble material
124: yellowish white bubbles
125: red crimson plants
126: thin grey shadewood
127: (!)reddish orange fire, emits orange light
128: green chlorophyte
129: thin brown rope
130: (!)trailing red falling fireworks, emits red light
131: (!)trailing green rising fireworks (no grav), emits green light
132: (!)trailing cyan falling fireworks, emits cyan light
133: (!)trailing yellow falling fireworks, emits cyan light
134: trailing pink falling fireworks
135: (!)cyan ice torch, emits cyan light !WARNING: Ignores Y velocity
136: red material
137: bright blue/cyan material
138: bright orange/brown material
139: cyan lingering confetti
140: green lingering confetti
141: pink lingering confetti
142: yellow lingering confetti
143: light grey stone
144: palladium
145: orichalcum
146: titanium
147: orange hive
148: red lihzahrd blocks
149: white slush
150: black/yellow/bluishwhite material
151: thin white material
152: bright orange bubbles !WARNING: Doesn't appear in gravity
153: bright orange honey
154: pale blue thin material
155: thin dark brown material
156: (.)bright blue/white bubble material, emits pale blue light
157: (.)thin green fx, glows in the dark
158: (!)orange fire, emits red light !WARNING: Ignores Y velocity
159: (!)wandering yellow fx (no grav), emits yellow light !WARNING: Possibly undesirable behaviour when gravity is disabled
160: (!)shortlived cyan fx (no grav), emits bright cyan light
161: cyan material
162: (!)shortlived orange fx (no grav), emits bright orange light
163: (.)bright green thin material, glows in the dark
164: (!)wandering pink fx (no grav), emits hot pink light !WARNING: Possibly undesirable behaviour when gravity is disabled
165: white/blue bubble material
166: thin bright pink material
167: thin green material
168: !wandering bright pink bubbles (no grav) !WARNING: Possibly undesirable behaviour when gravity is enabled
169: (!)yellow fx, emits deep yellow light !WARNING: Ignores Y velocity
170: (.)thin orange fx, emits faint white light
171: bright purple bubble material
172: (.)light blue particles, emits faint blue light
173: (!)shortlived purple fx (no grav), emits bright purple light
174: (!)bright orange bubble material, emits reddish orange light
175: (.)shortlived white fx (no grav), glows in the dark
176: light blue particles
177: light pink particles
178: light green particles
179: light purple particles
180: (.)light cyan particles, glows in the dark
181: (.)light cyan/pink bubble material, glows in the dark
182: (.)light red bubble material, barely emits red light
183: (.)transparent red bubble material, glows in the dark
184: sickly pale greenish grey particles that stay in place (no grav)
185: (!)light cyan crystal material, emits cyan light
186: pale dark blue smoke
187: (!)light cyan particles, emits cyan light
188: bright green bubbles (no grav)
189: thin orange pumpkin
190: thin yellow hay
191: black spooky wood
192: snow material
193: green material
194: thin brown material
195: thin black material
196: thin green material
197: (.)thin bright cyan material, glows in the dark
198: black/white particles
199: pale purple/black/grey particles
200: pink particles
201: light pink particles
202: light cyan particles
203: grey particles
204: (.)white particles (no grav), glows in the dark
205: (.)thin pink material, barely emits pink light
206: (!)shortlived cyan fx (no grav), barely emits blue light
207: thin brown dynasty wood
208: red shingles
209: blue shingles
210: off white material
211: bright blue particles
212: white particles
213: (.)shortlived tiny white fx, barely emits white light
214: thin pale brown material
215: thin brown palm wood
216: pale pink material
217: cyan particles
218: hot pink particles (no grav)
219: (!)trailing red flying fireworks, emits orange light
220: (!)trailing green flying fireworks, emits green light
221: (!)trailing blue flying fireworks, emits pale blue light
222: (!)trailing yellow flying fireworks, emits yellow light
223: (.)trailing red flying fireworks, glows in the dark
224: thin blue material
225: orange coralstone
226: (!)trailing cyan electricity, emits cyan light
227: thin solid purple material
228: (!)yellow fire, emits yellow light !WARNING: Ignores Y velocity
229: (!)thin solid cyan material (no grav), emits cyan light
230: (!)cyan cross fx, emits light that scales size with intensity !WARNING: Possibly undesirable behaviour with gravity enabled
231: (!)orange lingering particles (no grav), emits orange light
232: yellow stone
233: yellow material
234: (!)cyan and pink fx, emits pink light
235: (.)pure red fx, glows in the dark
236: white marble
237: thin orange material
238: off white-green material
239: thin pale purple silk rope
240: granite material
241: grey yellow material
242: (!)pink lingering nebula, emits deep pink light
243: pink slime
244: (!)orange fx (no grav), emits red light
245: (!)yellow fx (no grav), emits pale greenish yellow light
246: (!)yellow fx (no grav), emits orange light
247: (!)yellow fx (no grav), emits white light
248: pink debris
249: purple debris
250: thin pale orange material
251: thin strong red material
252: thin blue material
253: blue material
254: (.)bright pink bubbles, emits very faint pink light
255: (.) bright pink fx, glows in the dark
256: green jungle grass like material
257: bright white and blue bubbles
258: (.)deep red lava moss fx (no grav), glows in the dark
259: (.)bright orange circles, glows in the dark
260: (.)shortlived tiny red fx, barely emits white light
261: (.)white fx, emits faint greenish white light
262: (!)bright orange circles, emits orange light
263: (.)half transparent white fx, glows in the dark
264: (.)semi transparent white fx, glows in the dark
265: green/brown material
266: red water, highly transparent
Sounds in Terraria have a sound effect number and sometimes also a style type, such as sounds in SE number 2.

0: tile hit
1: male hit
2:
2 : 1: generic swing
2 : 2: crunchy eating
2 : 3: swallow drink
2 : 4: life crystal ping
2 : 5: bow shot
2 : 6: magic mirror whizz
2 : 7: low, quiet swing
2 : 8: magic cast
2 : 9: astral magic noise
2 : 10: bullet impact/harpoon
2 : 11: basic gun shot
2 : 12: laser beam
2 : 13: magic spray
2 : 14: explosion
2 : 15: phaseblade
2 : 16: whoopie cushion
2 : 17: dart shot
2 : 18: generic lower swing
2 : 19: throwing swing
2 : 20: fire cast
2 : 21: water cast
2 : 22: motor tool loop
2 : 23: motor tool activation
2 : 24: spectre boots
2 : 25: fairy bell
2 : 26: harp note
2 : 27: crystal smash
2 : 28: rising magic cast
2 : 29: mana crystal
2 : 30: ice materialise
2 : 31: clockwork burst shot
2 : 32: wing flap
2 : 33: boss laser beam
2 : 34: flamethrower
2 : 35: bell ding
2 : 36: pump shotgun
2 : 37: anvil clang
2 : 38: heavy shot
2 : 39: multi throw swing
2 : 40: sniper shot
2 : 41: revolver shot
2 : 42: flaming wood
2 : 43: staff magic cast
2 : 44: summon minion
2 : 45: inferno fork
2 : 46: summon hydra
2 : 47: the axe
2 : 48: mine snow/slush
2 : 49: mine snow/slush 2
2 : 50: mine ice
2 : 51: snowball impact
2 : 52: minecart track place
2 : 53: minecart land on track
2 : 54: bubble pop
2 : 55: minecart brake
2 : 56: minecart track bumper
2 : 57: cat meow
2 : 58: cat howl
2 : 59: pig chest
2 : 60: terra beam
2 : 61: grenade launcher
2 : 62: grenade explosion
2 : 63: blowpipe
2 : 64: blowgun
2 : 65: blow weapon?
2 : 66: nimbus rod
2 : 67: rainbow gun
2 : 68: rainbow gun alt?
2 : 69: staff of earth
2 : 70: staff of earth alt?
2 : 71: death sickle
2 : 72: shadowbeam staff
2 : 73: inferno fork
2 : 74: inferno explosion
2 : 75: pulse bow
2 : 76: summon hornet
2 : 77: summon imp
2 : 78: summon portal/crystal
2 : 79: spawn rabbit mount
2 : 80: spawn pigron mount
2 : 81: spawn slime mount
2 : 82: summon twin eyes
2 : 83: summon spider
2 : 84: razorblade typhoon
2 : 85: bubble gun
2 : 86: bubbles?
2 : 87: bubbles 2?
2 : 88: meteor staff
2 : 89: metoer crash
2 : 90: spawn scutlix mount
2 : 91: scutlix laser
2 : 92: electrosphere launch
2 : 93: electric zap
2 : 94: electrosphere stop
2 : 95: xenopopper
2 : 96: xenopopper burst
2 : 97: the bee's knees
2 : 98: dart pistol
2 : 99: dart rifle
2 : 100: cursed firewall
2 : 101: crystal vilethorn
2 : 102: shadowflame bow
2 : 103: shadowflame hex
2 : 104: shadowflame sound?
2 : 105: starfury
2 : 106: throwing flask
2 : 107: flask shatter
2 : 108: nailgun
2 : 109: crystal serpent fire
2 : 110: crystal serpent split
2 : 111: toxikcarp bubble
2 : 112: bubble noise?
2 : 113: summon deadly sphere
2 : 114: open blue portal (high)
2 : 115: open orange portal (low)
2 : 116: solar eruption swing
2 : 117: conjure arcanum
2 : 118: crystal serpent pop
2 : 119: phantasm dragon roar
2 : 120: ice mist
2 : 121: cultist lightning orb
2 : 122: lightning strike
2 : 123: cultist chant
2 : 124: phantasmal bolt fire
2 : 125: phantasmal bolt fire 2
3:
3 : 1:guideeek:rganic
3 : 2:bone
3 : 3:magic intercept
3 : 4:metal
3 : 5:guidetongue:ixie/ice
3 : 6:beast
3 : 7:wood, rock, wyvern
3 : 8:wall of flesh
3 : 9:leech
3 : 10:guideeek:ld unicorn
3 : 11:snow
3 : 12:horses
3 : 13:squishy crimson
3 : 14: fishron squeal
3 : 15: target dummy
3 : 16: target dummy 2
3 : 17: target dummy 3
3 : 18: blood zombie
3 : 19: drippler/dutchman/crawltipede
3 : 20: blood crawler
3 : 21: demon
3 : 22: derpling
3 : 23: flying snake
3 : 24: tortoise
3 : 25: jellyfish
3 : 26: lihzahrd
3 : 27: pigron
3 : 28: vulture
3 : 29: spider
3 : 30: nimbus
3 : 31: antlion, charger
3 : 32: antlion swarmer
3 : 33: crawdad
3 : 34: deadly sphere
3 : 35: dr. man fly
3 : 36: dungeon spirit
3 : 37: desert ghoul
3 : 38: giant shelly
3 : 39: gigazapper
3 : 40: goblin summoner
3 : 41: granite golem
3 : 42: martian drone
3 : 43: martians
3 : 44: mothron
3 : 45: mushi ladybug
3 : 46: parrot
3 : 47: the possessed
3 : 48: psycho
3 : 49: reaper
3 : 50: salamander
3 : 51: scutlix
3 : 52: shadowflame apparition
3 : 53: tesla turret
3 : 54: wraith
3 : 55: cultist
3 : 56: phantasm dragon
3 : 57: moonlord grunt
4:
4 : 1: slime
4 : 2: undead
4 : 3: magic destroy
4 : 4: bat/mouse
4 : 5: large foe
4 : 6: etheral gasp
4 : 7: hallow creature
4 : 8: beast grunt
4 : 9: spit
4 : 10: wall of flesh scream
4 : 11: the hungry split
4 : 12: the hungry destroy
4 : 13: wall of flesh belch
4 : 14: mechanical explosion
4 : 15: snow
4 : 16: insect
4 : 17: pigron
4 : 18: unicorn
4 : 19: squishy crimson
4 : 20: fishron scream
4 : 21: blood zombie
4 : 22: drippler/dutchman/crawltipede
4 : 23: blood crawler
4 : 24: demon
4 : 25: derpling
4 : 26: flying snake
4 : 27: tortoise
4 : 28: jellyfish
4 : 29: lihzahrd
4 : 30: pigron
4 : 31: spider
4 : 32: bug squash?
4 : 33: nimbus
4 : 34: antlion, charger
4 : 35: antlion swarmer
4 : 36: crawdad
4 : 37: deadly sphere
4 : 38: dr. man fly
4 : 39: dungeon spirit
4 : 40: desert ghoul
4 : 41: giant shelly
4 : 42: goblin summoner
4 : 43: heavy impact?
4 : 44: martian drone
4 : 45: martians
4 : 46: mothron
4 : 47: mushi ladybug
4 : 48: parrot
4 : 49: the possessed
4 : 50: psycho
4 : 51: reaper
4 : 52: wraith
4 : 53: saladmander
4 : 54: scutlix
4 : 55: shadowflame apparition
4 : 56: tesla turret
4 : 57: gigazapper
4 : 58: solar tower
4 : 59: cultist
4 : 60: phantasm dragon
4 : 61: moonlord final death and explosion
4 : 62: moonlord defeat
5: player death
6: grass/web cut
7: pickup noise
8: open door
9: close door
10: open menu
11: close menu
12: scroll/chat tick noise
13: pot breaking
14: zombie growl
15:
15 : 0: boss summon laughter
15 : 1: worm dig noise
15 : 2: scream
16: double jump
17: running
18: pay money
19:
19 : 0:large splash for npcs
19 : 1:small splash for items
20: female hit
21: stone tile hit
22: hotbar lock/unlock
23: drown
24: open npc chat window
25: mana full charge
26: low monster groan
27: pixie shimmer
28: wire mechanisms toggle noise
29:
29 : 1: undead moan
29 : 2: undead rawr
29 : 3: undead gurgle
29 : 4: beast low gurgle
29 : 5: beast low gurgle2
29 : 6: beasy medium noise
29 : 7: high gasp
29 : 8: low gasp
29 : 9: beast belch
29 : 10: duck quak
29 : 11: duck quack
29 : 12: 'quack'
29 : 13: frog ribbit
29 : 14: bird tweet
29 : 15: mouse squeak
29 : 16: bluejay tweet
29 : 17: cardinal tweet long
29 : 18: bird tweet slow
29 : 19: cardinal tweet
29 : 20: fishron bubbles belch
29 : 21: blood zombie moan
29 : 22: blood zombie rawr
29 : 23: blood zombie gurgle
29 : 24: blood crawler chitter
29 : 25: blood crwaler chatter
29 : 26: demon growl
29 : 27: demon growl 2
29 : 28: demon growl 3
29 : 29: demon growl 4
29 : 30: leech cry
29 : 31: leech groan
29 : 32: snake hiss
29 : 33: giant toirtoise
29 : 34: jellyfish propel
29 : 35: jellyfish swim
29 : 36: lihzahrd rawr
29 : 37: lihzahrd ohno
29 : 38: pigron cry
29 : 39: pigron moan
29 : 40: pigron groan
29 : 41: nimbus growl
29 : 42: nimbus draw
29 : 43: nimbus breath
29 : 44: antlions chitter
29 : 45: antlion swarmer flicker
29 : 46: antlion swarmer buzz
29 : 47: crawdad chitter
29 : 48: deadly sphere whizz
29 : 49: deadly sphere whirr
29 : 50: dr. man fly buzzy
29 : 51: dr. man fly buzz
29 : 52: dr. man fly loud
29 : 53: spirit ah
29 : 54: spirit yeah
29 : 55: ghoul stutter
29 : 56: ghoul mutter
29 : 57: shelly whirr
29 : 58: shelly burr
29 : 59: gigazapper yayay
29 : 60: gigazapper ayayay
29 : 61: goblin summoner chant
29 : 62: goblin summoner rant
29 : 63: granite golem grumble
29 : 64: granite golem cough
29 : 65: granite golem belch
29 : 66: martian drone fly
29 : 67: martian drone beeps
29 : 68: martian drone boost
29 : 69: martian walker attention
29 : 70: martian walker beep
29 : 71: martian walker boop
29 : 72: martian walker bop
29 : 73: mothron sing
29 : 74: mushi ladybug chit
29 : 75: mushi ladybug chat
29 : 76: mushi ladybug chitter
29 : 77: mushi ladybug click
29 : 78: parrot call
29 : 79: the possessed laugh
29 : 80: the possessed sputter
29 : 81: reaper gasp
29 : 82: reaper sigh
29 : 83: reaper wheeze
29 : 84: salamander gurgle
29 : 85: salamander babble
29 : 86: scutlix bzzt
29 : 87: scutlix growl
29 : 88: cultist mumble
29 : 89: cultist mantra
29 : 90: cultist chant
29 : 91: cultist evoke
29 : 92: phantasm dragon roar
29 : 93: moonlord exhale
29 : 94: moonlord moan
29 : 95: moonlord grpan
29 : 96: moonlord wheeze
29 : 97: moonlord breath
29 : 98: moonlord growl
29 : 99: moonlord inhale
29 : 100: true eye cry
29 : 101: true eye whirr
29 : 102: true eye scream
29 : 103: phantasmal eye launch
29 : 104: phantasmal deathray
29 : 105: cultist laugh
30: duck
31: frog
32: npc idle far noises - see 29
33: mouse squeaks
34: [VOL]running water
35: [VOL]running lava
36: copy of 15?
37: [VOL]meowmere explosion
38: coin pickup
39:
39 : 0: medium drip
39 : 1: light drip
39 : 2: heavy drip
40: camera screenshot
41: boss death

Some of you may remember the super useful Dust and Sound Catalog Mod by Romulan Paladin as well as my tAPI followup, back in the tConfig/tAPI days, and if you've visited those links you'll notice that I'm just copy-pasting at this point - but that's not what you're here for anyway! So this is the same mod, for tModLoader which has yet more interesting dust types, such as multi-coloured dusts! Additionally there are a waaaaaaaaaaaaaay more sounds that took some extra code digging to find their usage (and even then I still couldn't find them all), and they are also available in catalogue form. See book tooltips for details.

Download Here or through the mod browser (maybe).
Reminder: You don't need this mod to use any of the dusts and sounds, it only shows you what's already in the game. But you knew that already, didn't you.

For dusts, once you have the type, you need to spawn the particles in code using:
Code:
Dust.NewDust(Vector2 Position, int Width, int Height, int Type, float SpeedX = 0f, float SpeedY = 0f, int Alpha = 0, Color newColor = default(Color), float Scale = 1f)

//or one of the various alternatives, whichever is more appropriate, found in Dust.cs
Dust.NewDust(Vector2 Position, Vector2 Size, int Type, Vector2 Velocity = default(Vector2), int Alpha = 0, Color newColor = default(Color), float Scale = 1f)
Dust.NewDust(Rectangle rect, int Type, Vector2 Velocity = default(Vector2), int Alpha = 0, Color newColor = default(Color), float Scale = 1f)
The NewDust method returns the index value of the dust you just created, which you can reference using Main.dust[indexNumber]. In code it would look something like this:
Code:
//say you wanted to add particles that stay mostly still to leave a trail behind a projectile
int num1 = Dust.NewDust(
         projectile.position,
         projectile.width,
         projectile.height,
         6, //lazy number 6 for fire particles
         projectile.velocity.X,
         projectile.velocity.Y,
         100f, //alpha goes from 0 to 255
         default(Color),
         1f
         );

Main.dust[num1].noGravity = true;
Main.dust[num1].velocity *= 0.1f;
For sounds, once you have the type, you can put it in the .json under "useSound": insertItemSoundidHere, which only uses sounds from sound effect 2 (and its styles). Alternatively, if you want it in code you use:
Code:
PlaySound(int type, int x = -1, int y = -1, int Style = 1)

//but if you really need to, there are other method signatures that do various things, found in Main.cs
PlaySound(SoundEffect effect, float X = -1f, float Y = -1f, bool useInstance = false, Main.ShouldPlayDelegate shouldPlayDel = null, float panMod = float.NaN, float volumeMod = float.NaN, float pitchMod = float.NaN)
PlaySound(SoundEffect effect, float X, float Y, bool useInstance, float panMod, float volumeMod, float pitchMod)
PlaySound(SoundEffect effect, float X, float Y, bool useInstance, Main.ShouldPlayDelegate shouldPlayDel)
PlaySound(string name, float X = -1f, float Y = -1f, bool useInstance = false, Main.ShouldPlayDelegate shouldPlayDel = null, float panMod = float.NaN, float volumeMod = float.NaN, float pitchMod = float.NaN)
PlaySound(string name, float X, float Y, bool useInstance, float panMod, float volumeMod, float pitchMod)
PlaySound(string name, float X, float Y, bool useInstance, Main.ShouldPlayDelegate shouldPlayDel)
Note: The method PlaySound returns a SoundEffectInstance, but as of yet I still haven't had to use it so most likely neither do you :guidegrin:
So in practice the the code for playing a sound looks something like this:
Code:
Main.PlaySound(effectNumber, (int)p.position.X, (int)p.position.Y, styleNumber);
Neat, glad there is a new version!
 
My dream has come true..
I can finally spam the 4 : 59 (4 : 62) sound with my friends around.
To be a bit more serious, I played around with this a while ago, when tApi was still being updated.
I'm glad it's back :guidesmile:
 
How do I use a custom sound effect?

First number is sound group (see v2 for which variable this is used with), in this case the soundHit property, and the second number is that particular sound effect (which is a metallic clink).
For sounds, once you have the type, you can put it in the .json under "useSound": insertItemSoundidHere, which only uses sounds from sound effect 2 (and its styles). Alternatively, if you want it in code you use:
Code:
PlaySound(int type, int x = -1, int y = -1, int Style = 1)

//but if you really need to, there are other method signatures that do various things, found in Main.cs
PlaySound(SoundEffect effect, float X = -1f, float Y = -1f, bool useInstance = false, Main.ShouldPlayDelegate shouldPlayDel = null, float panMod = float.NaN, float volumeMod = float.NaN, float pitchMod = float.NaN)
PlaySound(SoundEffect effect, float X, float Y, bool useInstance, float panMod, float volumeMod, float pitchMod)
PlaySound(SoundEffect effect, float X, float Y, bool useInstance, Main.ShouldPlayDelegate shouldPlayDel)
PlaySound(string name, float X = -1f, float Y = -1f, bool useInstance = false, Main.ShouldPlayDelegate shouldPlayDel = null, float panMod = float.NaN, float volumeMod = float.NaN, float pitchMod = float.NaN)
PlaySound(string name, float X, float Y, bool useInstance, float panMod, float volumeMod, float pitchMod)
PlaySound(string name, float X, float Y, bool useInstance, Main.ShouldPlayDelegate shouldPlayDel)
Note: The method PlaySound returns a SoundEffectInstance, but as of yet I still haven't had to use it so most likely neither do you :guidegrin:
So in practice the the code for playing a sound looks something like this:
Code:
Main.PlaySound(effectNumber, (int)p.position.X, (int)p.position.Y, styleNumber);

So for example, you would use:
PlaySound(3, (int)position.X, (int)position.Y, 4)
 
Custom sound, not vanilla sound. I already figured it out anyways: Main.PlaySound(SoundLoader.customSoundType, (int)position.X, (int)position.Y, mod.GetSoundSlot(SoundType.Custom, "Sounds/Custom/[INSERTSOUNDEFFECTHERE]"));
 
Updated to tModLoader 0.9.1, basically a couple of new dusts and 232 sounds introduced in the update. All new sounds are under effect number 42 (Trackables), and if someone has that link to how to use SoundIDs that'd be great to paste here for posterity.
YUSSSSSSSSSSSSS
 
Updated to tModLoader 0.9.1, basically a couple of new dusts and 232 sounds introduced in the update. All new sounds are under effect number 42 (Trackables), and if someone has that link to how to use SoundIDs that'd be great to paste here for posterity.
Bless you. I've been waiting for this for months.
 
Do you plan on updating this to the new tModloader version?
Your mod is a great help for other modders and if you'd bring it to v0.10, that'd be awesome.
 
Back
Top Bottom