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: 9929
Joined: Fri Apr 25, 2014 9:28 pm

LordOfAles - Sounds CLOSED

Post by Stratego (dev) » Wed Nov 15, 2017 5:43 am

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: 3659
Joined: Tue Jul 18, 2017 12:27 pm
Location: Montenegro

Re: LordOfAles - Sounds

Post by LordOfAles » Fri Nov 17, 2017 3:45 pm

Is this the right format?
Attachments
soundz.json
(3.58 KiB) Downloaded 59 times
The Crusade never ends...

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

Re: LordOfAles - Sounds

Post by LordOfAles » Fri Nov 17, 2017 3:46 pm

Also: this is basically a sound storage?
The Crusade never ends...

Stratego (dev)
Site Admin
Posts: 9929
Joined: Fri Apr 25, 2014 9:28 pm

Re: LordOfAles - Sounds

Post by Stratego (dev) » Fri Nov 17, 2017 9:22 pm

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”