Better DuneBUG AI

Hi Keldath - I will uploaded version at some point today with the source. Just tidying up a few things.
 
I've assembled a new version of this which I've called Dune Wars 1.8X:

Download Installer Here

+ The installer will install the mod as "Dune Wars" so you may want to backup your current 1.8 install.

+ Source Code is included

+ Homeworld Screen now works fine.

+ I have merged in the bits of Dales Combat Mod we need. Seems to work OK.

+ I have taken Orion's Inquisition Mod, cut it down and merged it in. Inquisitors now work and there is some basic AI code for them too.

+ Fixed Religion gamefont icons (although there is an issue with the Technocracy one). Other gamefonts (water drops and bonuses, etc) not yet done.

This should be all the features from Dune Wars 1.8 implemented.

There seems to be a CTD after a certain number of turns Autoplay. There is nothing whatsoever in the Python log, so I'm pretty sure it's something in the SDK that is causing the crash. If anyone can help with diagnosing/fixing that would be great.
 
I think all of the Assert errors I fixed were specific to Dune Wars content.
As you correctly assumed, I am more interested in errors that are not exclusively relevant for the Dune mod. But if there are none that's even better.

I'll try and compile a Debug DLL this weekend.
Any luck?


There seems to be a CTD after a certain number of turns Autoplay. There is nothing whatsoever in the Python log, so I'm pretty sure it's something in the SDK that is causing the crash. If anyone can help with diagnosing/fixing that would be great.
I went through a whole 430 turns game with AIAutoPlay (4 times 100 turns) today without any problems so I hope this CTD is Dune-specific.
Compiling a Debug dll and attaching a debugger would be standard procedure I believe. Unfortunately I'm no expert there :p
 
I tried both final_release and debug builds and both fail at the same point.
Code:
1>CvFractal.cpp
1>NMAKE : fatal error U1073: don't know how to make 'CxImage/general/ximage.h'
1>Stop.
1>Project : error PRJ0019: A tool returned an error code from "Performing Makefile project actions"
The makefile does make the folder 'CxImage' and the two subfolders 'general' and 'jpeg' which are empty.

Edit: Looking over the makefile further, it would seem that I am missing all the source code for the subfolders 'general' and 'jpeg'. If you can upload the missing source files, I'll run the debug dll and see what bugs I can uncover.
 
The files included in the dune wars source directory are only the ones with specific DW changes. If you get the coresponding version of RevDCM code, and then unpack the DW source on top of it, you should get the contents of the CxImage directory.
 
The files included in the dune wars source directory are only the ones with specific DW changes. If you get the coresponding version of RevDCM code, and then unpack the DW source on top of it, you should get the contents of the CxImage directory.
I thought the whole point was to get rid of RevDCM specific code. Also, I did not need the 'CxImage' directory at all to compile 1.8. Seems to me this is a step backwards (and more convoluted). Furthermore, I don't even know what version of RevDCM to get. I am not trying to be negative but your programming experience exceeds my own by at least a factor of 20.
 
Good point. I forget where CxImage got added, actually. Here is the contents of that directory.
 

Attachments

  • CxImage.zip
    432.4 KB · Views: 51
I get these errors after about 99% complete on compiling the debug dll.
Code:
Creating library Debug/CvGameCoreDLL.lib and object Debug/CvGameCoreDLL.exp
CvGame.obj : error LNK2019: unresolved external symbol "public: bool __thiscall CxImage::CreateFromHBITMAP(struct HBITMAP__ *,struct HPALETTE__ *)" (?CreateFromHBITMAP@CxImage@@QAE_NPAUHBITMAP__@@PAUHPALETTE__@@@Z) referenced in function "public: bool __thiscall CvGame::takeJPEGScreenShot(class std::basic_string,class std::allocator >)const " (?takeJPEGScreenShot@CvGame@@QBE_NV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
Debug/CvGameCoreDLL.dll : fatal error LNK1120: 1 unresolved externals
NMAKE : fatal error U1077: '"C:/Program Files (x86)/Microsoft Visual C++ Toolkit 2003/bin/link.exe"' : return code '0x460'
Stop.
Project : error PRJ0019: A tool returned an error code from "Performing Makefile project actions"
P.S. @davidallen - Thank you for uploading the 'CxImage' directories.
 
Jester Fool said:
The makefile does make the folder 'CxImage' and the two subfolders 'general' and 'jpeg' which are empty.

Thanks for having a look at this.

CxImage is just a third party library for image handling. It is used for Better BUG AI, but was not needed for the Dune Wars 1.8 (RevDCM) compile. I presume one of the new features of BUG/BULL needed it.

I've attached my copy of the CxImage source - the only difference from david's seems to be that ximawnd.cpp is commented out with RevDCM comments. I'd advise using my version.

I have tried compiling a Debug DLL but despite getting quite a few non-crash causing FAsserts - I have been unable to recreate the crash with it and locate the problem.

Here are some of the non-CTD and hence non-critical FAssert errors:
Spoiler :
Code:
File:  CvPlot.cpp
Line:  4408
Expression:  !isWater()
Message:

File:  CvUnitAI.cpp
Line:  13982
Expression:  iParatrooperCount > 0
Message:  

File:  CvUnit.cpp
Line:  4317
Expression:  isHuman() || pCargo->getDomainType() == DOMAIN_AIR
Message:  

File:  CvUnitAI.cpp
Line:  17705
Expression:  pWaterArea != NULL
Message:  Ship out of water?

File:  CvUnitAI.cpp
Line:  7805
Expression:  pWaterArea != NULL
Message:
 
I get these errors after about 99% complete on compiling the debug dll.

Try with the copy of CxImage I just posted.

If that doesn't work try doing a completely clean build by deleting everything in the output Final_Release or Debug directories depending on which build you are doing.
 
@Deliverator - that worked. Thanks! I'll start a game tommorrow (..I mean later today) and see what happens.
 
Cool. Hopefully, we can weed out the remaining issue.
 
Here are some of the non-CTD and hence non-critical FAssert errors:

I don't recognize the paratrooper one, but most of the ones related to water have come since we had all-terrain travel. I am sure that a lot of the code doesn't deal with this properly and warns about sea units on land, etc. With a debugger attached, I just click "ignore always" once for each error, maybe a half-dozen clicks, and then the game continues smoothly.
 
I believe so, but no one else has confirmed yet.
 
Top Bottom