• Our friends from AlphaCentauri2.info are in need of technical assistance. If you have experience with the LAMP stack and some hours to spare, please help them out and post here.

Add a new unit in the game (using SQL)

Well it seems I have made an error somewhere, could some kind person please point it out where I have gone wrong before I :ar15:

I have made this unit the Evocatas which does show up fine in the game all works well except, its a UU for Rome but everybody can get it?

Also there is a syntax error on the first E (DEF) in ART_DEF_UNIT_EVOCATUS?

Please be gentle its my first day at SQL.

Regards

Riker13 :crazyeye:

SQL CODE:
Spoiler :
Code:
INSERT INTO ArtDefine_UnitInfos (Type,DamageStates,Formation)
	SELECT	('ART_DEF_UNIT_EVOCATUS'), DamageStates, Formation
	FROM ArtDefine_UnitInfos WHERE (Type = 'ART_DEF_UNIT_LONGSWORDSMAN');

INSERT INTO ArtDefine_UnitInfoMemberInfos (UnitInfoType,UnitMemberInfoType,NumMembers)
	SELECT	('ART_DEF_UNIT_EVOCATUS'), ('ART_DEF_UNIT_MEMBER_EVOCATUS'), NumMembers
	FROM ArtDefine_UnitInfoMemberInfos WHERE (UnitInfoType = 'ART_DEF_UNIT_LONGSWORDSMAN');

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_EVOCATUS'), 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_LONGSWORDSMAN');

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_EVOCATUS'), "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_LONGSWORDSMAN');

INSERT INTO ArtDefine_UnitMemberInfos (Type, Scale, ZOffset, Domain, Model, MaterialTypeTag, MaterialTypeSoundOverrideTag)
	SELECT	('ART_DEF_UNIT_MEMBER_EVOCATUS'), Scale, ZOffset, Domain, ('LONGSWORDSMAN_ROME.fxsxml'), MaterialTypeTag, MaterialTypeSoundOverrideTag
	FROM ArtDefine_UnitMemberInfos WHERE (Type = 'ART_DEF_UNIT_MEMBER_LONGSWORDSMAN');

INSERT INTO ArtDefine_StrategicView (StrategicViewType, TileType, Asset )
	SELECT	('ART_DEF_UNIT_EVOCATUS'), TileType, Asset
	FROM ArtDefine_StrategicView WHERE (StrategicViewType = 'ART_DEF_UNIT_LONGSWORDSMAN');

	INSERT INTO UnitClasses (Type, Description, MaxGlobalInstances, MaxTeamInstances, MaxPlayerInstances, InstanceCostModifier, DefaultUnit )
	SELECT ('UNITCLASS_EVOCATUS'), Description, MaxGlobalInstances, MaxTeamInstances, MaxPlayerInstances, InstanceCostModifier, ('UNIT_EVOCATUS')
	FROM UnitClasses WHERE (Type = 'UNITCLASS_LONGSWORDSMAN');

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	('UNIT_EVOCATUS'), ('EVOCATUS'), Civilopedia, Strategy, Help, Requirements,
			Combat, (25), (250), Moves, Immobile, (5), BaseSightRange, ('UNITCLASS_EVOCATUS'), 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,
			('ART_DEF_UNIT_EVOCATUS'), UnitArtInfoCulturalVariation, UnitArtInfoEraVariation, ProjectPrereq, SpaceshipProject, LeaderPromotion, LeaderExperience, DontShowYields, ShowInPedia, MoveRate,
			UnitFlagIconOffset, PortraitIndex, IconAtlas, UnitFlagAtlas
	FROM Units WHERE (Type = 'UNIT_LONGSWORDSMAN');

INSERT INTO Civilization_UnitClassOverrides (CivilizationType, UnitClassType, UnitType )
VALUES ('CIVILIZATION_ROME'), 'UNITCLASS_EVOCATUS', 'UNIT_LONGSWORDSMAN' );

INSERT INTO Unit_AITypes (UnitType, UnitAIType)
	SELECT ('UNIT_EVOCATUS'), UnitAIType
	FROM Unit_AITypes WHERE (UnitType = 'UNIT_LONGSWORDSMAN');

INSERT INTO Unit_ClassUpgrades (UnitType, UnitClassType)
	SELECT ('UNIT_EVOCATUS'), UnitClassType
	FROM Unit_ClassUpgrades WHERE (UnitType = 'UNIT_LONGSWORDSMAN');

