Axis and Allies Scenerio

DanielF

Chieftain
Joined
Nov 21, 2003
Messages
29
Well, I thought it was about time to learn how to create a scenerio for CivIV, so I thought I'd try a scenerio based on the Axis and Allies board game. Hopefully there will be some interest in this kind of scenerio here. :cooool:

I'm trying to change the rules of the game so that the game play is more like the board game. It's going great so far but I might need some suggestions. But first, here's what I have done so far:

1) The only buildable units are like in the original game (infantry, armor, fighter, bomber, battleship, submarine, and carrier) and the only building that can be built is a factory.

2) Units can only be built in cities with factories.

3) Units strenghts and movement have been adjusted to somewhat match the original game.

4) And, of course, I made a map based on the layout of the original board. Cities represent spaces in the board rather than individual cities. The placement of units are identical to the placement in the board game. Your income will hopefully (this is the part that I'm going to work on next :D) depend on what territories you own.

And now for the asking for help part. I've only been playing around with modding for a few days. :D

1) I built roads between cities to make it so land units can move from one territory to the next in one turn rather than 2 or 3. But the AI likes to destroy roads... :p Is there any way to prevent this?

2) Is there a way to prevent culture from effecting the defense of a city? I want to give some of the cities culture so that the entire continent is colored, but it gives these cities a defense boost.

3) When a city with a factory is attacked, the factory is destroyed. Is there a way to prevent this from happening?

4) I haven't even tried to look into this one yet, and it's probably an easy fix, but I thought I'd ask anyway. Is there a way to stop maintanance cost from increasing as the number of cities increase? Right now, your income decreases as you take more cities. :crazyeye:

Here's a screenshot of my first test run. The terrain looks kinda boring now, but I'm working on balancing everything before I make it look pretty.

DFAAPreview.jpg
 
Sounds like less rather than more. However
1. Just take away the power of units to pillage
2. No idea.
3. Yes. There's something in the BuildingInfos there
4. Yeah, easy fix. Do it with a civic.
 
I love the A&A boardgame! If this really gets rolling I might be able to set something up for you where each city is assigned a certain group of plots, regardless of the owner or the city's culture. With that system a city will keep its same borders even after someone has conquered it. I already have it implemented for a mod I'm working on, so it wouldn't be overly difficult to do.

For the culture defense look in XML\Gameinfo\CIV4CultureLevelInfo.xml
Should be pretty easy from there ;)
 
DanielF said:
Well, I thought it was about time to learn how to create a scenerio for CivIV, so I thought I'd try a scenerio based on the Axis and Allies board game. Hopefully there will be some interest in this kind of scenerio here. :cooool:

I'm trying to change the rules of the game so that the game play is more like the board game. It's going great so far but I might need some suggestions. But first, here's what I have done so far:

1) The only buildable units are like in the original game (infantry, armor, fighter, bomber, battleship, submarine, and carrier) and the only building that can be built is a factory.

2) Units can only be built in cities with factories.

3) Units strenghts and movement have been adjusted to somewhat match the original game.

4) And, of course, I made a map based on the layout of the original board. Cities represent spaces in the board rather than individual cities. The placement of units are identical to the placement in the board game. Your income will hopefully (this is the part that I'm going to work on next :D) depend on what territories you own.

And now for the asking for help part. I've only been playing around with modding for a few days. :D

1) I built roads between cities to make it so land units can move from one territory to the next in one turn rather than 2 or 3. But the AI likes to destroy roads... :p Is there any way to prevent this?

2) Is there a way to prevent culture from effecting the defense of a city? I want to give some of the cities culture so that the entire continent is colored, but it gives these cities a defense boost.

3) When a city with a factory is attacked, the factory is destroyed. Is there a way to prevent this from happening?

4) I haven't even tried to look into this one yet, and it's probably an easy fix, but I thought I'd ask anyway. Is there a way to stop maintanance cost from increasing as the number of cities increase? Right now, your income decreases as you take more cities. :crazyeye:

Here's a screenshot of my first test run. The terrain looks kinda boring now, but I'm working on balancing everything before I make it look pretty.

DFAAPreview.jpg

Neat idea. I'm a big fan of the board game. I wonder how far you'd be willing to strictly follow the rules, however, as you would have to get rid of a lot of Civ4 defaults (such as destroying roads, keeping factories, etc.). Much of these rule changes will have to be done in the SDK. Also, depending on how much you wish to follow the board game, reprogramming the AI will be a hefty task.

However, for a more Civilized approach, where the main ideas of Civ4 are kept but just the concepts of A&A are used, it shouldn't be too bad. To get some things I'm sure you will still have to dip into the SDK. At the very least, you might be able to use someone elses SDK, like the CCP, and do a bunch of python scripting.

Seeing as you've already done quite a bunch in just a few days, I feel like you can do pretty well. So, good luck.

1.) Either change the AI code, or better, change units so that all of them can't pillage.

2.) You can change the cultural defense levels that a city produces by editting the Civ4CultureLevelInfo.xml file. Change all the instances of "iCityDefenseModifier" to zero.

3.) Here is the code in the SDK relating to what buildings survive or get destroyed when taking a city:

Code:
for (iI = 0; iI < GC.getNumBuildingInfos(); iI++)
	{
		if (pabHasRealBuilding[iI])
		{
			eBuilding = ((BuildingTypes)(GC.getCivilizationInfo(getCivilizationType()).getCivilizationBuildings(GC.getBuildingInfo((BuildingTypes) iI).getBuildingClassType())));

			if (eBuilding != NO_BUILDING)
			{
				if (bTrade || [b]!(GC.getBuildingInfo(eBuilding).isNeverCapture())[/b])
				{
					[b]if (!isProductionMaxedBuildingClass(((BuildingClassTypes)(GC.getBuildingInfo(eBuilding).getBuildingClassType())), true))[/b]
					{
						[b]if (!bConquest || bRecapture || GC.getGameINLINE().getSorenRandNum(100, "Capture Probability") < GC.getBuildingInfo(eBuilding).getConquestProbability())[/b]
						{
							pNewCity->setHasRealBuildingTimed(eBuilding, true, false, ((PlayerTypes)(paiBuildingOriginalOwner[eBuilding])), paiBuildingOriginalTime[eBuilding]);
						}
					}
				}
			}
		}
	}

Building's have a "bNeverCapture" in their XML. If set to 0, the building will have a chance to survive. The factory is set to zero, but there are other factors as well. That would be the first reason why a building doesn't get captured. Factories are already set to 0, so you're set there.

The second is if there is a limit to the number of buildings a player can have. If the capturing player has already hit the limit, then they'll go over. Check the "iMaxGlobalInstances" value for a building class (note that this is for a building CLASS, not a building).

Finally, there's a random probability. To make sure that factories are ALWAYS captured (given that the first two criteria are reached), then change the building's "iConquestProb" tag to 100 percent.

4.) There are two defines in GlobalDefines.xml, "INITIAL_CITY_MAINTENANCE and "MAX_DISTANCE_CITY_MAINTENANCE". You might want to change them both to 0. I don't know if that will cover everything, however.
 
Back
Top Bottom