Page 1 of 1

Sunrise Samurai - sounds PASSED

Posted: Sat Sep 23, 2017 6:55 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");

SoundsDef.packs.append(SOUND_PACK_UNIT_SELECT_RU_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_JP_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 AFFIRM SOUNDS
		// -----------------------
		SoundsDef.packs.append(SOUND_PACK_UNIT_MOVE_TANK, 
				new int[] { 
				SoundsDef.addSound("unit_move_tank.ogg"),
				}
		);
		SoundsDef.packs.append(SOUND_PACK_UNIT_MOVE_VEHICLE, 
				new int[] { 
				SoundsDef.addSound("unit_move_tank.ogg"),
				}
		);
		SoundsDef.packs.append(SOUND_PACK_UNIT_MOVE_SHIP, 
				new int[] { 
				SoundsDef.addSound("unit_move_tank.ogg"),
				}
		);
		SoundsDef.packs.append(SOUND_PACK_UNIT_MOVE_PLANE, 
				new int[] { 
				SoundsDef.addSound("unit_move_tank.ogg"),
				}
		); 
		SoundsDef.packs.append(SOUND_PACK_UNIT_MOVE_INF, 
				new int[] { 
				SoundsDef.addSound("unit_move_inf.ogg"),
				}
		);
		SoundsDef.packs.append(SOUND_PACK_UNIT_MOVE_FIXED, 
				new int[] { 
				SoundsDef.addSound("unit_move_tank.ogg"),
				}
		);

Re: Sunrise Samurai - sounds

Posted: Sat Sep 23, 2017 10:24 pm
by Sunrise Samurai
Going to have to examine a couple of the sound JSONs to make sense of this. It looks completely different from the unit JSONs. Doesn't help that I never played with the sound on, so I barely know what it's supposed to do :?

By the way, why is the weight given by it's number of occurrence? Had to ask, just because you said not to :P

Re: Sunrise Samurai - sounds

Posted: Sat Sep 23, 2017 10:25 pm
by Stratego (dev)
because it was a lame approach there, that is why i made a better in jsons. :)

Re: Sunrise Samurai - sounds

Posted: Tue Sep 26, 2017 2:23 am
by Sunrise Samurai
Nowhere near done, but am I at least on the right track? Also trying a different program to edit, and I want to be sure it's going to work before I go further with it.

Also, what weights should I give? I don't play with the sound on, except for very rare occasions, so I have no clue how frequent you want them.

Re: Sunrise Samurai - sounds

Posted: Tue Sep 26, 2017 4:20 am
by Stratego (dev)
we have to edit it manually so we might need easy reading textfiles, beutifiers will help but they do not know what is better in one line - if u find one that is configurable - please tell me


