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 5 utilisateurs et 140 invités en ligne.

Utilisateurs en ligne

  • MondoMage
  • Shadow hornet
  • Lastdreamer
  • Faithful
  • Caius

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

Rescripting the AI for a modification to the Balance Mod...

Image de Kingside_Bishop
Soumis par Kingside_Bishop le Mer, 2007-09-19 13:26 SE:V MODs

Hi!

I've written a mod, based off of Captain Kwok's Balance Mod, and it has become apparent that in order for the AI to play effectively, it must be made so that the only way it will ever propose or agree to a treaty with a non-agression clause is if that clause is set to mutual colonization. That is, the AI should not be able to make a treaty by which it cannot colonize a system.

My problem is this: I have no idea what I'm doing. The rest of the mod is complete, there's just this one hang... Can anyone tell me how I might go about this possibly minor AI adjustment?

Thanks!

‹ Random Events Mod: Baby Steps GidMod ›
» 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: Rescripting the AI for a modification to the Balance Mod...

Soumis par Captain Kwok le Mer, 2007-09-19 13:36
I'm not sure that I would agree it's needed for the AI to play effectively, but that's another discussion. You can do what you want though by editing the condition for TREATY_ELEMENT_TYPE_NON_AGGRESSION in the function Get_Specific_Treaty_Element in Script_AI_Politics. Change:
    TREATY_ELEMENT_TYPE_NON_AGGRESSION:
      set elem_value := 2
      for elem_index := 1 to 3 do
        if (anger_towards_plr <= lng_Politics_Treaty_Elements_Allowed_Max_Anger.get(elem_index)) then
          set elem_value := elem_index
        endif
      endfor
to
    TREATY_ELEMENT_TYPE_NON_AGGRESSION:
      set elem_value := 2
» Vous devez vous identifier ou créer un compte pour écrire des commentaires

Re: Rescripting the AI for a modification to the Balance Mod...

Soumis par homo ludens le Jeu, 2007-09-20 03:33

maybe it's a little offtopic here, but i've a little issue with BM. it concerns empires' relations and treaties.
now i'm playing BM 1.09 and every empire which i met first time agreed with my proposal of non-agression pact. the thing is that my proposals were too impudent for the first contact i think: they must share techs, mine codes, maps, sensors and 5-10% of there resources each turn. i give 'em nothing except trade rights. and colonization allowed only in neutral systems. my score(techs,resources,pop) was not the best at that time.
and than, when i attack their planets they remain absolutly calm and quiet... and there is no any warnings when attacking allied empire.

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

Re: Rescripting the AI for a modification to the Balance Mod...

Soumis par Kingside_Bishop le Jeu, 2007-09-20 15:52

Thank you, Cap'n. It's the nature of the mod that requires the AI to not make this sort of treaty, not any particular balance issue. Again, thanks for the help, and for making such a great mod.

~ Kingside_Bishop

[/communication]

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

Re: Rescripting the AI for a modification to the Balance Mod...

Soumis par Kingside_Bishop le Jeu, 2007-10-04 11:31

I can't seem to find the data field your referring to, Kwok... I can find the file (in the Utilities folder), but within the file, I can't find the field I need to change. One other thing -- when I change it, how do I incorporate that into the mod, since the file I'm changing isn't in the mod's folder?

Thanks again for your help.

~ Kingside_Bishop

[/communication]

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

Re: Rescripting the AI for a modification to the Balance Mod...

Soumis par Isopsyco le Ven, 2007-10-05 14:02

Kingside_Bishop wrote:
I can't seem to find the data field your referring to, Kwok... I can find the file (in the Utilities folder), but within the file, I can't find the field I need to change. One other thing -- when I change it, how do I incorporate that into the mod, since the file I'm changing isn't in the mod's folder?

Thanks again for your help.

~ Kingside_Bishop

[/communication]


There are actually more files involved than just that file, to get your change into the game you will have to compile your Empire_Main_script using all the data files in the utility folder (or Captain Kwok's balance mod base script files) because the function call will be located in one data file requested by the empire_main_script file when compiling it.

I can't remember how many data files make up a complete package required for compiling but if you browsed the utility folder, look for all the ones that don't have an empire name associated with it and thats one. I co-located all the files into a working directory so I could modify the ones I needed and compile with in that directory.

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

Re: Rescripting the AI for a modification to the Balance Mod...

Soumis par Captain Kwok le Ven, 2007-10-05 14:27

Open Script_AI_Politics.txt. The function "Get_Specific_Treaty_Element" starts around line 3400. In that function, you'll find the code I quoted above. Make the change and save.

Next, follow the compiling instructions here:
http://wiki.spaceempires.net/index.php/AI_and_Script_Editing_%28SEV%29#Compiling_Scripts

You'll want to use the "Make File" option (2nd method described in wiki) to compile all the AI's at one time. You'll then have to put each race's .csf files in their respective Empire folders. These are found in the Balance Mod \ Empires folder.


Space Empires Depot | SE:V Balance Mod

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

  • Is the Patch Process Dead, and Other Thoughts...
  • Research By Percentage SUCKS
  • 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 :

  • planet invasion
  • Making It So Only The AI Can Use a Certain Component or Technology.
  • "Waiting for player" Test
  • Migration, birth rate... immigration?
  • Drone combat orders?
(c) Strategy First, Inc. All rights reserved.