AI problems -1 reply

Please wait...

Icewolf132

Only Slightly Insane

50 XP

1st June 2007

0 Uploads

182 Posts

0 Threads

#1 10 years ago

Hello, I'm trying to do new AI for the Federation for scratch on a modded game, but something's gone screwy. When I load up the Feds as computer player Armada 2 freezes when the loading bar reaches 100%. Can someone please check over this and tell me if I did something wrong with the code it's self, if not then I probably miss spelled something O.o

Spoiler: Show

// Load up the basic structures... #include "aipdef.h"

Way_Better_Build_List_Element the_build_list[MAX_ELEMENTS] = { //--------------------------------------------------------------------

// // Syntax: "ODF name", number to build, base to build at, max number from this line, min tech level //

// // Phase I. Starting out //

"fbase", 1,0, -1, 1, // starbase "fconst", 1,0, -1, 0, // construction ship "fconst", 1,0, -1, 0, // second construction ship "fconst", 1,0, -1, 0, // third construction ship "fyard", 1,0, -1, 0, // basic shipyard "fmining", 1,1, -1, 0, // mining stations "fscout", 1,0, -1, 0, // scout "ffreight", 2,0, -1, 0, // mining freighters "fexcel", 2,0, 4, -2, // Excelsior "forbital", 1,1, -1, 0, // build an orbital station "fresear2", 1,0, -1, 0, // Chassis research "fexcel", 2,0, 4, -3, // Excelsior "fturret", 2,0, 4, -3, // basic base defense "fcen", 3,0, 6, -3, // Centuar //Phase II. Chassis lvl 1 begin "fedshippod1", 1,0, -1, 2, // Chassis lvl 1 "fcolony", 1,0, -1, 0, // Colony ship "ftrading", 1,0, -1, 0, // Trading station "fcolony", 1,0, 3, -4, // Colony ship "fnova", 3,0, 6, -4, // Nova "fdestroy2", 2,0, 4, -4, // Sabre class "fyard", 1,0, -1, 0, // second basic yard "fdestroy2", 2,0, 4, -4, // Sabre "fdestroy", 3,0, 6, -5, // Defiant "fresear", 1,0, -1, 0, // Weapon research "fdestroy", 2,0, 4, -5, // Defiant "fexcel", 2,0, -1, -4, // Excelsior "fmining", 1,2, -1, 0, // second mining station "fedpodcloak", 1,0, -1, 0, // Cloak pod "ffreight", 2,0, -1, 0, // mining freighter "fturret", 2,2, -1, -3, // mine 2 defense "fyard", 1,1, -1, 0, // basic shipyard for mine 1 //Phase III. Chassis lvl 2 begin "fedshippod2", 1,0, -1, 3, // Chassis lvl 2 "fdestroy2", 3,0, 0, -5, // Sabre class "fedpodmiricalworkers", 1,0, -1, 0, // repair team "ffreight", 2,0, -1, 0, // mining freighter "fturret2", 2,1, -1, 0, // adv base defense "fyard2", 1,0, -1, 0, // medium yard "fambas", 2,0, -1, -5, // Ambassador "fturret2", 1,1, -1, 0, // adv mine defense "fedpodpd", 1,0, -1, 0, // Point defense phaser "fambas", 2,0, 4, -5, // Ambassador "fintrep", 3,0, -1, -6, // Intrepid "fturret2", 2,2, -1, 0, // adv mine 2 defense "fcruise1", 3,0, 9, -6, // Akira "fbase", 1,0, -1, 0, // second starbase "fcruise2", 2,0, -1, -6, // Steamrunner "fambas", 2,0, -1, -5, // Ambassador "fcruise1", 2,0, -1, -6, // Akira //Phase IV. Chassis lvl 3 begin "fedshippod3", 1,0, -1, 4, // Chassis lvl 3 "fspecial", 4,0, -1, 0, // Nebula //Phase IV. Chassis lvl 4 begin "fedshippod4", 1,0, -1, 5, // Chassis lvl 3 "fyard3", 1,0, -1, 0, // adv yard "fgalaxy", 4,0, -1, 0, // Galaxy "fbattle", 3,0, -1, 0, // Sovereign };




Guest

I didn't make it!

0 XP

 
#2 10 years ago

I don't see anything wrong with the layout. Whenever my game locks up or I get the dreaded, "Armada II has stopped working. Windows is searching for a solution." I check spelling first.




Guest

I didn't make it!

0 XP

 
#3 10 years ago

Its a shot in the dark but is the odf name for the ambassador spelled write?




Achilles

I stole fire from the lighter!

50 XP

13th January 2003

0 Uploads

1,596 Posts

0 Threads

#4 10 years ago

mirical is spelled miracle... if that's an error?




Avon

Ageing Rapidly

50 XP

27th October 2006

0 Uploads

483 Posts

0 Threads

#5 10 years ago

Phase 2: the first fyard has one too many spaces after the second number (should only be one space if your third number is a minus) Same for Phase 3: fyard2 and Phase 4: fyard3 -------------------------------- Phase 3: fdestroy2 should have a double space after the second number as should the second fambas and the first fcruise1 in phase 3 -------------------------------- Phase 2: the second fcolony should only have one space after the third number (because the fourth number is a minus) -------------------------------- Phase 2: the first fyard again should have a double space after the third number Same for fedpodcloak and fedshippod2 and fedpodmiricalworkers and fedpodpd and fedshippod3 and both fturret2s in phase 3 and everything in phase 4 and 5 by the looks of it. -------------------------------- Phew....did that make sense? My head hurts now.:(




Icewolf132

Only Slightly Insane

50 XP

1st June 2007

0 Uploads

182 Posts

0 Threads

#6 10 years ago

Hello, the problem was with the fcen and fintrep, which were still fassault and fcruise3 in the ODFs >.< it no longer crashes the game, but the AI seems to stop building after the second mining station, it might be something in the tech files...but I based the AI off of me doing a game using the feds.




Guest

I didn't make it!

0 XP

 
#7 10 years ago

Try using the Ctrl Shift A (I think) command to open the AI console. It will tell you whats wrong :) (i.e it will say technology not available or no resources etc) Combined with the AI build speed controls (in the advanced part of the options menu when you start an IA game) you can test an AI in about 30 seconds flat. :) Invaluable tools (compared to having to wait for hours for the AI to get to the end of its queue and trying to guess why its stopped!




BookBurner

First of many

50 XP

13th February 2008

0 Uploads

95 Posts

0 Threads

#8 10 years ago

1. "fintrep", 3,0, -1, -6, // Intrepid "fcruise1", 3,0, 9, -6, // Akira "fcruise2", 2,0, -1, -6, // Steamrunner "fcruise1", 2,0, -1, -6, // Akira

I can't fing tech-level 6 point, I'm not sure, but try to put 0 instead of -6, maybe it will help :)

2. Try to check all odf names, and techtrees (you know "fcruise1.odf 1 fyard.odf fresear.odf" ; I mean that kind od mistake)