Trait: Wraith
	Name: #TRAIT_WRAITH
	Description: #TRAIT_WRAITH_DESC
	Order: 6
	//DLC: Heralds

	Icon: Plantation
	Color: #5fb41c

	Category: Lifestyle
	Unique: Lifestyle
	
	//StarChildren Props
	//AddStatusOwnedPlanets(StarChildren)
	AddStatusOwnedPlanets(WraithFeedingGrounds)
	ModAttribute(PopulationGrowthFactor, Multiply, 0)
	ModAttribute(PopulationDecayFactor, Multiply, 0)
	//ModAttribute(TileDevelopmentFactor, Multiply, 0)
	ModAttribute(OverpopulationBenefitFactor, Multiply, 0)
	ModAttribute(ColonizeDevelopTiles, Multiply, 0)
	ModAttribute(ForbidColonization, Add, 1)
	ModAttribute(ImperialBldConstructionRate, Multiply, 0)
	//ModAttribute(CivBldConstructionRate, Multiply, 0)
	//ModAttribute(HabitatUpgrade, Add, 1)
	//ModAttribute(HasPressure, Multiply, 0.5)

	//Disable Terraforming
	ModAttribute(ForbidTerraform, Add, 1)

	//Giving a small amount of research just incase we end up with no research resource planets nearby
	AddResearchIncome(0.5)

	//UnlockSubsystem(MothershipHull)
	UnlockSubsystem(WraithHiveshipHull)

	IfHaveTrait(Hyperdrive, LoadDesigns(Wraith/mothership/hyperdrive))
	IfHaveTrait(Jumpdrive, LoadDesigns(Wraith/mothership/jumpdrive))
	IfHaveTrait(Slipstream, LoadDesigns(Wraith/mothership/slipstream))
	IfHaveTrait(Gate, LoadDesigns(Wraith/mothership/other))
	IfHaveTrait(Fling, LoadDesigns(Wraith/mothership/other))
	IfHaveTrait(Sublight, LoadDesigns(Wraith/mothership/other))

	//Because Hiveships are heavy and the Wraith have no FTL storage, cost must be under 250 max
	//IfHaveTrait(Fling, ModAttribute(FTLCostFactor, Multiply, 0.75))
	//IfHaveTrait(Fling, AddFTLStorage(50))

