New Faction AI -1 reply

Please wait...

Mobius13

aka Mobby!

50 XP

17th February 2009

0 Uploads

776 Posts

0 Threads

#1 9 years ago

This question is for anyone who has experience in adding a new faction.

How would i go about making the AI upgrade its tech levels? I want to make that certain faction to upgrade just like the Empire btw.

I think i already asked this question before but i dont think i got an answer :uhm:




Mobius13

aka Mobby!

50 XP

17th February 2009

0 Uploads

776 Posts

0 Threads

#2 9 years ago

Please, dont tell me NOBODY has added a new faction because i know you have :Puzzled:




Sidious Invader

Dark Lord Of The Sith

50 XP

8th January 2007

0 Uploads

853 Posts

0 Threads

#3 9 years ago

It's not an easy answer to explain, because the perception that evaluates whether or not it wants to upgrade tech is tied to the faction actually owning a "E_Research_Center." So you'd give your faction Basicempire for the player, and then change the perceptual equation to include "Yourfaction_Research_Center." There may be other perceptuals that tied the upgrade system to the Empire faction as well.




Mobius13

aka Mobby!

50 XP

17th February 2009

0 Uploads

776 Posts

0 Threads

#4 9 years ago
Sidious Invader;4958590It's not an easy answer to explain, because the perception that evaluates whether or not it wants to upgrade tech is tied to the faction actually owning a "E_Research_Center." So you'd give your faction Basicempire for the player, and then change the perceptual equation to include "Yourfaction_Research_Center." There may be other perceptuals that tied the upgrade system to the Empire faction as well.

Ok, that at least gives me a starting point.

Thanks again:giggle:




eons

Warrior of Time

50 XP

27th February 2009

0 Uploads

87 Posts

0 Threads

#5 9 years ago

Mobius, try going and copying the Death Star research levels found in Tech Building in the Xml folders. Create a copy of all these tech level upgrades, rename them, and if you know how give them a new icon. :)




Mobius13

aka Mobby!

50 XP

17th February 2009

0 Uploads

776 Posts

0 Threads

#6 9 years ago
eons;4960005Mobius, try going and copying the Death Star research levels found in Tech Building in the Xml folders. Create a copy of all these tech level upgrades, rename them, and if you know how give them a new icon. :)

Thats the first thing i did.

The hard part is actually finding references to to the research centers as Sid said in the post above you.




Sidious Invader

Dark Lord Of The Sith

50 XP

8th January 2007

0 Uploads

853 Posts

0 Threads

#7 9 years ago

It's in Xml\AI\Perceptualequations\Infastructuregalacticequations.xml.....

(Variable_Self.IsFaction {Parameter_Faction = "Empire"}) * (1.0 - Variable_Self.HasUnit{Parameter_Type = "Death_Star", Parameter_Count = 1, Parameter_Only_Consider_Complete = 1.0}) * Function_Has_Enough_Bases_For_Tech.Evaluate * ( clamp(Function_Has_Enough_Space_Force_Globally.Evaluate + (Game.Timeline > Variable_Self.TechLevel) * (Variable_Self.HasStructure{Parameter_Type = "E_Ground_Research_Facility"}) , 0.0, 1.0) * ( (1 - Variable_Self.HasStructure{Parameter_Type = "E_Ground_Research_Facility"}) * ((0.7 >= Variable_Self.BudgetFractionToBuild{Parameter_Type = "E_Ground_Research_Facility"}) + (0.9 >= Variable_Self.BudgetFractionToBuild{Parameter_Type = "E_Ground_Research_Facility", Parameter_Category = AIGoalCategoryType[MajorItem]}) >= 1.0) + Variable_Self.HasStructure{Parameter_Type = "E_Ground_Research_Facility"} * (Variable_Self.TechLevel == 1) * ((0.7 >= Variable_Self.BudgetFractionToBuild{Parameter_Type = "DS_Primary_Hyperdrive"}) + (0.9 >= Variable_Self.BudgetFractionToBuild{Parameter_Type = "DS_Primary_Hyperdrive", Parameter_Category = AIGoalCategoryType[MajorItem]}) >= 1.0) + (Variable_Self.TechLevel == 2) * ((0.7 >= Variable_Self.BudgetFractionToBuild{Parameter_Type = "DS_Shield_Gen"}) + (0.9 >= Variable_Self.BudgetFractionToBuild{Parameter_Type = "DS_Shield_Gen", Parameter_Category = AIGoalCategoryType[MajorItem]}) >= 1.0) + (Variable_Self.TechLevel == 3) * ((0.7 >= Variable_Self.BudgetFractionToBuild{Parameter_Type = "DS_Superlaser_Core"}) + (0.9 >= Variable_Self.BudgetFractionToBuild{Parameter_Type = "DS_Superlaser_Core", Parameter_Category = AIGoalCategoryType[MajorItem]}) >= 1.0) + (Variable_Self.TechLevel == 4) * ((0.7 >= Variable_Self.BudgetFractionToBuild{Parameter_Type = "DS_Durasteel"}) + (0.9 >= Variable_Self.BudgetFractionToBuild{Parameter_Type = "DS_Durasteel", Parameter_Category = AIGoalCategoryType[MajorItem]}) >= 1.0) ) + (Variable_Self.TechLevel == 5) * ((0.7 >= Variable_Self.BudgetFractionToBuild{Parameter_Type = "Death_Star"}) + (0.9 >= Variable_Self.BudgetFractionToBuild{Parameter_Type = "Death_Star", Parameter_Category = AIGoalCategoryType[MajorItem]}) >= 1.0) )

