Jump to content


Photo

An amazing tutorial of EAW's AI, by Drieick.


  • Please log in to reply
5 replies to this topic

#1 Banshee

Banshee

    One Vision, One Purpose!

  • Network Admins
  • 9,045 posts
  • Location:Rio De Janeiro, RJ, Brazil.
  • Projects:PPM, PPM: Final Dawn, OS SHP Builder, OS Palette Editor, OS W3D Viewer, VXLSE III, etc...
  •  Retired Network Leader
  • Division:Revora
  • Job:Maintenance Admin

Posted 19 February 2008 - 05:35 AM

Drieick has recently posted an impressive tutorial explaining how to play with the AI XML files that triggers .lua scripts from Empire at War. The tutorials explains the variables, categories, expressions, functions, and much more... and it features some examples in the very end. Here's a snippet:


Variables and how they're interpreted
Here are the variables, which obivously start with the word "Variable_":

Variable_Target
Variable_Enemy
Variable_Self

What they mean depends on how and where they're used; for example, if it's Galactic mode, Target could mean a planet and Variable_Self could mean the player attributes. However, in tactical mode, Variable_Target could mean a unit or a location on the map. Currently, on Target appears in the Lua source (defined in PGBaseDefitions.lua)
I'm not sure how exactly it determines locations, because there's no obvious grid, so I'mjust going to assume it's square pixel by square pixel, which is inefficient (Grid would be faster... or a bigger squareXsquare scaled grid).



And this is just the beggining. You can read the whole tutorial HERE and discuss it. Thanks a lot, Drieick. If anyone is interested on providing tutorials, post it on our modding forums or wait the new site goes live (which we recommend, since it will include a nice articles/tutorials system).

Edited by Duke, 27 February 2008 - 07:10 PM.

Project Perfect Mod

Command & Conquer Mods, Mods Support, Public Researchs, Map Archives, Tutorials, Tools, A Friendly Community and much more. Check it out now!

Posted Image

#2 Drieick

Drieick
  • Members
  • 12 posts
  • Location:Terra
  •  Otaku

Posted 25 February 2008 - 07:08 AM

I apologize for being politically correct (correct term?) and all, but that thread is mainly concentrated on the XML source and not the Lua source - the Lua just carries out the orders, the XML determines what orders to give. Just thought I'd tell you that, sir Banshee. :ohmy: (The XML source can be found at Data/XML/AI)

Sorry for a late response - been busy with story line.

Edited by Drieick, 25 February 2008 - 07:09 AM.


#3 Banshee

Banshee

    One Vision, One Purpose!

  • Network Admins
  • 9,045 posts
  • Location:Rio De Janeiro, RJ, Brazil.
  • Projects:PPM, PPM: Final Dawn, OS SHP Builder, OS Palette Editor, OS W3D Viewer, VXLSE III, etc...
  •  Retired Network Leader
  • Division:Revora
  • Job:Maintenance Admin

Posted 25 February 2008 - 02:20 PM

Thanks :ohmy:. I've patched the news.
Project Perfect Mod

Command & Conquer Mods, Mods Support, Public Researchs, Map Archives, Tutorials, Tools, A Friendly Community and much more. Check it out now!

Posted Image

#4 Guest_SCC_*

Guest_SCC_*
  • Guests

Posted 28 February 2008 - 09:20 AM

Variable_Target locations are selected in ground maps from the AI zones defining collections of contiguous of map cells (either procedurally calculated or hand painted by the editor). In space maps its a simple coarse grid.

-SCC

#5 Kelathin

Kelathin
  • VIP (Petroglyph)
  • 45 posts
  • Division:Petrolution
  • Job:Staff

Posted 28 February 2008 - 01:56 PM

If this SCC is the one I'm thinking of, Scc is Steve Copeland, a Petroglyph developer

#6 Drieick

Drieick
  • Members
  • 12 posts
  • Location:Terra
  •  Otaku

Posted 06 May 2008 - 05:33 AM

Variable_Target locations are selected in ground maps from the AI zones defining collections of contiguous of map cells (either procedurally calculated or hand painted by the editor). In space maps its a simple coarse grid.

-SCC

Fix'd. Thank you very much, sir.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users