.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Raging Tiger- Save $9.00
World Supremacy- Save $9.00

   







Go Back   .com.unity Forums > Shrapnel Community > Space Empires: IV & V

Reply
 
Thread Tools Display Modes
  #11  
Old January 21st, 2007, 11:02 PM
Captain Kwok's Avatar

Captain Kwok Captain Kwok is offline
National Security Advisor
 
Join Date: Oct 2001
Location: Toronto, Canada
Posts: 5,623
Thanks: 1
Thanked 14 Times in 12 Posts
Captain Kwok is on a distinguished road
Default Re: Anyone working on AI for standard SE V?

Quote:
Imperator Fyron said:
Any chance of sharing some of your AI wisdom on the Wiki, Kwok?
I'd like to do something like that eventually, but it's always a time issue. The latest beta patches alone take considerable time to reconcile with the Balance Mod AI. Too bad I need to waste so much time sleeping!

But here are a few beginner tips:

All the AI source scripts are found in the Utilities\ScriptParser\SE5EmpireScripts folder. The Script Parser itself is not a great editing tool, so use Notepad etc., but you'll need the Script Parser to compile AI files. Each empire has a Setup and Main script, which are the only files you every actually compile. The AI_Script_[xxxxxx] files contain functions that are included in the Setup/Main scripts.

The [Empire]_Setup_Script file is used only on player generation and chooses the racial traits as well as starting research. I suppose the most important note is that it uses the Script_AI_GlobalResearch file to pick starting techs, and not Script_AI_Research - which is used by the AI for choosing techs to research in-game.

The [Empire]_Main_Script is run for each AI every turn. It incorporates the functions of all the Script_AI_[xxxxxx] files, as well as sets most variables and tech choices for that Empire.

A brief synopsis of each file:

Script_AI_GlobalConstants sets various constants used in the other AI files.

