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 189 guests online.

Online users

  • GambitUK
  • Roxton
  • Disco Stu
  • ForesterSOF

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 doesn't recognize new vehicle sizes

Submitted by CP1985 on Thu, 2007-10-18 20:56. SE:V MODs

Hi guys, I'm working on a new mod and ran into a problem. I added 2 new types of Vehicle sizes, Corvette (200kt), and Battle Cruiser (800kt). When ever I load my mod, the AI refuses to design anything at all now except Satellites and Weapon Platforms. I checked the scripts, and added the new types to the Script_AI_GlobalConstants_VehicleSizes. I then placed the recompiled files into my mod directories. The only thing I haven't tried yet is disallowing main empires in the Mod_Definition file. I'm not sure what this does yet. Does anyone have any other ideas on how to fix this?

‹ Happiness.txt Specialized Research Labs ›
» 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.
Mod Designer

Re: AI doesn't recognize new vehicle sizes

Submitted by Gideon on Wed, 2007-10-24 11:55.

Hello, and welcome to the wacky world of AI scripting. Where some times things just don't work like you think they should!

Alrighty, you are on the right track.

The GlobalConstants files are used by other AI script files to define variables for use by those files. They do not do any actual processing by themselves, but they are still very important. Good work on knowing to modify those, as some people miss them completely at first.

What you want to look in next is the Script_AI_GlobalSettings.txt file. This file uses some of the data in Script_AI_GlobalConstants_VehicleSizes.txt as well as data from other sources.

If you open up this file, at the very beginning you will see the definition of the ship sizes, in the form of a list. Look at it a while, and you should get the gist of how it works (or go mad...whichever). This is list the AI looks through in order to determine what ship sizes to build.

Having said that, the AI may STILL not use your ships. The stock AI builds only the LARGEST ship type available to it. Technically, it doesn't build the largest ship avilable to it, but rather the ship lowest on the list that fills its selection criteria (so it doesn't pick carriers for attack ships, but will NOT pick frigates if it can pick destroyers). So, you need to place your new ship types in this list while keeping in mind what priority the AI gives to that size. Assuming you are using stock ship sizes, your Corvette should be first in the list, while your Battle Cruiser should be inserted between Cruisers and Battleships.

However, please keep in mind that the AI will build the lowest type in the list available to it. That means if it can build your Corvettes (200kt, so the first ship in the list) and can also build Frigates (250kt, and available at the first tech level), then it will build Frigates, and not build or design Corvettes.

If you changed how the tech tree makes ships available, you will want to get in to the Script_AI_Research.txt(governs research during game play) and Script_AI_GlobalResearch.txt(governs how the AI spends tech points before the game starts in a game where the AI begins with some) files. These will need to be adjusted to take in to account any changes you may have made to the tech trees.

See what I mean about going mad?

Anyways, this should get you pointed in the right direction. Good hunting!

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

» login or register to post comments
Mod Designer

Re: AI doesn't recognize new vehicle sizes

Submitted by CP1985 on Thu, 2007-10-25 01:38.

Thanks Gideon, looks like I have some more work to do lol.

» login or register to post comments
Mod Designer

Re: AI doesn't recognize new vehicle sizes

Submitted by CP1985 on Fri, 2007-10-26 00:29.

Ok I've run into a rather very weird problem in the Script_AI_GlobalSettings file. Under the section for Fighters:

call lst_AI_Vehicle_Sizes_Name.add(AI_VEHICLE_SIZE_SMALL_FIGHTER)
call lst_AI_Vehicle_Sizes_AI_Size_Class.add(AI_VEHICLE_SIZE_CLASS_FIGHTER)
call lst_AI_Vehicle_Sizes_Num_Life_Support.add(1)
call lst_AI_Vehicle_Sizes_Num_Crew_Quarters.add(1)
call lst_AI_Vehicle_Sizes_Num_Engines.add(18)
call lst_AI_Vehicle_Sizes_Name.add(AI_VEHICLE_SIZE_ORGANIC_SMALL_FIGHTER)
call lst_AI_Vehicle_Sizes_AI_Size_Class.add(AI_VEHICLE_SIZE_CLASS_FIGHTER)
call lst_AI_Vehicle_Sizes_Num_Life_Support.add(1)
call lst_AI_Vehicle_Sizes_Num_Crew_Quarters.add(1)
call lst_AI_Vehicle_Sizes_Num_Engines.add(18)
call lst_AI_Vehicle_Sizes_Name.add(AI_VEHICLE_SIZE_CRYSTALLINE_SMALL_FREIGHTER)
call lst_AI_Vehicle_Sizes_AI_Size_Class.add(AI_VEHICLE_SIZE_CLASS_FIGHTER)
call lst_AI_Vehicle_Sizes_Num_Life_Support.add(1)
call lst_AI_Vehicle_Sizes_Num_Crew_Quarters.add(1)
call lst_AI_Vehicle_Sizes_Num_Engines.add(18)

Shouldnt the last one be CRYSTALLINE_SMALL_FIGHTER? At first I thought it was a typo. The compiler wont compile the Empire main files now that I changed this to Crystalline Small Fighter.

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

Re: AI doesn't recognize new vehicle sizes

Submitted by Isopsyco on Tue, 2007-11-06 17:47.

If you have exhausted every possible syntax and variable/constant declaration error then try an #Include statement for the constant data file and global variable data file. I ran into similar problems and couldn't see anything wrong, when I put the includes for the data files it compiled and executed as intended.

» login or register to post comments
Mod Designer

Re: AI doesn't recognize new vehicle sizes

Submitted by Gideon on Tue, 2007-11-06 18:05.

Yes, that should be AI_VEHICLE_SIZE_CRYSTALLINE_SMALL_FIGHTER, not AI_VEHICLE_SIZE_CRYSTALLINE_SMALL_FREIGHTER.

HOWEVER...

You also need to add the following:

AI_VEHICLE_SIZE_CRYSTALLINE_SMALL_FIGHTER: string := "Crystalline Small Fighter"

To Script_AI_GlobalConstants_VehicleSizes.txt in order for it to recognize the corrected entry in Script_AI_GlobalSettings.txt. It seems as though someone missed this size.

Each one of those things in all caps is actually a variable, defined somewhere in one of the Script_AI_GlobalConstants files.

I just recently caught this error myself, and worked it in to my mod. Good eyes, CP1985.

"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

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:

  • Ship Capture Issues
  • Space Empires V
  • Hows the current AI?
  • Space Empires V and VI: Expansions and the Future: Tell the Company What's on Your Wish List
  • SE5 Multimedia Pack

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:

  • TCP/IP Setup
  • Migration?
  • WP creation allowed abilities
  • Forum improvement concerning "Bugs"
  • Errors in BM
(c) Strategy First, Inc. All rights reserved.