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

Utilisateurs en ligne

  • Pham Nuwen
  • Duality
  • smart

Languages

  • English English
  • French French

Parcourir les archives

« Octobre 2008  
Lu Ma Me Je Ve Sa Di
    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 » Space Empires V » Space Empires V General

AI doesn't make designs of freighters and carriers. I need help!

Soumis par Deer le Mer, 2007-02-14 11:18 Space Empires V General

I decided to tranlate SE V to other language. Now it is in app. 70%
Unfortunately, I ran into a bug, which was made by me. (It works in original, English version.)
I run game in ALL Tech mode. The AI makes all of the designs except Carrier, Pop. Transport, Troop Transport, Cargo Ship. I have no idea, what the problem is. I scanned all script files, but I haven't found my mistake. I translated design names, component names. It works well for other designs, but not for carriers and freighters. I have no idea.
What should I do?

‹ CSM vs Torpedos Speeding up the combat clock creates different outcomes in battles. ›
» 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.

Re: AI doesn't make designs of freighters and carriers. I need h

Soumis par Deer le Ven, 2007-02-16 07:23

Now I know that the propblem is: AI don't give any Fighter bays/cargo bays to ships.
Debugging result: --- Wrong version ---
Script_AI_DesignCreation.txt(0963): End Function Add_Components_To_Vehicle_Design ---------------------
Script_AI_DesignCreation.txt(1421): 2 = 5 = FALSE
Script_AI_DesignCreation.txt(1421): If ((vehicle_size_class(2) = ai_vehicle_size_class_colony_ship(5))) = FALSE
Script_AI_DesignCreation.txt(1452): 2 = 6 = FALSE
Script_AI_DesignCreation.txt(1452): If ((vehicle_size_class(2) = ai_vehicle_size_class_freighter(6))) = FALSE
Script_AI_DesignCreation.txt(1465): 2 = 2 = TRUE
Script_AI_DesignCreation.txt(1465): If ((vehicle_size_class(2) = ai_vehicle_size_class_carrier(2))) = TRUE
Script_AI_DesignCreation.txt(1466): Sys_Get_Component_With_Name(2, Vadászgép hangár)
Script_AI_DesignCreation.txt(1466): Set comp_id(9) := 22
Script_AI_DesignCreation.txt(1467): 22 > 0 = TRUE
Script_AI_DesignCreation.txt(1467): If ((comp_id(22) > 0)) = TRUE
Script_AI_DesignCreation.txt(1468): Sys_Get_Best_Comp_Enh_For_Component(2, -1, 22)
Script_AI_DesignCreation.txt(1468): Set comp_enh_id(0) := 0
Script_AI_DesignCreation.txt(1469): Sys_Get_Component_Tonnage_Space(2, 22, 0)
Script_AI_DesignCreation.txt(1469): Set comp_tonnage(0) := 30
Script_AI_DesignCreation.txt(1470): 1350 * 0 = 0
Script_AI_DesignCreation.txt(1470): 0 / 30 = 0
Script_AI_DesignCreation.txt(1470): 0 + 0 = 0
Script_AI_DesignCreation.txt(1470): Sys_Trunc(0)
Script_AI_DesignCreation.txt(1470): Set num_to_add(10) := 0
Script_AI_DesignCreation.txt(1471): Add_Components_To_Vehicle_Design(-1, 22, 0, 2, 0, FALSE)
Script_AI_DesignCreation.txt(0963): Begin Function Add_Components_To_Vehicle_Design(-1, 22, 0, 2, 0, FALSE) ---------------------

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

Re: AI doesn't make designs of freighters and carriers. I need h

Soumis par Deer le Ven, 2007-02-16 07:24

