Midonik - sounds PASSED

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

Midonik - sounds PASSED

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"),
				}
		);


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

Re: Midonik - sounds

Post by Stratego (dev) »

any proggress here?
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Midonik - sounds

Post by Stratego (dev) »

How is it going?
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Midonik - sounds

Post by Stratego (dev) »

Hi, are are you about finish this lecture?
Midonik
Posts: 5325
Joined: Mon Sep 05, 2016 5:27 pm
Location: Poland

Re: Midonik - sounds

Post by Midonik »

Ok,I started to make it (by editing Sunrise Samurai json,is it ok?),and I have a question: all units types should have the same sound file (unit_damage_tank.ogg) when damaged?
Support new AoS variant, Age of Galaxy: http://ageofstrategy.net/viewforum.php? ... 608408ebc8
All help will be welcome.
Midonik
Posts: 5325
Joined: Mon Sep 05, 2016 5:27 pm
Location: Poland

Re: Midonik - sounds

Post by Midonik »

Ok,I think its ready.
Attachments
sounds.json
(2.85 KiB) Downloaded 114 times
Support new AoS variant, Age of Galaxy: http://ageofstrategy.net/viewforum.php? ... 608408ebc8
All help will be welcome.
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Midonik - sounds

Post by Stratego (dev) »

"SOUND_PACK_UNIT_CONVERT"
is wrongly embedded into an other sound pack.

here is the current sound json, please add yours here similarily (sort of merging).
Attachments
sounds.json
(1.8 KiB) Downloaded 114 times
Midonik
Posts: 5325
Joined: Mon Sep 05, 2016 5:27 pm
Location: Poland

Re: Midonik - sounds

Post by Midonik »

Is it good?
Attachments
sounds.json
(4.78 KiB) Downloaded 122 times
Support new AoS variant, Age of Galaxy: http://ageofstrategy.net/viewforum.php? ... 608408ebc8
All help will be welcome.
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Midonik - sounds

Post by Stratego (dev) »

what editor are u using?
Midonik
Posts: 5325
Joined: Mon Sep 05, 2016 5:27 pm
Location: Poland

Re: Midonik - sounds

Post by Midonik »

JSON editor,its its name.
Support new AoS variant, Age of Galaxy: http://ageofstrategy.net/viewforum.php? ... 608408ebc8
All help will be welcome.
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Midonik - sounds

Post by Stratego (dev) »

could u please use a simple text editor? (that app ruins the nicely aligned, compact textfile that was well readable)
Midonik
Posts: 5325
Joined: Mon Sep 05, 2016 5:27 pm
Location: Poland

Re: Midonik - sounds

Post by Midonik »

But... it is simply text editor.
Support new AoS variant, Age of Galaxy: http://ageofstrategy.net/viewforum.php? ... 608408ebc8
All help will be welcome.
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Midonik - sounds

Post by Stratego (dev) »

are u using a pc? or phone?

for pc i use the free "TextPad"
Midonik
Posts: 5325
Joined: Mon Sep 05, 2016 5:27 pm
Location: Poland

Re: Midonik - sounds

Post by Midonik »

Phone.
Support new AoS variant, Age of Galaxy: http://ageofstrategy.net/viewforum.php? ... 608408ebc8
All help will be welcome.
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Midonik - sounds

Post by Stratego (dev) »

ok.
so you dont see that you change the total file by only loading and saving with that app? (it automatically "beautifies" it, that is unwanted - maybe can u turn beautifying off?)
Midonik
Posts: 5325
Joined: Mon Sep 05, 2016 5:27 pm
Location: Poland

Re: Midonik - sounds

Post by Midonik »

Hmm. Can you tell me what does it beatifying? Mayby I make this unintentionally. I were using it all the time.
Support new AoS variant, Age of Galaxy: http://ageofstrategy.net/viewforum.php? ... 608408ebc8
All help will be welcome.
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Midonik - sounds

Post by Stratego (dev) »

in your version
- the weights are not in same row with the soundfile
- also check the brackets they are all in separate row instead of being packed nicely.

check the file i attached comparing to yours
(remark: this does not effect the working of a json - these are only beauty things, json can work in any way even without line breaks)

here are samples:

Code: Select all

{
      "packIDString": "SOUND_PACK_UNIT_MOVE_FIXED",
      "items": [
         {
            "fileName": "unit_selected_unit_move_tank.ogg",
            "weight": 1
         }
      ]
   }

Code: Select all

{
	"packIDString": "SOUND_PACK_UNIT_ATTACK_VEHICLE_SHOOT",
	"items": [
		{"fileName": "unit_tank_shoot.ogg", 	"weight": 1}
	]		
}
Stratego (dev)
Site Admin
Posts: 15734
Joined: Fri Apr 25, 2014 9:28 pm

Re: Midonik - sounds

Post by Stratego (dev) »

i am doing it now as i have to compile aow with it
Post Reply

Return to “Under the Hood studies”