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 132 invités en ligne.

Utilisateurs en ligne

  • GambitUK

Languages

  • English English
  • French French

Parcourir les archives

« August 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 modding... Help me, please!!!

Soumis par Lastdreamer le Mar, 2008-01-29 07:25 SE:V MODs

I want to let AI use the new component I've created in my personal mod, and looking a little bit around the AI files, I've seen how to make... or I think so.

I've created 3 new component (at least in this moment...):

1) Temporal Shield (block anything)
2) Self Repairing Armor (Armor which repair itself like Organic)
3) Self Repairing Emissive Armor (Self Repairing and Emissive...)

If I don't make a mistake, I must add in file "Script_AI_GlobalConstants_Components.txt" the entry, like this:

1) AI_COMPONENT_TEMPORAL_SHIELD_GENERATOR: string := "Temporal Shield Generator"
2) AI_COMPONENT_SELF_REP_ARMOR: string := "Self Repairing Armor"
3) AI_COMPONENT_SELF_REP_EMISSIVE_ARMOR: string := "Self Repairing Emissive Armor"

and then in file "Script_AI_DesignCreation.txt" in the "Get_Best_Component_Of_Type" function I must add this modification:

1) for Temporal Shield in the section "AI_GEN_COMP_TYPE_SHIELD":

set comp_id := Sys_Get_Component_With_Name(sys_long_Player_ID, AI_COMPONENT_TEMPORAL_SHIELD_GENERATOR)
if (Sys_Is_Component_Available(sys_long_Player_ID, comp_id) then set final_comp_id := comp_id
endif
if (final_comp_id = 0) then
set comp_id := Sys_Get_Component_With_Name(sys_long_Player_ID, AI_COMPONENT_PHASED_SHIELD_GENERATOR)
if (Sys_Is_Component_Available(sys_long_Player_ID, comp_id)) then set final_comp_id := comp_id
endif
if (final_comp_id = 0) then
set comp_id := Sys_Get_Component_With_Name(sys_long_Player_ID, AI_COMPONENT_SHIELD_GENERATOR)
if (Sys_Is_Component_Available(sys_long_Player_ID, comp_id)) then
set final_comp_id := comp_id
endif
endif
endif

2 and 3) here come the trouble... the file "Script_AI_DesignCreation.txt" refer to "Get_Wanted_Component_From_List", but I don't undestand this part... where I can manipulate this list?

And one last thing... when I finished mod all this file... how can I compile all this file to let empire use them?

‹ Help with a little bit of comp. code Creating Racial Traits ›
» 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 Isopsyco
Mod Designer

Re: AI modding... Help me, please!!!

Soumis par Isopsyco le Mar, 2008-01-29 08:06

AI Scrips List.txt data file has the list, however, each Empire_main script has a section where it loads the list with the wanted tech.

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

Re: AI modding... Help me, please!!!

Soumis par Lastdreamer le Mar, 2008-01-29 08:55

thanks!

But now I don't understand one thing... how function this entries?

call lst_Armor_Wanted_Name.add(AI_COMPONENT_EMISSIVE_ARMOR)
call lst_Armor_Wanted_Tech_Area.add(AI_TECH_AREA_ARMOR)
call lst_Armor_Wanted_Tech_Level.add(20)

As I can see, the first is the name of the component, as in Global Constant files, the second is the tech area... and the third? What make the third entry?

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

Re: AI modding... Help me, please!!!

Soumis par Isopsyco le Mar, 2008-01-29 14:06

these are actually three related lists being filled,
this is the one you want to add your component to:
call lst_Armor_Wanted_Name.add(AI_COMPONENT_EMISSIVE_ARMOR)

This one just keeps track of the tech area that its in:
call lst_Armor_Wanted_Tech_Area.add(AI_TECH_AREA_ARMOR)

And this one associates the level needed to obtain it. If you look in the Script_AI_GlobalResearch.txt you'll see how it keeps research areas populated and the empire on track in the right tech area to obtain certain tech/components.
call lst_Armor_Wanted_Tech_Level.add(20)

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

Re: AI modding... Help me, please!!!

Soumis par Lastdreamer le Mar, 2008-01-29 14:56

I've tried to add the new armor I've added, but it seem the AI don't use them anyway... maybe there is any metod to set "priorities"?

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

Re: AI modding... Help me, please!!!

Soumis par Captain Kwok le Mar, 2008-01-29 15:01

The AI proceeds through the lists from first to last entry, so the most preferred armor should be listed first.


Space Empires Depot | SE:V Balance Mod

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

Re: AI modding... Help me, please!!!

Soumis par Lastdreamer le Mar, 2008-01-29 15:12

Thanks!!!

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

Re: AI modding... Help me, please!!!

Soumis par Brad le Mar, 2008-01-29 15:59

Shameless Plug: http://www.spaceempires5.com/en-US/node/5037

Down in part four there's stuff about getting the AI to use new components in its designs.

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

Re: AI modding... Help me, please!!!

Soumis par Lastdreamer le Mer, 2008-01-30 07:43

Thanks to all!!! All this info make a good start for me to mod AI and Script!!!

» 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 :

  • Issues with Baseship combat pitures
  • Space Empires V 1.74
  • How to deploy starbase
  • Fighter Launch
  • Bigger Map as in Bigger :)

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 :

  • SE5_20060929-53.jpg
  • Research Calculations program?
  • Antares Mod
  • cueman-shakka-copy.jpg
  • PBW File sizes.
(c) Strategy First, Inc. All rights reserved.