Faction is Empire, Has research center, it's all there.




Mobius13

aka Mobby!

50 XP

17th February 2009

0 Uploads

776 Posts

0 Threads

#8 9 years ago

Sidious Invader;4960085It's in Xml\AI\Perceptualequations\Infastructuregalacticequations.xml.....

Faction is Empire, Has research center, it's all there.

Ah, i was looking at the Enum folder lol

Sorry SI, I'm slow to catch on to this stuff.




Mobius13

aka Mobby!

50 XP

17th February 2009

0 Uploads

776 Posts

0 Threads

#9 9 years ago

Ok i know this is old but can someone check if i did it right?

[HTML] (Variable_Self.IsFaction {Parameter_Faction = "Underworld"}) * Function_Has_Enough_Bases_For_Tech.Evaluate * ( clamp(Function_Has_Enough_Space_Force_Globally.Eva luate + (Game.Timeline > Variable_Self.TechLevel) * (Variable_Self.HasStructure{Parameter_Type = "U_Ground_Palace"}) , 0.0, 1.0) * ( (1 - Variable_Self.HasStructure{Parameter_Type = "U_Ground_Palace"}) * ((0.7 >= Variable_Self.BudgetFractionToBuild{Parameter_Type = "U_Ground_Palace"}) + (0.9 >= Variable_Self.BudgetFractionToBuild{Parameter_Type = "U_Ground_Palace", Parameter_Category = AIGoalCategoryType[MajorItem]}) >= 1.0) + Variable_Self.HasStructure{Parameter_Type = "U_Ground_Palace"} * (Variable_Self.TechLevel == 1) * ((0.7 >= Variable_Self.BudgetFractionToBuild{Parameter_Type = "Black_Sun_Alliance"}) + (0.9 >= Variable_Self.BudgetFractionToBuild{Parameter_Type = "Black_Sun_Alliance", Parameter_Category = AIGoalCategoryType[MajorItem]}) >= 1.0) + (Variable_Self.TechLevel == 2) * ((0.7 >= Variable_Self.BudgetFractionToBuild{Parameter_Type = "Mandalorian_Piracy"}) + (0.9 >= Variable_Self.BudgetFractionToBuild{Parameter_Type = "Mandalorian_Piracy", Parameter_Category = AIGoalCategoryType[MajorItem]}) >= 1.0) + (Variable_Self.TechLevel == 3) * ((0.7 >= Variable_Self.BudgetFractionToBuild{Parameter_Type = "Hutt_Alliance"}) + (0.9 >= Variable_Self.BudgetFractionToBuild{Parameter_Type = "Hutt_Alliance", Parameter_Category = AIGoalCategoryType[MajorItem]}) >= 1.0) + (Variable_Self.TechLevel == 4) * ((0.7 >= Variable_Self.BudgetFractionToBuild{Parameter_Type = "Consortium_Shipyards"}) + (0.9 >= Variable_Self.BudgetFractionToBuild{Parameter_Type = "Consortium_Shipyards", Parameter_Category = AIGoalCategoryType[MajorItem]}) >= 1.0) ) [/HTML]