I understand what you're getting at, but a lot of godpower commands can't be used for techs. That's why they're godpowers. There is a way to change the appearance of a villager when a technology is researched, and then have statistics defined in the techtree.xml file, however, there is no way to write a tech that converts all of 'unit a' into 'unit b' without the use of a godpower.
The anim file is the file in your AoM/anim folder and for the villager, is called villager greek_anim.txt. This text file tells the game what models to use and how to handle technology upgrades.
For example, in
The Roman Legion Expansion, we've got a large set of scutum (a large rectangular shield) textures that are controlled using variation and tech logic.
Here is a small excerpt from the scutum's definition://==========================================
define Scutum
{
SetSelector
{
TechLogic none/Copper shields/Bronze shields/Iron shields
SetSelector
{
set hotspot
{
version
{
visualnone jimmy
}
}
{
set hotspot
{
version
{
visual attachments r scutum
ReplaceTexture weapons r scutum/weapons r scutum copper
}
}
}
In a similar syntax to javascript, the models and textures are defined. Starting with 'TechLogic', you'll always find a small variety of technologies defined, separated by slash marks.
For the next 4 instances of the 'set hotspot' command, those technologies are defined in that order. For example, 'none' is defined as 'visualnone jimmy' because we don't want anything to show unless the player has researched a shield-related upgrade. For the upgrade 'Copper shields', we've defined the use of the model 'attachments r scutum.brg'. Don't include the extention when defining which model to use, just the name.
Below it is a command called 'ReplaceTexture'. As the name implies, this command replaces the existing texture with the texture named on the right side of the slash mark.
Let's say we were upgrading villagers to 'Elite Villagers', which have a new texture. Let's open 'villager greek_anim.txt'. Scrolling down to the first animation (marked 'anim GatherChop'), we'll edit in the new technology:anim GatherChop
{
SetSelector
{
TechLogic none/Elite Villagers
SetSelector
{
set hotspot
{
version
{
Visual Villager G male_chopA
//-- auto generated by the bang animation tool
//-- do not hand edit these values
tag Attack 0.67 true
tag SpecificSoundSet 0.67 false GatherChop checkVisible
//-- end auto generated section
connect RightHand Axe hotspot
}
}
}
SetSelector
{
set hotspot
{
version
{
Visual Villager G male_chopA
//-- auto generated by the bang animation tool
//-- do not hand edit these values
tag Attack 0.67 true
tag SpecificSoundSet 0.77 false GatherChop checkVisible
//-- end auto generated section
connect RightHand Axe hotspot
ReplaceTexture villager g male standard/elite villager texture
}
}
}
}
}
Notice that I removed the female animation. It's quite easy to work in, but I removed it for the simplicity of this mini-tutorial. Noting that Nottud found a way to invoke godpowers in the editor, there could be a way to invoke a godpower through a tech, however such information is currently unknown. You could be the first to discover it!