INSERT INTO Unit_Flavors (UnitType, FlavorType, Flavor)
	SELECT ('UNIT_EVOCATUS'), FlavorType, Flavor
	FROM Unit_Flavors WHERE (UnitType = 'UNIT_LONGSWORDSMAN');

INSERT INTO Unit_FreePromotions (UnitType, PromotionType)
	SELECT ('UNIT_EVOCATUS'), PromotionType
	FROM Unit_FreePromotions WHERE (UnitType = 'UNIT_LONGSWORDSMAN');

INSERT INTO Unit_ResourceQuantityRequirements (UnitType, ResourceType, Cost)
	SELECT ('UNIT_EVOCATUS'), ResourceType, Cost
	FROM Unit_ResourceQuantityRequirements WHERE (UnitType = 'UNIT_LONGSWORDSMAN');
 
Hi Nutty,

Doh oh yes, done that but it still does not work, playing Greece I could still build the unit? Ummmmmmmm.
 
You shouldn't be making a new unit class. Delete the whole "INSERT INTO UnitClasses..." section and change "('UNITCLASS_EVOCATUS')" to "Class" in the "INSERT INTO Units..." section. [NB: don't actually put the quotes.]
 
Morning Nutty,

Well I changed the code as you suggested (see below) but now no one not even the Romans can make the unit and on the Civilopedia it says the Units cost is FREE?

Don't you just modding there is always something but its good once you figure it out :)

Spoiler :
Code:
INSERT INTO ArtDefine_UnitInfos (Type,DamageStates,Formation)
	SELECT	('ART_DEF_UNIT_EVOCATUS'), DamageStates, Formation
	FROM ArtDefine_UnitInfos WHERE (Type = 'ART_DEF_UNIT_LONGSWORDSMAN');

INSERT INTO ArtDefine_UnitInfoMemberInfos (UnitInfoType,UnitMemberInfoType,NumMembers)
	SELECT	('ART_DEF_UNIT_EVOCATUS'), ('ART_DEF_UNIT_MEMBER_EVOCATUS'), NumMembers
	FROM ArtDefine_UnitInfoMemberInfos WHERE (UnitInfoType = 'ART_DEF_UNIT_LONGSWORDSMAN');

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_EVOCATUS'), 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_LONGSWORDSMAN');

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_EVOCATUS'), "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_LONGSWORDSMAN');

INSERT INTO ArtDefine_UnitMemberInfos (Type, Scale, ZOffset, Domain, Model, MaterialTypeTag, MaterialTypeSoundOverrideTag)
	SELECT	('ART_DEF_UNIT_MEMBER_EVOCATUS'), Scale, ZOffset, Domain, ('LONGSWORDSMAN_ROME.fxsxml'), MaterialTypeTag, MaterialTypeSoundOverrideTag
	FROM ArtDefine_UnitMemberInfos WHERE (Type = 'ART_DEF_UNIT_MEMBER_LONGSWORDSMAN');

INSERT INTO ArtDefine_StrategicView (StrategicViewType, TileType, Asset )
	SELECT	('ART_DEF_UNIT_EVOCATUS'), TileType, Asset
	FROM ArtDefine_StrategicView WHERE (StrategicViewType = 'ART_DEF_UNIT_LONGSWORDSMAN');

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	('UNIT_EVOCATUS'), ('EVOCATUS'), Civilopedia, Strategy, Help, Requirements,
			Combat, (25), (250), Moves, Immobile, (5), 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,
			('ART_DEF_UNIT_EVOCATUS'), UnitArtInfoCulturalVariation, UnitArtInfoEraVariation, ProjectPrereq, SpaceshipProject, LeaderPromotion, LeaderExperience, DontShowYields, ShowInPedia, MoveRate,
			UnitFlagIconOffset, PortraitIndex, IconAtlas, UnitFlagAtlas
	FROM Units WHERE (Type = 'UNIT_LONGSWORDSMAN');

INSERT INTO Civilization_UnitClassOverrides (CivilizationType, UnitClassType, UnitType )
VALUES ('CIVILIZATION_ROME', 'UNITCLASS_EVOCATUS', 'UNIT_LONGSWORDSMAN' );

INSERT INTO Unit_AITypes (UnitType, UnitAIType)
	SELECT ('UNIT_EVOCATUS'), UnitAIType
	FROM Unit_AITypes WHERE (UnitType = 'UNIT_LONGSWORDSMAN');

