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

Utilisateurs en ligne

  • GambitUK
  • Romulus68
  • Theace
  • Shanebad

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

Soumis par CP1985 le Jeu, 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 ›
» 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.
Mod Designer

Re: AI doesn't recognize new vehicle sizes

Soumis par Gideon le Mer, 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

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

Re: AI doesn't recognize new vehicle sizes

Soumis par CP1985 le Jeu, 2007-10-25 01:38

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

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

Re: AI doesn't recognize new vehicle sizes

Soumis par CP1985 le Ven, 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.

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

Re: AI doesn't recognize new vehicle sizes

Soumis par Isopsyco le Mar, 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.

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

Re: AI doesn't recognize new vehicle sizes

Soumis par Gideon le Mar, 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

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

  • Bigger Map as in Bigger :)
  • Editing max systems in settings.txt
  • Wepons Mod
  • Known SE5 v1.74 Bugs
  • some stuff I use without support for AI - Crew

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 :

  • Installing Shipsets
  • Is it possible -- Planet Shields
  • SE:V v1.60 History
  • Supply usage of Afterburners, Shields & Regenerators
  • What new with race relations se5 via se4?
(c) Strategy First, Inc. All rights reserved.