Page MenuHomeWildfire Games

Fix select, order, and trained sound groups
ClosedPublic

Authored by temple on Oct 1 2017, 3:55 AM.

Details

Summary

Sounds for select and order should have:

	<Distanceless>1</Distanceless>

And sounds for trained should have:

	<Omnipresent>1</Omnipresent>
	<HeardBy>owner</HeardBy>

For example, if you have a camel archer selected and tell it to move to another area, if the camel isn't on the screen you won't hear a sound, although you should.

In this patch I added files for select, order, and train where they were needed. If someone wants to reorganize everything later, that's fine (it's somewhat of a mess). I only changed one sound, which I'll explain below.

The voice and interface folders seemed to be correct. Here's my notes:

~/0ad/binaries/data/mods/public/simulation/templates$ grep "select" * -R | grep -v interface | grep -v voice

// Changed these ones to lion_death since it shouldn't use distanceless.
gaia/fauna_bear.xml:      <death>actor/fauna/animal/lion_select.xml</death>
gaia/fauna_crocodile.xml:      <death>actor/fauna/animal/lion_select.xml</death>
gaia/fauna_lioness.xml:      <death>actor/fauna/animal/lion_select.xml</death>
gaia/fauna_lion.xml:      <death>actor/fauna/animal/lion_select.xml</death>
gaia/fauna_rhino.xml:      <death>actor/fauna/animal/lion_select.xml</death>
gaia/fauna_tiger.xml:      <death>actor/fauna/animal/lion_select.xml</death>

// Added _select files for these if they were needed.
gaia/fauna_bear.xml:      <select>actor/fauna/animal/lion_select.xml</select>
gaia/fauna_camel.xml:      <select>actor/fauna/animal/camel.xml</select>
gaia/fauna_chicken.xml:      <select>actor/fauna/animal/chickens.xml</select>
gaia/fauna_crocodile.xml:      <select>actor/fauna/animal/lion_select.xml</select>
gaia/fauna_goat.xml:      <select>actor/fauna/animal/goat.xml</select>
gaia/fauna_horse.xml:      <select>actor/fauna/animal/horse_select.xml</select>
gaia/fauna_lioness.xml:      <select>actor/fauna/animal/lion_select.xml</select>
gaia/fauna_lion.xml:      <select>actor/fauna/animal/lion_select.xml</select>
gaia/fauna_peacock.xml:      <select>actor/fauna/animal/peacock_call.xml</select>
gaia/fauna_pig_flaming.xml:      <select>actor/fauna/animal/pig_flaming_order.xml</select>
gaia/fauna_pig.xml:      <select>actor/fauna/animal/pig.xml</select>
gaia/fauna_rhino.xml:      <select>actor/fauna/animal/lion_select.xml</select>
gaia/fauna_sheep.xml:      <select>actor/fauna/animal/sheep.xml</select>
gaia/fauna_tiger.xml:      <select>actor/fauna/animal/lion_select.xml</select>

units/cart_support_trader.xml:      <select>actor/fauna/animal/camel.xml</select>
units/pers_support_trader.xml:      <select>actor/fauna/animal/camel.xml</select>
units/ptol_cavalry_archer_b.xml:      <select>actor/fauna/animal/camel.xml</select>
units/ptol_support_trader.xml:      <select>actor/fauna/animal/camel.xml</select>

template_unit_champion_elephant.xml:      <select>actor/fauna/animal/elephant_select.xml</select>
template_unit_fauna_hunt_defensive_elephant.xml:      <select>actor/fauna/animal/elephant_select.xml</select>
template_unit_fauna_hunt_skittish_elephant_infant.xml:      <select>actor/fauna/animal/elephant_select.xml</select>
template_unit_hero_elephant_melee.xml:      <select>actor/fauna/animal/elephant_select.xml</select>
units/maur_elephant_archer_b.xml:      <select>actor/fauna/animal/elephant_select.xml</select>
units/maur_support_elephant.xml:      <select>actor/fauna/animal/elephant_select.xml</select>

template_unit_mechanical_ship.xml:      <select>actor/ship/ship_select_01.xml</select>

