Accueil Crush your enemies... and create an EMPIRE!!! Space Empires V -- BUY NOW!!!

Connexion utilisateur

  • Créer un nouveau compte
  • Demander un nouveau mot de passe

Navigation

  • news
    • archive
    • blogs
    • books
    • forums
    • recent posts
    • groups
  • image galleries
  • projects & downloads
  • search
  • create content
  • agrégateur de nouvelles

Rechercher

Qui est en ligne

Il y a actuellement 1 utilisateur et 166 invités en ligne.

Utilisateurs en ligne

  • Santiago

Languages

  • English English
  • French French

Parcourir les archives

« December 2008  
Mo Tu We Th Fr Sa Su
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        
Accueil » news » forums » Support & Feedback » Scenarios & Mods » SE:V MODs

AI Script Flow Chart

Image de Isopsyco
Soumis par Isopsyco le Sam, 2007-09-22 20:56 SE:V MODs

Does anyone know the associated files required to input a custom unit type into the AI script so it becomes selectable by the AI?

I'm assuming there are several files required to do this, just would like a list of the required ones to look/edit the required variables and constants.

Also looking for the same information to input a new tech area into the AI selectable arena.

Anyone have a flow chart of how the data files are inter-related?

‹ Three cheers for Captain Kwok! Balance Mod Updates ›
» Vous devez vous identifier ou créer un compte pour écrire des commentaires

Options d'affichage des commentaires

Sélectionnez la méthode d'affichage des commentaires que vous préférez, puis cliquez sur "Sauvegarder les paramètres" pour activer vos changements.
Image de Captain Kwok
Mod Designer

Re: AI Script Flow Chart

Soumis par Captain Kwok le Sam, 2007-09-22 21:37

Here's kind of a brief answer:

If you're working from the stock scripts look at Script_AI_GlobalConstants_VehicleSizes. Add two new constants for the unit's name and size.

The function "Set_AI_Vehicle_Sizes" in Script_AI_GlobalSettings is where a list is made of all the vehicles that the AI might use. You'll want to add new entries for you unit.

Next, the function "AI_Set_Race_Design_Types" in the same file makes a list of the design types the AI will attempt to design. You'll want to add a new design type for your unit and then set the size choice to your new unit's size constant.

During design creation, the AI runs through its list of design types and tries to make a design for each. It will look at the vehicle size wanted for that design type from its list and then cross checks its list of vehicle sizes. If a match is found, it looks at the name for that list position and picks that vehicle.


Space Empires Depot | SE:V Balance Mod

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Image de Captain Kwok
Mod Designer

Re: AI Script Flow Chart

Soumis par Captain Kwok le Sam, 2007-09-22 21:58

One way to get a feel for how the AI script comes together is look at "Main" function in any of the Found in [RaceName]_Main_Script files. It's calls off a series of functions that if you follow through, you'll get a good idea of how it all fits together.

Briefly as it pertains to the stock AI files:

// Base values for this AI
call Set_AI_Script_Values() - Found in [RaceName]_Main_Script; Sets variables to values specific to that race

// Generate lists for AI use.
call AI_Generate_Lists() - Found in Script_AI_Lists - Makes a bunch of lists for the AI's use

// Compute any state changes.
call AI_StateChange() - Found in Script_AI_StateChange - Determines the AI's state (attack, explore, etc)

// Set this races preferences
call AI_Set_Vehicle_Sizes() - Found in Script_AI_GlobalSettings; Makes list of vehicle sizes for use
call Set_Race_Research_Spending() - Found in [RaceName]_Main_Script; Sets race-specific research spending levels
call Set_Race_Research_Areas() - Found in [RaceName]_Main_Script; Sets race-specific tech areas to research (and weapons to use)
call AI_Set_Race_Design_Types() - Found in Script_AI_GlobalSettings; Makes list of design types to design
call Set_Race_Overall_Spending_Percentages() - Found in [RaceName]_Main_Script; sets construction spending levels
call Set_Race_State_Preference_Values() - Found in [RaceName]_Main_Script; sets race-specific for fleet formations etc.
call Set_Race_Political_Settings() - Found in [RaceName]_Main_Script; calls functions to set anger values for events etc.
call Set_Race_Colony_Type_Percentages() - Found in [RaceName]_Main_Script; Sets race colony type percentages

// Execute AI Controls.
call AI_SetColonyTypes() - Found in Script_AI_ColonyTypes; Assigns colony types to colonies without one
call AI_EnemyAnalysis() - Found in Script_AI_EnemyAnalysis; Does nothing in stock
call AI_Restricted_SolarSystems() - Found in Script_AI_Restricted_SolarSystems; Does nothing in stock
call AI_DesignCreation() - Found in Script_AI_DesignCreation; Runs the AI's design creation minister
call AI_Research() - Found in Script_AI_Research; Runs the AI's research minister
call AI_Intelligence() - Found in Script_AI_Intelligence; Runs the AI's intelligence minister
call AI_Construction() - Found in Script_AI_Construction; Runs the AI's construction minister
call AI_Politics() - Found in Script_AI_Politics; Runs the AI's politics minister
call AI_Orders_Planets() - Found in Script_AI_OrderPlanets; Runs the AI's construction minister
call AI_Orders_Ships() - Found in Script_AI_OrderShips; Runs the AI's ship ministers


Space Empires Depot | SE:V Balance Mod

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Image de Isopsyco
Mod Designer

Re: AI Script Flow Chart

Soumis par Isopsyco le Dim, 2007-09-23 08:59

Captain Kwok, as usual your prompt and on the mark. I thank you again for the assist, thats exactly what I was looking for.

» Vous devez vous identifier ou créer un compte pour écrire des commentaires

Options d'affichage des commentaires

Sélectionnez la méthode d'affichage des commentaires que vous préférez, puis cliquez sur "Sauvegarder les paramètres" pour activer vos changements.

Now on STEAM

Now on STEAM!Space Empires V via STEAMSpace Empires IV via STEAMSTEAM online by Valve Corporation

Contenu populaire

Aujourd'hui :

  • Research By Percentage SUCKS
  • Is the Patch Process Dead, and Other Thoughts...
  • Known SE5 v1.74 Bugs
  • Babylon 5 Wars SEV Mod Update
  • Space Empires V 1.74

Depuis toujours :

  • Space Empires V and VI: Expansions and the Future: Tell the Company What's on Your Wish List
  • Space Empires V
  • Gritty Galaxy Fleet Clash
  • Damn Dirty Bugs/Annoyances
  • Space Empires V: General Thoughts, Observations, and Suggestions

Dernier accès :

  • Starbase needs Supply in order to Fire?
  • xfilesclasses_steller
  • Cannot mothball
  • Unit Abilities not being listed in available orders
  • Checking Retrofit Cost
(c) Strategy First, Inc. All rights reserved.