Dale's MOD Code Factory

Dale,

I am trying to use your bombardment code but can't get the xml files to load properly. Might you have a copy of the edited xml files for just the bombardment code?

Thanks

-Hrnac
 
Caesium said:
Hi Dale.

I integrated your MAD into my mod, but since that I get every turn an information about MAD targets and sound. Is there a possibility to switch off the information and the sound, or to make them triggerable?
After reading post #2 again and again, I realized, you already had given the hint there. Sorry.
 
Has anyone mad a simple mod that uses the bombard code? I can't seem to make this work as I am getting a ton of XML errors when I try to load up my "bombardment" mod.

I have tried to compare my XML files with the ones in Dales Combat mod and despite having them appear identical, I still receive xml errors when loading my mod.

I sure could use some pointers with this.

Thanks

-Hrnac
 
What's the xml error you're getting?

Sorry, I've been really busy with other stuff, so haven't been dropping in as often.

Dale
 
Dale,

I managed to figure out what was happening. In your instructions you list this variable as iDCMBombRange. After examining your xml files in your mod, I discovered that this variable was being declared as bDCMBombRange.

A few quick edits and my stand alone bombard mod loaded properly.

-Hrnac
 
Hi!

I found a bug in your Mad Nukes code:

In CvUnit.cpp, CvUnit::doTurn():

Code:
...
iNumCities = GET_PLAYER((PlayerTypes)iRandPlayer).getNumCities();
					pCity = GET_PLAYER((PlayerTypes)iRandPlayer).getCity(rand() % iNumCities);
						if(canNuke(pCity->plot()))
						{
...
The game stops at the call of pCity->plot().
This is because GET_PLAYER((PlayerTypes)iRandPlayer).getCity(rand() % iNumCities)doesn't return a proper city. pCity has the adress 000000000x0.

Matze
 
Hrnac said:
Dale,

I managed to figure out what was happening. In your instructions you list this variable as iDCMBombRange. After examining your xml files in your mod, I discovered that this variable was being declared as bDCMBombRange.

A few quick edits and my stand alone bombard mod loaded properly.

-Hrnac

I changed the variables back to iDCMBombardRange and everything loaded just fine. My catapults however now had the rebase icon instead of the target icon.

Has anyone out there sucessfully implemented the bombardment code? If so, might you be able to point me in the right direction?

Thanks

-Hrnac
 
Are you giving your catapults both tags? They need:

<bDCMBombard>1</bDCMBombard> to receive the normal bombard mission
<iDCMBombRange>1</iDCMBombRange> to be able to bomb the next tile.
 
Dale said:
Are you giving your catapults both tags? They need:

<bDCMBombard>1</bDCMBombard> to receive the normal bombard mission
<iDCMBombRange>1</iDCMBombRange> to be able to bomb the next tile.

They do have both tags. When I switched iDCMBombRange back to bDCMBombRange, the units lost all bombard functionality.

Do you have a set of xml files that work with the bombard code?

-Hrnac
 
MatzeHH said:
Hi!

I found a bug in your Mad Nukes code:

In CvUnit.cpp, CvUnit::doTurn():

Code:
...
iNumCities = GET_PLAYER((PlayerTypes)iRandPlayer).getNumCities();
					pCity = GET_PLAYER((PlayerTypes)iRandPlayer).getCity(rand() % iNumCities);
						if(canNuke(pCity->plot()))
						{
...
The game stops at the call of pCity->plot().
This is because GET_PLAYER((PlayerTypes)iRandPlayer).getCity(rand() % iNumCities)doesn't return a proper city. pCity has the adress 000000000x0.

Matze
Dale, what about that error, will there be a patch or an update?
 
I finally got the bombard code working. The solution to my problems was to move the bombard interface code to the end of the interface xml file.

-Hrnac
 
Hrnac said:
I finally got the bombard code working. The solution to my problems was to move the bombard interface code to the end of the interface xml file.

-Hrnac

Do you mean in the XML file, or in the actual source code itself?

BTW, bug noted about the MAD code. I've pinpointed it, and a patch will come out for it.

Dale
 
I just modified the xml file. I am using your compiled DLL file. everything works great now and will tide me over until your mod is finished.

-Hrnac
 
Hi Dale
by playing more with ur mod ( actually the file u gave me for missiles ) i've noticed that AI doesn't build much ( almost none ) of cruises but only cruisesnukes! have u updated ur file and can u give me the updated one once again if u did ;)
also, is it possible to take away recon option for cruises and cruises nukes ? :)
thx and great mod u made, once again!
 
MaxRiga said:
Hi Dale
also, is it possible to take away recon option for cruises and cruises nukes ? :)

I did that in my version of Dale's mod which I merged in with my flying mod. I also removed he rebase mission since I didn't like missiles flying out to my SSBNs to rearm.

Roger Bacon
 
Sorry I've been a bit lax in replies, been really busy off the computer. :)

E:
I've got a few other ideas, but I want to finish off what's on my plate now before starting something else. :) As for what they are, I'll leave the surprise till later. ;)

MaxRiga:
The recon option is an XML option in the units file. I can't remember which one it is but have a play around with it and you'll find it quick. :) Besides, I'm not going through your entire units XML file just to change that. 1. You know it better than me and can find the relevant units quicker than me, and 2. I don't actually have the time right now to do it. Sorry, but that's the facts. :)
As for updating missiles, I haven't as yet as there's been no need for a change.

Dale
 
Announcement!

This is the biggy. :)

Combined Arms Stack Attack is now available!

Please see the second post of this thread for download and details.

Please post any comments here. :)

Thanks for playing my mods and making it all worthwhile.

Dale
 
Top Bottom