INSERT INTO Unit_ClassUpgrades (UnitType, UnitClassType)
	SELECT ('UNIT_EVOCATUS'), UnitClassType
	FROM Unit_ClassUpgrades WHERE (UnitType = 'UNIT_LONGSWORDSMAN');

INSERT INTO Unit_Flavors (UnitType, FlavorType, Flavor)
	SELECT ('UNIT_EVOCATUS'), FlavorType, Flavor
	FROM Unit_Flavors WHERE (UnitType = 'UNIT_LONGSWORDSMAN');

INSERT INTO Unit_FreePromotions (UnitType, PromotionType)
	SELECT ('UNIT_EVOCATUS'), PromotionType
	FROM Unit_FreePromotions WHERE (UnitType = 'UNIT_LONGSWORDSMAN');

INSERT INTO Unit_ResourceQuantityRequirements (UnitType, ResourceType, Cost)
	SELECT ('UNIT_EVOCATUS'), ResourceType, Cost
	FROM Unit_ResourceQuantityRequirements WHERE (UnitType = 'UNIT_LONGSWORDSMAN');
 
Nutty, I know we have not sorted the above post yet but if I wanted to make this a new class what differences would I need to make.

I thank you for your time and patience.

Riker 13 :crazyeye:
 
In the Civilization_UnitClassOverrides table, you've got UnitClassType and UnitType reversed.

As far as making it a new class, that's what you were doing the first time. If you want Rome to be the only one to be able to build your new unit, and you don't want it to replace an existing unit, then you'd need to make 2 new units with the same class: one being a dummy unit with a -1 cost, the other being the new unit unique to Rome.
 
Nutty should 'UNITCLASS_EVOCATUS', 'UNIT_LONGSWORDSMAN' be reversed as well?

VALUES ('CIVILIZATION_ROME', 'UNITCLASS_EVOCATUS', 'UNIT_LONGSWORDSMAN' );
 
VALUES ('CIVILIZATION_ROME', 'UNITCLASS_EVOCATUS', 'UNIT_LONGSWORDSMAN' );

