Explanation of Empire At War's AI "engine"
|
1 vote |
Examples that you can use
Here are some functions I wrote that you can study and use; just provide a link to this thread (or just a form of credit, but I prefer the link) if you publish any work with any of these functions in it:
<!-- Are we connected to the enemy's home planet? -->
<Is_Connected_To_Enemy_Home_Planet> Function_Is_Connected_To_Me.Evaluate * Function_Is_Home_Planet.Evaluate </Is_Connected_To_Enemy_Home_Planet>
<!-- Does this planet have a barracks? -->
<Has_Barracks> Variable_Target.HasStructure{Parameter_Type = "E_Ground_Barracks", Parameter_Type = "R_Ground_Barracks", Parameter_Only_Consider_Complete = 1.0} </Has_Barracks>
<!-- Does this planet have a light factory? -->
<Has_Light_Vehicle_Factory> Variable_Target.HasStructure{Parameter_Type = "E_Ground_Light_Vehicle_Factory", Parameter_Type = "R_Ground_Light_Vehicle_Factory", Parameter_Only_Consider_Complete = 1.0} </Has_Light_Vehicle_Factory>
<!-- Does this planet have a barracks OR a light factory? -->
<Has_Barracks_Or_Light_Factory> Function_Has_Barracks.Evaluate + Function_Has_Light_Vehicle_Factory.Evaluate </Has_Barracks_Or_Light_Factory>
<!-- Does this planet have a barracks AND a light factory? -->
<Has_Barracks_And_Light_Factory> Function_Has_Barracks.Evaluate * Function_Has_Light_Vehicle_Factory.Evaluate </Has_Barracks_And_Light_Factory>
The season finale
The only thing I hope is that you understood is what I wrote; if you have any questions, just post.
-------------------------------------------------------------------------------------------
That's all of it. But, I would like to make a correction: it translates to, what I have reason to believe, C/C++. The files are attached, so you may download and review them. Not sure if they're valid C++, since I just started a couple days before posting that tutorial, so feel free to make appropriate modifications. (They won't Build though; they're just a rough lay out of what I think they might look like; ever heard of XAML?)
Here are some functions I wrote that you can study and use; just provide a link to this thread (or just a form of credit, but I prefer the link) if you publish any work with any of these functions in it:
<!-- Are we connected to the enemy's home planet? -->
<Is_Connected_To_Enemy_Home_Planet> Function_Is_Connected_To_Me.Evaluate * Function_Is_Home_Planet.Evaluate </Is_Connected_To_Enemy_Home_Planet>
<!-- Does this planet have a barracks? -->
<Has_Barracks> Variable_Target.HasStructure{Parameter_Type = "E_Ground_Barracks", Parameter_Type = "R_Ground_Barracks", Parameter_Only_Consider_Complete = 1.0} </Has_Barracks>
<!-- Does this planet have a light factory? -->
<Has_Light_Vehicle_Factory> Variable_Target.HasStructure{Parameter_Type = "E_Ground_Light_Vehicle_Factory", Parameter_Type = "R_Ground_Light_Vehicle_Factory", Parameter_Only_Consider_Complete = 1.0} </Has_Light_Vehicle_Factory>
<!-- Does this planet have a barracks OR a light factory? -->
<Has_Barracks_Or_Light_Factory> Function_Has_Barracks.Evaluate + Function_Has_Light_Vehicle_Factory.Evaluate </Has_Barracks_Or_Light_Factory>
<!-- Does this planet have a barracks AND a light factory? -->
<Has_Barracks_And_Light_Factory> Function_Has_Barracks.Evaluate * Function_Has_Light_Vehicle_Factory.Evaluate </Has_Barracks_And_Light_Factory>
The season finale
The only thing I hope is that you understood is what I wrote; if you have any questions, just post.
-------------------------------------------------------------------------------------------
That's all of it. But, I would like to make a correction: it translates to, what I have reason to believe, C/C++. The files are attached, so you may download and review them. Not sure if they're valid C++, since I just started a couple days before posting that tutorial, so feel free to make appropriate modifications. (They won't Build though; they're just a rough lay out of what I think they might look like; ever heard of XAML?)
Links / Downloads
Hits | Added | |
---|---|---|
NameSpace and TestFunction (Page 6) | 2608 | February 25, 2008 - 3:19 |
News article pertainting to tutorial | 3064 | February 25, 2008 - 3:07 |
The original thread | 2979 | February 25, 2008 - 3:06 |