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 4 users and 200 guests online.

Online users

  • GambitUK
  • Shyssiryxius
  • Fyron
  • Captain Kwok

Languages

  • English English
  • French French

Browse archives

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

AI and Point Defense

Submitted by Redbull102 on Tue, 2006-10-24 16:52. SE:V MODs

Today I fought again against the Amonkrie. They had Anti Proton Beams and a few torps on their ships. I had Missiles and was faster than they were, so it was really pointless, just missiled them to death, because no ship of them had even one point defense cannon on board.

Where have I to mod the AI files to get point defense on their ships?

I used the scriptparser tool, but I am not able to find the entries, searched the Amonkrie Main script, the Amonkrie Setup script, Script AI design creation, Script AI Construction, and looked into a few other ones, only in the research script I found entries to point defense, increased the levels there a bit, but what does it help, to have the AI researching the point defense Techs further, when the canons are not used. Sad

Hope you can help me.

Redbull102

Edit: I reduced now the entry
set lng_AI_Design_Tonnage_Ship_Pct_Primary_Weapon := 40
to
set lng_AI_Design_Tonnage_Ship_Pct_Primary_Weapon := 20

Now there should be +20% for the AI to put other mods in.
For Colony ships it works, they have now ~ 4 point defense weapons on board, but there are still no point defense weapons on frigates and destroyers. Sad

Can I directly say the AI to put 2 point denfense weapons on their ships?

‹ AI tags Kwok, I've got a question: ›
» 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.

Changing AI scripts for missile and PD use... will it work??

Submitted by Weber Fan on Thu, 2006-10-26 11:04.

Hey all! I've been trying to get the AI to use PD and missiles as well, so I made some changes to the AI scripts, and I want to know if you think they would work. Capt Kwok can hopefully answer this question.

I made the following changes to the Amonkrie_Main_Script.txt files:
Based on my understanding of this portion of the file:
call lst_Heavy_Weapon_Name.add("Null - Space Projector")
call lst_Heavy_Weapon_Tech_Area.add("Null - Space Weapons")
call lst_Heavy_Weapon_Tech_Level.add(1)
call lst_Heavy_Weapon_Name.add("Anti - Matter Torpedo")
call lst_Heavy_Weapon_Tech_Area.add("Torpedo Weapons")
call lst_Heavy_Weapon_Tech_Level.add(1)
call lst_Heavy_Weapon_Name.add("Capital Ship Missile")
call lst_Heavy_Weapon_Tech_Area.add("Missile Weapons")
call lst_Heavy_Weapon_Tech_Level.add(1)
I believe the heavy weapons are the ranged weapons, so I think it's as simple as having the AI assign more tonnage to heavy weapons. So I changed the tonnage distribution portion of the file to:
set lng_AI_Design_Tonnage_Ship_Pct_Primary_Weapon := 10
set lng_AI_Design_Tonnage_Ship_Pct_Heavy_Weapon := 40
set lng_AI_Design_Tonnage_Ship_Pct_Special_Weapon := 10
set lng_AI_Design_Tonnage_Ship_Pct_Shields := 10
set lng_AI_Design_Tonnage_Ship_Pct_Armor := 10
I also reduced the net assigned percent ship tonnage to 80% thereby opening more space for
"extra_components" which includes PD. I then modified the extra tonnage function in the file:
Script_AI_GlobalSettings.txt to make PD a higher priority. I did this by moving the portion of the file that assigns "Supply_storage" behind the portion of the file that assigns all PD.

Finally, I also wanted every empire to use all PD techs so they would take the first PD tech they get and assign it to the ships. So I changed this portion of the
Amonkrie_Main_Script.txt files:
set bool_Race_Uses_Point_Defense_Cannons := TRUE
set bool_Race_Uses_Point_Defense_Beam := TRUE
set bool_Race_Uses_Point_Defense_Blaster := TRUE
set bool_Race_Uses_Flak_Cannon := TRUE
set bool_Race_Uses_Bomblet_Missile := TRUE

Those were my changes. What do you think? Should they work? Did I do anything wrong?

---
The goggles... they do nothing!

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

It looks ok...

Submitted by Captain Kwok on Thu, 2006-10-26 11:24.

Lines 630-700ish contain the relevant info you want to change in the Script_AI_GlobalSettings.txt file. You'll want to bump the pct space to see more PD added on designs - particularly on smaller ships.

