Add a new unit in the game (using SQL)

Gedemon

Modder
Super Moderator
Joined
Oct 4, 2004
Messages
11,505
Location
France
This tutorial is a step by step to add a new unit in the game, it won't covert the creation of a new unit model, there are other tutorials about that.

It assumes that you know how to create a basic mod, and understand the meaning of "OnModActivated"

It applies for Civilization and G+K post patch .674, since that patch you don't have (and in fact can't) to replace Civ5ArtDefines_UnitMembers.xml and Civ5ArtDefines_Units.xml. The only file related to units which is still not loaded to the Database (and so have to be replaced in a mod using the VFS property) is unitformations.xml. But unless you want to change the default formations, you won't need it.

Note that previous version of the tutorials made a bad use of double-quote in the SQL code, see here why you shouldn't use them and please refer to the now corrected code.

The exception for using double-quote is when a SQL keyword is used as a table of column name, as it is the case with "Index" column in ArtDefine_UnitMemberCombats table (see code in step 4)


Pre-required : Right click your mod project in the Solution explorer windows, select "properties", go in the "Mod Info" panel, and check the "Reload Unit System" in the "Systems" section.


step 1 : For the tutorial, we're taking the example of the biplan from this danrell's units pack, supposing that we want to add a WW1 era fighter to civ5 vanilla.

Here are the files requested by this unit model:

EarlyFighter_Generic_gloss.dds
EarlyFighter_Generic.gr2
EarlyFighter_Generic.fxsxml
EarlyFighter_Generic.dds

All this files must be copied in your project and have the VFS property set to "true". I'll suggest you to organize your project using folders and subfolders if you have to put many files in it, the VFS will not care for the relative path.

Danrell also provide the blend file and a jpg screenshot, those are not needed in your mod, but the blend is a must for those who want to edit the model itself, go and thanks him again for his work :goodjob:


step 2 : create a new sql file in your project (right click the project name or one of it's subfolder in the Solution Explorer windows, select "Add", "New Item..." and Game Rules (SQL)

Rename it, or keep the original Game Rules1.sql. You don't need to set the VFS to true for that file, but you have to add an UpdateDatabase entry for it.


step 3 : For that right click your mod project in the Solution explorer windows, select "properties", go in the "Action" panel, click "Add...", select "OnModActivated" as event, "UpdateDatabase" as Action, and point File to your newly created SQL file.

As this is a step by step mod, I won't detailed the SQL commands used here, just follow the steps and all will goes well (I hope :D)

An XML tutorial may be more user friendly, but I really found the SQL method more efficient.


step 4 : Now open the sql file and add the following code to it :

Code:
INSERT INTO ArtDefine_UnitInfos (Type,DamageStates,Formation)
	SELECT	([COLOR="Red"]'ART_DEF_UNIT_BIPLAN'[/COLOR]), DamageStates, Formation
	FROM ArtDefine_UnitInfos WHERE (Type = [COLOR=Blue]'ART_DEF_UNIT_FIGHTER'[/COLOR]);

INSERT INTO ArtDefine_UnitInfoMemberInfos (UnitInfoType,UnitMemberInfoType,NumMembers)
	SELECT	([COLOR="Red"]'ART_DEF_UNIT_BIPLAN'[/COLOR]), ([COLOR="Red"]'ART_DEF_UNIT_MEMBER_BIPLAN'[/COLOR]), NumMembers
	FROM ArtDefine_UnitInfoMemberInfos WHERE (UnitInfoType = [COLOR=Blue]'ART_DEF_UNIT_FIGHTER'[/COLOR]);

INSERT INTO ArtDefine_UnitMemberCombats (UnitMemberType, EnableActions, DisableActions, MoveRadius, ShortMoveRadius, ChargeRadius, AttackRadius, RangedAttackRadius, MoveRate, ShortMoveRate, TurnRateMin, TurnRateMax, TurnFacingRateMin, TurnFacingRateMax, RollRateMin, RollRateMax, PitchRateMin, PitchRateMax, LOSRadiusScale, TargetRadius, TargetHeight, HasShortRangedAttack, HasLongRangedAttack, HasLeftRightAttack, HasStationaryMelee, HasStationaryRangedAttack, HasRefaceAfterCombat, ReformBeforeCombat, HasIndependentWeaponFacing, HasOpponentTracking, HasCollisionAttack, AttackAltitude, AltitudeDecelerationDistance, OnlyTurnInMovementActions, RushAttackFormation)
	SELECT	([COLOR="Red"]'ART_DEF_UNIT_MEMBER_BIPLAN'[/COLOR]), EnableActions, DisableActions, MoveRadius, ShortMoveRadius, ChargeRadius, AttackRadius, RangedAttackRadius, MoveRate, ShortMoveRate, TurnRateMin, TurnRateMax, TurnFacingRateMin, TurnFacingRateMax, RollRateMin, RollRateMax, PitchRateMin, PitchRateMax, LOSRadiusScale, TargetRadius, TargetHeight, HasShortRangedAttack, HasLongRangedAttack, HasLeftRightAttack, HasStationaryMelee, HasStationaryRangedAttack, HasRefaceAfterCombat, ReformBeforeCombat, HasIndependentWeaponFacing, HasOpponentTracking, HasCollisionAttack, AttackAltitude, AltitudeDecelerationDistance, OnlyTurnInMovementActions, RushAttackFormation
	FROM ArtDefine_UnitMemberCombats WHERE (UnitMemberType = [COLOR=Blue]'ART_DEF_UNIT_MEMBER_FIGHTER'[/COLOR]);

INSERT INTO ArtDefine_UnitMemberCombatWeapons (UnitMemberType, "Index", SubIndex, ID, VisKillStrengthMin, VisKillStrengthMax, ProjectileSpeed, ProjectileTurnRateMin, ProjectileTurnRateMax, HitEffect, HitEffectScale, HitRadius, ProjectileChildEffectScale, AreaDamageDelay, ContinuousFire, WaitForEffectCompletion, TargetGround, IsDropped, WeaponTypeTag, WeaponTypeSoundOverrideTag)
	SELECT ([COLOR="Red"]'ART_DEF_UNIT_MEMBER_BIPLAN'[/COLOR]), "Index", SubIndex, ID, VisKillStrengthMin, VisKillStrengthMax, ProjectileSpeed, ProjectileTurnRateMin, ProjectileTurnRateMax, HitEffect, HitEffectScale, HitRadius, ProjectileChildEffectScale, AreaDamageDelay, ContinuousFire, WaitForEffectCompletion, TargetGround, IsDropped, WeaponTypeTag, WeaponTypeSoundOverrideTag
	FROM ArtDefine_UnitMemberCombatWeapons WHERE (UnitMemberType = [COLOR=Blue]'ART_DEF_UNIT_MEMBER_FIGHTER'[/COLOR]);

INSERT INTO ArtDefine_UnitMemberInfos (Type, Scale, ZOffset, Domain, Model, MaterialTypeTag, MaterialTypeSoundOverrideTag)
	SELECT	([COLOR="Red"]'ART_DEF_UNIT_MEMBER_BIPLAN'[/COLOR]), Scale, ZOffset, Domain, ([COLOR="Red"]'EarlyFighter_Generic.fxsxml'[/COLOR]), MaterialTypeTag, MaterialTypeSoundOverrideTag
	FROM ArtDefine_UnitMemberInfos WHERE (Type = [COLOR=Blue]'ART_DEF_UNIT_MEMBER_FIGHTER'[/COLOR]);

INSERT INTO ArtDefine_StrategicView (StrategicViewType, TileType, Asset )
	SELECT	([COLOR="Red"]'ART_DEF_UNIT_BIPLAN'[/COLOR]), TileType, Asset
	FROM ArtDefine_StrategicView WHERE (StrategicViewType = [COLOR=Blue]'ART_DEF_UNIT_FIGHTER'[/COLOR]);

In red the reference for the new unit, in blue the reference of the unit we use as a template for the new one.

This code define the visual effects for the new unit. I use a "template" unit for reference, so I don't have to manually set each entry, but have the SQL code copy them from the "template" unit (here the normal fighter) and only change those that are needed.

Using a template is much faster, but you have to be sure that no other mods will delete the unit you're using as a template. Mods compatibility depend of the loading order and can sometimes be assured using associations, but that's another subject.

You can still use SQL to add new entries without duplicating another unit's entry using this syntax:

Code:
INSERT INTO table_name (column1, column2, column3,...)
VALUES (value1, value2, value3,...);

Horem has posted a complete SQL template here.

but you may find it easier to use XML in that case, see the second post for an example from whoward69.


step 5 : Below is the code for the new unit statistics, add it after in the sql file :

Code:
INSERT INTO UnitClasses (Type, Description, MaxGlobalInstances, MaxTeamInstances, MaxPlayerInstances, InstanceCostModifier, DefaultUnit )
	SELECT ([COLOR="Red"]'UNITCLASS_BIPLAN'[/COLOR]), Description, MaxGlobalInstances, MaxTeamInstances, MaxPlayerInstances, InstanceCostModifier, ([COLOR="Red"]'UNIT_BIPLAN'[/COLOR])
	FROM UnitClasses WHERE (Type = [COLOR="blue"]'UNITCLASS_FIGHTER'[/COLOR]);

INSERT INTO Units (Type, Description, Civilopedia, Strategy, Help, Requirements, Combat, RangedCombat, Cost, Moves, Immobile, Range, BaseSightRange, Class, Special, Capture, CombatClass, Domain, CivilianAttackPriority, DefaultUnitAI, Food, NoBadGoodies, RivalTerritory, MilitarySupport, MilitaryProduction, Pillage, Found, FoundAbroad, CultureBombRadius, GoldenAgeTurns, IgnoreBuildingDefense, PrereqResources, Mechanized, Suicide, CaptureWhileEmbarked, PrereqTech, ObsoleteTech, GoodyHutUpgradeUnitClass, HurryCostModifier, AdvancedStartCost, MinAreaSize, AirUnitCap, NukeDamageLevel, WorkRate, NumFreeTechs, RushBuilding, BaseHurry, HurryMultiplier, BaseGold, NumGoldPerEra, SpreadReligion, CombatLimit, RangeAttackOnlyInDomain, RangeAttackIgnoreLOS, RangedCombatLimit, XPValueAttack, XPValueDefense, SpecialCargo, DomainCargo, Conscription, ExtraMaintenanceCost, NoMaintenance, Unhappiness, UnitArtInfo, UnitArtInfoCulturalVariation, UnitArtInfoEraVariation, ProjectPrereq, SpaceshipProject, LeaderPromotion, LeaderExperience, DontShowYields, ShowInPedia, MoveRate, UnitFlagIconOffset, PortraitIndex, IconAtlas, UnitFlagAtlas)
	SELECT	[COLOR="red"]('UNIT_BIPLAN')[/COLOR], [COLOR="red"]('Biplan')[/COLOR], Civilopedia, Strategy, Help, Requirements,
			Combat, [COLOR="red"](25)[/COLOR], [COLOR="red"](250)[/COLOR], Moves, Immobile, [COLOR="red"](5)[/COLOR], BaseSightRange, [COLOR="red"]('UNITCLASS_BIPLAN')[/COLOR], Special, Capture, CombatClass, Domain, CivilianAttackPriority, DefaultUnitAI, Food, NoBadGoodies, RivalTerritory, MilitarySupport, MilitaryProduction, Pillage, Found, FoundAbroad, CultureBombRadius, GoldenAgeTurns, IgnoreBuildingDefense, PrereqResources, Mechanized, Suicide, CaptureWhileEmbarked, PrereqTech, ObsoleteTech, GoodyHutUpgradeUnitClass, HurryCostModifier, AdvancedStartCost, MinAreaSize, AirUnitCap, NukeDamageLevel, WorkRate, NumFreeTechs, RushBuilding, BaseHurry, HurryMultiplier, BaseGold, NumGoldPerEra, SpreadReligion, CombatLimit, RangeAttackOnlyInDomain, RangeAttackIgnoreLOS, RangedCombatLimit, XPValueAttack, XPValueDefense, SpecialCargo, DomainCargo, Conscription, ExtraMaintenanceCost, NoMaintenance, Unhappiness,
			[COLOR="red"]('ART_DEF_UNIT_BIPLAN')[/COLOR], UnitArtInfoCulturalVariation, UnitArtInfoEraVariation, ProjectPrereq, SpaceshipProject, LeaderPromotion, LeaderExperience, DontShowYields, ShowInPedia, MoveRate,
			UnitFlagIconOffset, PortraitIndex, IconAtlas, UnitFlagAtlas
	FROM Units WHERE (Type = [COLOR="blue"]'UNIT_FIGHTER'[/COLOR]);

INSERT INTO Unit_AITypes (UnitType, UnitAIType)
	SELECT [COLOR="red"]('UNIT_BIPLAN')[/COLOR], UnitAIType
	FROM Unit_AITypes WHERE (UnitType = [COLOR="blue"]'UNIT_FIGHTER'[/COLOR]);

INSERT INTO Unit_ClassUpgrades (UnitType, UnitClassType)
	SELECT [COLOR="red"]('UNIT_BIPLAN')[/COLOR], UnitClassType
	FROM Unit_ClassUpgrades WHERE (UnitType = [COLOR="blue"]'UNIT_FIGHTER'[/COLOR]);

INSERT INTO Unit_Flavors (UnitType, FlavorType, Flavor)
	SELECT [COLOR="red"]('UNIT_BIPLAN')[/COLOR], FlavorType, Flavor
	FROM Unit_Flavors WHERE (UnitType = [COLOR="blue"]'UNIT_FIGHTER'[/COLOR]);

INSERT INTO Unit_FreePromotions (UnitType, PromotionType)
	SELECT [COLOR="red"]('UNIT_BIPLAN')[/COLOR], PromotionType
	FROM Unit_FreePromotions WHERE (UnitType = [COLOR="blue"]'UNIT_FIGHTER'[/COLOR]);

INSERT INTO Unit_ResourceQuantityRequirements (UnitType, ResourceType, Cost)
	SELECT [COLOR="red"]('UNIT_BIPLAN')[/COLOR], ResourceType, Cost
	FROM Unit_ResourceQuantityRequirements WHERE (UnitType = [COLOR="Blue"]'UNIT_FIGHTER'[/COLOR]);

That code will copy all the entry of the vanilla civ5 fighter in new entry for our new units. In red the changes that are made:
UNIT_BIPLAN is the type of your new unit
Biplan is the in game name
(25) the ranged attack value
(250) the construction cost
(5) the range
ART_DEF_UNIT_BIPLAN refer to the <Type> of step 4

Fell free to tweak other values, thinking of the requested tech for example...


This should be enough for most your new units to work properly, danrell's units may require an extra step

extra step : copy the "Common" folder from danrell's pack in your project folder, and set the VFS property to true for all it's files. Needed especially for his tanks and ships.


edit : finally converted to post-patch .674 method.
 
This should assist more people to get active in modding.

I remember how painful it was to make my first few units work, but with this guide and Kael's combined we have a good source of info.
 
Thanks a million for this Gedemon. This is going to help new modders a great deal. I have some real good ideas, involving a World War One mod.

This is going to be great! I am going to learn this, it will give me something to do while waiting for GnK. :D
 
Apparently this tutorial wasn't quite enough for some, so I zipped up a small ModBuddy project to use as a template, and have attached it here. [EDIT: Removed because it was no longer valid after the changes from pre-G+K patch and later.]

The template copies the stats of a vanilla unit, and makes a new unique "ethnic" unit with new art for a specific Civ. (Vivastpauli requested a Portuguese knight reskin but then disappeared, so this adds the mostly-finished unit to the game and gives it to Greece to replace their knight.)

Note that this template isn't compatible with any other mod that adds units with new art. Remember, the last activated version of the civ5artdefines_* files must include all changes from all such mods.

From a recent thread:

If you can think of any other reasons that'd be great in the meantime, a checklist of 'files needed' and so on might be helpful.

...

Checklist:
  • You need the 2 civ5artdefines files, the entire contents copied with your additions added (both VFS true).
  • You'll need the 4 art files (all VFS true):
    [*]the gr2 (for a reskin, you would have just copied the vanilla one, renamed it, and revised it with IndieStone Nexus Buddy to point to the new dds files)
    [*]the fxsxml, also pointing to the new dds files
    [*]your edited dds's (diff and sref)​
  • Finally, the XML or SQL file that adds the new unit (VFS false, but set to OnModActivated/ImportDatabase).

I prefer Gedemon's method using SQL rather than XML, because you can easily just copy all the rows from an existing unit and make your changes without worrying about missing anything.

If you aren't making a new unique/ethnic unit, and just want to change the default for everyone, you can skip the XML/SQL file and not worry about adding any new entries to the civ5artdefines. You just edit the civ5artdefines_unitmembers.xml and change the fxsxml reference for, e.g., UNIT_KNIGHT to your new fxsxml. Don't include a path, only "<Granny>knight_camelot.fxsxml</Granny>" (or whatever you called it).

Also note that "Reload Unit System" must be checked on the Mod Info tab of your mod properties.
 
So, how do you mod in units post .674 patch? Let me know I want to learn.
 
The following is the SQL code that I use to replace step 3 and step 4 now that Civ5ArtDefines_UnitMembers.xml and Civ5ArtDefines_Units.xml are no longer needed to mod in new units (which is a very good thing, but has broken a lot of mods)

You can put that code in the file created in step 5.

The rest of the steps are still valid I think.

Code:
INSERT INTO ArtDefine_UnitInfos (Type,DamageStates,Formation)
	SELECT	([COLOR="Red"]'ART_DEF_UNIT_WW1_FIGHTER_GERMANY'[/COLOR]), DamageStates, Formation
	FROM ArtDefine_UnitInfos WHERE (Type = [COLOR=SeaGreen]'ART_DEF_UNIT_WW1_FIGHTER'[/COLOR]);
INSERT INTO ArtDefine_UnitInfoMemberInfos (UnitInfoType,UnitMemberInfoType,NumMembers)
	SELECT	([COLOR="Red"]'ART_DEF_UNIT_WW1_FIGHTER_GERMANY'[/COLOR]), ([COLOR="Red"]'ART_DEF_UNIT_MEMBER_WW1_FIGHTER_GERMANY'[/COLOR]), NumMembers
	FROM ArtDefine_UnitInfoMemberInfos WHERE (UnitInfoType = [COLOR=SeaGreen]'ART_DEF_UNIT_WW1_FIGHTER'[/COLOR]);
INSERT INTO ArtDefine_UnitMemberCombats (UnitMemberType, EnableActions, DisableActions, MoveRadius, ShortMoveRadius, ChargeRadius, AttackRadius, RangedAttackRadius, MoveRate, ShortMoveRate, TurnRateMin, TurnRateMax, TurnFacingRateMin, TurnFacingRateMax, RollRateMin, RollRateMax, PitchRateMin, PitchRateMax, LOSRadiusScale, TargetRadius, TargetHeight, HasShortRangedAttack, HasLongRangedAttack, HasLeftRightAttack, HasStationaryMelee, HasStationaryRangedAttack, HasRefaceAfterCombat, ReformBeforeCombat, HasIndependentWeaponFacing, HasOpponentTracking, HasCollisionAttack, AttackAltitude, AltitudeDecelerationDistance, OnlyTurnInMovementActions, RushAttackFormation)
	SELECT	([COLOR="Red"]'ART_DEF_UNIT_MEMBER_WW1_FIGHTER_GERMANY'[/COLOR]), EnableActions, DisableActions, MoveRadius, ShortMoveRadius, ChargeRadius, AttackRadius, RangedAttackRadius, 
			MoveRate, ShortMoveRate, TurnRateMin, TurnRateMax, TurnFacingRateMin, TurnFacingRateMax, RollRateMin, RollRateMax, PitchRateMin, PitchRateMax, LOSRadiusScale, TargetRadius, TargetHeight, HasShortRangedAttack, HasLongRangedAttack, HasLeftRightAttack, HasStationaryMelee, HasStationaryRangedAttack, HasRefaceAfterCombat, ReformBeforeCombat, HasIndependentWeaponFacing, HasOpponentTracking, HasCollisionAttack, AttackAltitude, AltitudeDecelerationDistance, OnlyTurnInMovementActions, RushAttackFormation
	FROM ArtDefine_UnitMemberCombats WHERE (UnitMemberType = [COLOR=SeaGreen]'ART_DEF_UNIT_MEMBER_WW1_FIGHTER'[/COLOR]);
INSERT INTO ArtDefine_UnitMemberCombatWeapons (UnitMemberType, "Index", SubIndex, ID, VisKillStrengthMin, VisKillStrengthMax, ProjectileSpeed, ProjectileTurnRateMin, ProjectileTurnRateMax, HitEffect, HitEffectScale, HitRadius, ProjectileChildEffectScale, AreaDamageDelay, ContinuousFire, WaitForEffectCompletion, TargetGround, IsDropped, WeaponTypeTag, WeaponTypeSoundOverrideTag)
	SELECT ([COLOR="Red"]'ART_DEF_UNIT_MEMBER_WW1_FIGHTER_GERMANY'[/COLOR]), "Index", SubIndex, ID, VisKillStrengthMin, VisKillStrengthMax, ProjectileSpeed, ProjectileTurnRateMin, ProjectileTurnRateMax, HitEffect, HitEffectScale, HitRadius, ProjectileChildEffectScale, AreaDamageDelay, ContinuousFire, WaitForEffectCompletion, TargetGround, IsDropped, WeaponTypeTag, WeaponTypeSoundOverrideTag
	FROM ArtDefine_UnitMemberCombatWeapons WHERE (UnitMemberType = [COLOR=SeaGreen]'ART_DEF_UNIT_MEMBER_WW1_FIGHTER'[/COLOR]);
INSERT INTO ArtDefine_UnitMemberInfos (Type, Scale, ZOffset, Domain, Model, MaterialTypeTag, MaterialTypeSoundOverrideTag)
	SELECT	([COLOR="Red"]'ART_DEF_UNIT_MEMBER_WW1_FIGHTER_GERMANY'[/COLOR]), Scale, ZOffset, Domain, 
			([COLOR="Red"]'Fokker_Dr.1.fxsxml'[/COLOR]), MaterialTypeTag, MaterialTypeSoundOverrideTag
	FROM ArtDefine_UnitMemberInfos WHERE (Type = [COLOR=SeaGreen]'ART_DEF_UNIT_MEMBER_WW1_FIGHTER'[/COLOR]);

In red the reference for the new unit, in green the reference of the unit we use as a template for the new one.

I'll do a clean update of first post when I have the time for it (which may not be *soon*, but I'll try to prioritize it)
 