template_unit_mechanical_siege_ram.xml:      <select>attack/siege/siege_select.xml</select>
template_unit_mechanical_siege_tower.xml:      <select>attack/siege/siege_select.xml</select>
template_unit_mechanical_siege.xml:      <select>attack/siege/siege_select.xml</select>
other/special_catafalque.xml:      <select>attack/siege/siege_select.xml</select>
~/0ad/binaries/data/mods/public/simulation/templates$ grep "<order" * -R | grep -v interface | grep -v voice

// Added _order files for these if they were needed.
gaia/fauna_camel.xml:      <order_walk>actor/fauna/movement/camel.xml</order_walk>
gaia/fauna_goat.xml:      <order_walk>actor/fauna/animal/goat.xml</order_walk>
gaia/fauna_horse.xml:      <order_walk>actor/fauna/animal/horse_order.xml</order_walk>
gaia/fauna_peacock.xml:      <order_walk>actor/fauna/animal/peacock_call.xml</order_walk>
gaia/fauna_pig_flaming.xml:      <order_walk>actor/fauna/animal/pig_flaming_order.xml</order_walk>
gaia/fauna_pig.xml:      <order_walk>actor/fauna/animal/pig.xml</order_walk>
gaia/fauna_sheep.xml:      <order_walk>actor/fauna/animal/sheep.xml</order_walk>

units/cart_support_trader.xml:      <order_walk>actor/fauna/movement/camel.xml</order_walk>
units/pers_support_trader.xml:      <order_walk>actor/fauna/movement/camel.xml</order_walk>
units/ptol_cavalry_archer_b.xml:      <order_walk>actor/fauna/movement/camel.xml</order_walk>
units/ptol_support_trader.xml:      <order_walk>actor/fauna/movement/camel.xml</order_walk>

template_unit_champion_elephant.xml:      <order_garrison>actor/fauna/animal/elephant_order.xml</order_garrison>
template_unit_champion_elephant.xml:      <order_gather>actor/fauna/animal/elephant_order.xml</order_gather>
template_unit_champion_elephant.xml:      <order_walk>actor/fauna/animal/elephant_order.xml</order_walk>
template_unit_fauna_hunt_defensive_elephant.xml:      <order_walk>actor/fauna/animal/elephant_order.xml</order_walk>
template_unit_fauna_hunt_skittish_elephant_infant.xml:      <order_walk>actor/fauna/animal/elephant_order.xml</order_walk>
template_unit_hero_elephant_melee.xml:      <order_garrison>actor/fauna/animal/elephant_order.xml</order_garrison>
template_unit_hero_elephant_melee.xml:      <order_gather>actor/fauna/animal/elephant_order.xml</order_gather>
template_unit_hero_elephant_melee.xml:      <order_walk>actor/fauna/animal/elephant_order.xml</order_walk>
units/maur_elephant_archer_b.xml:      <order_walk>actor/fauna/animal/elephant_order.xml</order_walk>
units/maur_support_elephant.xml:      <order_walk>actor/fauna/animal/elephant_order.xml</order_walk>

// There's also regular <attack>, which shouldn't be distanceless. So we need to add _attack_order for these.
gaia/fauna_horse.xml:      <order_attack>actor/fauna/animal/horse_attack.xml</order_attack>
template_unit_champion_elephant.xml:      <order_attack>actor/fauna/animal/elephant_attack.xml</order_attack>
template_unit_fauna_hunt_defensive_elephant.xml:      <order_attack>actor/fauna/animal/elephant_attack.xml</order_attack>
template_unit_fauna_hunt_skittish_elephant_infant.xml:      <order_attack>actor/fauna/animal/elephant_attack.xml</order_attack>
template_unit_hero_elephant_melee.xml:      <order_attack>actor/fauna/animal/elephant_attack.xml</order_attack>
units/maur_elephant_archer_b.xml:      <order_attack>actor/fauna/animal/elephant_attack.xml</order_attack>
units/maur_support_elephant.xml:      <order_attack>actor/fauna/animal/elephant_attack.xml</order_attack>

