In this tutorial you will learn how to import .gr2 units from other games. The catapult is the very first unit that had imported animations
http://www.youtube.com/watch?v=yKXmzWVYJZI&feature=related
(credit goes to Thattus who imported the catapult, even if he didnt managed to show up the textures ingame)
Table of Content
1.Basics
2.Importing a .gr2 moddel
3.Importing a texture
4.Importing a animation
5.FAQ
Chapter1: Basics
pro:
-importing a simple moddel + animations take just up to 30 minutes
-textures are allready done and can be used without changing anything
-animations are possible
contra:
-you can't rescale the moddel without loosing the ability to animate it
-not all moddels/animations can be imported
Required Tools:
a)Granny Viewer
b)AOE3ed
c)A converter Tool for Textures if the other games doesnt use .tga - files
d)a text editor like Notepad++
e)a game which contain useable .gr2 files
Games where you can take units from
-Stronghold 2 and Stronghold Legends:
Games where you can't take units from
-The Settlers II 10th Anniversary
-Civilization V
The list is incomplete. I dont own any other .gr2 supporting games
Chapter2: Importing a .gr2 moddel
Well the first step you need to do, is to search for a unit you wanna have. Well for KnB I want to have more european animals, therefore i choose the rabiit
Well this is the list of usefull .gr2 files for the rabbit:
rabbit
rabbit.low
rabbit_eat
rabbit_die_1
rabitt_die_2
rabiit_hop
the .low file is a lowpoly file so just ignore it.I will Copy and paste the 5 remaining toC:\Program Files (x86)\Microsoft Games\Age of Empires III\art\units\KnB\Animals\rabbit
Now openrabbit with Granny Viewer and Drag and Drop the other four files into the same window of granny viewer.
You can now see
a)All the required textures (textures tab)
b)Your moddel with Animations (animations tab)
We want now to make the moddel to appear ingame:
A basic anim script:
The file is named Rabbit.xml and has this filepath
C:\Program Files (x86)\Microsoft Games\Age of Empires III\art\Units\KnB\Animals\Rabbit\Rabbit.xml
This is some random protoy code that makes the unit appears ingame
(credit goes to Thattus who imported the catapult, even if he didnt managed to show up the textures ingame)
Table of Content
-importing a simple moddel + animations take just up to 30 minutes
-textures are allready done and can be used without changing anything
-animations are possible
-you can't rescale the moddel without loosing the ability to animate it
-not all moddels/animations can be imported
a)Granny Viewer
b)AOE3ed
c)A converter Tool for Textures if the other games doesnt use .tga - files
d)a text editor like Notepad++
e)a game which contain useable .gr2 files
-Stronghold 2 and Stronghold Legends:
-used the Granny SDK Exporter 2.4 - 2.6
-the units are taller then the aoe3 units
-the trebuchet_shooting.gr2 anim doesnt work and the dragons from Stronghold Legends wont show up in aoe3 as well
-most buildings might be only useable in the hc due their size
-buildings seems also to cause trouble (wont appear)
-game use.dds textures
-the units are taller then the aoe3 units
-the trebuchet_shooting.gr2 anim doesnt work and the dragons from Stronghold Legends wont show up in aoe3 as well
-most buildings might be only useable in the hc due their size
-buildings seems also to cause trouble (wont appear)
-game use
-The Settlers II 10th Anniversary
files are compressed
-Civilization V
direct import is not possible (used SDK exporter is higher then 2.6)
you need to convert the file in order to be able to import it
The units have no texture informations in the granny files
you need to convert the file in order to be able to import it
The units have no texture informations in the granny files
The list is incomplete. I dont own any other .gr2 supporting games
Well the first step you need to do, is to search for a unit you wanna have. Well for KnB I want to have more european animals, therefore i choose the rabiit
Well this is the list of usefull .gr2 files for the rabbit:
rabbit
rabbit.low
rabbit_eat
rabbit_die_1
rabitt_die_2
rabiit_hop
the .low file is a lowpoly file so just ignore it.I will Copy and paste the 5 remaining to
Now open
You can now see
a)All the required textures (textures tab)
b)Your moddel with Animations (animations tab)
We want now to make the moddel to appear ingame:
A basic anim script:
<animfile>
<component>
ModelComp
<assetreference type="GrannyModel">
<file> units\KnB\Animals\rabbit\rabbit< /file>
</assetreference>
<decal>
<effecttype> default< /effecttype>
<texture isfakeshadow="1"> shadows_selections\shadow_circle_128x128< /texture>
<selectedtexture> shadows_selections\selection_oval_64x128< /selectedtexture>
<width> 5.00< /width>
<height> 8.00< /height>
</decal>
</component>
<anim>
Idle
<component> ModelComp< /component>
</anim>
</animfile>
The file is named Rabbit.xml and has this filepath
This is some random protoy code that makes the unit appears ingame
<Unit id ='98277' name ='Rabbit'>
<DisplayNameID> Wild Boar< /DisplayNameID>
<EditorNameID> Wild Boar< /EditorNameID>
<DBID> 3< /DBID>
<DisplayNameID> < /DisplayNameID>
<EditorNameID> < /EditorNameID>
<PopulationCount> 3< /PopulationCount>
<ObstructionRadiusX> 1.500< /ObstructionRadiusX>
<ObstructionRadiusZ> 1.500< /ObstructionRadiusZ>
<FormationCategory> Ranged< /FormationCategory>
<MaxVelocity> 3.0000< /MaxVelocity>
<MaxRunVelocity> 4.0000< /MaxRunVelocity>
<MovementType> land< /MovementType>
<TurnRate> 2.0000< /TurnRate>
<AnimFile> Units\KnB\Animals\Rabbit\Rabbit.xml< /AnimFile>
<ImpactType> wood< /ImpactType>
<PhysicsInfo> dude< /PhysicsInfo>
<Icon> units\infantry_ranged\musketeer\musketeer_icon_64x64< /Icon>
<PortraitIcon> units\infantry_ranged\musketeer\musketeer_portrait< /PortraitIcon>
<RolloverTextID> 22812< /RolloverTextID>
<ShortRolloverTextID> 25669< /ShortRolloverTextID>
<InitialHitpoints> 350.0000< /InitialHitpoints>
<MaxHitpoints> 350.0000< /MaxHitpoints>
<LOS> 30.0000< /LOS>
<ProjectileProtoUnit> InvisibleProjectile< /ProjectileProtoUnit>
<UnitAIType> RangedCombative< /UnitAIType>
<TrainPoints> 30.0000< /TrainPoints>
<Bounty> 10.0000< /Bounty>
<BuildBounty> 10.0000< /BuildBounty>
<Cost resourcetype ='Food'> 75.0000< /Cost>
<Cost resourcetype ='Gold'> 25.0000< /Cost>
<AllowedAge> 1< /AllowedAge>
<Armor type ='Hand' value ='0.2000'> < /Armor>
<UnitType> LogicalTypeHealed< /UnitType>
<UnitType> LogicalTypeNeededForVictory< /UnitType>
<UnitType> LogicalTypeLandMilitary< /UnitType>
<UnitType> LogicalTypeRangedUnitsAutoAttack< /UnitType>
<UnitType> LogicalTypeVillagersAttack< /UnitType>
<UnitType> LogicalTypeHandUnitsAttack< /UnitType>
<UnitType> LogicalTypeRangedUnitsAttack< /UnitType>
<UnitType> LogicalTypeMinimapFilterMilitary< /UnitType>
<UnitType> Unit< /UnitType>
<UnitType> Military< /UnitType>
<UnitType> UnitClass< /UnitType>
<UnitType> HasBountyValue< /UnitType>
<UnitType> Ranged< /UnitType>
<UnitType> CountsTowardMilitaryScore< /UnitType>
<UnitType> ConvertsHerds< /UnitType>
<Flag> CollidesWithProjectiles< /Flag>
<Flag> ApplyHandicapTraining< /Flag>
<Flag> CorpseDecays< /Flag>
<Flag> ShowGarrisonButton< /Flag>
<Flag> DontRotateObstruction< /Flag>
<Flag> ObscuredByUnits< /Flag>
<Flag> Tracked< /Flag>
<Command page ='10' column ='1'> Stop< /Command>
<Command page ='10' column ='0'> Garrison<