Don't worry It will take me some time to learn this. I will be patient and do it step by step. Thank you very much for the update, and for your help.

Ok, I am starting with adding a Nieuport 17 mod. Now...

I don't need the Nieuport_17.blend file, or do I? I also changed the no_gloss.dds to Nieuport_17_no_gloss.dds is that the way? Both .dds files need to be used right? So, I do not have to do step 3 or 4? Because the new SQL code takes care of those two steps. I just have to edit the code, correct?

Now when this mod is done it will add the Nieuport 17 to the game, and I can make it just be available to France. Just like I tweaked the longboat UU to be available to Sweden as well as the Danes.

Code:
<Civilization_UnitClassOverrides>
    <Row>
      <CivilizationType>CIVILIZATION_SWEDEN</CivilizationType>
      <UnitClassType>UNITCLASS_TRIREME</UnitClassType>
      <UnitType>UNIT_VIKING_LONGBOAT</UnitType>
    </Row>
  </Civilization_UnitClassOverrides>

I will ask you a few more questions later, but I feel I will get the hang of this quite quickly. So far it seems far easier than modding CiIV.

I could also pick apart WHoward's longboat UU mod. I hope he does not mind. Now I can open files in modbuddy properly. I see how he changed the unit stats. I see how the modinfo file is set up. It is a summary. XML is straight forward, just like in CiIV. Let me continue...

So, what I am doing is simply adding the Nierport 17 as a UU for France, as a replacement for the triplane. I figured this kind of project is perfect for getting my feet wet as far as modding goes. The plan is to copy what WHoward did, except I am not going to change unit stats. It will have the same stats as the WWI fighter. Just to learn for the moment.

Ok, SQL folder is in, and code. Changes just need to be made. I do not have to set VFS file to true. check!

Now let's add files to the XML folder.

These two I don't need in the mod file. WHoward does not use them and you said they are not needed for modding in a unit. Civ5ArtDefines_UnitMembers.xml and Civ5ArtDefines_Units.xml so bye bye to them.

I found everything but this.

Code:
<Row Tag="TXT_KEY_UNIT_VIKING_LONGBOAT_TEXT">
			<Text>Longboats (or Longships) were sea vessels made and used by the Vikings from the Nordic countries for trade, commerce, exploration, and warfare during the Viking Age.[NEWLINE][NEWLINE]The longship is characterized as a graceful, long, narrow, light, wooden boat with a shallow-draft hull designed for speed. The ship's shallow draft allowed navigation in waters only one metre deep and permitted beach landings. Longships were fitted with oars along almost the entire length of the boat itself. Later versions sported a rectangular sail on a single mast which was used to replace or augment the effort of the rowers.</Text>
		</Row>

I cannot find any UNIT_TEXT so, I am just going to replace it with my own changes.