Otherwise it looks ok, but the primary weapon % should probably be 15ish to make sure the AI will add at least 1 weapon on low level frigates.

Primary weapons are your typical DUCs, APBs, etc., heavy weapons are usually assign to CSMS, Torps, or other 40kT+ weapons.

-----

Space Empires Depot | Space Food Empires!

» login or register to post comments
Mod Designer

Re: AI and Point Defense

Submitted by Gideon on Sat, 2007-11-24 14:32.

There are other inherant flaws in the DesignCreation file. For instance:

When calculating the percentage of a ship to fill with components, the AI uses the ship's remaining tonnage, not it's total tonnage. This results in components further down the design list being given less and less room on a ship, until they just don't have any room to add any at all.

"Only by being constantly at war with evil in all things, including yourself, can you truely know peace."
Download my mod here: GidMod

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

Re: AI and Point Defense

Submitted by Captain Kwok on Sat, 2007-11-24 16:48.

I don't think so. The percent to add items always use the vehcile's tonnage, not its space remaining.


Space Empires Depot | SE:V Balance Mod

» login or register to post comments
Mod Designer

Re: AI and Point Defense

Submitted by Gideon on Sat, 2007-11-24 17:01.

Captain Kwok wrote:
I don't think so. The percent to add items always use the vehcile's tonnage, not its space remaining.


Space Empires Depot | SE:V Balance Mod

From stock Script_Ai_DesignCreation.txt as of v1.63:

//------------------------------------------------------------------------
// Add_Components_To_Design
//------------------------------------------------------------------------
function Add_Components_To_Design returns boolean
params
  design_id:           long
  ai_design_type:      string
vars
  comp_id:             long
  comp_enh_id:         long
  num_to_add:          long
  size_id:             long
  vehicle_tonnage:     long
  comp_tonnage:        long
  list_count:          long
  index:               long
  design_type_str:     string
  continue_design:     boolean
  found_type:          boolean
  pct_of_space:        long
  comp_name:           string
  add_comp:            boolean
begin
  set continue_design := TRUE
  set size_id := Sys_Get_Vehicle_Design_Size_ID(design_id)
  set vehicle_tonnage := Sys_Get_Vehicle_Design_Remaining_Tonnage_Space(design_id)
  set comp_enh_id := 0
...

Should be:

  set vehicle_tonnage := Sys_Get_Vehicle_Design_Tonnage_Space(design_id)

"Only by being constantly at war with evil in all things, including yourself, can you truely know peace."
Download my mod here: GidMod

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

Re: AI and Point Defense

Submitted by Captain Kwok on Sat, 2007-11-24 17:06.

That's no good. Sticking out tongue

I wonder when it changed. Long ago when the Balance Mod first started, it was based on the vehicle tonnage.


Space Empires Depot | SE:V Balance Mod

» login or register to post comments
Mod Designer

Re: AI and Point Defense

Submitted by Gideon on Sat, 2007-11-24 17:14.

Ahh, I see what you mean, Kwok.

Yes, you are absolutely correct, it doesn't recalculate the tonnage after adding components. My mis-speaking (mis-typing?) there.

However, what I showed above has serious ramifications on the AI design of a ship. That simple change can make all the world of difference.

As to the OP:

I found the same problem. In my mod I ended up removing PD devices from the Misc Components list (since I felt they were sort of a nessesity) and set them up similar to how it adds primary weapons, etc. The Misc Components list is in Script_AI_GlobalSettings.txt.

"Only by being constantly at war with evil in all things, including yourself, can you truely know peace."
Download my mod here: GidMod

» login or register to post comments

Re: AI and Point Defense

Submitted by Brad on Sat, 2007-11-24 18:41.

That changed way back in 1.25

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

Re: AI and Point Defense

Submitted by Captain Kwok on Sat, 2007-11-24 19:05.

The base of the Balance Mod scripts actually date back to a v0.80ish version of stock SE:V scripts. Sticking out tongue


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:

  • Balance Mod v1.05 Available!
  • Babylon 5 Space Empires V mod?
  • Space Empires V
  • Empire Selection Algorithm Question
  • Colonizing planets in foreign systems

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:

  • Drushocka_Splash.jpg
  • SE V v1.44 Crash after combat
  • Banana Republik Guide for Demokratik Xpansion and Diplomatik Xtermination
  • PBW obsolete? Time for fresh ideas?
  • lack of resources
(c) Strategy First, Inc. All rights reserved.