Automatic upgrade? (or in this case, downgrade haha)


(GOLIATH Mod) #1

Hello Everyone,

I’m worried about the capture frigates being too butch with the armor upgrades, and I’m thinking about excluding them. So the question comes up, HOW?

I read somewhere, and from the AI only upgrades in the ‘ai_properties’ file, I think upgrades that cost 1 space buck are supposed to be automatic.

So the thinking is to downgrade the capture frigates after all the frigates have been upgraded. But it doesn’t work.

Does anybody have an idea what’s wrong with this? This is the research lua for the armor upgrades and I’m trying to have IA_F2 triggered by IA_F and VS_F2 triggered by VS_F. Maybe it’s something easy that I’m not seeing. :

base_research = nil 	
base_research = {

{
		Name =					"TorpedoFrigateHealthUpgrade1",
		RequiredResearch =		"",                                          
		RequiredSubSystems =	"Research | AdvancedResearch & FrigateProduction",    
		Cost = 					1000,
		Time = 					75,
		DisplayedName =			"$7571",
		DisplayPriority =		300,                                                    
		Description =			"$7572",
		UpgradeType =			Modifier,
		TargetType =			Ship,
		TargetName =			"Hgn_TorpedoFrigate",
       		UpgradeName =			"MAXHEALTH",
        	UpgradeValue =			1.4,
		Icon = 				Icon_Health,
		ShortDisplayedName = 		"$7244",
	},

	{
		Name =					"IonCannonFrigateHealthUpgrade1",
		RequiredResearch =		"InstaAdvancedFrigateTech",                                         
		RequiredSubSystems =	"Research | AdvancedResearch & FrigateProduction", 
		Cost = 					1000,
		Time = 					75,
		DisplayedName =			"$7579",
		DisplayPriority =		306,                                                    
		Description =			"$7580",
		UpgradeType =			Modifier,
		TargetType =			Ship,
		TargetName =			"Hgn_IonCannonFrigate",
       		UpgradeName =			"MAXHEALTH",
        	UpgradeValue =			1.4,
		Icon = 				Icon_Health,
		ShortDisplayedName = 		"$7247",
	},

	{
		Name =					"AssaultFrigateHealthUpgrade1",
		RequiredResearch =		"InstaAdvancedFrigateTech",                                         
		RequiredSubSystems =	"Research | AdvancedResearch & FrigateProduction", 
 		Cost = 					1000,
		Time = 					75,
		DisplayedName =			"$7587",
		DisplayPriority =		312,                                                    
		Description =			"$7588",
		UpgradeType =			Modifier,
		TargetType =			Ship,
		TargetName =			"Hgn_AssaultFrigate",
        	UpgradeName =			"MAXHEALTH",
       		UpgradeValue =			1.4,
		Icon = 				Icon_Health,
		ShortDisplayedName = 		"$7251",
	},

	{
		Name =					"VS_F",
		--RequiredResearch =		"",
		RequiredResearch =		"AssaultFrigateHealthUpgrade1 & TorpedoFrigateHealthUpgrade1 & IonCannonFrigateHealthUpgrade1",   
		--RequiredSubSystems =	"",                                       
		RequiredSubSystems =	"AdvancedResearch & FrigateProduction", 
		Cost = 					15000,
		Time = 					120,
		DisplayedName =			"Vibrantex - Frigates",
		DisplayPriority =		400,                                                    
		Description =			"<b>Description:</b> A weave of flexible ceramics and high-tensile super-alloys bonded to the superstructure of a vessel at the molecular level, damage resistance +50%. \n\n<b>Prerequisites:</b> Adv. Research Module, Frigate Facility, all frigate armor upgrades.",
		UpgradeType =			Modifier,
		TargetType =			Family,
		TargetName =			"Frigate",
       		UpgradeName =			"MAXHEALTH",
        	UpgradeValue =			2.1,
		Icon = 				Icon_Health,
		ShortDisplayedName = 		"Lvl 2 Frigates",
	},

	{
		Name =					"VS_F2",
		RequiredResearch =		"VS_F",                                        
		RequiredSubSystems =	"", 
		Cost = 					1,
		Time = 					1,
		DisplayedName =			"",
		DisplayPriority =		0,                                                    
		Description =			"",
		UpgradeType =			Modifier,
		TargetType =			Ship,
		TargetName =			"hgn_marinefrigate",
       		UpgradeName =			"MAXHEALTH",
        	UpgradeValue =			0.476,
	},

	{
		Name =					"IA_F",
		RequiredResearch =		"VS_F & Subspace",                                         
		RequiredSubSystems =	"AdvancedResearch & FrigateProduction", 
		Cost = 					40000,
		Time = 					220,
		DisplayedName =			"Impenetrum Armor - Frigates",
		DisplayPriority =		400,                                                    
		Description =			"<b>Description:</b> Its scales forged in a sub-space envelope at the center of a pulsar, Impenetrum  Armor is in a class of its own. (additional +70%) \n\n<b>Prerequisites:</b> Sub-Space Breach and Vibrantex Superstructure Research.",
		UpgradeType =			Modifier,
		TargetType =			Family,
		TargetName =			"Frigate",
       		UpgradeName =			"MAXHEALTH",
        	UpgradeValue =			3.57,
		Icon = 				Icon_Health,
		ShortDisplayedName = 		"Lvl 3 Frigates",
	},

	{
		Name =					"IA_F2",

		RequiredResearch =		"IA_F",                                        
		RequiredSubSystems =	"", 
		Cost = 					1,
		Time = 					1,
		DisplayedName =			"",
		DisplayPriority =		0,                                                    
		Description =			"",
		UpgradeType =			Modifier,
		TargetType =			Ship,
		TargetName =			"hgn_marinefrigate",
       		UpgradeName =			"MAXHEALTH",
        	UpgradeValue =			0.28,
	},

	{ 
		Name =			"IF_tech",
		RequiredResearch =	"Subspace",                                               
		RequiredSubSystems =	"Research | AdvancedResearch & FrigateProduction",                             
		Cost = 			1500,
		Time = 			150,
		DisplayedName =		"Neutron Torpedoes",
		DisplayPriority =	316,                                                    
		Description =		"<b>Description:</b> The neutron torpedo is deadly even to the most armored vessels, however if they are shaken violently... \n\nRequired to unlock Insurrection Frigates. \n\n<b>Prerequisites:</b> Adv. Research Module, Vibrantex Superstructure Research and Sub-Space Breach Research.",
		TargetName = "Vgr_IF",
		Icon = Icon_Tech,
		ShortDisplayedName = "Neutron Torpedoes",
	},


}

-- Add these items to the research tree!
for i,e in base_research do
	research[res_index] = e
	res_index = res_index+1
end


base_research = nil 

Thanks in advance!


(Taiidan Republic Mod) #2

Instead of…

…why not lost all the frigates except capture frigates using “&”?


(ajlsunrise) #3

Cost and Time need to be 0, otherwise it is an actual research option listed in-game.


(GOLIATH Mod) #4

Hi, I tried that, but it didn’t work. I was only either able to target one ship or a family.


(GOLIATH Mod) #5

Okay thanks, I’ll try it out tonight. I gotta go to work first - lame.


(GOLIATH Mod) #6

So, the cost and time set to 0 worked! The upgrades are of course not cumulative though. So the Hiigarans should be set to 1 and the Vaygr to 1.4. But I bet you could set up a whole chain of automatic upgrades like that if you needed to.

Thanks guys!