// The move files are only used in orders, so I kept them rather than add on _order.
template_unit_mechanical_ship_fishing.xml:      <order_attack>actor/ship/boat_move.xml</order_attack>
template_unit_mechanical_ship_fishing.xml:      <order_walk>actor/ship/boat_move.xml</order_walk>
template_unit_mechanical_ship.xml:      <order_attack>actor/ship/warship_move_01.xml</order_attack>
template_unit_mechanical_ship.xml:      <order_gather>actor/ship/warship_move_01.xml</order_gather>
template_unit_mechanical_ship.xml:      <order_walk>actor/ship/warship_move_01.xml</order_walk>

// I didn't append _order to move here either. I used ram_move rather than ram_attack for other siege orders, because there already was a ram_attack_order and I guess it's a better sound anyway. I think this is the only place where I actually changed any sounds. (Note that siege tower inherits from siege, so it could be removed, but that's beyond the scope of this patch.)
template_unit_mechanical_siege_ram.xml:      <order_attack>attack/siege/ram_attack_order.xml</order_attack>
template_unit_mechanical_siege_ram.xml:      <order_walk>attack/siege/ram_move.xml</order_walk>
template_unit_mechanical_siege_tower.xml:      <order_attack>attack/siege/ram_attack.xml</order_attack>
template_unit_mechanical_siege_tower.xml:      <order_walk>attack/siege/ram_move.xml</order_walk>
template_unit_mechanical_siege.xml:      <order_attack>attack/siege/ram_attack.xml</order_attack>
template_unit_mechanical_siege.xml:      <order_walk>attack/siege/ram_move.xml</order_walk>

other/special_catafalque.xml:      <order_walk>actor/singlesteps/steps_grass.xml</order_walk>
~/0ad/binaries/data/mods/public/simulation/templates$ grep "trained" * -R | grep -v interface | grep -v voice

// Added _trained files for these if they were needed.
gaia/fauna_goat.xml:      <trained>actor/fauna/animal/goat.xml</trained>
gaia/fauna_horse.xml:      <trained>actor/fauna/animal/horse_trained.xml</trained>
gaia/fauna_peacock.xml:      <trained>actor/fauna/animal/peacock_call.xml</trained>
gaia/fauna_pig_flaming.xml:      <trained>actor/fauna/animal/pig_flaming_order.xml</trained>
gaia/fauna_pig.xml:      <trained>actor/fauna/animal/pig.xml</trained>
gaia/fauna_sheep.xml:      <trained>actor/fauna/animal/sheep.xml</trained>

template_unit_champion_elephant.xml:      <trained>actor/fauna/animal/elephant_trained.xml</trained>
template_unit_fauna_hunt_defensive_elephant.xml:      <trained>actor/fauna/animal/elephant_trained.xml</trained>
template_unit_fauna_hunt_skittish_elephant_infant.xml:      <trained>actor/fauna/animal/elephant_trained.xml</trained>
template_unit_hero_elephant_melee.xml:      <trained>actor/fauna/animal/elephant_trained.xml</trained>
units/maur_elephant_archer_b.xml:      <trained>actor/fauna/animal/elephant_trained.xml</trained>
units/maur_support_elephant.xml:      <trained>actor/fauna/animal/elephant_trained.xml</trained>

template_unit_support_slave.xml:      <trained>actor/singlesteps/steps_gravel.xml</trained>

template_unit_mechanical_siege_ram.xml:      <trained>attack/siege/ram_move.xml</trained>
template_unit_mechanical_siege_tower.xml:      <trained>attack/siege/ram_move.xml</trained>
template_unit_mechanical_siege.xml:      <trained>attack/siege/ram_move.xml</trained>

