AI combat problem

Post bug reports and ask for tech support here. Post any Community Site Requests here as well.

Moderator: Vic

Post Reply
rickier65
Posts: 14253
Joined: Thu Apr 20, 2000 8:00 am

AI combat problem

Post by rickier65 »

Working on my first scenario. Have finished OOB's for both German and American forces. Got supply level set where I want it, at least to start. Up to now I've been doing human vs human step throughs to make sure reinforcements were coming in correctly and supply was flowing as i intended.

I decided to try some run-throughs to check balance, using myself agains AI.

As soon as AI turn started, got an exception error show below. Error statement was: Object reference not set to instance of an object;
AIClass.isAreaNeighbor(.....

This is senario where a few units start on map, but bulk arrive as reinforcements. However, this erro come up on first turn, before any reinforcement event. I have no production in this scenario. all loctypes owned by Italions and prod mod is set to 0 for for German and Americans, so that no production is possible for american or German forces (the scneario is using 1 day turns, and only running about 10-12 days).

I provide suppy using an event to geive supply to both sides.

I don't seem to have a problem when I run through with Human vs Human, but get same error msg for AI when Ai takes either side. If I choose to continue, rather than quit, the AI loops (I let it get up to 3000 steps before killing it one time).

Below is screen grab.

I'm thinking I may need to start over and be very careful not to make error as i go thorugh. But any ideas what might cause this error would be appreciated.

Thanks
Rick


Additional notes: using generic masterfile, but set to not read people.

Also, tried turning off all events(by setting to no check), still creashes at same place.


Image
Attachments
AIcombatexception.jpg
AIcombatexception.jpg (41.74 KiB) Viewed 159 times
User avatar
dazoline II
Posts: 400
Joined: Mon Nov 05, 2007 3:59 pm

RE: AI combat problem

Post by dazoline II »

Hi Rick,
Have you taken a look at the production model that the North Africa senario uses?
Its very similar to what you want to do using pre def units and events with execgivereinforcements.

IF this error is from the senario you had the problem with the "phantom unit" on it maybe still there in some fashion. Don't know if you know code or not but the errors saying it has a null pointer, sounds like it maybe to that phantom thang you described.
Moscow by winter? Only if you send Fast Heinz to Kiev.
User avatar
Vic
Posts: 9967
Joined: Mon May 17, 2004 2:17 pm
Contact:

RE: AI combat problem

Post by Vic »

send me the scenario to vic@xs4all.nl
 
i will keep thixing this things for v1.1.
 
did you define any victory points?
 
Visit www.vrdesigns.net for the latest news, polls, screenshots and blogs on Shadow Empire, Decisive Campaigns and Advanced Tactics
rickier65
Posts: 14253
Joined: Thu Apr 20, 2000 8:00 am

RE: AI combat problem

Post by rickier65 »

ORIGINAL: dazoline II

Hi Rick,
Have you taken a look at the production model that the North Africa senario uses?
Its very similar to what you want to do using pre def units and events with execgivereinforcements.

IF this error is from the senario you had the problem with the "phantom unit" on it maybe still there in some fashion. Don't know if you know code or not but the errors saying it has a null pointer, sounds like it maybe to that phantom thang you described.

Yes, the N. Africa scenario is what gave me the idea I could do what I was trying to do with event level reinforcements, rather than produced reinforcements. (actually a mix of the two).

My first thought was exactly what you indicate re: phantom unit, but it actually crashes before it gets to any reinforcement event. But that is still possible. I removed all HQ's from the pre-defined list, but that left "gaps" in list, and I assume gaps in unit list as well. So I've gone back to point where all I had were at start forces before I started making predefined units. Going kind of slow now to see if I can spot the steps that cause it to break.

(I'm actually playing the N. africa scenario now, so I'm trying to not look at events codes in case it gives something away - I'd hat for the Brits to lose their element of surprise!)

Thanks for ideas!
Rick
Post Reply

Return to “Advanced Tactics Support”