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 3 users and 203 guests online.

Online users

  • Ender Wiggin
  • Fyron
  • crazydog

Languages

  • English English
  • French French

Browse archives

« July 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 » Space Empires V » Space Empires V General

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

Submitted by Deer on Wed, 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. ›
» 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.

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

Submitted by Deer on Fri, 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) ---------------------

» login or register to post comments

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

Submitted by Deer on Fri, 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) ---------------------

» login or register to post comments

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

Submitted by Deer on Fri, 2007-02-16 07:26.

Why doesn't work it? Why 0?

» login or register to post comments
pikcachu20's picture

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

Submitted by pikcachu20 on Fri, 2007-02-16 13:56.

What is the other language?

» login or register to post comments

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

Submitted by Deer on Fri, 2007-02-16 14:19.

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

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

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

Submitted by Thy Reaper on Fri, 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

» login or register to post comments

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

Submitted by Deer on Sat, 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.

» login or register to post comments

Weird things (WTF?)

Submitted by Deer on Sat, 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.

» 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 1.74
  • Governmet mod/patch/addon
  • Tweaking the planet art without going all the way to FQM
  • Shipsets, Empires, and dead AIs

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:

  • Planet Capture Woes
  • stopping post combat launch of satelites and mines
  • 12 engines, 6 moves? No fullscreen ATI
  • SE5_20060929-45.jpg
  • 1.33 fighter bug? Planet bombardment
(c) Strategy First, Inc. All rights reserved.