(Grugnas did this differently in D808. I think it's easier to keep the sound files where they are, for now anyway.)

Test Plan

See if I missed anything (or not).
Agree with the siege sound change (i.e. use ram_move rather than ram_attack for attacks by non-ram siege).
Check that select/order all have the distanceless element.
Check that trained all have the omnipresent/heardby elements.
Check that other sound groups don't have those elements (I don't think they do, but I didn't check this 100%).

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

temple created this revision.Oct 1 2017, 3:55 AM
temple edited the summary of this revision. (Show Details)Oct 1 2017, 4:02 AM
bb added a subscriber: bb.Dec 25 2017, 8:03 PM

Mostly rebase

binaries/data/mods/public/audio/actor/fauna/animal/camel_select.xml
1 ↗(On Diff #3822)

propsetting fun XD

binaries/data/mods/public/audio/actor/fauna/animal/goat_select.xml
3 ↗(On Diff #3822)

distanceless?

binaries/data/mods/public/simulation/templates/gaia/fauna_bear.xml
30–32 ↗(On Diff #3822)

(if one wants one can in another patch make these order alphabetically)

binaries/data/mods/public/simulation/templates/gaia/fauna_camel.xml
30 ↗(On Diff #3822)

strange location

binaries/data/mods/public/simulation/templates/gaia/fauna_goat.xml
30 ↗(On Diff #3822)

(another patch could rename those sounds, to _death)

binaries/data/mods/public/simulation/templates/gaia/fauna_peacock.xml
21 ↗(On Diff #3822)

strange name aswell

bb accepted this revision.Jan 12 2018, 12:47 AM

This patch fixes the currently wrong sounds, but does not add missing ones (lots of animals miss sounds), nor renames file to something consistent, nor makes any order consistent within a file. All those things could be addressed by other patches.

  • rebased the patch
  • changed the inlines
  • added steps_order to catafalque
  • added propsetting

review:

  • all select, death, order and attack sounds have now their own file
  • all sound actors of these types checked being correct
  • templates have the changes accordingly
binaries/data/mods/public/audio/actor/fauna/animal/elephant_attack_order.xml
10–11 ↗(On Diff #3822)

any reason these are different from other files?
also for <Gain>

binaries/data/mods/public/audio/actor/fauna/animal/goat_order.xml
3 ↗(On Diff #3822)

distanceless?

This revision is now accepted and ready to land.Jan 12 2018, 12:47 AM
temple marked 2 inline comments as done.Jan 12 2018, 1:50 AM
In D944#49410, @bb wrote:

This patch fixes the currently wrong sounds, but does not add missing ones (lots of animals miss sounds), nor renames file to something consistent, nor makes any order consistent within a file. All those things could be addressed by other patches.

  • rebased the patch
  • changed the inlines
  • added steps_order to catafalque
  • added propsetting

review:

  • all select, death, order and attack sounds have now their own file
  • all sound actors of these types checked being correct
  • templates have the changes accordingly

Past tense, so it sounds like you did those four things but forgot to attach an updated diff? Or did you want me to do them?
I'm not familiar with the propset stuff, what's wrong or how to tell what's wrong or how to fix it.

binaries/data/mods/public/audio/actor/fauna/animal/elephant_attack_order.xml
10–11 ↗(On Diff #3822)

Don't know, I just copied the values from elephant_attack.xml.

elexis added a subscriber: elexis.Jan 12 2018, 1:55 AM

propset:
It's irrelevant for uploading it to phabricator, but once when you commit a patch, use svn propset svn:eol-style native filename on new files (can send you a sh script for entire directories).
This way people with windows (unix) download the file with windows (unix) lineendings to their working copy.
(If we don't set the property, the file is committed with one type of lineendings and then when someone submits a patch there are many lines where only the lineendings changed and noone knows what's going on.)

temple updated this revision to Diff 5241.Jan 12 2018, 2:24 AM

Did propset on the xml files in that directory and it changed a few others too, so not sure this is correct. And maybe bb did this all already. Anyway..

Owners added a subscriber: Restricted Owners Package.Jan 12 2018, 2:24 AM
temple updated this revision to Diff 5243.Jan 12 2018, 2:32 AM

missed a few files

temple added inline comments.Jan 12 2018, 2:36 AM
binaries/data/mods/public/audio/actor/fauna/animal/elephant_attack_order.xml
10–11 ↗(On Diff #3822)
In D944#49430, @temple wrote:

missed a few files

Forgot to do the propsetting on these (steps, ram), but whatever.

bb added a comment.Jan 12 2018, 6:38 PM

Past tense indeed, since I made those things in my local working copy, was planning to commit asap, but my bio-clock intervened.

This revision was automatically updated to reflect the committed changes.