And good one:
Script_AI_DesignCreation.txt(0963): End Function Add_Components_To_Vehicle_Design ---------------------
Script_AI_DesignCreation.txt(1421): 2 = 5 = FALSE
Script_AI_DesignCreation.txt(1421): If ((vehicle_size_class(2) = ai_vehicle_size_class_colony_ship(5))) = FALSE
Script_AI_DesignCreation.txt(1452): 2 = 6 = FALSE
Script_AI_DesignCreation.txt(1452): If ((vehicle_size_class(2) = ai_vehicle_size_class_freighter(6))) = FALSE
Script_AI_DesignCreation.txt(1465): 2 = 2 = TRUE
Script_AI_DesignCreation.txt(1465): If ((vehicle_size_class(2) = ai_vehicle_size_class_carrier(2))) = TRUE
Script_AI_DesignCreation.txt(1466): Sys_Get_Component_With_Name(2, Fighter Bay)
Script_AI_DesignCreation.txt(1466): Set comp_id(9) := 22
Script_AI_DesignCreation.txt(1467): 22 > 0 = TRUE
Script_AI_DesignCreation.txt(1467): If ((comp_id(22) > 0)) = TRUE
Script_AI_DesignCreation.txt(1468): Sys_Get_Best_Comp_Enh_For_Component(2, -1, 22)
Script_AI_DesignCreation.txt(1468): Set comp_enh_id(0) := 0
Script_AI_DesignCreation.txt(1469): Sys_Get_Component_Tonnage_Space(2, 22, 0)
Script_AI_DesignCreation.txt(1469): Set comp_tonnage(0) := 30
Script_AI_DesignCreation.txt(1470): 1700 * 0.499999992153375 = 850.000003840606
Script_AI_DesignCreation.txt(1470): 850.000003840606 / 30 = 28.3333340340158
Script_AI_DesignCreation.txt(1470): 28.3333340340158 + 0.989999994771603 = 29.3233325856784
Script_AI_DesignCreation.txt(1470): Sys_Trunc(29.3233325856784)
Script_AI_DesignCreation.txt(1470): Set num_to_add(10) := 29
Script_AI_DesignCreation.txt(1471): Add_Components_To_Vehicle_Design(-1, 22, 0, 2, 29, FALSE)
Script_AI_DesignCreation.txt(0963): Begin Function Add_Components_To_Vehicle_Design(-1, 22, 0, 2, 29, FALSE) ---------------------

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

Re: AI doesn't make designs of freighters and carriers. I need h

Soumis par Deer le Ven, 2007-02-16 07:26

Why doesn't work it? Why 0?

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

Re: AI doesn't make designs of freighters and carriers. I need h

Soumis par pikcachu20 le Ven, 2007-02-16 13:56

What is the other language?

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

Re: AI doesn't make designs of freighters and carriers. I need h

Soumis par Deer le Ven, 2007-02-16 14:19

Hungarian.
Now I stop the translation until I find the error.

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

Re: AI doesn't make designs of freighters and carriers. I need h

Soumis par Thy Reaper le Ven, 2007-02-16 16:42

I've looked at the code in the AI file for the messed up lines. It seems that the 0.50 and .99 at line 1470 is a 0 in your code for some reason. Line 1470 in that file should be:

set num_to_add := Sys_Trunc(((vehicle_tonnage * 0.50) / comp_tonnage) + 0.99)

Your translation shouldn't be causing any problems because the problem is from those two numbers not being read properly.

-----
Space for rent - please contact owner

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

Re: AI doesn't make designs of freighters and carriers. I need h

Soumis par Deer le Sam, 2007-02-17 04:11

Thank you your answer. Huh, it will be difficult to find that error. I think I must scan and merge all the files with originals.

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

Weird things (WTF?)

Soumis par Deer le Sam, 2007-02-17 13:11

The error was found, but...
The original line is in Ai_DesignCreation.txt:

set num_to_add := Sys_Trunc(((vehicle_tonnage * 0.50) / comp_tonnage) + 0.99)
---
The software makes round-off constant from 0.50 and 0.99 so the result is 0.
----
I have overwrited this line:

set num_to_add := Sys_Trunc(((vehicle_tonnage / 2) / comp_tonnage) + 1)

Now it works well:
1350 / 2 = 675.00001517686
675.00001517686 / 30 = 22.5000005058953
22.5000005058953 + 1 = 23.4999994594099
Sys_Trunc(23.4999994594099)
Set num_to_add(10) := 23

But why program makes round-off constant from these numbers?
I have no idea.

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

  • Research By Percentage SUCKS
  • More organic stuff is needed.
  • No Point Defence in Technology in Balance mod
  • Space Dock suggestion
  • Nebula Storm

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 :

  • Transport AI.
  • Space Empires V 1.74
  • Intelligence bug
  • New 4 player PBW game
  • Capturing non-combat or Max range ships
(c) Strategy First, Inc. All rights reserved.