LordOfAles - Sounds CLOSED

Here i will list the apprentices and their learning tasks, so others also can follow how it goes.
Please DONT POST HERE any solutions on the given task earlier than the apprentice, you can ask questions from him tough.
Post Reply
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

LordOfAles - Sounds CLOSED

Post by Stratego (dev) »

In AOW there are no sounds implemented yet in json, so
task 1: put in this sound to json form:

the defaultSoundUh means "unit_selected_small4.ogg" file, and its weight is given by its number of occurence - never ask why was it :)


Code: Select all

	
int defaultSoundUh = SoundsDef.addSound("unit_selected_small4.ogg");

	SoundsDef.packs.append(SOUND_PACK_UNIT_SELECT_US_BLD, 
				new int[] { 
				defaultSoundUh,
				defaultSoundUh,
				defaultSoundUh,
				defaultSoundUh,
				defaultSoundUh,
				defaultSoundUh,
				defaultSoundUh,
				defaultSoundUh,
				defaultSoundUh,
				defaultSoundUh,
				defaultSoundUh,
				defaultSoundUh,
				defaultSoundUh,
				defaultSoundUh,
				defaultSoundUh,
				defaultSoundUh,
				defaultSoundUh,
				defaultSoundUh,
				defaultSoundUh,
				defaultSoundUh,
				defaultSoundUh,
				SoundsDef.addSound("unit_selected_us_yes.ogg"),
				SoundsDef.addSound("unit_selected_us_yes_sir.ogg"),
				SoundsDef.addSound("unit_selected_us_your_orders.ogg"),				
				}

			);

		SoundsDef.packs.append(SOUND_PACK_UNIT_SELECT_GER_BLD, 
				new int[] { 
				defaultSoundUh,
				defaultSoundUh,
				defaultSoundUh,
				defaultSoundUh,
				defaultSoundUh,
				defaultSoundUh,
				defaultSoundUh,
				defaultSoundUh,
				defaultSoundUh,
				defaultSoundUh,
				defaultSoundUh,
				defaultSoundUh,
				defaultSoundUh,
				defaultSoundUh,
				defaultSoundUh,
				defaultSoundUh, 
				defaultSoundUh,
				defaultSoundUh,
				defaultSoundUh,
				defaultSoundUh,
				defaultSoundUh,
				SoundsDef.addSound("unit_selected_us_yes.ogg"),
				SoundsDef.addSound("unit_selected_us_yes_sir.ogg"),
				SoundsDef.addSound("unit_selected_us_your_orders.ogg"),				
				}

			);


		// -----------------------
		// UNIT DAMAGE
		// -----------------------
		
		
		SoundsDef.packs.append(SOUND_PACK_UNIT_DAMAGE_TANK, 
				new int[] { 
				SoundsDef.addSound("unit_damage_tank.ogg"),
				}
		); 
		SoundsDef.packs.append(SOUND_PACK_UNIT_DAMAGE_VEHICLE, 
				new int[] { 
				SoundsDef.addSound("unit_damage_tank.ogg"),
				}
		); 
		SoundsDef.packs.append(SOUND_PACK_UNIT_DAMAGE_SHIP, 
				new int[] { 
				SoundsDef.addSound("unit_damage_tank.ogg"),
				}
		); 
		SoundsDef.packs.append(SOUND_PACK_UNIT_DAMAGE_PLANE, 
				new int[] { 
				SoundsDef.addSound("unit_damage_tank.ogg"),
				}
		); 
		SoundsDef.packs.append(SOUND_PACK_UNIT_DAMAGE_INF, 
				new int[] { 
				SoundsDef.addSound("unit_damage_tank.ogg"),
				} 
		); 
		SoundsDef.packs.append(SOUND_PACK_UNIT_DAMAGE_FIXED, 
				new int[] { 
				SoundsDef.addSound("unit_damage_tank.ogg"),
				}
		);  
		SoundsDef.packs.append(SOUND_PACK_UNIT_DAMAGE_BLD, 
				new int[] { 
				SoundsDef.addSound("unit_damage_tank.ogg"),
				}
		); 
		
		// -----------------------
		// UNIT MEND/HEAL etc. SOUNDS
		// -----------------------
		
		SoundsDef.packs.append(SOUND_PACK_UNIT_HEAL, 
				new int[] {
				SoundsDef.addSound("unit_action_heal.ogg"),
				}
		);

		SoundsDef.packs.append(SOUND_PACK_UNIT_CONVERT, 
				new int[] {
				SoundsDef.addSound("unit_action_convert.ogg"),
				}
		);
		
		SoundsDef.packs.append(SOUND_PACK_UNIT_MEND_BUILD, 
				new int[] {
				SoundsDef.addSound("unit_action_mend_build.ogg"),
				}
		);

		SoundsDef.packs.append(SOUND_PACK_UNIT_MEND_BUILD, 
				new int[] {
				SoundsDef.addSound("unit_action_mend_build.ogg"),
				}
		);


User avatar
LordOfAles
Posts: 3694
Joined: Tue Jul 18, 2017 12:27 pm
Location: Balkans, Montenegro

Re: LordOfAles - Sounds

Post by LordOfAles »

Is this the right format?
Attachments
soundz.json
(3.58 KiB) Downloaded 114 times
I am, indeed, a big Witch King and Middle Earth fan if you didn't notice.
User avatar
LordOfAles
Posts: 3694
Joined: Tue Jul 18, 2017 12:27 pm
Location: Balkans, Montenegro

Re: LordOfAles - Sounds

Post by LordOfAles »

Also: this is basically a sound storage?
I am, indeed, a big Witch King and Middle Earth fan if you didn't notice.
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

Re: LordOfAles - Sounds

Post by Stratego (dev) »

LordOfAles wrote:Is this the right format?

hmmm, no :)

you simply renamed a "unit" json :)

read the "sounds.json" format in FAQ and make this sample in first post into that form.
Post Reply

Return to “Under the Hood studies”