Those working on this mod do so in their own free time and for no pay.
Show your support for them by enabling ads on this site!

Post reply

Warning: this topic has not been posted in for at least 100 days.
Unless you're sure you want to reply, please consider starting a new topic.
Name:
Email:
Subject:
Message icon:

Verification:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:
What is the name of the planet we live on? Type it backwards then add a 5.:
Who is taking revenge? (lowercase):

shortcuts: hit alt+s to submit/post or alt+p to preview


Topic Summary

Posted by: Mord
« on: May 29, 2018, 01:51:01 PM »

Very short answer:
No, the top-level Goal tags are not hardcoded. The code inside the Goal tag matters a lot, both to the Goal itself and to other code that refers to the Goal.

Somewhat longer answer:
If you're interested in the AI, you should read this. You can create new goals with new top-level tags, but creating new goals by itself won't do anything for you. "Goals" are things the AI might like to do, but whether or not the AI will actually try to do them is governed by a "goalfunction" that links the goal to a perceptual equation. The perceptual equation is a way for the AI to evaluate the desirability of pursuing that specific goal at that specific moment. In your example, the goal "Corrupt_Planet" (AI_Goals_Underworld_Galactic.xml) is governed by the goalfunction also named "Corrupt_Planet" (AI_Goalset_Underworld_Galactic.xml) and the perceptual equation named "Should_Corrupt_Planet" (AI_Equations_Underworld_Galactic.xml). Once the AI has decided to pursue a Goal, it then uses a Plan to actually execute tasks in pursuit of that goal. The only Plan available to the AI in pursuit of the "Corrupt_Planet" goal is found in "AI_Plan_Underworld_DeploySaboteur.lua".
Posted by: demcalves
« on: March 29, 2018, 08:59:33 AM »

I have a question about a line of code found in the source file for FOC. Under XML\AI\Goals there are many files like AI_Goals_Underworld_Galactic.xml that have code that looks like this for example:

<Corrupt_Planet>
      <AIGoalApplicationFlags> Enemy </AIGoalApplicationFlags>
      <GameMode>Galactic</GameMode>
      <Category>Infrastructure</Category>
      <Reachability>Any</Reachability>
      <Time_Limit>60.0</Time_Limit>
      <Build_Time_Delay_Tolerance>1.25</Build_Time_Delay_Tolerance>
      <Tracking_Duration>300.0</Tracking_Duration>
      <Per_Failure_Desire_Adjust>-20.0</Per_Failure_Desire_Adjust>         
   </Corrupt_Planet>

What I am curious about is if the tag <Corrupt_Planet> is hard-coded or not? If that's the case then does only the code inside the tags matter more?

Those working on this mod do so in their own free time and for no pay.
Show your support for them by enabling ads on this site!