Code:
<Row Tag="TXT_KEY_UNIT_NIEUPORT17_TEXT">
			<Text>The Nieuport 17 was a French biplane fighter aircraft of World War I, manufactured by the Nieuport company. It had outstanding maneuverability, and an excellent rate of climb. Initially, the Nieuport 17 retained the above wing mounted Lewis gun of the Nieuport 11, but in French service this was soon replaced by a synchronised Vickers gun. The Nieuport 17 became obsolescent in 1917, and was replaced by the SPAD S.VII.</Text>
		</Row>

That should do, so far so good.
 
I cannot find these for triplane. The <IconTextureAtlases> can you send me the path to these. I have to change all of the <Atlas>UNITS_VIKING_LONGBOAT_ICON_ATLAS</Atlas> to NIEUPORT17 correct? So, I have to locate the path to for those dealing with the Triplane <IconTextureAtlases>.

Or will my unit, just by default use the triplane icons? I am :confused: about this.

I am guessing that because my Nieuport 17 is under UNITCLASS_TRIPLANE, then it should use the triplane icons by default. The unit I am adding does not have it's own unique icons. So, am I right in this assumption?
 
I cannot find these for triplane. The <IconTextureAtlases> can you send me the path to these. I have to change all of the <Atlas>UNITS_VIKING_LONGBOAT_ICON_ATLAS</Atlas> to NIEUPORT17 correct? So, I have to locate the path to for those dealing with the Triplane <IconTextureAtlases>.
See the first spoiler below. However, the way you're going about it, you won't have a proper air unit.

Or will my unit, just by default use the triplane icons?
No, if you don't use SQL (much easier, IMHO--you can just copy most of the entries, and change the ones you need), then you will need to specify everything.

If you still want to use XML, then there's no need to guess about any of this. Just take a look at the pertinent section of the game XML. Everything is there, you just have to piece it together from the various files (or learn to go through the database [Documents\My Games\Sid Meier's Civilization V\cache\Civ5DebugDatabase.db] using SQLite Manager for Firefox, or a similar program).

It is a little confusing here because Firaxis has 2 different names they use internally for "Triplanes" or "WWI Fighters."

