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

User login

  • Create new account
  • Request new password

Navigation

  • news
    • archive
    • blogs
    • books
    • forums
    • recent posts
    • groups
  • image galleries
  • projects & downloads
  • search
  • create content
  • news aggregator

Search

Who's online

There are currently 1 user and 193 guests online.

Online users

  • Santiago

Languages

  • English English
  • French French

Browse 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        
Home » news » forums » Support & Feedback » Scenarios & Mods » SE:V MODs

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

Kingside_Bishop's picture
Submitted by Kingside_Bishop on Wed, 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 ›
» login or register to post comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Captain Kwok's picture
Mod Designer

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

Submitted by Captain Kwok on Wed, 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
» login or register to post comments

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

Submitted by homo ludens on Thu, 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.

» login or register to post comments
Kingside_Bishop's picture

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

Submitted by Kingside_Bishop on Thu, 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]

» login or register to post comments
Kingside_Bishop's picture

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

Submitted by Kingside_Bishop on Thu, 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]

» login or register to post comments
Isopsyco's picture
Mod Designer

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

Submitted by Isopsyco on Fri, 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.

» login or register to post comments
Captain Kwok's picture
Mod Designer

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

Submitted by Captain Kwok on Fri, 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

» login or register to post comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Now on STEAM

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

Popular content

Today's:

  • Research By Percentage SUCKS
  • Space Empires V and VI: Expansions and the Future: Tell the Company What's on Your Wish List
  • What does Environmental Resistance do?
  • OK Ship Mod
  • Space Empires V 1.74

All time:

  • 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

Last viewed:

  • Troops need balancing
  • True Max Number of Systems
  • Frequent Crashes
  • Modding population reproduction rate
  • Feind flieht immer
(c) Strategy First, Inc. All rights reserved.