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.)