so a simple beautifier is the minimum to use like this(https://codebeautify.org/jsonviewer) :

Code: Select all


[
	{
		"packIDString": "SOUND_PACK_UNIT_SELECT_RU_BLD",
		"items": [
			{
				"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
			}
		]
	}
]
but the best is this (removing unnecessary line breaks and better look tru if it is like this):

Code: Select all

[{
	"packIDString": "SOUND_PACK_UNIT_SELECT_RU_BLD",
	"items": [
		{"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}
	]
}]

other tha that it seems ok!

Re: Sunrise Samurai - sounds

Posted: Tue Sep 26, 2017 10:07 am
by Sunrise Samurai
If you want to try it out, the app is called "json genie." It is editable, allowing you to edit everything, copy roots, properties, etc. to do similar items, easily locate things, etc. Only problem is it tries to organize alphabetically when you save if you don't uncheck the box. It also allows directly editing the text if preferred.

Re: Sunrise Samurai - sounds

Posted: Tue Sep 26, 2017 8:10 pm
by Stratego (dev)
will chk. thx

Re: Sunrise Samurai - sounds

Posted: Wed Sep 27, 2017 1:58 am
by Sunrise Samurai
Here it is. Not exactly indented like the rest, but it checks out as valid. That's the only problem making a json on this program. It flattens everything. If you need me to redo it for appearance sake I can.

Everything look good?

Re: Sunrise Samurai - sounds

Posted: Wed Sep 27, 2017 2:38 am
by Sunrise Samurai
Edit: nevermind. I figured out how to make it indent. Here's the indented copy. Easier to read by far.

Re: Sunrise Samurai - sounds

Posted: Wed Sep 27, 2017 4:40 am
by Stratego (dev)
yes, this is the drawback of using json editor (8 lines and weights can not be scanned tru easily):

Code: Select all

         {
            "fileName": "unit_selected_us_yes.ogg",
            "weight": 1
         },
         {
            "fileName": "unit_selected_us_yes_sir.ogg",
            "weight": 1
         },
instead of (2 lines):

Code: Select all

         {"fileName": "unit_selected_us_yes.ogg",       "weight": 1},
         {"fileName": "unit_selected_us_yes_sir.ogg",   "weight": 1},
if you can do it with the json genie than ok - tell me how :)
othervise please make them this form (one line is about one sound file) - much more easier to look tru.

Also:
- you have not set weight for the "unit_selected_small4.ogg", or you did not even put it in :)
- you made the buildings speak like "yes sir" :)

Re: Sunrise Samurai - sounds

Posted: Fri Oct 06, 2017 6:05 am
by Stratego (dev)
How is it going?

Re: Sunrise Samurai - sounds

Posted: Mon Oct 09, 2017 5:47 pm
by Stratego (dev)
Hi, are are you about finish this lecture?

Re: Sunrise Samurai - sounds

Posted: Tue Oct 10, 2017 8:28 pm
by Sunrise Samurai
Sorry, I honestly haven't done anything since my last post. Real life got in the way for a while. I'm getting back into it later today. See if a fresh perspective helps :D

Again, sorry to be away from it for so long. Though it looks like we all slowed down at the same time :lol:

Re: Sunrise Samurai - sounds

Posted: Tue Oct 10, 2017 8:40 pm
by Stratego (dev)
yes, no problem, i only ask to sign me if u see you will get away from the lectures for a while,
so i will not ask these questions and will not check those topics daily - that takes my time :)

Re: Sunrise Samurai - sounds

Posted: Wed Oct 11, 2017 12:49 am
by Sunrise Samurai
Okay, where should I put the small 4 sound? You didn't have it in a sound pack like the rest. And I must ask, what should the buildings say if not "yes sir" I wonder?

We all know buildings can talk. How else could we have an argument with a wall? :lol:

Re: Sunrise Samurai - sounds

Posted: Wed Oct 11, 2017 6:03 am
by Stratego (dev)
Sunrise Samurai wrote:Okay, where should I put the small 4 sound? You didn't have it in a sound pack like the rest. And I must ask, what should the buildings say if not "yes sir" I wonder?

We all know buildings can talk. How else could we have an argument with a wall? :lol:

where you see the "defaultSoundUh" that is that.

building: yes :) it is currently wrong now in my sample, simply put there the small4 for 100% probability.

Re: Sunrise Samurai - sounds

Posted: Wed Oct 11, 2017 11:35 am
by Sunrise Samurai
So everywhere you have default sound uh, put small 4? Should it be in so many times, or a high probability instead?

Re: Sunrise Samurai - sounds

Posted: Thu Oct 12, 2017 5:39 pm
by Stratego (dev)
it will be alone so it can be any probabaility, put there 100 for instance.

Re: Sunrise Samurai - sounds

Posted: Mon Oct 16, 2017 1:26 am
by Sunrise Samurai
I'm sorry. I'm having trouble getting back into this. Sooner or later I'll post on it, but I'll email you if I need a fast response.

Re: Sunrise Samurai - sounds

Posted: Sat Jan 27, 2018 12:27 pm
by Stratego (dev)
ok, but now i want to speed up aow, so i will do it then