Code:
-- Unique Faction ID
local factionid = "GDI";
print ("Loading "..factionid)
CF_Factions[#CF_Factions + 1] = factionid
-- Faction name
CF_FactionNames[factionid] = "GDI";
-- Faction description
CF_FactionDescriptions[factionid] = "Global Defense Initiative";
-- Set true if faction is selectable by player or AI
CF_FactionPlayable[factionid] = true;
-- Modules needed for this faction
CF_RequiredModules[factionid] = {"Base.rte", "GDI.rte"}
-- Set faction nature - types are ORGANIC and SYNTHETIC
CF_FactionNatures[factionid] = CF_FactionTypes.ORGANIC;
-- Define faction bonuses, in percents
-- Scan price reduction
CF_ScanBonuses[factionid] = 0
-- Relation points increase
CF_RelationsBonuses[factionid] = 0
-- Hew HQ build price reduction
CF_ExpansionBonuses[factionid] = 0
-- Gold per turn increase
CF_MineBonuses[factionid] = 10
-- Science per turn increase
CF_LabBonuses[factionid] = 10
-- Delivery time reduction
CF_AirfieldBonuses[factionid] = 0
-- Superweapon targeting reduction
CF_SuperWeaponBonuses[factionid] = 0
-- Item price reduction
CF_FactoryBonuses[factionid] = 0
-- Body price reduction
CF_CloneBonuses[factionid] = 0
-- HP regeneration increase
CF_HospitalBonuses[factionid] = 10
-- Hack time decrease
CF_HackTimeBonuses[factionid] = 0
-- Hack reward increase
CF_HackRewardBonuses[factionid] = 0
-- How many more troops dropship can hold
CF_DropShipCapacityBonuses[factionid] = CF_MaxUnitsPerDropship * 2
-- Percentage of troops sent to brainhunt or attack player LZ when AI is defending (default - CF_DefaultBrainHuntRatio)
-- If this value is less then default then faction is marked as Defensive if it's more, then as Offensive
CF_BrainHuntRatios[factionid] = 50
-- Prefered brain inventory items. Brain gets the best available items of the classes specified in list for free.
-- Default - {CF_WeaponTypes.DIGGER, CF_WeaponTypes.RIFLE}
CF_PreferedBrainInventory[factionid] = {CF_WeaponTypes.RIFLE}
-- Define brain unit
CF_Brains[factionid] = "GDI Officer";
CF_BrainModules[factionid] = "GDI.rte";
CF_BrainClasses[factionid] = "AHuman";
CF_BrainPrices[factionid] = 200;
-- Define dropship
CF_Crafts[factionid] = "GDI V-20 Bison Transport";
CF_CraftModules[factionid] = "GDI.rte";
CF_CraftClasses[factionid] = "ACDropship";
CF_CraftPrices[factionid] = 300;
-- Define superweapon script - Bombing, DummyParticle, MineBombing, NapalmBombing
CF_SuperWeaponScripts[factionid] = nil;
-- Define buyable actors available for purchase or unlocks
CF_ActNames[factionid] = {}
CF_ActPresets[factionid] = {}
CF_ActModules[factionid] = {}
CF_ActPrices[factionid] = {}
CF_ActDescriptions[factionid] = {}
CF_ActUnlockData[factionid] = {}
CF_ActClasses[factionid] = {} -- permissable types are LIGHT, HEAVY, ARMOR, and TURRET
CF_ActTypes[factionid] = {} -- AI will select different weapons based on this value
CF_ActPowers[factionid] = {} -- AI will select weapons based on this value 1 - weakest, 10 toughest, 0 never use
CF_ActOffsets[factionid] = {}
local i = 0
--i = #CF_ActNames[factionid] + 1
--CF_ActNames[factionid][i] = "GDI Recon"
--CF_ActPresets[factionid][i] = "GDI Recon"
--CF_ActModules[factionid][i] = "GDI.rte"
--CF_ActPrices[factionid][i] = 100
--CF_ActDescriptions[factionid][i] = "Outfitted with lighter armour than regular infantry, GDI Recon units are generally either veterans assigned to Yellow Zone patrols and scouting missions, or raw recruits stuck in the Blue Zones, where the only traces of tiberium they’ll ever see are on the news. They’re a little tougher than the Brotherhood’s fanatics, but are best employed as snipers."
--CF_ActUnlockData[factionid][i] = 0 -- 0 means available at start
--CF_ActTypes[factionid][i] = CF_ActorTypes.LIGHT;
--CF_ActPowers[factionid][i] = 1
i = #CF_ActNames[factionid] + 1
CF_ActNames[factionid][i] = "GDI Infantry"
CF_ActPresets[factionid][i] = "GDI Infantry"
CF_ActModules[factionid][i] = "GDI.rte"
CF_ActPrices[factionid][i] = 175
CF_ActDescriptions[factionid][i] = "GDI's line infantrymen, these soldiers are issued semi-powered full-body armour with limited servo-assistance, a low-power flight pack, and a full heads-up display. They're easily a one-to-one match for Nod's Loyalist Infantry, and can make short work of Fanatics. They're best deployed in teams of two to four."
CF_ActUnlockData[factionid][i] = 0 -- 0 means available at start
CF_ActTypes[factionid][i] = CF_ActorTypes.LIGHT;
CF_ActPowers[factionid][i] = 3
i = #CF_ActNames[factionid] + 1
CF_ActNames[factionid][i] = "Zone Trooper"
CF_ActPresets[factionid][i] = "Zone Trooper"
CF_ActModules[factionid][i] = "GDI.rte"
CF_ActPrices[factionid][i] = 500
CF_ActDescriptions[factionid][i] = "GDI's Zone Troopers are tasked with protecting and patrolling both the most hazardous locations and the most valuable GDI assets. Clad in heavy, full-body power armour that allows them to wield the most powerful weapons in the GDI’s arsenal, the Zone Troopers are amongst the most fearsome infantry units fielded. They are second only to the Brotherhood's fearsome Cyborg Commando."
CF_ActUnlockData[factionid][i] = 1800 -- 0 means available at start
CF_ActTypes[factionid][i] = CF_ActorTypes.HEAVY;
CF_ActPowers[factionid][i] = 6
-- Define buyable items available for purchase or unlocks
CF_ItmNames[factionid] = {}
CF_ItmPresets[factionid] = {}
CF_ItmModules[factionid] = {}
CF_ItmPrices[factionid] = {}
CF_ItmDescriptions[factionid] = {}
CF_ItmUnlockData[factionid] = {}
CF_ItmClasses[factionid] = {} -- permissable types are PISTOL, RIFLE, SHOTGUN, SNIPER, HEAVY, SHIELD, DIGGER, GRENADE
CF_ItmTypes[factionid] = {}
CF_ItmPowers[factionid] = {} -- AI will select weapons based on this value 1 - weakest, 10 toughest, 0 never use
local i = 0
i = #CF_ItmNames[factionid] + 1
CF_ItmNames[factionid][i] = "Light Digger"
CF_ItmPresets[factionid][i] = "Light Digger"
CF_ItmModules[factionid][i] = "Base.rte"
CF_ItmPrices[factionid][i] = 10
CF_ItmDescriptions[factionid][i] = "Lightest in the digger family. Cheapest of them all and works as a nice melee weapon on soft targets."
CF_ItmUnlockData[factionid][i] = 0 -- 0 means available at start
CF_ItmTypes[factionid][i] = CF_WeaponTypes.DIGGER;
CF_ItmPowers[factionid][i] = 1
i = #CF_ItmNames[factionid] + 1
CF_ItmNames[factionid][i] = "Medium Digger"
CF_ItmPresets[factionid][i] = "Medium Digger"
CF_ItmModules[factionid][i] = "Base.rte"
CF_ItmPrices[factionid][i] = 40
CF_ItmDescriptions[factionid][i] = "Stronger digger. This one can pierce rocks with some effort and dig impressive tunnels and its melee weapon capabilities are much greater."
CF_ItmUnlockData[factionid][i] = 500
CF_ItmTypes[factionid][i] = CF_WeaponTypes.DIGGER;
CF_ItmPowers[factionid][i] = 4
i = #CF_ItmNames[factionid] + 1
CF_ItmNames[factionid][i] = "Heavy Digger"
CF_ItmPresets[factionid][i] = "Heavy Digger"
CF_ItmModules[factionid][i] = "Base.rte"
CF_ItmPrices[factionid][i] = 100
CF_ItmDescriptions[factionid][i] = "Heaviest and the most powerful of them all. Eats concrete with great hunger and allows you to make complex mining caves incredibly fast. Shreds anyone unfortunate who stand in its way."
CF_ItmUnlockData[factionid][i] = 1000
CF_ItmTypes[factionid][i] = CF_WeaponTypes.DIGGER;
CF_ItmPowers[factionid][i] = 8
i = #CF_ItmNames[factionid] + 1
CF_ItmNames[factionid][i] = "Grapple Gun"
CF_ItmPresets[factionid][i] = "Grapple Gun"
CF_ItmModules[factionid][i] = "Base.rte"
CF_ItmPrices[factionid][i] = 40
CF_ItmDescriptions[factionid][i] = "Use this to climb walls and descend dangerous drops! Climb up by holding the crouch key, and then holding up/down or scrolling up/down."
CF_ItmUnlockData[factionid][i] = 0 -- 0 means available at start
CF_ItmTypes[factionid][i] = CF_WeaponTypes.DIGGER;
CF_ItmPowers[factionid][i] = 0
i = #CF_ItmNames[factionid] + 1
CF_ItmNames[factionid][i] = "Riot Shield"
CF_ItmPresets[factionid][i] = "Riot Shield"
CF_ItmModules[factionid][i] = "Base.rte"
CF_ItmPrices[factionid][i] = 20
CF_ItmDescriptions[factionid][i] = "This metal shield provides excellent additional frontal protection to the user and it can stop numerous hits before breaking up."
CF_ItmUnlockData[factionid][i] = 500
CF_ItmClasses[factionid][i] = "HeldDevice"
CF_ItmTypes[factionid][i] = CF_WeaponTypes.SHIELD;
CF_ItmPowers[factionid][i] = 1
i = #CF_ItmNames[factionid] + 1
CF_ItmNames[factionid][i] = "Light Scanner"
CF_ItmPresets[factionid][i] = "Light Scanner"
CF_ItmModules[factionid][i] = "Base.rte"
CF_ItmPrices[factionid][i] = 10
CF_ItmDescriptions[factionid][i] = "Lightest in the scanner family. Cheapest of them all and can only scan a small area."
CF_ItmUnlockData[factionid][i] = 150
CF_ItmTypes[factionid][i] = CF_WeaponTypes.TOOL;
CF_ItmPowers[factionid][i] = 0
i = #CF_ItmNames[factionid] + 1
CF_ItmNames[factionid][i] = "Medium Scanner"
CF_ItmPresets[factionid][i] = "Medium Scanner"
CF_ItmModules[factionid][i] = "Base.rte"
CF_ItmPrices[factionid][i] = 40
CF_ItmDescriptions[factionid][i] = "Medium scanner. This scanner is stronger and can reveal a larger area."
CF_ItmUnlockData[factionid][i] = 250
CF_ItmTypes[factionid][i] = CF_WeaponTypes.TOOL;
CF_ItmPowers[factionid][i] = 0
i = #CF_ItmNames[factionid] + 1
CF_ItmNames[factionid][i] = "Heavy Scanner"
CF_ItmPresets[factionid][i] = "Heavy Scanner"
CF_ItmModules[factionid][i] = "Base.rte"
CF_ItmPrices[factionid][i] = 70
CF_ItmDescriptions[factionid][i] = "Strongest scanner out of the three. Can reveal a large area."
CF_ItmUnlockData[factionid][i] = 450
CF_ItmTypes[factionid][i] = CF_WeaponTypes.TOOL;
CF_ItmPowers[factionid][i] = 0
i = #CF_ItmNames[factionid] + 1
CF_ItmNames[factionid][i] = "Global Defense Semi-Automatic"
CF_ItmPresets[factionid][i] = "Global Defense Semi-Automatic"
CF_ItmModules[factionid][i] = "GDI.rte"
CF_ItmPrices[factionid][i] = 25
CF_ItmDescriptions[factionid][i] = "Replacing the older Vervack CE Falcon, the GDSA is a deadlier, higher-capacity sidearm, thanks to its custom armour-piercing rounds."
CF_ItmUnlockData[factionid][i] = 0 -- 0 means available at start
CF_ItmTypes[factionid][i] = CF_WeaponTypes.PISTOL;
CF_ItmPowers[factionid][i] = 1
i = #CF_ItmNames[factionid] + 1
CF_ItmNames[factionid][i] = "Peacekeeper '45"
CF_ItmPresets[factionid][i] = "Peacekeeper '45"
CF_ItmModules[factionid][i] = "GDI.rte"
CF_ItmPrices[factionid][i] = 45
CF_ItmDescriptions[factionid][i] = "Introduced in 2045, the Peacekeeper '45 is an old-style revolver with lots of stopping power. It's not a subtle weapon, but then it doesn't need to be. The Peacekeeper's special surprise, though, is that it has a seven-round cylinder."
CF_ItmUnlockData[factionid][i] = 600 -- 0 means available at start
CF_ItmTypes[factionid][i] = CF_WeaponTypes.PISTOL;
CF_ItmPowers[factionid][i] = 1
i = #CF_ItmNames[factionid] + 1
CF_ItmNames[factionid][i] = "Global Defense Close Combat Weapon"
CF_ItmPresets[factionid][i] = "Global Defense Close Combat Weapon"
CF_ItmModules[factionid][i] = "GDI.rte"
CF_ItmPrices[factionid][i] = 65
CF_ItmDescriptions[factionid][i] = "The GDI's answer to close-combat situations is the newly developed Global Defense Close Combat Weapon. Based loosely off the Kel-Tec KSG, the CCW features a pair of removable magazine tubes forward of the trigger, each holding six special hybrid lance-flechette rounds. With a fully-automatic trigger and a decent rate of fire, it is a very effective weapon."
CF_ItmUnlockData[factionid][i] = 500 -- 0 means available at start
CF_ItmTypes[factionid][i] = CF_WeaponTypes.SHOTGUN;
CF_ItmPowers[factionid][i] = 3
i = #CF_ItmNames[factionid] + 1
CF_ItmNames[factionid][i] = "Global Defense Compact Infantry Rifle"
CF_ItmPresets[factionid][i] = "Global Defense Compact Infantry Rifle"
CF_ItmModules[factionid][i] = "GDI.rte"
CF_ItmPrices[factionid][i] = 75
CF_ItmDescriptions[factionid][i] = "A modified version of the GDSIR, the GDCIR trades down to a lower caliber and more compact design. Whilst it has a much higher capacity, higher muzzle velocity, and increased rate of fire, the smaller-caliber projectiles are less effective against heavily armoured targets."
CF_ItmUnlockData[factionid][i] = 0 -- 0 means available at start
CF_ItmTypes[factionid][i] = CF_WeaponTypes.RIFLE;
CF_ItmPowers[factionid][i] = 2
i = #CF_ItmNames[factionid] + 1
CF_ItmNames[factionid][i] = "Global Defense Standard Infantry Rifle"
CF_ItmPresets[factionid][i] = "Global Defense Standard Infantry Rifle"
CF_ItmModules[factionid][i] = "GDI.rte"
CF_ItmPrices[factionid][i] = 75
CF_ItmDescriptions[factionid][i] = "The Global Defense Initiative's latest and greatest assault rifle, the bullpup GDSIR is lightweight, reliable, controllable, and efficient. It's the standard assault rifle for GDI Infantrymen across the Initiative's forces."
CF_ItmUnlockData[factionid][i] = 500 -- 0 means available at start
CF_ItmTypes[factionid][i] = CF_WeaponTypes.RIFLE;
CF_ItmPowers[factionid][i] = 4
i = #CF_ItmNames[factionid] + 1
CF_ItmNames[factionid][i] = "Global Defense Zone Enforcement Machinegun"
CF_ItmPresets[factionid][i] = "Global Defense Zone Enforcement Machinegun"
CF_ItmModules[factionid][i] = "GDI.rte"
CF_ItmPrices[factionid][i] = 150
CF_ItmDescriptions[factionid][i] = "When it comes to tiberium-mutated wildlife and murderous Brotherhood Cyborgs, few people want to take chances with their choice of weapon. With this in mind, the GDI deployed the new GDZMG - based loosely on the venerable KPV - to their Zone Trooper units. Firing a mix of 14.5mm API/APT rounds, the recoil is far too strong for standard infantry to handle, but the sheer damage output is almost unsurpassed."
CF_ItmUnlockData[factionid][i] = 1750 -- 0 means available at start
CF_ItmTypes[factionid][i] = CF_WeaponTypes.RIFLE;
CF_ItmPowers[factionid][i] = 8
i = #CF_ItmNames[factionid] + 1
CF_ItmNames[factionid][i] = "GLS70 Sniper Rifle"
CF_ItmPresets[factionid][i] = "GLS70 Sniper Rifle"
CF_ItmModules[factionid][i] = "GDI.rte"
CF_ItmPrices[factionid][i] = 80
CF_ItmDescriptions[factionid][i] = "The Vervack R59 is a light but effective semi-automatic sniper rifle with a decent rate of fire, high accuracy, and a 10-round magazine. Whilst it lacks stopping power against heavily-armoured targets, it's still an extremely effective weapon in the right hands."
CF_ItmUnlockData[factionid][i] = 1500 -- 0 means available at start
CF_ItmTypes[factionid][i] = CF_WeaponTypes.SNIPER;
CF_ItmPowers[factionid][i] = 7
i = #CF_ItmNames[factionid] + 1
CF_ItmNames[factionid][i] = "Global Defense Man-Portable Railgun"
CF_ItmPresets[factionid][i] = "Global Defense Man-Portable Railgun"
CF_ItmModules[factionid][i] = "GDI.rte"
CF_ItmPrices[factionid][i] = 300
CF_ItmDescriptions[factionid][i] = "Usually only issued to GDI’s Zone Troopers due to its considerable weight, the GDMPR launches a ‘bolt’ or ‘stream’ of ferromagnetic fluid that can penetrate even the strongest armour and defenses. There are few places to hide from its firepower, but whilst it’s powerful, it has very little splash-damage potential. As a result, it’s most effective against single targets such as heavy infantry and vehicles."
CF_ItmUnlockData[factionid][i] = 2500 -- 0 means available at start
CF_ItmTypes[factionid][i] = CF_WeaponTypes.SNIPER;
CF_ItmPowers[factionid][i] = 10
i = #CF_ItmNames[factionid] + 1
CF_ItmNames[factionid][i] = "Vervack AG79 Grenade Launcher"
CF_ItmPresets[factionid][i] = "Vervack AG79 Grenade Launcher"
CF_ItmModules[factionid][i] = "GDI.rte"
CF_ItmPrices[factionid][i] = 80
CF_ItmDescriptions[factionid][i] = "With a six-round drum, the AG79 Grenade Launcher is a little out of date - but probably one of the most flexible weapons in the GDI Arsenal, as it can utilize a couple of different grenade types. It’s probably best known for its standard bouncy proximity grenades that deflect off terrain but detonate when close to enemies, or after a set amount of time."
CF_ItmUnlockData[factionid][i] = 1200 -- 0 means available at start
CF_ItmTypes[factionid][i] = CF_WeaponTypes.HEAVY;
CF_ItmPowers[factionid][i] = 6
i = #CF_ItmNames[factionid] + 1
CF_ItmNames[factionid][i] = "Global Defense Light Anti-Armour Weapon"
CF_ItmPresets[factionid][i] = "Global Defense Light Anti-Armour Weapon"
CF_ItmModules[factionid][i] = "GDI.rte"
CF_ItmPrices[factionid][i] = 200
CF_ItmDescriptions[factionid][i] = "When it became apparent that heavier weapons would be required to counter GDI's armoured vehicles, Nod's engineers came together to design the Redeemer Shoulder-Mounted Assault Weapon. Capable of locking onto infantry, vehicles, and low-flying aircraft, the Redeemer is one of the most efficient and deadly man-portable launcher systems ever designed."
CF_ItmUnlockData[factionid][i] = 2000 -- 0 means available at start
CF_ItmTypes[factionid][i] = CF_WeaponTypes.HEAVY;
CF_ItmPowers[factionid][i] = 8
i = #CF_ItmNames[factionid] + 1
CF_ItmNames[factionid][i] = "Experimental Weapon, 'Merlin' Personal Ion Cannon"
CF_ItmPresets[factionid][i] = "Experimental Weapon, 'Merlin' Personal Ion Cannon"
CF_ItmModules[factionid][i] = "GDI.rte"
CF_ItmPrices[factionid][i] = 300
CF_ItmDescriptions[factionid][i] = "A prototype dating back to the very end of the First Tiberium War, the Merlin Personal Ion Cannon was ultimately shelved due to its slow charging system, subpar performance, and unreliable hardware. The schematics were recently rediscovered, allowing the new and improved Merlin to return to the battlefield. Whilst still expensive, the slow charging system has been significantly enhanced with the use of pre-charged ‘battery’ modules. Though the weapon remains extremely deadly, its relative lack of penetration compared to railgun weapons makes it much less effective against heavily fortified structures."
CF_ItmUnlockData[factionid][i] = 4000 -- 0 means available at start
CF_ItmTypes[factionid][i] = CF_WeaponTypes.HEAVY;
CF_ItmPowers[factionid][i] = 0
i = #CF_ItmNames[factionid] + 1
CF_ItmNames[factionid][i] = "GDI Disc Grenade"
CF_ItmPresets[factionid][i] = "GDI Disc Grenade"
CF_ItmModules[factionid][i] = "GDI.rte"
CF_ItmPrices[factionid][i] = 10
CF_ItmDescriptions[factionid][i] = "Whilst more challenging to use than a regular grenade, the GDI’s discus-style grenades can be thrown much further and faster, and lose none of the regular grenade’s lethality. "
CF_ItmUnlockData[factionid][i] = 0 -- 0 means available at start
CF_ItmClasses[factionid][i] = "TDExplosive"
CF_ItmTypes[factionid][i] = CF_WeaponTypes.GRENADE;
CF_ItmPowers[factionid][i] = 4
i = #CF_ItmNames[factionid] + 1
CF_ItmNames[factionid][i] = "GDI Timed C4"
CF_ItmPresets[factionid][i] = "GDI Timed C4"
CF_ItmModules[factionid][i] = "GDI.rte"
CF_ItmPrices[factionid][i] = 25
CF_ItmDescriptions[factionid][i] = "A powerful explosive charge that can stick to objects and surfaces. Once armed, it will detonate after 10 seconds. Deploy, and stand well back!"
CF_ItmUnlockData[factionid][i] = 500 -- 0 means available at start
CF_ItmClasses[factionid][i] = "TDExplosive"
CF_ItmTypes[factionid][i] = CF_WeaponTypes.GRENADE;
CF_ItmPowers[factionid][i] = 0