Page 1 of 1

Samuel - sounds PASSED

Posted: Sat Sep 23, 2017 6:52 pm
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");
		
		// -----------------------
		// UNIT ATTACK SOUNDS
		// -----------------------
		
		SoundsDef.packs.append(SOUND_PACK_UNIT_ATTACK_TANK_SHOOT, 
				new int[] { 
				SoundsDef.addSound("unit_tank_shoot.ogg"),
				}
		);
		SoundsDef.packs.append(SOUND_PACK_UNIT_ATTACK_VEHICLE_SHOOT, 
				new int[] { 
				SoundsDef.addSound("unit_tank_shoot.ogg"),
				}
		);
		SoundsDef.packs.append(SOUND_PACK_UNIT_ATTACK_SHIP_SHOOT, 
				new int[] { 
				SoundsDef.addSound("unit_tank_shoot.ogg"),
				}
		);
		
		SoundsDef.packs.append(SOUND_PACK_UNIT_ATTACK_PLANE_SHOOT, 
				new int[] { 
				SoundsDef.addSound("unit_tank_shoot.ogg"),
				}
		);
		SoundsDef.packs.append(SOUND_PACK_UNIT_ATTACK_INF_SHOOT, 
				new int[] { 
				SoundsDef.addSound("unit_tank_shoot.ogg"),
				}
		);
		SoundsDef.packs.append(SOUND_PACK_UNIT_ATTACK_AA_SHOOT, 
				new int[] { 
				SoundsDef.addSound("unit_tank_shoot.ogg"),
				}
		);
		// -----------------------
		// UNIT SELECT SOUNDS
		// -----------------------
		SoundsDef.packs.append(SOUND_PACK_UNIT_SELECT_US, 
				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, 
				new int[] { 
				defaultSoundUh,
				defaultSoundUh,
				defaultSoundUh,
				defaultSoundUh,
				defaultSoundUh,
				defaultSoundUh,
				defaultSoundUh,
				SoundsDef.addSound("unit_selected_ger_raus_out.ogg"),
				}
		
		
		);
		SoundsDef.packs.append(SOUND_PACK_UNIT_SELECT_RU, 
				new int[] { 
				defaultSoundUh,
				defaultSoundUh,
				defaultSoundUh,
				defaultSoundUh,
				defaultSoundUh,
				defaultSoundUh,
				defaultSoundUh,	
				SoundsDef.addSound("unit_selected_rus.ogg"),
				}
		
		
		);
		SoundsDef.packs.append(SOUND_PACK_UNIT_SELECT_JP, 
				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"),				
				}
		
		
		);



Re: Samuel - sounds

Posted: Sat Sep 23, 2017 7:09 pm
by samuelch
Sounds.

Re: Samuel - sounds

Posted: Sat Sep 23, 2017 8:12 pm
by Stratego (dev)
seems good!

comment: the weights are everywhere 1, the weight needs to be increased if you want it to sound more frequently
(
sample:
soundA weight 80
soundB weight 20

means AoundA will have 80% to be heard, while B is only 20%

same result if you set this:
soundA weight 4
soundB weight 1

)

eg: on SOUND_PACK_UNIT_SELECT_US
the
- unit_selected_small4.ogg should be weight 21
- unit_selected_us_yes.ogg weight 1
- unit_selected_us_yes_sir.ogg weight 1
- unit_selected_us_your_orders.ogg weight 1

Re: Samuel - sounds

Posted: Sun Sep 24, 2017 9:08 am
by samuelch
Fix.

Re: Samuel - sounds

Posted: Sun Sep 24, 2017 1:27 pm
by Stratego (dev)
there were "comma" errors while compiling in, i have fixed them:

"packIDString": "SOUND_PACK_UNIT_SELECT_US",
"items": [
{"fileName": "unit_selected_small4.ogg", "weight": 21},
{"fileName": "unit_selected_us_yes.ogg", "weight": 1},
{"fileName": "unit_selected_us_yes_sir.ogg", "weight": 1},
{"fileName": "unit_selected_us_your_orders.ogg", "weight": 1} (HERE WERE a COMMA that is not needed)
]


and were some in similar places:
key point: that is a list, and tha last item has no commas in the end.

here is the fixed, check where the unwanted commas were - you will get same error when you design in UFO game and left there commas.
sounds.json
(1.8 KiB) Downloaded 51 times
other than this it was impeccable!
-----------
SECOND PASSED item!