Not quite. (Sorry I didn't make this clear.)
Code:
INSERT INTO Civilization_UnitClassOverrides (CivilizationType, UnitClassType, UnitType )
VALUES ('CIVILIZATION_ROME', 'UNITCLASS_LONGSWORDSMAN', 'UNIT_EVOCATUS' );
It should "read": For the Roman civilization, replace the unit of the longswordsman class with the Evocatus unit.
 
Cool thanks for that Nutty and thanks for your time and knowledge.

All the best.
 
Exactly how do you do the art defines for a mounted unit when the horse dds is separated from the unit dds?

nothing special, in that case the .fxsxml reference the .gr2 that is using the multiple .dds, just make sure the VFS property is set to true for all of those files.

the only file name that you will reference in your code is the .fxsxml file
 
You'll have to edit the model itself do to that, you'll need 3D tools and some knowledge in modelling (that I don't have).
 
I've referenced this post many times in the past (even the past month or so) but just recently got around to adding new unit graphics (normally used orphaned ones from scenarios with no alterations) and spent a week trying to figure out why they weren't working until late last night I noticed:

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.

Nice red highlight and I'd overlooked that completely...
:wallbash:

So apparently my issue was just a short between the user and the keyboard.
:cry:
 
Thank you, I'm actually planning a Post-World War mod that will have new units and revamped units, new ideologies which does not follow a tenet but gives benefits and non-benefits.

New buildings, new resolutions for UN as well as revamped versions of existing resolutions, new improvements and possibly more
 
[I haven't tested it, but at least one problem appears to be that] you also need to revise Lua\RedDefinesUnits.lua to allow each civ to build the cavalry.

EDIT:
Add ", CAVALRY" to each civ, e.g.:
Spoiler :
Code:
Lg_Major_Units = {
	[FRANCE] = {
		FR_INFANTRY, FR_LEGION,
		FR_R35, FR_R40, FR_H35, FR_H39,
		FR_S35, FR_B1, FR_ARL_44,
		FR_MB152, FR_D520, FR_POTEZ630,
		FR_LN401, FR_AMIOT350,
		FR_FANTASQUE, FR_GALISSONIERE, FR_SUBMARINE, FR_BATTLESHIP, FR_BATTLESHIP_2,
		ARTILLERY, AA_GUN, AT_GUN, CAVALRY},
	[ENGLAND] = {
		UK_INFANTRY,
		UK_MATILDA_I, UK_CRUISER_II, UK_CRUISER_III, UK_CRUISER_IV, UK_A10_VALENTINE, UK_A15_CRUSADER,
		UK_MATILDA_II, UK_M4_FIREFLY,
		UK_CHURCHILL,
		UK_SPITFIRE, UK_SPITFIRE_V, UK_SPITFIRE_IX, UK_WHIRLWIND, UK_BEAUFIGHTER,
		UK_MOSQUITO, UK_WELLINGTON, UK_HALIFAX, UK_LANCASTER,
		UK_TRIBA, UK_SUBMARINE, UK_DIDO, UK_BATTLESHIP, UK_BATTLESHIP_2,
		ARTILLERY, AA_GUN, AT_GUN, CAVALRY},
 
Could someone please help I am having trouble putting the fantastic Cruiser by Lord Tirian unit into the game and getting the icons to work correctly

Here is my Units SQL:

Spoiler :
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 ('UNIT_CRUISER'), ('Cruiser'), Civilopedia, Strategy, Help, Requirements, (40), (45), (250), Moves, Immobile, (2), BaseSightRange, ('UNITCLASS_CRUISER'), Special, Capture, CombatClass, Domain, CivilianAttackPriority, DefaultUnitAI, Food, NoBadGoodies, RivalTerritory, MilitarySupport, MilitaryProduction, Pillage, Found, FoundAbroad, CultureBombRadius, GoldenAgeTurns, IgnoreBuildingDefense, PrereqResources, Mechanized, Suicide, CaptureWhileEmbarked, ('TECH_BIOLOGY'), 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, ('ART_DEF_UNIT_CRUISER'), UnitArtInfoCulturalVariation, UnitArtInfoEraVariation, ProjectPrereq, SpaceshipProject, LeaderPromotion, LeaderExperience, DontShowYields, ShowInPedia, MoveRate, 0, 0, ('UNIT_CRUISER_FLAG_ART'), ('UNIT_CRUISER_PORTRAIT_ART')
FROM Units WHERE (Type = 'UNIT_FRIGATE');


AND the UNITSART that I believe is needed

Spoiler :
INSERT INTO ArtDefine_UnitInfos (Type,DamageStates,Formation)
SELECT ('ART_DEF_UNIT_CRUISER'), DamageStates, Formation
FROM ArtDefine_UnitInfos WHERE (Type = 'ART_DEF_UNIT_FRIGATE');

INSERT INTO ArtDefine_UnitInfoMemberInfos (UnitInfoType,UnitMemberInfoType,NumMembers)
SELECT ('ART_DEF_UNIT_CRUISER'), ('ART_DEF_UNIT_MEMBER_CRUISER'), NumMembers
FROM ArtDefine_UnitInfoMemberInfos WHERE (UnitInfoType = 'ART_DEF_UNIT_FRIGATE');

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_CRUISER'), 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_FRIGATE');

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_CRUISER'), "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_FRIGATE');

INSERT INTO ArtDefine_UnitMemberInfos (Type, Scale, ZOffset, Domain, Model, MaterialTypeTag, MaterialTypeSoundOverrideTag)
SELECT ('ART_DEF_UNIT_MEMBER_CRUISER'), ('0.086'), ZOffset, Domain, ('cruiser.fxsxml'), MaterialTypeTag, MaterialTypeSoundOverrideTag
FROM ArtDefine_UnitMemberInfos WHERE (Type = 'ART_DEF_UNIT_MEMBER_FRIGATE');

INSERT INTO ArtDefine_StrategicView (StrategicViewType, TileType, Asset )
SELECT ('ART_DEF_UNIT_CRUISER'), TileType, ('svcruiser.dds')
FROM ArtDefine_StrategicView WHERE (StrategicViewType = 'ART_DEF_UNIT_FRIGATE');

INSERT INTO (IconTextureAtlases (Atlas, IconSize, Filename, IconsPerRow, IconsPerColumn)
VALUES ('UNIT_CRUISER_FLAG_ART', 32, 'cruiserflag.dds', 1, 1)
VALUES ('UNIT_CRUISER_PORTRAIT_ART',32, 'cruiserportrait.dds', 1, 1);


Everything else is working strategic view graphics animations just I get the settler flag and a blank portrait. PLease help!
 
Back
Top Bottom