Home » MODDING HQ 1.13 » v1.13 Coding Talk » Learning how the tactical AI works
Re: Learning how the AI works[message #274502]
|
Fri, 25 February 2011 06:02 ![Go to previous message Go to previous message](/theme/Bear_Classic_Brown/images/up.png)
|
|
MorgluM |
![](/images/ranks/private_1stclass.png) |
Messages:24
Registered:March 2004 Location: Qu |
|
|
JMichto get F5 (Start Debugging) to work in VS2010, right click on project ja2, click properties, and then select Configuration Properties->General. The first field is called "Output Directory", which is where the executable will be built. Set this to your JA2 testing directory, for example "C:\JA2\Debug build\".
Then go to Configuration Properties->Debugging and set the "Working Directory" to the directory you set before. These 2 directories mean that any time you build your solution, you will built it in the directory it should go (instead of copying it afterwards) and you can also use F5 (Start Debugging) to run your build, whether it's a debug build or not. Do this with a version you can compile (eg svn version without any changes) and it should work. It is possible that I forgot a change, if so I will look at it again tomorrow, after I have managed to sleep.
I am also trying to see what needs to be changed so the code can compile with Define Debugdecisions but it is quite a mess, will update if I manage to compile it.
Re: starting debbugging.
Thanks for the tip, here's how I was doing so far:
1) I copied the .PDB , the .ILK and the .EXE files that compiled to my JA2 folder
2) Run JA2 in windowed mode. To do that, edit JA2.INI and set windowed to =1
3) In VS2010, Debug-->Attach process, then look at the output from "Debug".
Re:Compiling with Define DebugDecisions, I found the following things:
1) Do I need to replace all the "STR16 tempstr;" lines by "STR tempstr;" lines in all the .cpp files?
2) I added the following 3 lines to AI.h:
void AIPopMessage ( STR str );
void AINumMessage(const STR str, INT num);
void AINameMessage(SOLDIERTYPE * pSoldier,const STR8 str,INT32 num);
3) In AIUtils, I replaced the input of AIPopMessage, AINumMessage and AINameMessage from "STR16 str" to "STR str".
4) I forgot which CPP file, but one of the call has a type and asks for "sGridno" (type instead of "sGridNo")
5) In CreatureDecideAction, one of the "AINumMessage" wants to refer to "sClosestFriend" which doesnt exist...
Now I compile, but with warnings.
JA2 will crash when in the tactical screen, because tempstr isnt initialized...
Report message to a moderator
|
Private 1st Class
|
|
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Learning how the tactical AI works
By: MorgluM on Tue, 22 February 2011 07:54
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: MorgluM on Tue, 22 February 2011 15:30
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: MorgluM on Tue, 22 February 2011 15:57
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: MorgluM on Tue, 22 February 2011 20:03
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: Buns on Wed, 23 February 2011 15:59
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: MorgluM on Wed, 23 February 2011 17:34
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: MorgluM on Wed, 23 February 2011 17:36
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: Buns on Wed, 23 February 2011 18:24
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: MorgluM on Wed, 23 February 2011 21:13
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: JMich on Wed, 23 February 2011 21:27
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: MorgluM on Wed, 23 February 2011 21:32
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: MorgluM on Wed, 23 February 2011 21:42
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: MorgluM on Wed, 23 February 2011 21:57
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: MorgluM on Thu, 24 February 2011 01:22
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: MorgluM on Thu, 24 February 2011 23:27
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: JMich on Thu, 24 February 2011 23:41
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: tais on Fri, 25 February 2011 00:07
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: MorgluM on Fri, 25 February 2011 06:02
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: MorgluM on Fri, 25 February 2011 06:09
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: JMich on Fri, 25 February 2011 09:05
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: MorgluM on Tue, 01 March 2011 20:08
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: Buns on Tue, 08 March 2011 17:26
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: JMich on Tue, 08 March 2011 17:47
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: Buns on Tue, 08 March 2011 19:39
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: JMich on Tue, 08 March 2011 20:13
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: Buns on Wed, 09 March 2011 14:51
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: JMich on Wed, 09 March 2011 16:05
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: Buns on Wed, 09 March 2011 17:34
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: SharkD on Sun, 20 March 2011 14:57
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: Buns on Sun, 20 March 2011 15:19
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: SharkD on Tue, 22 March 2011 03:08
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: Buns on Tue, 22 March 2011 14:53
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: MorgluM on Wed, 06 April 2011 01:45
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Learning how the AI works
By: JMich on Wed, 06 April 2011 10:39
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Semi-Success , and question re: working directory
By: MorgluM on Thu, 07 April 2011 15:26
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Semi-Success , and question re: working directory
By: JMich on Thu, 07 April 2011 16:29
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Semi-Success , and question re: working directory
By: MorgluM on Fri, 08 April 2011 00:46
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Semi-Success , and question re: working directory
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Semi-Success , and question re: working directory
By: MorgluM on Fri, 08 April 2011 02:28
|
![Read Message Read Message](/theme/Bear_Classic_Brown/images/read.png) |
|
Re: Semi-Success , and question re: working directory
By: MorgluM on Fri, 08 April 2011 03:06
|
Goto Forum:
Current Time: Tue Feb 11 12:37:29 GMT+2 2025
Total time taken to generate the page: 0.01764 seconds
|