Script_AI_GlobalVariables sets all sorts of variables (some of which are overwritten by an Empire's main scripts) used by functions in other files.

Script_AI_GlobalSettings sets all sorts of variables used by the other AI functions. This includes settings for vehicle design creation (such as number of engines or crew), extra components to add to designs, setting demand for vehicles to construct, and a bunch of politics settings which are used in calculations for diplomacy.

Script_AI_ColonyType contains the functions that determine the Colony Type the AI assigns to a new colony.

Script_AI_Construction contains the functions that add ships/units/facilities to the building queues.

Script_AI_DesignCreation contains the design algorithm for the AI. This is perhaps the most complex file to understand at first. A lot of settings from the GlobalSettings file are used here.

Script_AI_Intelligence contains the functions that choose what intel projects to run etc.

Script_AI_Lists contains a series of functions that compile lists for lots of different things like attack/defend locations, colonizable planets, resupply locations, etc. This list variables are used in many of the scripts, particularly in Script_AI_Orders_Ships.

Script_AI_Orders_Planets contains a few functions to give planets orders like launch mines.

Script_AI_Orders_Ships has all the functions that assign orders to ships. It often uses list variables set in Script_AI_Lists in its functions.

Script_AI_Politics contains all the functions that handle sending messages and diplomacy. Many of the functions refer to values that are set in Script_AI_GlobalSettings, such as the maximum anger level for a given treaty stipulation.

Script_AI_Research contains the functions used to pick research items for the AI during the game. It's just a list of tech areas to add to the research queue and set tech area requirements.

Script_AI_GlobalReseach is more or less the same as Script_AI_Research, but is only used by the Empire's setup script.

Script_AI_Restricted_SolarSystems doesn't do anything at this time.

Script_AI_StateChange has functions that determines the AI's state. It also has functions to determine whether to attack or not.
__________________
Space Empires Depot | SE:V Balance Mod
Reply With Quote
  #12  
Old January 22nd, 2007, 12:27 AM
President_Elect_Shang's Avatar

President_Elect_Shang President_Elect_Shang is offline
Brigadier General
 
Join Date: Nov 2001
Location: WA
Posts: 1,894
Thanks: 5
Thanked 3 Times in 3 Posts
President_Elect_Shang is on a distinguished road
Default Re: Anyone working on AI for standard SE V?

Excellent! <cue evil laugh>
__________________
President Elect Shang; Tal-Re Republic of Free Worlds
Welcome to Super Vegeta’s Big Bang Attack… Welcome to OBLIVION!
“Don Panoz made an awesome car and… an incinerator” Bill Auberlen
Reply With Quote
  #13  
Old January 22nd, 2007, 07:55 AM
Mephisto's Avatar

Mephisto Mephisto is offline
Brigadier General
 
Join Date: Sep 2000
Location: Frankfurt, Germany
Posts: 1,994
Thanks: 0
Thanked 0 Times in 0 Posts
Mephisto is on a distinguished road
Default Re: Anyone working on AI for standard SE V?

What is so discouraging is the fact that the AI is so lacking in some functions and its overall design. To get a real nice AI you have to start all over again from my POV. For example: Why do AI ships only ever get one order per turn? Because the scripts don't check if a ship has movement points left (and those could to something) but if it has an order already. Instead of moving to a planet, pick up cargo, move it to the next, go back, pick up more and move on because you have enough movement points the AI will do this step by step turn by turn and therefore in slow motion compared to a human player. You can fix this but it's a lot of work. Maybe I will start modding again but I'm yet undecided.
__________________
For, in the final analysis, our most basic common link is that we all inhabit this small planet. We all breathe the same air. We all cherish our children's futures. And we are all mortal. - JFK
Reply With Quote
  #14  
Old January 22nd, 2007, 09:55 AM

Raapys Raapys is offline
First Lieutenant
 
Join Date: Jan 2005
Posts: 689
Thanks: 0
Thanked 0 Times in 0 Posts
Raapys is on a distinguished road
Default Re: Anyone working on AI for standard SE V?

I think the major AI improvements should be done by Aaron, now that most of the bugs are getting worked out. That way we'd actually have some AI script files where modders would just have to put in their tech tree and components and then have a usable AI to go with their mod.
Reply With Quote
  #15  
Old January 22nd, 2007, 02:23 PM
Q's Avatar

Q Q is offline
Colonel
 
Join Date: Jan 2001
Posts: 1,661
Thanks: 0
Thanked 0 Times in 0 Posts
Q is on a distinguished road
Default Re: Anyone working on AI for standard SE V?

Quote:
Ironmanbc said:
Quote:
Q said:
If I look at the AI files I understand the reluctance!
For me these files are very hard to understand. Just for instance how do you chan g e the AI design creation?
But I thought you were Q
I am used to snip my fingers to get what I want and not to modify some text files!

On a more serious side it is very bad that the AI design creation is so complex, as it is just terrible in standard SE V: I wiped out a fleet from a well developped AI empire with 7 light cruisers and high level anti proton beams because they didn't have combat sensors and ECM (although they had researched it to a high level). My 3 destroyers didn't take any damage at all!
Reply With Quote
  #16  
Old January 22nd, 2007, 05:46 PM
Suicide Junkie's Avatar
Suicide Junkie Suicide Junkie is offline
Shrapnel Fanatic
 
Join Date: Feb 2001
Location: Waterloo, Ontario, Canada
Posts: 11,451
Thanks: 1
Thanked 4 Times in 4 Posts
Suicide Junkie is on a distinguished road
Default Re: Anyone working on AI for standard SE V?

That issue is partly the design AI, and partly the mod itself.

Allowing sensors and ECM to be *so* critical is risky. Having solid shields also means that any hits which do land, don't do anything.
Reply With Quote
  #17  
Old January 22nd, 2007, 06:00 PM
Captain Kwok's Avatar

Captain Kwok Captain Kwok is offline
National Security Advisor
 
Join Date: Oct 2001
Location: Toronto, Canada
Posts: 5,623
Thanks: 1
Thanked 14 Times in 12 Posts
Captain Kwok is on a distinguished road
Default Re: Anyone working on AI for standard SE V?

The problem with the stock design creation is not that it's too complex, but that it tries to everything with the same functions. In doing so, it does a half-*** job with all designs.

To elaborate on why I called the design creation script file the most complex is that it has the most connections to other scripts and variables, so changing the file often requires making changes in a few other script files at the same time.
__________________
Space Empires Depot | SE:V Balance Mod
Reply With Quote
  #18  
Old February 2nd, 2007, 01:40 AM
President_Elect_Shang's Avatar

President_Elect_Shang President_Elect_Shang is offline
Brigadier General
 
Join Date: Nov 2001
Location: WA
Posts: 1,894
Thanks: 5
Thanked 3 Times in 3 Posts
President_Elect_Shang is on a distinguished road
Default Re: Anyone working on AI for standard SE V?

Kwok were did you get your info from on the below list of AI files? I am wondering because I am rewriting all but two or three from the ground up and I am coming to a few different conclusions. Minor points but I would like to know if you made these yourself or if they come from Aaron? If you made them I will pass the differences off as nothing. If they are from Aaron than I may need to "spot check" over my work.
__________________
President Elect Shang; Tal-Re Republic of Free Worlds
Welcome to Super Vegeta’s Big Bang Attack… Welcome to OBLIVION!
“Don Panoz made an awesome car and… an incinerator” Bill Auberlen
Reply With Quote
  #19  
Old February 2nd, 2007, 01:53 AM
Captain Kwok's Avatar

Captain Kwok Captain Kwok is offline
National Security Advisor
 
Join Date: Oct 2001
Location: Toronto, Canada
Posts: 5,623
Thanks: 1
Thanked 14 Times in 12 Posts
Captain Kwok is on a distinguished road
Default Re: Anyone working on AI for standard SE V?

I just made it up at the time. What were your issues?
__________________
Space Empires Depot | SE:V Balance Mod
Reply With Quote
  #20  
Old February 2nd, 2007, 02:21 AM
President_Elect_Shang's Avatar

President_Elect_Shang President_Elect_Shang is offline
Brigadier General
 
Join Date: Nov 2001
Location: WA
Posts: 1,894
Thanks: 5
Thanked 3 Times in 3 Posts
President_Elect_Shang is on a distinguished road
Default Re: Anyone working on AI for standard SE V?

No issues yet. So far I am coming along nicely. I just came to minor, very minor points of differences. For example the Global Research is like the Research but it appears to be a stepping stone for what is needed to attain the next level in every area. Then is the age repeat which appears to be set if the specific species lacks a setting already. Which is another minor point but one I can't figure out the purpose of since every species should have a set research program. I am going to say this is a backup fail safe system which Aaron appears to have included for just about everything. Such as the call for what makes a mine layer a mine layer. No, no problems yet... unless you count tired eyes! At this point there is only you and I to bounce this stuff off of. I asked Aaron about adding another weapon call besides the primary, heavy and special calls there are now. He told me how to but I am past that point so I will add it to the tweak list. I would like to add missile and beam to the list then call for an attack ship which is loaded with beams and label it something nifty like a wp assault ship. Set the call for armor and shields too. Should give the average player a nasty surprise know what I mean?
__________________
President Elect Shang; Tal-Re Republic of Free Worlds
Welcome to Super Vegeta’s Big Bang Attack… Welcome to OBLIVION!
“Don Panoz made an awesome car and… an incinerator” Bill Auberlen
Reply With Quote
Reply

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 12:16 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2024, Shrapnel Games, Inc. - All Rights Reserved.