* See Assets\DLC\Expansion\Gameplay\XML\Units\CIV5Units_Expansion.xml (I've bolded <Icon_Atlas> and <PortraitIndex>, which should be the one you were asking about):
Spoiler :
Code:
<GameData>
	<Units>
		<Row>
			<Class>UNITCLASS_TRIPLANE</Class>
			<Type>UNIT_TRIPLANE</Type>
			<PrereqTech>TECH_FLIGHT</PrereqTech>
			<RangedCombat>35</RangedCombat>
			<Cost>325</Cost>
			<Moves>2</Moves>
			<Special>SPECIALUNIT_FIGHTER</Special>
			<Immobile>true</Immobile>
			<Range>5</Range>
			<AirInterceptRange>5</AirInterceptRange>
			<CombatClass>UNITCOMBAT_FIGHTER</CombatClass>
			<Domain>DOMAIN_AIR</Domain>
			<DefaultUnitAI>UNITAI_DEFENSE_AIR</DefaultUnitAI>
			<Description>TXT_KEY_UNIT_TRIPLANE</Description>
			<Civilopedia>TXT_KEY_CIV5_TRIPLANE_TEXT</Civilopedia>
			<Strategy>TXT_KEY_UNIT_TRIPLANE_STRATEGY</Strategy>
			<Help>TXT_KEY_UNIT_HELP_TRIPLANE</Help>
			<MilitarySupport>true</MilitarySupport>
			<MilitaryProduction>true</MilitaryProduction>
			<Mechanized>true</Mechanized>
			<ObsoleteTech>TECH_RADAR</ObsoleteTech>
			<IgnoreBuildingDefense>true</IgnoreBuildingDefense>
			<AdvancedStartCost>30</AdvancedStartCost>
			<AirUnitCap>1</AirUnitCap>
			<RangedCombatLimit>100</RangedCombatLimit>
			<CombatLimit>0</CombatLimit>
			<XPValueAttack>3</XPValueAttack>
			<XPValueDefense>2</XPValueDefense>
			<UnitArtInfo>ART_DEF_UNIT_WW1_FIGHTER</UnitArtInfo>
			<UnitFlagAtlas>EXPANSION_UNIT_FLAG_ATLAS</UnitFlagAtlas>
			<UnitFlagIconOffset>24</UnitFlagIconOffset>
			[B]<IconAtlas>EXPANSION_UNIT_ATLAS_1</IconAtlas>
			<PortraitIndex>24</PortraitIndex>[/B]
			<MoveRate>AIR_REBASE</MoveRate>
		</Row>
	</Units>
</GameData>

* The Art Defines are in Assets\DLC\Expansion\Units\Civ5ArtDefines_Expansion_Units.xml [note, though, that they need to be rewritten; tag names are different in the database, so if you have to do it from scratch you'll want to check the database--but I've done this for you below; hopefully I haven't made any mistakes/typos] [EDIT: I apparently made lots, but I've tried to fix them]:
Spoiler :
Code:
<GameData>

<ArtDefine_UnitInfos>
  <Row>
    <Type>ART_DEF_UNIT_WW1_FIGHTER</Type>
    <DamageStates>1</DamageStates>
    <Formation>FighterWing</Formation>
  </Row>
</ArtDefine_UnitInfos>

<ArtDefine_UnitInfoMemberInfos>
  <Row>
      <UnitInfoType>ART_DEF_UNIT_WW1_FIGHTER</UnitInfoType>
      <UnitMemberInfoType>ART_DEF_UNIT_MEMBER_WW1_FIGHTER</UnitMemberInfoType>
      <NumMembers>3</NumMembers>
  </Row>
</ArtDefine_UnitInfoMemberInfos>

</GameData>

...and Assets\DLC\Expansion\Units\Civ5ArtDefines_Expansion_UnitMembers.xml [same for this one, needed to be rewritten]:
Spoiler :
Code:
<GameData>

<ArtDefine_UnitMemberInfos>
  <Row>
    <Type>ART_DEF_UNIT_MEMBER_WW1_FIGHTER</Type>
    <Scale>0.09</Scale>
    <ZOffset />
    <Domain>Air</Domain>
    <Model>WW1_Fighter.fxsxml</Model>
    <MaterialTypeTag>METAL</MaterialTypeTag>
    <MaterialTypeSoundOverrideTag>METALLRG</MaterialTypeSoundOverrideTag>
  </Row>
</ArtDefine_UnitMemberInfos>

<ArtDefine_UnitMemberCombats>
  <Row>
    <UnitMemberType>ART_DEF_UNIT_MEMBER_WW1_FIGHTER</UnitMemberType>
      <EnableActions>Idle Attack Bombard Death Run</EnableActions>
      <DisableActions />
      <AttackRadius>45.0</AttackRadius>
      <MoveRate>1.6</MoveRate>
      <TurnRateMin>0.25</TurnRateMin>
      <TurnRateMax>0.5</TurnRateMax>
      <HasRefaceAfterCombat>0</HasRefaceAfterCombat>
      <RushAttackFormation />
  </Row>
</ArtDefine_UnitMemberCombats>

<ArtDefine_UnitMemberCombatWeapons>
  <Row>
    <UnitMemberType>ART_DEF_UNIT_MEMBER_WW1_FIGHTER</UnitMemberType>
      <Index>0</Index>
      <SubIndex>0</SubIndex>
      <ID />
        <VisKillStrengthMin>10.0</VisKillStrengthMin>
        <VisKillStrengthMax>20.0</VisKillStrengthMax>
        <ProjectileSpeed>1.3</ProjectileSpeed>
        <HitEffect>ART_DEF_VEFFECT_FIGHTER_MACHINE_GUN_HIT_$(TERRAIN)</HitEffect>
        <HitRadius>20.0</HitRadius>
        <WeaponTypeTag>BULLETHC</WeaponTypeTag>
        <WeaponTypeSoundOverrideTag>BULLETHC</WeaponTypeSoundOverrideTag>
  </Row>
  <Row>
    <UnitMemberType>ART_DEF_UNIT_MEMBER_WW1_FIGHTER</UnitMemberType>
      <Index>1</Index>
      <SubIndex>0</SubIndex>
      <ID />
          <VisKillStrengthMin>1.0</VisKillStrengthMin>
          <VisKillStrengthMax>1.0</VisKillStrengthMax>
          <HitEffect>ART_DEF_VEFFECT_FIGHTER_MACHINE_GUN_HIT_$(TERRAIN)</HitEffect>
          <HitRadius>30.0</HitRadius>
          <WeaponTypeTag>BULLETHC</WeaponTypeTag>
          <WeaponTypeSoundOverrideTag>BULLETHC</WeaponTypeSoundOverrideTag>
  </Row>
  <Row>
    <UnitMemberType>ART_DEF_UNIT_MEMBER_WW1_FIGHTER</UnitMemberType>
      <Index>1</Index>
      <SubIndex>1</SubIndex>
          <ID>PROJECTILE</ID>
          <VisKillStrengthMin>25.0</VisKillStrengthMin>
          <VisKillStrengthMax>50.0</VisKillStrengthMax>
          <ProjectileSpeed>1.3</ProjectileSpeed>
          <HitEffect />
          <TargetGround>1</bTargetGround>
          <IsDropped>1</bIsDropped>
          <WeaponTypeTag>EXPLOSIVE</WeaponTypeTag>
          <WeaponTypeSoundOverrideTag>EXPLOSION200POUND</WeaponTypeSoundOverrideTag>
  </Row>
</ArtDefine_UnitMemberCombatWeapons>
</GameData>

...and Assets\DLC\Expansion\StrategicView\Civ5ArtDefines_SV_Expansion_Units.xml [which doesn't need rewriting, thankfully]:
Spoiler :
Code:
<GameData>
	<ArtDefine_StrategicView>
		<Row>
			<StrategicViewType>ART_DEF_UNIT_WW1_FIGHTER</StrategicViewType>
			<TileType>Unit</TileType>
			<Asset>SV_WWI_Triplane.dds</Asset>
		</Row>
	</ArtDefine_StrategicView>
</GameData>

* The text descriptions are in Assets\DLC\Expansion\Gameplay\XML\Text\en_US\CIV5GameTextInfos2_Expansion.xml:
Spoiler :
Code:
<GameData>
	<Language_en_US>
		<Row Tag="TXT_KEY_UNIT_HELP_TRIPLANE">
			<Text>Early Air Unit designed to intercept incoming enemy aircraft.</Text>
		</Row>
		<Row Tag="TXT_KEY_UNIT_TRIPLANE_STRATEGY">
			<Text>The Triplane is an early air unit. It can be based in any city you own or aboard an aircraft carrier. It can move from city to city (or carrier) and can perform "missions" within its range of 5 tiles. Use triplanes to attack enemy aircraft and ground units, to scout enemy positions, and to defend against enemy air attacks. See the rules on Aircraft for more information.</Text>
		</Row>
	</Language_en_US>
</GameData>

...and Assets\DLC\Expansion\Gameplay\XML\Text\en_US\CIV5GameTextInfos_Civilopedia_Expansion.xml:
Spoiler :
Code:
<GameData>
	<Language_en_US>
		<Row Tag="TXT_KEY_CIV5_TRIPLANE_TEXT">
			<Text>Deriving its name from the unique three-tiered wing system utilized in its design, the triplane was used with varying degrees of success during World War I.  The most famous triplane of the war, the Fokker Dr.I, was used extensively by the German air force, gaining particular notoriety as the legendary Red Baron's craft of choice. Although engineers developed many variations on the triplane design, advancements in the traditional biplane rendered the triplane obsolete within a decade of its introduction.</Text>
		</Row>
	</Language_en_US>
</GameData>

Now copy all this mess into your mod, and go through and make your changes. One file or multiple, doesn't matter. You can leave stuff out if you're going to use the references to the original (e.g., I might use the original TXT_KEY_UNIT_HELP_TRIPLANE then leave out the <Row Tag="TXT_KEY_UNIT_HELP_TRIPLANE"> entry).
 
Ok, let's do this one step at a time so I don't get confused. This is my Nieuport17.xml code. Is anything missing in this file that needs to be added? I am basically copying how WHoward did it.

Spoiler :
Code:
<?xml version="1.0" encoding="utf-8"?>
<GameData>
	<Units>
		<Row>
			<Class>UNITCLASS_TRIPLANE</Class>
			<Type>UNIT_NIEUPORT17</Type>
			<PrereqTech>TECH_FLIGHT</PrereqTech>
			<RangedCombat>35</RangedCombat>
			<Cost>325</Cost>
			<Moves>2</Moves>
			<Special>SPECIALUNIT_FIGHTER</Special>
			<Immobile>true</Immobile>
			<Range>5</Range>
			<AirInterceptRange>5</AirInterceptRange>
			<CombatClass>UNITCOMBAT_FIGHTER</CombatClass>
			<Domain>DOMAIN_AIR</Domain>
			<DefaultUnitAI>UNITAI_DEFENSE_AIR</DefaultUnitAI>
			<Description>TXT_KEY_UNIT_NIEUPORT17</Description>
			<Civilopedia>TXT_KEY_CIV5_NIEUPORT17_TEXT</Civilopedia>
			<Strategy>TXT_KEY_UNIT_NIEUPORT17_STRATEGY</Strategy>
			<Help>TXT_KEY_UNIT_HELP_NIEUPORT17</Help>
			<MilitarySupport>true</MilitarySupport>
			<MilitaryProduction>true</MilitaryProduction>
			<Mechanized>true</Mechanized>
			<ObsoleteTech>TECH_RADAR</ObsoleteTech>
			<IgnoreBuildingDefense>true</IgnoreBuildingDefense>
			<AdvancedStartCost>30</AdvancedStartCost>
			<AirUnitCap>1</AirUnitCap>
			<RangedCombatLimit>100</RangedCombatLimit>
			<CombatLimit>0</CombatLimit>
			<XPValueAttack>3</XPValueAttack>
			<XPValueDefense>2</XPValueDefense>
			<UnitArtInfo>ART_DEF_UNIT_NIEUPORT17</UnitArtInfo>
			<UnitFlagAtlas>EXPANSION_UNIT_FLAG_ATLAS</UnitFlagAtlas>
			<UnitFlagIconOffset>24</UnitFlagIconOffset>
			<IconAtlas>EXPANSION_UNIT_ATLAS_1</IconAtlas>
			<PortraitIndex>24</PortraitIndex>
			<MoveRate>AIR_REBASE</MoveRate>
		</Row>
	</Units>

	<Unit_AITypes>
		<Row>
			<UnitType>UNIT_NIEUPORT17</UnitType>
			<UnitAIType>UNITAI_DEFENSE_AIR</UnitAIType>
		</Row>
		<Row>
			<UnitType>UNIT_NIEUPORT17</UnitType>
			<UnitAIType>UNITAI_CARRIER_AIR</UnitAIType>
		</Row>
	</Unit_AITypes>

	<Unit_ClassUpgrades>
		<Row>
			<UnitType>UNIT_NIEUPORT17</UnitType>
			<UnitClassType>UNITCLASS_FIGHTER</UnitClassType>
		</Row>
	</Unit_ClassUpgrades>

	<Unit_Flavors>
		<Row>
			<UnitType>UNIT_NIEUPORT17</UnitType>
			<FlavorType>FLAVOR_OFFENSE</FlavorType>
			<Flavor>5</Flavor>
		</Row>
		<Row>
			<UnitType>UNIT_NIEUPORT17</UnitType>
			<FlavorType>FLAVOR_DEFENSE</FlavorType>
			<Flavor>5</Flavor>
		</Row>
		<Row>
			<UnitType>UNIT_NIEUPORT17</UnitType>
			<FlavorType>FLAVOR_AIR</FlavorType>
			<Flavor>10</Flavor>
		</Row>
		<Row>
			<UnitType>UNIT_NIEUPORT17</UnitType>
			<FlavorType>FLAVOR_ANTIAIR</FlavorType>
			<Flavor>12</Flavor>
		</Row>
	</Unit_Flavors>

	<Unit_FreePromotions>
		<Row>
			<UnitType>UNIT_NIEUPORT17</UnitType>
			<PromotionType>PROMOTION_INTERCEPTION_III</PromotionType>
		</Row>
		<Row>
			<UnitType>UNIT_NIEUPORT17</UnitType>
			<PromotionType>PROMOTION_AIR_SWEEP</PromotionType>
		</Row>
		<Row>
			<UnitType>UNIT_NIEUPORT17</UnitType>
			<PromotionType>PROMOTION_AIR_RECON</PromotionType>
		</Row>
		<Row>
			<UnitType>UNIT_NIEUPORT17</UnitType>
			<PromotionType>PROMOTION_ANTI_AIR_II</PromotionType>
		</Row>
	</Unit_FreePromotions>

	<Civilization_UnitClassOverrides>
		<Row>
			<CivilizationType>CIVILIZATION_FRANCE</CivilizationType>
			<UnitClassType>UNITCLASS_FIGHTER</UnitClassType>
			<UnitType>UNIT_NIEUPORT17</UnitType>
		</Row>
	</Civilization_UnitClassOverrides>

	<Unit_ResourceQuantityRequirements>
		<Row>
			<UnitType>UNIT_NIEUPORT17</UnitType>
			<ResourceType>RESOURCE_OIL</ResourceType>
		</Row>
	</Unit_ResourceQuantityRequirements>

	<Language_en_US>
		<Row Tag="TXT_KEY_UNIT_NIEUPORT17">
			<Text>Nieuport 17</Text>
		</Row>
		<Row Tag="TXT_KEY_UNIT_NIEUPORT17_TEXT">
			<Text>The Nieuport 17 was a French biplane fighter aircraft of World War I, manufactured by the Nieuport company. It had outstanding maneuverability, and an excellent rate of climb. Initially, the Nieuport 17 retained the above wing mounted Lewis gun of the Nieuport 11, but in French service this was soon replaced by a synchronised Vickers gun. The Nieuport 17 became obsolescent in 1917, and was replaced by the SPAD S.VII.</Text>
		</Row>
		<Row Tag="TXT_KEY_UNIT_NIEUPORT17_STRATEGY">
			<Text>The Triplane is an early air unit. It can be based in any city you own or aboard an aircraft carrier. It can move from city to city (or carrier) and can perform "missions" within its range of 5 tiles. Use triplanes to attack enemy aircraft and ground units, to scout enemy positions, and to defend against enemy air attacks. See the rules on Aircraft for more information.</Text>
		</Row>
		<Row Tag="TXT_KEY_UNIT_HELP_NIEUPORT17">
			<Text>Early Air Unit designed to intercept incoming enemy aircraft.</Text>
		</Row>
	</Language_en_US>
</GameData>

Nieuport17Art.xml

Spoiler :
Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Created by ModBuddy on 7/7/2012 1:47:03 PM -->
<GameData>
	<ArtDefine_UnitInfos>
		<Row>
			<Type>ART_DEF_UNIT_NIEUPORT17</Type>
			<DamageStates>1</DamageStates>
			<Formation>FighterWing</Formation>
		</Row>
	</ArtDefine_UnitInfos>

	<ArtDefine_UnitInfoMemberInfos>
		<Row>
		 <UnitMemberArt>
			<UnitInfoType>ART_DEF_UNIT_NIEUPORT17</UnitInfoType>
			<UnitMemberInfoType>ART_DEF_UNIT_MEMBER_WW1_FIGHTER</UnitMemberInfoType>
			<NumMembers>3</NumMembers>
		  </UnitMemberArt>
		</Row>
	</ArtDefine_UnitInfoMemberInfos>

    <ArtDefine_UnitMemberInfos>
		<Row>
		 <Type>ART_DEF_UNIT_MEMBER_WW1_Fighter</Type>
			<Scale>0.09</Scale>
			  <ZOffset/>
				<Domain>Air</Domain>
				<Model>
				  <Granny>Nieuport17.fxsxml</Granny>
				  <MaterialTypeTag>METAL</MaterialTypeTag>
				  <MaterialTypeSoundOverrideTag>METALLRG</MaterialTypeSoundOverrideTag>
				</Model>
		</Row>
	</ArtDefine_UnitMemberInfos>

	<ArtDefine_UnitMemberCombats>
		<Row>
			<UnitMemberType>ART_DEF_UNIT_MEMBER_WW1_FIGHTER</UnitMemberType>
			<EnableActions>Idle Attack Bombard Death Run</EnableActions>
			<DisableActions />
			<AttackRadius>45.0</AttackRadius>
			<MoveRate>1.6</MoveRate>
			<TurnRateMin>0.25</TurnRateMin>
			<TurnRateMax>0.5</TurnRateMax>
			<HasRefaceAfterCombat>0</HasRefaceAfterCombat>
			<RushAttackFormation />
		</Row>
	</ArtDefine_UnitMemberCombats>

	<Usage>Vs_Air</Usage>

	<ArtDefine_UnitMemberCombatWeapons>
		<Row>
			<UnitMemberType>ART_DEF_UNIT_MEMBER_WW1_FIGHTER</UnitMemberType>
			<Index>0</Index>
			<SubIndex>0</SubIndex>
			<ID />
			<VisKillStrengthMin>10.0</VisKillStrengthMin>
			<VisKillStrengthMax>20.0</VisKillStrengthMax>
			<ProjectileSpeed>1.3</ProjectileSpeed>
			<HitEffect>ART_DEF_VEFFECT_FIGHTER_MACHINE_GUN_HIT_$(TERRAIN)</HitEffect>
			<HitRadius>20.0</HitRadius>
			<WeaponTypeTag>BULLETHC</WeaponTypeTag>
			<WeaponTypeSoundOverrideTag>BULLETHC</WeaponTypeSoundOverrideTag>
		</Row>
		<Row>
			<UnitMemberType>ART_DEF_UNIT_MEMBER_WW1_FIGHTER</UnitMemberType>
			<Index>1</Index>
			<SubIndex>0</SubIndex>
			<ID />
			 <Weapon>
				<VisKillStrengthMin>1.0</VisKillStrengthMin>
				<VisKillStrengthMax>1.0</VisKillStrengthMax>
				<HitEffect>ART_DEF_VEFFECT_FIGHTER_MACHINE_GUN_HIT_$(TERRAIN)</HitEffect>
				<HitRadius>30.0</HitRadius>
				<WeaponTypeTag>BULLETHC</WeaponTypeTag>
				<WeaponTypeSoundOverrideTag>BULLETHC</WeaponTypeSoundOverrideTag>
			  </Weapon>
		</Row>
		<Row>
			<UnitMemberType>ART_DEF_UNIT_MEMBER_WW1_FIGHTER</UnitMemberType>
			<Index>1</Index>
			<SubIndex>1</SubIndex>
			<ID>PROJECTILE</ID>
			<VisKillStrengthMin>25.0</VisKillStrengthMin>
			<VisKillStrengthMax>50.0</VisKillStrengthMax>
			<ProjectileSpeed>1.3</ProjectileSpeed>
			<HitEffect />
			<TargetGround>1</TargetGround>
				<IsDropped>1</IsDropped>
					<WeaponTypeTag>EXPLOSIVE</WeaponTypeTag>
					<WeaponTypeSoundOverrideTag>EXPLOSION200POUND</WeaponTypeSoundOverrideTag>
				</Row>
	</ArtDefine_UnitMemberCombatWeapons>

    <ArtDefine_StrategicView>
		<Row>
			<StrategicViewType>ART_DEF_UNIT_NIEUPORT17</StrategicViewType>
			<TileType>Unit</TileType>
			<Asset>SV_WWI_Triplane.dds</Asset>
		</Row>
	</ArtDefine_StrategicView>
</GameData>

A couple small xml typos. It's ok it keeps me on my toes.

All of this look ok? According to modbuddy there are no xml errors. SV_WWI_Triplane.dds the unit from Danrell does not have a version of this. And most of the animations will be for WW1_FIGHTER is that ok?
 
@Gedemon or Nutty, or anyone else that knows.

I am just going to do the SQL way and see how that goes.

This is what my Nieuport17.sql code looks like, in my mod project. Is this ok? I just changed unit stats to match the triplane. Where it says this in the code, WHERE (UnitType = "UNIT_FIGHTER"), shouldn't I change that to

WHERE (UnitType = "UNIT_TRIPLANE")? And will this be a UU for France or is there more steps to get that done? Let me know.

Spoiler :
Code:
INSERT INTO "ArtDefine_UnitInfos" ('Type','DamageStates','Formation')
	SELECT	("ART_DEF_UNIT_NIEUPORT17_FRANCE"), "DamageStates", "Formation"
	FROM "ArtDefine_UnitInfos" WHERE (Type = "ART_DEF_UNIT_WW1_FIGHTER");
INSERT INTO "ArtDefine_UnitInfoMemberInfos" ('UnitInfoType','UnitMemberInfoType','NumMembers')
	SELECT	("ART_DEF_UNIT_NIEUPORT17_FRANCE"), ("ART_DEF_UNIT_MEMBER_NIEUPORT17_FRANCE"), "NumMembers"
	FROM "ArtDefine_UnitInfoMemberInfos" WHERE (UnitInfoType = "ART_DEF_UNIT_WW1_FIGHTER");
INSERT INTO "ArtDefine_UnitMemberCombats" ('UnitMemberType', 'EnableActions', 'DisableActions', 'MoveRadius', 'ShortMoveRadius', 'ChargeRadius', 'AttackRadius', 'RangedAttackRadius', 'MoveRate', 'ShortMoveRate', 'TurnRateMin', 'TurnRateMax', 'TurnFacingRateMin', 'TurnFacingRateMax', 'RollRateMin', 'RollRateMax', 'PitchRateMin', 'PitchRateMax', 'LOSRadiusScale', 'TargetRadius', 'TargetHeight', 'HasShortRangedAttack', 'HasLongRangedAttack', 'HasLeftRightAttack', 'HasStationaryMelee', 'HasStationaryRangedAttack', 'HasRefaceAfterCombat', 'ReformBeforeCombat', 'HasIndependentWeaponFacing', 'HasOpponentTracking', 'HasCollisionAttack', 'AttackAltitude', 'AltitudeDecelerationDistance', 'OnlyTurnInMovementActions', 'RushAttackFormation')
	SELECT	("ART_DEF_UNIT_MEMBER_NIEUPORT17_FRANCE"), "EnableActions", "DisableActions", "MoveRadius", "ShortMoveRadius", "ChargeRadius", "AttackRadius", "RangedAttackRadius", 
			"MoveRate", "ShortMoveRate", "TurnRateMin", "TurnRateMax", "TurnFacingRateMin", "TurnFacingRateMax", "RollRateMin", "RollRateMax", "PitchRateMin", "PitchRateMax", "LOSRadiusScale", "TargetRadius", "TargetHeight", "HasShortRangedAttack", "HasLongRangedAttack", "HasLeftRightAttack", "HasStationaryMelee", "HasStationaryRangedAttack", "HasRefaceAfterCombat", "ReformBeforeCombat", "HasIndependentWeaponFacing", "HasOpponentTracking", "HasCollisionAttack", "AttackAltitude", "AltitudeDecelerationDistance", "OnlyTurnInMovementActions", "RushAttackFormation"
	FROM "ArtDefine_UnitMemberCombats" WHERE (UnitMemberType = "ART_DEF_UNIT_MEMBER_WW1_FIGHTER");
INSERT INTO "ArtDefine_UnitMemberCombatWeapons" ('UnitMemberType', 'Index', 'SubIndex', 'ID', 'VisKillStrengthMin', 'VisKillStrengthMax', 'ProjectileSpeed', 'ProjectileTurnRateMin', 'ProjectileTurnRateMax', 'HitEffect', 'HitEffectScale', 'HitRadius', 'ProjectileChildEffectScale', 'AreaDamageDelay', 'ContinuousFire', 'WaitForEffectCompletion', 'TargetGround', 'IsDropped', 'WeaponTypeTag', 'WeaponTypeSoundOverrideTag')
	SELECT ("ART_DEF_UNIT_MEMBER_NIEUPORT17_FRANCE"), "Index", "SubIndex", "ID", "VisKillStrengthMin", "VisKillStrengthMax", "ProjectileSpeed", "ProjectileTurnRateMin", "ProjectileTurnRateMax", "HitEffect", "HitEffectScale", "HitRadius", "ProjectileChildEffectScale", "AreaDamageDelay", "ContinuousFire", "WaitForEffectCompletion", "TargetGround", "IsDropped", "WeaponTypeTag", "WeaponTypeSoundOverrideTag"
	FROM "ArtDefine_UnitMemberCombatWeapons" WHERE (UnitMemberType = "ART_DEF_UNIT_MEMBER_WW1_FIGHTER");
INSERT INTO "ArtDefine_UnitMemberInfos" ("Type", "Scale", "ZOffset", "Domain", "Model", "MaterialTypeTag", "MaterialTypeSoundOverrideTag")
	SELECT	("ART_DEF_UNIT_MEMBER_NIEUPORT17_FRANCE"), "Scale", "ZOffset", "Domain", 
			("Nieuport17.fxsxml"), "MaterialTypeTag", "MaterialTypeSoundOverrideTag"
	FROM "ArtDefine_UnitMemberInfos" WHERE (Type = "ART_DEF_UNIT_MEMBER_WW1_FIGHTER"); 

	-- NIEUPORT17
INSERT INTO "UnitClasses" ('Type', 'Description', 'MaxGlobalInstances', 'MaxTeamInstances', 'MaxPlayerInstances', 'InstanceCostModifier', 'DefaultUnit' )
	SELECT ("UNITCLASS_NIEUPORT17"), "Description", "MaxGlobalInstances", "MaxTeamInstances", "MaxPlayerInstances", "InstanceCostModifier", "DefaultUnit"
	FROM "UnitClasses" WHERE (Type = "UNITCLASS_FIGHTER");

INSERT INTO "Units" ('Type', 'Description', 'Civilopedia', 'Strategy', 'Help', 'Requirements', 'Combat', 'RangedCombat', 'Cost', 'Moves', 'Immobile', 'Range', 'BaseSightRange', 'Class', 'Special', 'Capture', 'CombatClass', 'Domain', 'CivilianAttackPriority', 'DefaultUnitAI', 'Food', 'NoBadGoodies', 'RivalTerritory', 'MilitarySupport', 'MilitaryProduction', 'Pillage', 'Found', 'FoundAbroad', 'CultureBombRadius', 'GoldenAgeTurns', 'IgnoreBuildingDefense', 'PrereqResources', 'Mechanized', 'Suicide', 'CaptureWhileEmbarked', 'PrereqTech', 'ObsoleteTech', 'GoodyHutUpgradeUnitClass', 'HurryCostModifier', 'AdvancedStartCost', 'MinAreaSize', 'AirUnitCap', 'NukeDamageLevel', 'WorkRate', 'NumFreeTechs', 'RushBuilding', 'BaseHurry', 'HurryMultiplier', 'BaseGold', 'NumGoldPerEra', 'SpreadReligion', 'IsReligious', 'CombatLimit', 'RangeAttackOnlyInDomain', 'RangeAttackIgnoreLOS', 'RangedCombatLimit', 'XPValueAttack', 'XPValueDefense', 'SpecialCargo', 'DomainCargo', 'Conscription', 'ExtraMaintenanceCost', 'NoMaintenance', 'Unhappiness', 'UnitArtInfo', 'UnitArtInfoCulturalVariation', 'UnitArtInfoEraVariation', 'ProjectPrereq', 'SpaceshipProject', 'LeaderPromotion', 'LeaderExperience', 'DontShowYields', 'ShowInPedia', 'MoveRate', 'UnitFlagIconOffset', 'PortraitIndex', 'IconAtlas', 'UnitFlagAtlas')
	SELECT	("UNIT_NIEUPORT17"), ("Nieuport 17"), "Civilopedia", "Strategy", "Help", "Requirements",
			"Combat", (35), (325), "Moves", "Immobile", (5), "BaseSightRange", ("UNITCLASS_NIEUPORT17"), "Special", "Capture", "CombatClass", "Domain", "CivilianAttackPriority", "DefaultUnitAI", "Food", "NoBadGoodies", "RivalTerritory", "MilitarySupport", "MilitaryProduction", "Pillage", "Found", "FoundAbroad", "CultureBombRadius", "GoldenAgeTurns", "IgnoreBuildingDefense", "PrereqResources", "Mechanized", "Suicide", "CaptureWhileEmbarked", "PrereqTech", "ObsoleteTech", "GoodyHutUpgradeUnitClass", "HurryCostModifier", "AdvancedStartCost", "MinAreaSize", "AirUnitCap", "NukeDamageLevel", "WorkRate", "NumFreeTechs", "RushBuilding", "BaseHurry", "HurryMultiplier", "BaseGold", "NumGoldPerEra", "SpreadReligion", "IsReligious", "CombatLimit", "RangeAttackOnlyInDomain", "RangeAttackIgnoreLOS", "RangedCombatLimit", "XPValueAttack", "XPValueDefense", "SpecialCargo", "DomainCargo", "Conscription", "ExtraMaintenanceCost", "NoMaintenance", "Unhappiness",
			("ART_DEF_UNIT_NIEUPORT17"), "UnitArtInfoCulturalVariation", "UnitArtInfoEraVariation", "ProjectPrereq", "SpaceshipProject", "LeaderPromotion", "LeaderExperience", "DontShowYields", "ShowInPedia", "MoveRate",
			"UnitFlagIconOffset", "PortraitIndex", "IconAtlas", "UnitFlagAtlas"
	FROM "Units" WHERE (Type = "UNIT_FIGHTER");
INSERT INTO "Unit_AITypes" ('UnitType', 'UnitAIType')
	SELECT ("UNIT_NIEUPORT17"), "UnitAIType"
	FROM "Unit_AITypes" WHERE (UnitType = "UNIT_FIGHTER");
INSERT INTO "Unit_ClassUpgrades" ('UnitType', 'UnitClassType')
	SELECT ("UNIT_NIEUPORT17"), "UnitClassType"
	FROM "Unit_ClassUpgrades" WHERE (UnitType = "UNIT_FIGHTER");
INSERT INTO "Unit_Flavors" ('UnitType', 'FlavorType', 'Flavor')
	SELECT ("UNIT_NIEUPORT17"), "FlavorType", "Flavor"
	FROM "Unit_Flavors" WHERE (UnitType = "UNIT_FIGHTER");
INSERT INTO "Unit_FreePromotions" ('UnitType', 'PromotionType')
	SELECT ("UNIT_NIEUPORT17"), "PromotionType"
	FROM "Unit_FreePromotions" WHERE (UnitType = "UNIT_FIGHTER");
INSERT INTO "Unit_ResourceQuantityRequirements" ('UnitType', 'ResourceType', 'Cost')
	SELECT ("UNIT_NIEUPORT17"), "ResourceType", "Cost"
	FROM "Unit_ResourceQuantityRequirements" WHERE (UnitType = "UNIT_FIGHTER");
----
 
I'm going to respond to the XML question anyway because I botched the job so horribly.

Note, these are SQL rows you're adding with XML, so you're not going to have any nesting within the <Row> tags.

<ArtDefine_UnitInfoMemberInfos>
<Row>
<UnitMemberArt>
<UnitInfoType>ART_DEF_UNIT_NIEUPORT17</UnitInfoType>
<UnitMemberInfoType>ART_DEF_UNIT_MEMBER_WW1_FIGHTER</UnitMemberInfoType>
<NumMembers>3</NumMembers>
</UnitMemberArt>
</Row>
</ArtDefine_UnitInfoMemberInfos>

You don't want a <UnitMemberArt></UnitMemberArt> tag in there.

<ArtDefine_UnitMemberInfos>
<Row>
<Type>ART_DEF_UNIT_MEMBER_WW1_Fighter</Type>
<Scale>0.09</Scale>
<ZOffset/>
<Domain>Air</Domain>
<Model>
<Granny>Nieuport17.fxsxml</Granny>
<MaterialTypeTag>METAL</MaterialTypeTag>
<MaterialTypeSoundOverrideTag>METALLRG</MaterialTypeSoundOverrideTag>
</Model>
</Row>
</ArtDefine_UnitMemberInfos>
You don't want <Granny></Granny> in there either, it should be
Code:
[B]<Model>Nieuport17.fxsxml</Model>
<MaterialTypeTag>METAL</MaterialTypeTag>[/B]

<Usage>Vs_Air</Usage>
That needs to be deleted.

<Row>
<UnitMemberType>ART_DEF_UNIT_MEMBER_WW1_FIGHTER</UnitMemberType>
<Index>1</Index>
<SubIndex>0</SubIndex>
<ID />
<Weapon>
<VisKillStrengthMin>1.0</VisKillStrengthMin>
<VisKillStrengthMax>1.0</VisKillStrengthMax>
<HitEffect>ART_DEF_VEFFECT_FIGHTER_MACHINE_GUN_HIT_$(TERRAIN)</HitEffect>
<HitRadius>30.0</HitRadius>
<WeaponTypeTag>BULLETHC</WeaponTypeTag>
<WeaponTypeSoundOverrideTag>BULLETHC</WeaponTypeSoundOverrideTag>
</Weapon>
</Row>
There shouldn't be a <Weapon></Weapon> tag.

SV_WWI_Triplane.dds the unit from Danrell does not have a version of this.
That's the vanilla one, which should be fine.

And most of the animations will be for WW1_FIGHTER is that ok?
What do you mean? You shouldn't need to change the fxsxml or the gr2.

Now I'll take a look at the SQL...
 
Is this ok?
Just glancing at it, it looks fine.

shouldn't I change that to WHERE (UnitType = "UNIT_TRIPLANE")?
Yes.

And will this be a UU for France or is there more steps to get that done?

To make a UU, you need:
Code:
[B]INSERT INTO "Civilization_UnitClassOverrides" ( 'CivilizationType', 'UnitClassType', 'UnitType' )
	VALUES ( 'CIVILIZATION_FRANCE', 'UNITCLASS_TRIPLANE', 'UNIT_NIEUPORT17' );[/B]
 
I am doing it the shorter way via SQL. Steps 3 and 4, the xml steps are not needed to add units to a mod anymore.

This is my current SQL code.

Nieuport17.sql

Spoiler :
Code:
INSERT INTO "ArtDefine_UnitInfos" ('Type','DamageStates','Formation')
	SELECT	("ART_DEF_UNIT_NIEUPORT17"), "DamageStates", "Formation"
	FROM "ArtDefine_UnitInfos" WHERE (Type = "ART_DEF_UNIT_WW1_FIGHTER");
INSERT INTO "ArtDefine_UnitInfoMemberInfos" ('UnitInfoType','UnitMemberInfoType','NumMembers')
	SELECT	("ART_DEF_UNIT_NIEUPORT17"), ("ART_DEF_UNIT_MEMBER_NIEUPORT17"), "NumMembers"
	FROM "ArtDefine_UnitInfoMemberInfos" WHERE (UnitInfoType = "ART_DEF_UNIT_WW1_FIGHTER");
INSERT INTO "ArtDefine_UnitMemberCombats" ('UnitMemberType', 'EnableActions', 'DisableActions', 'MoveRadius', 'ShortMoveRadius', 'ChargeRadius', 'AttackRadius', 'RangedAttackRadius', 'MoveRate', 'ShortMoveRate', 'TurnRateMin', 'TurnRateMax', 'TurnFacingRateMin', 'TurnFacingRateMax', 'RollRateMin', 'RollRateMax', 'PitchRateMin', 'PitchRateMax', 'LOSRadiusScale', 'TargetRadius', 'TargetHeight', 'HasShortRangedAttack', 'HasLongRangedAttack', 'HasLeftRightAttack', 'HasStationaryMelee', 'HasStationaryRangedAttack', 'HasRefaceAfterCombat', 'ReformBeforeCombat', 'HasIndependentWeaponFacing', 'HasOpponentTracking', 'HasCollisionAttack', 'AttackAltitude', 'AltitudeDecelerationDistance', 'OnlyTurnInMovementActions', 'RushAttackFormation')
	SELECT	("ART_DEF_UNIT_MEMBER_NIEUPORT17"), "EnableActions", "DisableActions", "MoveRadius", "ShortMoveRadius", "ChargeRadius", "AttackRadius", "RangedAttackRadius", 
			"MoveRate", "ShortMoveRate", "TurnRateMin", "TurnRateMax", "TurnFacingRateMin", "TurnFacingRateMax", "RollRateMin", "RollRateMax", "PitchRateMin", "PitchRateMax", "LOSRadiusScale", "TargetRadius", "TargetHeight", "HasShortRangedAttack", "HasLongRangedAttack", "HasLeftRightAttack", "HasStationaryMelee", "HasStationaryRangedAttack", "HasRefaceAfterCombat", "ReformBeforeCombat", "HasIndependentWeaponFacing", "HasOpponentTracking", "HasCollisionAttack", "AttackAltitude", "AltitudeDecelerationDistance", "OnlyTurnInMovementActions", "RushAttackFormation"
	FROM "ArtDefine_UnitMemberCombats" WHERE (UnitMemberType = "ART_DEF_UNIT_MEMBER_WW1_FIGHTER");
INSERT INTO "ArtDefine_UnitMemberCombatWeapons" ('UnitMemberType', 'Index', 'SubIndex', 'ID', 'VisKillStrengthMin', 'VisKillStrengthMax', 'ProjectileSpeed', 'ProjectileTurnRateMin', 'ProjectileTurnRateMax', 'HitEffect', 'HitEffectScale', 'HitRadius', 'ProjectileChildEffectScale', 'AreaDamageDelay', 'ContinuousFire', 'WaitForEffectCompletion', 'TargetGround', 'IsDropped', 'WeaponTypeTag', 'WeaponTypeSoundOverrideTag')
	SELECT ("ART_DEF_UNIT_MEMBER_NIEUPORT17"), "Index", "SubIndex", "ID", "VisKillStrengthMin", "VisKillStrengthMax", "ProjectileSpeed", "ProjectileTurnRateMin", "ProjectileTurnRateMax", "HitEffect", "HitEffectScale", "HitRadius", "ProjectileChildEffectScale", "AreaDamageDelay", "ContinuousFire", "WaitForEffectCompletion", "TargetGround", "IsDropped", "WeaponTypeTag", "WeaponTypeSoundOverrideTag"
	FROM "ArtDefine_UnitMemberCombatWeapons" WHERE (UnitMemberType = "ART_DEF_UNIT_MEMBER_WW1_FIGHTER");
INSERT INTO "ArtDefine_UnitMemberInfos" ("Type", "Scale", "ZOffset", "Domain", "Model", "MaterialTypeTag", "MaterialTypeSoundOverrideTag")
	SELECT	("ART_DEF_UNIT_MEMBER_NIEUPORT17"), "Scale", "ZOffset", "Domain", 
			("Nieuport17.fxsxml"), "MaterialTypeTag", "MaterialTypeSoundOverrideTag"
	FROM "ArtDefine_UnitMemberInfos" WHERE (Type = "ART_DEF_UNIT_MEMBER_WW1_FIGHTER"); 

	-- NIEUPORT17
INSERT INTO "UnitClasses" ('Type', 'Description', 'MaxGlobalInstances', 'MaxTeamInstances', 'MaxPlayerInstances', 'InstanceCostModifier', 'DefaultUnit' )
	SELECT ("UNITCLASS_NIEUPORT17"), "Description", "MaxGlobalInstances", "MaxTeamInstances", "MaxPlayerInstances", "InstanceCostModifier", "DefaultUnit"
	FROM "UnitClasses" WHERE (Type = "UNITCLASS_FIGHTER");

INSERT INTO "Units" ('Type', 'Description', 'Civilopedia', 'Strategy', 'Help', 'Requirements', 'Combat', 'RangedCombat', 'Cost', 'Moves', 'Immobile', 'Range', 'BaseSightRange', 'Class', 'Special', 'Capture', 'CombatClass', 'Domain', 'CivilianAttackPriority', 'DefaultUnitAI', 'Food', 'NoBadGoodies', 'RivalTerritory', 'MilitarySupport', 'MilitaryProduction', 'Pillage', 'Found', 'FoundAbroad', 'CultureBombRadius', 'GoldenAgeTurns', 'IgnoreBuildingDefense', 'PrereqResources', 'Mechanized', 'Suicide', 'CaptureWhileEmbarked', 'PrereqTech', 'ObsoleteTech', 'GoodyHutUpgradeUnitClass', 'HurryCostModifier', 'AdvancedStartCost', 'MinAreaSize', 'AirUnitCap', 'NukeDamageLevel', 'WorkRate', 'NumFreeTechs', 'RushBuilding', 'BaseHurry', 'HurryMultiplier', 'BaseGold', 'NumGoldPerEra', 'SpreadReligion', 'IsReligious', 'CombatLimit', 'RangeAttackOnlyInDomain', 'RangeAttackIgnoreLOS', 'RangedCombatLimit', 'XPValueAttack', 'XPValueDefense', 'SpecialCargo', 'DomainCargo', 'Conscription', 'ExtraMaintenanceCost', 'NoMaintenance', 'Unhappiness', 'UnitArtInfo', 'UnitArtInfoCulturalVariation', 'UnitArtInfoEraVariation', 'ProjectPrereq', 'SpaceshipProject', 'LeaderPromotion', 'LeaderExperience', 'DontShowYields', 'ShowInPedia', 'MoveRate', 'UnitFlagIconOffset', 'PortraitIndex', 'IconAtlas', 'UnitFlagAtlas')
	SELECT	("UNIT_NIEUPORT17"), ("Nieuport 17"), "Civilopedia", "Strategy", "Help", "Requirements",
			"Combat", (35), (325), "Moves", "Immobile", (5), "BaseSightRange", ("UNITCLASS_NIEUPORT17"), "Special", "Capture", "CombatClass", "Domain", "CivilianAttackPriority", "DefaultUnitAI", "Food", "NoBadGoodies", "RivalTerritory", "MilitarySupport", "MilitaryProduction", "Pillage", "Found", "FoundAbroad", "CultureBombRadius", "GoldenAgeTurns", "IgnoreBuildingDefense", "PrereqResources", "Mechanized", "Suicide", "CaptureWhileEmbarked", "PrereqTech", "ObsoleteTech", "GoodyHutUpgradeUnitClass", "HurryCostModifier", "AdvancedStartCost", "MinAreaSize", "AirUnitCap", "NukeDamageLevel", "WorkRate", "NumFreeTechs", "RushBuilding", "BaseHurry", "HurryMultiplier", "BaseGold", "NumGoldPerEra", "SpreadReligion", "IsReligious", "CombatLimit", "RangeAttackOnlyInDomain", "RangeAttackIgnoreLOS", "RangedCombatLimit", "XPValueAttack", "XPValueDefense", "SpecialCargo", "DomainCargo", "Conscription", "ExtraMaintenanceCost", "NoMaintenance", "Unhappiness",
			("ART_DEF_UNIT_NIEUPORT17"), "UnitArtInfoCulturalVariation", "UnitArtInfoEraVariation", "ProjectPrereq", "SpaceshipProject", "LeaderPromotion", "LeaderExperience", "DontShowYields", "ShowInPedia", "MoveRate",
			"UnitFlagIconOffset", "PortraitIndex", "IconAtlas", "UnitFlagAtlas"
	FROM "Units" WHERE (Type = "UNIT_FIGHTER");
INSERT INTO "Unit_AITypes" ('UnitType', 'UnitAIType')
	SELECT ("UNIT_NIEUPORT17"), "UnitAIType"
	FROM "Unit_AITypes" WHERE (UnitType = "UNIT_FIGHTER");
INSERT INTO "Unit_ClassUpgrades" ('UnitType', 'UnitClassType')
	SELECT ("UNIT_NIEUPORT17"), "UnitClassType"
	FROM "Unit_ClassUpgrades" WHERE (UnitType = "UNIT_FIGHTER");
INSERT INTO "Unit_Flavors" ('UnitType', 'FlavorType', 'Flavor')
	SELECT ("UNIT_NIEUPORT17"), "FlavorType", "Flavor"
	FROM "Unit_Flavors" WHERE (UnitType = "UNIT_FIGHTER");
INSERT INTO "Unit_FreePromotions" ('UnitType', 'PromotionType')
	SELECT ("UNIT_NIEUPORT17"), "PromotionType"
	FROM "Unit_FreePromotions" WHERE (UnitType = "UNIT_FIGHTER");
INSERT INTO "Unit_ResourceQuantityRequirements" ('UnitType', 'ResourceType', 'Cost')
	SELECT ("UNIT_NIEUPORT17"), "ResourceType", "Cost"
	FROM "Unit_ResourceQuantityRequirements" WHERE (UnitType = "UNIT_FIGHTER");
----

Check this and let me know if it is correct. Thanks Nutty
 
To make a UU, you need:
Code:
[B]INSERT INTO "Civilization_UnitClassOverrides" ( 'CivilizationType', 'UnitClassType', 'UnitType' )
	VALUES ( 'CIVILIZATION_FRANCE', 'UNITCLASS_TRIPLANE', 'UNIT_NIEUPORT17' );[/B]

This I added in an XML folder.

Nieuport17.xml

Spoiler :
Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Created by ModBuddy on 7/8/2012 5:08:15 AM -->
<Civilization_UnitClassOverrides>
	<Row>
		<CivilizationType>CIVILIZATION_FRANCE</CivilizationType>
		<UnitClassType>UNITCLASS_NIEUPORT17</UnitClassType>
		<UnitType>UNIT_NIEUPORT17</UnitType>
	</Row>
</Civilization_UnitClassOverrides>

Correct?

Finished SQL.

Spoiler :
Code:
INSERT INTO "ArtDefine_UnitInfos" ('Type','DamageStates','Formation')
	SELECT	("ART_DEF_UNIT_NIEUPORT17"), "DamageStates", "Formation"
	FROM "ArtDefine_UnitInfos" WHERE (Type = "ART_DEF_UNIT_WW1_FIGHTER");
INSERT INTO "ArtDefine_UnitInfoMemberInfos" ('UnitInfoType','UnitMemberInfoType','NumMembers')
	SELECT	("ART_DEF_UNIT_NIEUPORT17"), ("ART_DEF_UNIT_MEMBER_NIEUPORT17"), "NumMembers"
	FROM "ArtDefine_UnitInfoMemberInfos" WHERE (UnitInfoType = "ART_DEF_UNIT_WW1_FIGHTER");
INSERT INTO "ArtDefine_UnitMemberCombats" ('UnitMemberType', 'EnableActions', 'DisableActions', 'MoveRadius', 'ShortMoveRadius', 'ChargeRadius', 'AttackRadius', 'RangedAttackRadius', 'MoveRate', 'ShortMoveRate', 'TurnRateMin', 'TurnRateMax', 'TurnFacingRateMin', 'TurnFacingRateMax', 'RollRateMin', 'RollRateMax', 'PitchRateMin', 'PitchRateMax', 'LOSRadiusScale', 'TargetRadius', 'TargetHeight', 'HasShortRangedAttack', 'HasLongRangedAttack', 'HasLeftRightAttack', 'HasStationaryMelee', 'HasStationaryRangedAttack', 'HasRefaceAfterCombat', 'ReformBeforeCombat', 'HasIndependentWeaponFacing', 'HasOpponentTracking', 'HasCollisionAttack', 'AttackAltitude', 'AltitudeDecelerationDistance', 'OnlyTurnInMovementActions', 'RushAttackFormation')
	SELECT	("ART_DEF_UNIT_MEMBER_NIEUPORT17"), "EnableActions", "DisableActions", "MoveRadius", "ShortMoveRadius", "ChargeRadius", "AttackRadius", "RangedAttackRadius", 
			"MoveRate", "ShortMoveRate", "TurnRateMin", "TurnRateMax", "TurnFacingRateMin", "TurnFacingRateMax", "RollRateMin", "RollRateMax", "PitchRateMin", "PitchRateMax", "LOSRadiusScale", "TargetRadius", "TargetHeight", "HasShortRangedAttack", "HasLongRangedAttack", "HasLeftRightAttack", "HasStationaryMelee", "HasStationaryRangedAttack", "HasRefaceAfterCombat", "ReformBeforeCombat", "HasIndependentWeaponFacing", "HasOpponentTracking", "HasCollisionAttack", "AttackAltitude", "AltitudeDecelerationDistance", "OnlyTurnInMovementActions", "RushAttackFormation"
	FROM "ArtDefine_UnitMemberCombats" WHERE (UnitMemberType = "ART_DEF_UNIT_MEMBER_WW1_FIGHTER");
INSERT INTO "ArtDefine_UnitMemberCombatWeapons" ('UnitMemberType', 'Index', 'SubIndex', 'ID', 'VisKillStrengthMin', 'VisKillStrengthMax', 'ProjectileSpeed', 'ProjectileTurnRateMin', 'ProjectileTurnRateMax', 'HitEffect', 'HitEffectScale', 'HitRadius', 'ProjectileChildEffectScale', 'AreaDamageDelay', 'ContinuousFire', 'WaitForEffectCompletion', 'TargetGround', 'IsDropped', 'WeaponTypeTag', 'WeaponTypeSoundOverrideTag')
	SELECT ("ART_DEF_UNIT_MEMBER_NIEUPORT17"), "Index", "SubIndex", "ID", "VisKillStrengthMin", "VisKillStrengthMax", "ProjectileSpeed", "ProjectileTurnRateMin", "ProjectileTurnRateMax", "HitEffect", "HitEffectScale", "HitRadius", "ProjectileChildEffectScale", "AreaDamageDelay", "ContinuousFire", "WaitForEffectCompletion", "TargetGround", "IsDropped", "WeaponTypeTag", "WeaponTypeSoundOverrideTag"
	FROM "ArtDefine_UnitMemberCombatWeapons" WHERE (UnitMemberType = "ART_DEF_UNIT_MEMBER_WW1_FIGHTER");
INSERT INTO "ArtDefine_UnitMemberInfos" ("Type", "Scale", "ZOffset", "Domain", "Model", "MaterialTypeTag", "MaterialTypeSoundOverrideTag")
	SELECT	("ART_DEF_UNIT_MEMBER_NIEUPORT17"), "Scale", "ZOffset", "Domain", 
			("Nieuport17.fxsxml"), "MaterialTypeTag", "MaterialTypeSoundOverrideTag"
	FROM "ArtDefine_UnitMemberInfos" WHERE (Type = "ART_DEF_UNIT_MEMBER_WW1_FIGHTER"); 

	-- NIEUPORT17
INSERT INTO "UnitClasses" ('Type', 'Description', 'MaxGlobalInstances', 'MaxTeamInstances', 'MaxPlayerInstances', 'InstanceCostModifier', 'DefaultUnit' )
	SELECT ("UNITCLASS_NIEUPORT17"), "Description", "MaxGlobalInstances", "MaxTeamInstances", "MaxPlayerInstances", "InstanceCostModifier", "DefaultUnit"
	FROM "UnitClasses" WHERE (Type = "UNITCLASS_TRIPLANE");

INSERT INTO "Units" ('Type', 'Description', 'Civilopedia', 'Strategy', 'Help', 'Requirements', 'Combat', 'RangedCombat', 'Cost', 'Moves', 'Immobile', 'Range', 'BaseSightRange', 'Class', 'Special', 'Capture', 'CombatClass', 'Domain', 'CivilianAttackPriority', 'DefaultUnitAI', 'Food', 'NoBadGoodies', 'RivalTerritory', 'MilitarySupport', 'MilitaryProduction', 'Pillage', 'Found', 'FoundAbroad', 'CultureBombRadius', 'GoldenAgeTurns', 'IgnoreBuildingDefense', 'PrereqResources', 'Mechanized', 'Suicide', 'CaptureWhileEmbarked', 'PrereqTech', 'ObsoleteTech', 'GoodyHutUpgradeUnitClass', 'HurryCostModifier', 'AdvancedStartCost', 'MinAreaSize', 'AirUnitCap', 'NukeDamageLevel', 'WorkRate', 'NumFreeTechs', 'RushBuilding', 'BaseHurry', 'HurryMultiplier', 'BaseGold', 'NumGoldPerEra', 'SpreadReligion', 'IsReligious', 'CombatLimit', 'RangeAttackOnlyInDomain', 'RangeAttackIgnoreLOS', 'RangedCombatLimit', 'XPValueAttack', 'XPValueDefense', 'SpecialCargo', 'DomainCargo', 'Conscription', 'ExtraMaintenanceCost', 'NoMaintenance', 'Unhappiness', 'UnitArtInfo', 'UnitArtInfoCulturalVariation', 'UnitArtInfoEraVariation', 'ProjectPrereq', 'SpaceshipProject', 'LeaderPromotion', 'LeaderExperience', 'DontShowYields', 'ShowInPedia', 'MoveRate', 'UnitFlagIconOffset', 'PortraitIndex', 'IconAtlas', 'UnitFlagAtlas')
	SELECT	("UNIT_NIEUPORT17"), ("Nieuport 17"), "Civilopedia", "Strategy", "Help", "Requirements",
			"Combat", (35), (325), "Moves", "Immobile", (5), "BaseSightRange", ("UNITCLASS_NIEUPORT17"), "Special", "Capture", "CombatClass", "Domain", "CivilianAttackPriority", "DefaultUnitAI", "Food", "NoBadGoodies", "RivalTerritory", "MilitarySupport", "MilitaryProduction", "Pillage", "Found", "FoundAbroad", "CultureBombRadius", "GoldenAgeTurns", "IgnoreBuildingDefense", "PrereqResources", "Mechanized", "Suicide", "CaptureWhileEmbarked", "PrereqTech", "ObsoleteTech", "GoodyHutUpgradeUnitClass", "HurryCostModifier", "AdvancedStartCost", "MinAreaSize", "AirUnitCap", "NukeDamageLevel", "WorkRate", "NumFreeTechs", "RushBuilding", "BaseHurry", "HurryMultiplier", "BaseGold", "NumGoldPerEra", "SpreadReligion", "IsReligious", "CombatLimit", "RangeAttackOnlyInDomain", "RangeAttackIgnoreLOS", "RangedCombatLimit", "XPValueAttack", "XPValueDefense", "SpecialCargo", "DomainCargo", "Conscription", "ExtraMaintenanceCost", "NoMaintenance", "Unhappiness",
			("ART_DEF_UNIT_NIEUPORT17"), "UnitArtInfoCulturalVariation", "UnitArtInfoEraVariation", "ProjectPrereq", "SpaceshipProject", "LeaderPromotion", "LeaderExperience", "DontShowYields", "ShowInPedia", "MoveRate",
			"UnitFlagIconOffset", "PortraitIndex", "IconAtlas", "UnitFlagAtlas"
	FROM "Units" WHERE (Type = "UNIT_TRIPLANE");
INSERT INTO "Unit_AITypes" ('UnitType', 'UnitAIType')
	SELECT ("UNIT_NIEUPORT17"), "UnitAIType"
	FROM "Unit_AITypes" WHERE (UnitType = "UNIT_TRIPLANE");
INSERT INTO "Unit_ClassUpgrades" ('UnitType', 'UnitClassType')
	SELECT ("UNIT_NIEUPORT17"), "UnitClassType"
	FROM "Unit_ClassUpgrades" WHERE (UnitType = "UNIT_TRIPLANE");
INSERT INTO "Unit_Flavors" ('UnitType', 'FlavorType', 'Flavor')
	SELECT ("UNIT_NIEUPORT17"), "FlavorType", "Flavor"
	FROM "Unit_Flavors" WHERE (UnitType = "UNIT_TRIPLANE");
INSERT INTO "Unit_FreePromotions" ('UnitType', 'PromotionType')
	SELECT ("UNIT_NIEUPORT17"), "PromotionType"
	FROM "Unit_FreePromotions" WHERE (UnitType = "UNIT_TRIPLANE");
INSERT INTO "Unit_ResourceQuantityRequirements" ('UnitType', 'ResourceType', 'Cost')
	SELECT ("UNIT_NIEUPORT17"), "ResourceType", "Cost"
	FROM "Unit_ResourceQuantityRequirements" WHERE (UnitType = "UNIT_TRIPLANE");
----
 
The XML to make it a UU is fine [though why not leave it in SQL?], but looking at your SQL again, I notice you're making a new unit class. You should just be using UNITCLASS_TRIPLANE.
(i.e., delete the inserts to the UnitClasses and Unit_ClassUpgrades tables)

EDIT: And you still want to change references to UNIT_FIGHTER to UNIT_TRIPLANE.
 
Ok like this

Spoiler :
Code:
-- NIEUPORT17
INSERT INTO "UnitClasses" ('Type', 'Description', 'MaxGlobalInstances', 'MaxTeamInstances', 'MaxPlayerInstances', 'InstanceCostModifier', 'DefaultUnit' )
	SELECT ("UNITCLASS_TRIPLANE"), "Description", "MaxGlobalInstances", "MaxTeamInstances", "MaxPlayerInstances", "InstanceCostModifier", "DefaultUnit"
	FROM "UnitClasses" WHERE (Type = "UNITCLASS_TRIPLANE");

INSERT INTO "Units" ('Type', 'Description', 'Civilopedia', 'Strategy', 'Help', 'Requirements', 'Combat', 'RangedCombat', 'Cost', 'Moves', 'Immobile', 'Range', 'BaseSightRange', 'Class', 'Special', 'Capture', 'CombatClass', 'Domain', 'CivilianAttackPriority', 'DefaultUnitAI', 'Food', 'NoBadGoodies', 'RivalTerritory', 'MilitarySupport', 'MilitaryProduction', 'Pillage', 'Found', 'FoundAbroad', 'CultureBombRadius', 'GoldenAgeTurns', 'IgnoreBuildingDefense', 'PrereqResources', 'Mechanized', 'Suicide', 'CaptureWhileEmbarked', 'PrereqTech', 'ObsoleteTech', 'GoodyHutUpgradeUnitClass', 'HurryCostModifier', 'AdvancedStartCost', 'MinAreaSize', 'AirUnitCap', 'NukeDamageLevel', 'WorkRate', 'NumFreeTechs', 'RushBuilding', 'BaseHurry', 'HurryMultiplier', 'BaseGold', 'NumGoldPerEra', 'SpreadReligion', 'IsReligious', 'CombatLimit', 'RangeAttackOnlyInDomain', 'RangeAttackIgnoreLOS', 'RangedCombatLimit', 'XPValueAttack', 'XPValueDefense', 'SpecialCargo', 'DomainCargo', 'Conscription', 'ExtraMaintenanceCost', 'NoMaintenance', 'Unhappiness', 'UnitArtInfo', 'UnitArtInfoCulturalVariation', 'UnitArtInfoEraVariation', 'ProjectPrereq', 'SpaceshipProject', 'LeaderPromotion', 'LeaderExperience', 'DontShowYields', 'ShowInPedia', 'MoveRate', 'UnitFlagIconOffset', 'PortraitIndex', 'IconAtlas', 'UnitFlagAtlas')
	SELECT	("UNIT_NIEUPORT17"), ("Nieuport 17"), "Civilopedia", "Strategy", "Help", "Requirements",
			"Combat", (35), (325), "Moves", "Immobile", (5), "BaseSightRange", ("UNITCLASS_TRIPLANE"), "Special", "Capture", "CombatClass", "Domain", "CivilianAttackPriority", "DefaultUnitAI", "Food", "NoBadGoodies", "RivalTerritory", "MilitarySupport", "MilitaryProduction", "Pillage", "Found", "FoundAbroad", "CultureBombRadius", "GoldenAgeTurns", "IgnoreBuildingDefense", "PrereqResources", "Mechanized", "Suicide", "CaptureWhileEmbarked", "PrereqTech", "ObsoleteTech", "GoodyHutUpgradeUnitClass", "HurryCostModifier", "AdvancedStartCost", "MinAreaSize", "AirUnitCap", "NukeDamageLevel", "WorkRate", "NumFreeTechs", "RushBuilding", "BaseHurry", "HurryMultiplier", "BaseGold", "NumGoldPerEra", "SpreadReligion", "IsReligious", "CombatLimit", "RangeAttackOnlyInDomain", "RangeAttackIgnoreLOS", "RangedCombatLimit", "XPValueAttack", "XPValueDefense", "SpecialCargo", "DomainCargo", "Conscription", "ExtraMaintenanceCost", "NoMaintenance", "Unhappiness",
			("ART_DEF_UNIT_NIEUPORT17"), "UnitArtInfoCulturalVariation", "UnitArtInfoEraVariation", "ProjectPrereq", "SpaceshipProject", "LeaderPromotion", "LeaderExperience", "DontShowYields", "ShowInPedia", "MoveRate",
			"UnitFlagIconOffset", "PortraitIndex", "IconAtlas", "UnitFlagAtlas"
	FROM "Units" WHERE (Type = "UNIT_TRIPLANE");
INSERT INTO "Unit_AITypes" ('UnitType', 'UnitAIType')
	SELECT ("UNIT_NIEUPORT17"), "UnitAIType"
	FROM "Unit_AITypes" WHERE (UnitType = "UNIT_TRIPLANE");
etc etc.
 
Delete the first insert, because you don't want to change that table. (Note that what that would have done is make a duplicate of the UNITCLASS_TRIPLANE row.)
 
Ok, finally the SQL is done.

Spoiler :
Code:
INSERT INTO "ArtDefine_UnitInfos" ('Type','DamageStates','Formation')
	SELECT	("ART_DEF_UNIT_NIEUPORT17"), "DamageStates", "Formation"
	FROM "ArtDefine_UnitInfos" WHERE (Type = "ART_DEF_UNIT_WW1_FIGHTER");
INSERT INTO "ArtDefine_UnitInfoMemberInfos" ('UnitInfoType','UnitMemberInfoType','NumMembers')
	SELECT	("ART_DEF_UNIT_NIEUPORT17"), ("ART_DEF_UNIT_MEMBER_NIEUPORT17"), "NumMembers"
	FROM "ArtDefine_UnitInfoMemberInfos" WHERE (UnitInfoType = "ART_DEF_UNIT_WW1_FIGHTER");
INSERT INTO "ArtDefine_UnitMemberCombats" ('UnitMemberType', 'EnableActions', 'DisableActions', 'MoveRadius', 'ShortMoveRadius', 'ChargeRadius', 'AttackRadius', 'RangedAttackRadius', 'MoveRate', 'ShortMoveRate', 'TurnRateMin', 'TurnRateMax', 'TurnFacingRateMin', 'TurnFacingRateMax', 'RollRateMin', 'RollRateMax', 'PitchRateMin', 'PitchRateMax', 'LOSRadiusScale', 'TargetRadius', 'TargetHeight', 'HasShortRangedAttack', 'HasLongRangedAttack', 'HasLeftRightAttack', 'HasStationaryMelee', 'HasStationaryRangedAttack', 'HasRefaceAfterCombat', 'ReformBeforeCombat', 'HasIndependentWeaponFacing', 'HasOpponentTracking', 'HasCollisionAttack', 'AttackAltitude', 'AltitudeDecelerationDistance', 'OnlyTurnInMovementActions', 'RushAttackFormation')
	SELECT	("ART_DEF_UNIT_MEMBER_NIEUPORT17"), "EnableActions", "DisableActions", "MoveRadius", "ShortMoveRadius", "ChargeRadius", "AttackRadius", "RangedAttackRadius", 
			"MoveRate", "ShortMoveRate", "TurnRateMin", "TurnRateMax", "TurnFacingRateMin", "TurnFacingRateMax", "RollRateMin", "RollRateMax", "PitchRateMin", "PitchRateMax", "LOSRadiusScale", "TargetRadius", "TargetHeight", "HasShortRangedAttack", "HasLongRangedAttack", "HasLeftRightAttack", "HasStationaryMelee", "HasStationaryRangedAttack", "HasRefaceAfterCombat", "ReformBeforeCombat", "HasIndependentWeaponFacing", "HasOpponentTracking", "HasCollisionAttack", "AttackAltitude", "AltitudeDecelerationDistance", "OnlyTurnInMovementActions", "RushAttackFormation"
	FROM "ArtDefine_UnitMemberCombats" WHERE (UnitMemberType = "ART_DEF_UNIT_MEMBER_WW1_FIGHTER");
INSERT INTO "ArtDefine_UnitMemberCombatWeapons" ('UnitMemberType', 'Index', 'SubIndex', 'ID', 'VisKillStrengthMin', 'VisKillStrengthMax', 'ProjectileSpeed', 'ProjectileTurnRateMin', 'ProjectileTurnRateMax', 'HitEffect', 'HitEffectScale', 'HitRadius', 'ProjectileChildEffectScale', 'AreaDamageDelay', 'ContinuousFire', 'WaitForEffectCompletion', 'TargetGround', 'IsDropped', 'WeaponTypeTag', 'WeaponTypeSoundOverrideTag')
	SELECT ("ART_DEF_UNIT_MEMBER_NIEUPORT17"), "Index", "SubIndex", "ID", "VisKillStrengthMin", "VisKillStrengthMax", "ProjectileSpeed", "ProjectileTurnRateMin", "ProjectileTurnRateMax", "HitEffect", "HitEffectScale", "HitRadius", "ProjectileChildEffectScale", "AreaDamageDelay", "ContinuousFire", "WaitForEffectCompletion", "TargetGround", "IsDropped", "WeaponTypeTag", "WeaponTypeSoundOverrideTag"
	FROM "ArtDefine_UnitMemberCombatWeapons" WHERE (UnitMemberType = "ART_DEF_UNIT_MEMBER_WW1_FIGHTER");
INSERT INTO "ArtDefine_UnitMemberInfos" ("Type", "Scale", "ZOffset", "Domain", "Model", "MaterialTypeTag", "MaterialTypeSoundOverrideTag")
	SELECT	("ART_DEF_UNIT_MEMBER_NIEUPORT17"), "Scale", "ZOffset", "Domain", 
			("Nieuport17.fxsxml"), "MaterialTypeTag", "MaterialTypeSoundOverrideTag"
	FROM "ArtDefine_UnitMemberInfos" WHERE (Type = "ART_DEF_UNIT_MEMBER_WW1_FIGHTER");
INSERT INTO "Units" ('Type', 'Description', 'Civilopedia', 'Strategy', 'Help', 'Requirements', 'Combat', 'RangedCombat', 'Cost', 'Moves', 'Immobile', 'Range', 'BaseSightRange', 'Class', 'Special', 'Capture', 'CombatClass', 'Domain', 'CivilianAttackPriority', 'DefaultUnitAI', 'Food', 'NoBadGoodies', 'RivalTerritory', 'MilitarySupport', 'MilitaryProduction', 'Pillage', 'Found', 'FoundAbroad', 'CultureBombRadius', 'GoldenAgeTurns', 'IgnoreBuildingDefense', 'PrereqResources', 'Mechanized', 'Suicide', 'CaptureWhileEmbarked', 'PrereqTech', 'ObsoleteTech', 'GoodyHutUpgradeUnitClass', 'HurryCostModifier', 'AdvancedStartCost', 'MinAreaSize', 'AirUnitCap', 'NukeDamageLevel', 'WorkRate', 'NumFreeTechs', 'RushBuilding', 'BaseHurry', 'HurryMultiplier', 'BaseGold', 'NumGoldPerEra', 'SpreadReligion', 'IsReligious', 'CombatLimit', 'RangeAttackOnlyInDomain', 'RangeAttackIgnoreLOS', 'RangedCombatLimit', 'XPValueAttack', 'XPValueDefense', 'SpecialCargo', 'DomainCargo', 'Conscription', 'ExtraMaintenanceCost', 'NoMaintenance', 'Unhappiness', 'UnitArtInfo', 'UnitArtInfoCulturalVariation', 'UnitArtInfoEraVariation', 'ProjectPrereq', 'SpaceshipProject', 'LeaderPromotion', 'LeaderExperience', 'DontShowYields', 'ShowInPedia', 'MoveRate', 'UnitFlagIconOffset', 'PortraitIndex', 'IconAtlas', 'UnitFlagAtlas')
	SELECT	("UNIT_NIEUPORT17"), ("Nieuport 17"), "Civilopedia", "Strategy", "Help", "Requirements",
			"Combat", (35), (325), "Moves", "Immobile", (5), "BaseSightRange", ("UNITCLASS_TRIPLANE"), "Special", "Capture", "CombatClass", "Domain", "CivilianAttackPriority", "DefaultUnitAI", "Food", "NoBadGoodies", "RivalTerritory", "MilitarySupport", "MilitaryProduction", "Pillage", "Found", "FoundAbroad", "CultureBombRadius", "GoldenAgeTurns", "IgnoreBuildingDefense", "PrereqResources", "Mechanized", "Suicide", "CaptureWhileEmbarked", "PrereqTech", "ObsoleteTech", "GoodyHutUpgradeUnitClass", "HurryCostModifier", "AdvancedStartCost", "MinAreaSize", "AirUnitCap", "NukeDamageLevel", "WorkRate", "NumFreeTechs", "RushBuilding", "BaseHurry", "HurryMultiplier", "BaseGold", "NumGoldPerEra", "SpreadReligion", "IsReligious", "CombatLimit", "RangeAttackOnlyInDomain", "RangeAttackIgnoreLOS", "RangedCombatLimit", "XPValueAttack", "XPValueDefense", "SpecialCargo", "DomainCargo", "Conscription", "ExtraMaintenanceCost", "NoMaintenance", "Unhappiness",
			("ART_DEF_UNIT_NIEUPORT17"), "UnitArtInfoCulturalVariation", "UnitArtInfoEraVariation", "ProjectPrereq", "SpaceshipProject", "LeaderPromotion", "LeaderExperience", "DontShowYields", "ShowInPedia", "MoveRate",
			"UnitFlagIconOffset", "PortraitIndex", "IconAtlas", "UnitFlagAtlas"
	FROM "Units" WHERE (Type = "UNIT_TRIPLANE");
INSERT INTO "Unit_AITypes" ('UnitType', 'UnitAIType')
	SELECT ("UNIT_NIEUPORT17"), "UnitAIType"
	FROM "Unit_AITypes" WHERE (UnitType = "UNIT_TRIPLANE");
INSERT INTO "Unit_ClassUpgrades" ('UnitType', 'UnitClassType')
	SELECT ("UNIT_NIEUPORT17"), "UnitClassType"
	FROM "Unit_ClassUpgrades" WHERE (UnitType = "UNIT_TRIPLANE");
INSERT INTO "Unit_Flavors" ('UnitType', 'FlavorType', 'Flavor')
	SELECT ("UNIT_NIEUPORT17"), "FlavorType", "Flavor"
	FROM "Unit_Flavors" WHERE (UnitType = "UNIT_TRIPLANE");
INSERT INTO "Unit_FreePromotions" ('UnitType', 'PromotionType')
	SELECT ("UNIT_NIEUPORT17"), "PromotionType"
	FROM "Unit_FreePromotions" WHERE (UnitType = "UNIT_TRIPLANE");
INSERT INTO "Unit_ResourceQuantityRequirements" ('UnitType', 'ResourceType', 'Cost')
	SELECT ("UNIT_NIEUPORT17"), "ResourceType", "Cost"
	FROM "Unit_ResourceQuantityRequirements" WHERE (UnitType = "UNIT_TRIPLANE");
INSERT INTO "Civilization_UnitClassOverrides" ( 'CivilizationType', 'UnitClassType', 'UnitType' )
	VALUES ( 'CIVILIZATION_FRANCE', 'UNITCLASS_TRIPLANE', 'UNIT_NIEUPORT17' );

This is the dreaded thread of code. Doing it until I get it right is the only way I'll learn.
 
Something is not right it is stiill a triplane. I tried it in game. The mod showed up in the mod section, just that the plane I built is not a Nieuport 17. It does not list France as having that as a UU in the techtree, which it should.

@Gedemon you said...The following is the SQL code that I use to replace step 3 and step 4 now that Civ5ArtDefines_UnitMembers.xml and Civ5ArtDefines_Units.xml are no longer needed to mod in new units (which is a very good thing, but has broken a lot of mods)

So, I decided not to change the xml, you said steps 3 and 4 are not needed now. So, I added the SQL code yyou listed and adjusted it as you said to do.
 
Top Bottom