//	IfHaveTrait(Hyperdrive, LoadDesigns(hyperdrive/Wraith))
//	IfHaveTrait(Hyperdrive, LoadDesigns(default/Wraith))

	//TriggerHomeworld(SpawnShip(Hive Mothership Mk I, Override Disable Starting = True, Set Home = True))
	TriggerHomeworld(SpawnShip(WRA Hiveship, Override Disable Starting = True, Set Home = True))
	TriggerHomeworld(DestroySystemPlanet(0, Quiet = True))

	//For testing purposes only
	//ModEmpireAttribute(TotalHiveships, Add, 5)

	ReplaceTechnologyNodes(ImpFactoryLabor, ImpMothershipLabor)
	ReplaceTechnologyNodes(ImpFactoryLabor2, ImpMothershipLabor2)

	ReplaceTechnologyNodes(ImpTileDevelopment, ImpMothershipLabor)
	ReplaceTechnologyNodes(ImpTileDevelopment2, ImpMothershipLabor2)

	ReplaceTechnologyNodes(ImpCivConstructionRate, WraithShipCost)
	ReplaceTechnologyNodes(ImpCivConstructionRate2, WraithShipCost)

	ReplaceTechnologyNodes(ImpImpConstructionRate, WraithShipCost)
	ReplaceTechnologyNodes(ImpImpConstructionRate2, WraithShipCost)

	ReplaceTechnologyNodes(ImpPlanetDamage, WraithShipCost)
	ReplaceTechnologyNodes(ImpPlanetDamage2, WraithShipCost)

	//ReplaceTechnologyNodes(BldMegacity, ImpMothershipLabor)
	ReplaceTechnologyNodes(BldMegacity, WraithNodeBrain)
	ReplaceTechnologyNodes(BldPlanetaryEngine, SysZeroPointModuleStolen)

	OnDLC(Heralds, ReplaceTechnologyNodes(FactoryLabor, MothershipLabor))
	OnDLC(Heralds, ReplaceTechnologyNodes(FactoryLabor2, MothershipLabor2))
	OnDLC(Heralds, ReplaceTechnologyNodes(Construction, WraithShipCost))
	OnDLC(Heralds, ReplaceTechnologyNodes(Megacity, WraithShipCost))
	OnDLC(Heralds, ReplaceTechnologyNodes(PlanetaryEngine, ZeroPointModuleStolen))
	OnDLC(Heralds, ReplaceTechnologyNodes(Population, WraithShipCost))
	//OnDLC(Heralds, ReplaceTechnologyNodeAt((-3,1), WraithShipCost))
	//OnDLC(Heralds, ReplaceTechnologyNodeAt((-1,4), WraithShipCost))
	//OnDLC(Heralds, ReplaceTechnologyNodeAt((-1,11), WraithShipCost))
	//OnDLC(Heralds, ReplaceTechnologyNodeAt((-8,11), WraithShipCost))
	//OnDLC(Heralds, ReplaceTechnologyNodeAt((5,-12), WraithShipCost))
	//OnDLC(Heralds, ReplaceTechnologyNodeAt((7,1), WraithShipCost))
	OnDLC(Heralds, ReplaceTechnologyNodes(InfiniteShields, WraithNodeRegeneration))
	OnDLC(Heralds, ReplaceTechnologyNodes(Laboratories, WraithShipCost2))
	OnDLC(Heralds, ReplaceTechnologyNodes(HydroponicsSatellite, WraithNodeBrain))
	OnDLC(Heralds, ReplaceTechnologyNodes(RingHabitat, WraithNodePsychic))

	//FTL Storage allowance
	ReplaceTechnologyNodes(FTL, FTLWraith)
	ReplaceTechnologyNodes(FTLCost, FTLCostWraith)
	ReplaceTechnologyNodes(FTLHurdle, FTLHurdleWraith)
	ReplaceTechnologyNodes(HyperfieldSequencing, HyperfieldSequencingWraith)

	//Custom Mod Tech
	ForbidSubsystem(PlateArmor)
	ForbidSubsystem(AblativeArmor)
	ForbidSubsystem(ReactiveArmor)
	ForbidSubsystem(SupportPlateArmor)
	ForbidSubsystem(SupportAblativeArmor)
	ForbidSubsystem(ShieldGen)
	ForbidSubsystem(ShieldHardener)
	ForbidSubsystem(CrewControl)
	ForbidSubsystem(CrewDeck)
	UnlockSubsystem(WraithSinew)
	UnlockSubsystem(WraithCarapace)
	UnlockSubsystem(WraithSinewSupport)
	UnlockSubsystem(WraithCarapaceSupport)
	UnlockSubsystem(PlasmaBeam)
	UnlockSubsystem(PlasmaBeamSupport)
	ForbidSubsystem(RepairRobot)
	UnlockSubsystem(WraithNodeRegeneration)

	ReplaceTechnologyNodes(SysShipComupter, WraithQueenChamber)
	OnDLC(Heralds, ReplaceTechnologyNodes(ShipComputer, WraithQueenChamber))
	ReplaceTechnologyNodes(SysAntimatterGen, WraithNodeBioelectric)
	OnDLC(Heralds, ReplaceTechnologyNodes(AntimatterGen, WraithNodeBioelectric))
	ReplaceTechnologyNodes(OrbArtificialPlanetoid, WraithShipCost2)
	OnDLC(Heralds, ReplaceTechnologyNodes(ArtificialPlanetoid, DOFactionsArmorMasteryHeralds2))
	ReplaceTechnologyNodes(OrbRingworld, DOFactionsArmorMasteryHeralds2)
	OnDLC(Heralds, ReplaceTechnologyNodes(Ringworld, WraithShipCost2))
	ReplaceTechnologyNodes(ImpShieldCap, ImpArmorHealth)
	OnDLC(Heralds, ReplaceTechnologyNodes(ShieldCap, ArmorHealth))	//15% armor health.  x4 = +75%
	//OnDLC(Heralds, ReplaceTechnologyNodes(ShieldCap, Damage))	//15% damage.  x4 = +75%
	ReplaceTechnologyNodes(ImpShieldCap2, ImpArmorHealth2)
	//OnDLC(Heralds, ReplaceTechnologyNodes(ShieldCap2, ArmorHealth2))	//30% armor health.  x3 = +120%
	OnDLC(Heralds, ReplaceTechnologyNodes(ShieldCap2, Damage))	/15% damage.  x3 = +52.1%
	ReplaceTechnologyNodes(ImpShieldReg, ImpArmorDR)
	OnDLC(Heralds, ReplaceTechnologyNodes(ShieldReg, ArmorDR))	//10% armor DR. x4 = +46.4%
	ReplaceTechnologyNodes(ImpShieldReg2, ImpArmorDR2)
	OnDLC(Heralds, ReplaceTechnologyNodes(ShieldReg2, ArmorDR2))	//25% armor DR.  x2 = +56.25%
	ReplaceTechnologyNodes(SysLiquidArmor, SysWraithChitin)
	OnDLC(Heralds, ReplaceTechnologyNodes(LiquidArmor, WraithChitin))
	ReplaceTechnologyNodes(SysNeutronArmor, SysWraithCarapacePowered)
	OnDLC(Heralds, ReplaceTechnologyNodes(NeutronArmor, WraithCarapacePowered))
	ReplaceTechnologyNodes(SysShieldGen, DOFactionsArmorMastery1)
	OnDLC(Heralds, ReplaceTechnologyNodes(ShieldGen, DOFactionsArmorMasteryHeralds1))
	ReplaceTechnologyNodes(SysShieldHardener, DOFactionsArmorMastery2)
	OnDLC(Heralds, ReplaceTechnologyNodes(ShieldHardener, DOFactionsArmorMasteryHeralds2))
	OnDLC(Heralds, ReplaceTechnologyNodes(ShieldHarmonizer, PlasmaThermite))
	OnDLC(Heralds, ReplaceTechnologyNodes(FlakBattery, PlasmaCooldown))
	OnDLC(Heralds, ReplaceTechnologyNodes(ShockMissiles, PlasmaRange))

	//Weapon Restrictions
	ForbidSubsystem(Laser)
	ForbidSubsystem(SupportLaser)
	ForbidSubsystem(PulseLaser)
	ForbidSubsystem(PulseLaserSupport)
	ForbidSubsystem(BeamCannon)
	ForbidSubsystem(BeamCannonSupport)
	ForbidSubsystem(RailgunBattery)
	ForbidSubsystem(Railgun)
	ForbidSubsystem(MissileLauncher)
	ForbidSubsystem(SupportMissileLauncher)
	ForbidSubsystem(LancerMissileLauncher)
	ForbidSubsystem(LancerMissileLauncherSupport)
	ForbidSubsystem(RocketPod)
	ForbidSubsystem(TorpedoLauncher)
	ForbidSubsystem(TorpedoLauncherSupport)
	ForbidSubsystem(Autocannon)
	ForbidSubsystem(AutocannonSupport)
	ForbidSubsystem(PulseGun)
	ForbidSubsystem(PulseGunSupport)
	//ForbidSubsystem(PlasmaCannon)
	//ForbidSubsystem(PlasmaCannonSupport)
	//ForbidSubsystem(PlasmaBomb)
	//ForbidSubsystem(PlasmaBombSupport)
	ForbidSubsystem(FlakCannon)
	ForbidSubsystem(FlakCannonSupport)