Modder's Guide to A New Dawn

Ok, so im starting to modify unit graphics, and i need some help regarding wheather or not i need to create new unit type in order to have civilization specific graphics for a unit (ex. Russian Archers).

And i also want to know why when u play multiplayer with friends, the game is out of sync.

Thanks for the reply.
 
All computers on Multiplayer must have the Exact same copy of the mod. Any thing changed will cause an OOS. So if anyone has went into the mod and tweaked something in it that the others have not, it will throw off the sync.

JosEPh
 
All computers on Multiplayer must have the Exact same copy of the mod. Any thing changed will cause an OOS. So if anyone has went into the mod and tweaked something in it that the others have not, it will throw off the sync.

JosEPh

o ok, would you guys like me to submit my work, so u can add it to the OOS?
I just wanted every Civ to have unique looking units from the ancient to industrial period.
 
"never tried to mod before, and I just want to adjust the tech diffusion upward. Any tips on how to do that."

gonna try again
 
I've been trying to incorporate the ability to build a hill into this mod by using your FeatureChange field in the Civ4BuildInfo.xml and generally copying the syntax I see being used.

Edit: My attempts at modding are now concealed by a spoiler to prevent an overly obtrusive post.

Spoiler :

My Addition to the Civ4BuildInfo.xml:
Code:
		<BuildInfo>
			<Type>BUILD_Hill</Type>
			<Description>TXT_KEY_BUILD_HILL</Description>
			<Help/>
			<PrereqTech>TECH_PLASTICS</PrereqTech>
			<iTime>2000</iTime>
			<iCost>100</iCost>
			<bKill>0</bKill>
			<ImprovementType>IMPROVEMENT_HILL</ImprovementType>
			<RouteType>NONE</RouteType>
			<TerrainChange>TERRAIN_HILL</TerrainChange>
			<EntityEvent>ENTITY_EVENT_BUILD</EntityEvent>
			<FeatureStructs>
				<FeatureStruct>
					<FeatureType>FEATURE_FOREST</FeatureType>
					<PrereqTech/>
					<iTime>250</iTime>
					<iProduction>30</iProduction>
					<bRemove>1</bRemove>
				</FeatureStruct>
				<FeatureStruct>
					<FeatureType>FEATURE_JUNGLE</FeatureType>
					<PrereqTech/>
					<iTime>400</iTime>
					<iProduction>0</iProduction>
					<bRemove>1</bRemove>
				</FeatureStruct>
			</FeatureStructs>
			<HotKey>KB_T</HotKey>
			<bAltDown>0</bAltDown>
			<bShiftDown>0</bShiftDown>
			<bCtrlDown>1</bCtrlDown>
			<iHotKeyPriority>0</iHotKeyPriority>
			<Button>Art/Interface/Buttons/baseterrain/Hill.dds</Button>
		</BuildInfo>

My Addition to the CIV4UnitInfos.xml (for each different worker unit)
Code:
				<Build>
					<BuildType>BUILD_HILL</BuildType>
					<bBuild>1</bBuild>
				</Build>

My Addition to the CIV4ImprovementInfos.xml
Code:
		<ImprovementInfo>
			<Type>IMPROVEMENT_HILL</Type>
			<Description>TXT_KEY_BUILD_HILL</Description>
			<Civilopedia>TXT_KEY_IMPROVEMENT_LAND_WORKED_PEDIA</Civilopedia>
			<ArtDefineTag>ART_DEF_IMPROVEMENT_BUILD_HILL</ArtDefineTag>
			<YieldChanges>
				<iYieldChange>1</iYieldChange>
				<iYieldChange>1</iYieldChange>
				<iYieldChange>0</iYieldChange>
			</YieldChanges>
			<bActsAsCity>0</bActsAsCity>
			<bHillsMakesValid>0</bHillsMakesValid>
			<bFreshWaterMakesValid>0</bFreshWaterMakesValid>
			<bRiverSideMakesValid>0</bRiverSideMakesValid>
			<bNoFreshWater>0</bNoFreshWater>
			<bRequiresFlatlands>0</bRequiresFlatlands>
			<bRequiresRiverSide>0</bRequiresRiverSide>
			<bRequiresIrrigation>0</bRequiresIrrigation>
			<bCarriesIrrigation>0</bCarriesIrrigation>
			<bRequiresFeature>0</bRequiresFeature>
			<bWater>0</bWater>
			<bGoody>0</bGoody>
			<bPermanent>0</bPermanent>
			<iAdvancedStartCost>-1</iAdvancedStartCost>
			<iAdvancedStartCostIncrease>0</iAdvancedStartCostIncrease>
			<iTilesPerGoody>0</iTilesPerGoody>
			<iGoodyRange>0</iGoodyRange>
			<iFeatureGrowth>0</iFeatureGrowth>
			<iUpgradeTime>0</iUpgradeTime>
			<iAirBombDefense>-1</iAirBombDefense>
			<iDefenseModifier>0</iDefenseModifier>
			<iHappiness>0</iHappiness>
			<iPillageGold>0</iPillageGold>
			<bOutsideBorders>1</bOutsideBorders>
			<TerrainMakesValids>
				<TerrainMakesValid>
					<TerrainType>TERRAIN_DESERT</TerrainType>
					<bMakesValid>1</bMakesValid>
				</TerrainMakesValid>
				<TerrainMakesValid>
					<TerrainType>TERRAIN_TUNDRA</TerrainType>
					<bMakesValid>1</bMakesValid>
				</TerrainMakesValid>
					<TerrainMakesValid>
					<TerrainType>TERRAIN_GRASS</TerrainType>
					<bMakesValid>1</bMakesValid>
				</TerrainMakesValid>
				<TerrainMakesValid>
					<TerrainType>TERRAIN_PLAINS</TerrainType>
					<bMakesValid>1</bMakesValid>
				</TerrainMakesValid>
			</TerrainMakesValids>
			<FeatureMakesValids/>
			<ImprovementPillage/>
			<ImprovementUpgrade/>
			<TechYieldChanges/>
			<RouteYieldChanges/>
			<WorldSoundscapeAudioScript/>
			<bGraphicalOnly>1</bGraphicalOnly>
		</ImprovementInfo>

My Addition to the CIV4ArtDefines_Improvement.xml
Code:
		<ImprovementArtInfo>
			<Type>ART_DEF_IMPROVEMENT_BUILD_HILL</Type>
			<bExtraAnimations>0</bExtraAnimations>
			<fScale>2</fScale>
			<fInterfaceScale>1.0</fInterfaceScale>
			<NIF>Art/Structures/Improvements/LandWorked/sm_farm_house.nif</NIF>
			<KFM>Art/Structures/Improvements/LandWorked/sm_farm_house.kfm</KFM>
			<Button>,Art/Interface/Buttons/baseterrain/Hill.dds</Button>
		</ImprovementArtInfo>


Currently I'm getting an error when I load the version of the mod that I have changed that says that the tag BUILD_HILL in the Civ4UnitInfos.xml is incorrect.

Please help me figure out what I am doing wrong.


EDIT:
It was a capitalization error on my part, now I'm having some sort of Art bug where after the hill is completed it eats the worker and what is left behind is more of a crater than a hill.
 
EDIT:
It was a capitalization error on my part, now I'm having some sort of Art bug where after the hill is completed it eats the worker and what is left behind is more of a crater than a hill.

If it looks like a hill after you reload the game then it is working as expected.:( The graphics for hills looks strange when you place them during a game.
 
thx for the help with the hills.

btw, is bCanMovePeaks for CIV4PromotionInfos.xml currently broken?
 
I would like to try making some modifications to AND 1.75C and would like to get that specific version from SVN. Is that at all possible? I would assume it would be if it was tagged as a specific version, though I am not sure that was the case.
 
I would like to try making some modifications to AND 1.75C and would like to get that specific version from SVN. Is that at all possible? I would assume it would be if it was tagged as a specific version, though I am not sure that was the case.

I'll have a look at it; when I find the correct rev, I'll let you know. I guess with SVN you can revert back to every version you like to.
 
Hi all

I would like to add ranged attack to grenadiers and modern grenadiers. What must i edit in unit infos ?

Thanks in advance.
 
I mean such ranged attack as does archers have against units. Anyone know ?
 
Sorry for not seeing this. If you want to add a ranged attack to units, there are two XML tags you have to use. These go just before the </UnitInfo>.

<iDCMBombRange> covers how far a unit can ranged-attack.
<iDCMBombAccuracy> covers the percentage change (out of 100) of the attack hitting.

So if you want a range-1 attack with 70% accuracy, add these lines:
Code:
<iDCMBombRange>1</iDCMBombRange>
<iDCMBombAccuracy>70</iDCMBombAccuracy>

Are you sure of your version, though? I see that AND already has a ranged attack on Grenadiers and Modern Grenadiers. Is your Archer Bombard option turned on?
 
I've been trying to incorporate the ability to build a hill into this mod by using your FeatureChange field in the Civ4BuildInfo.xml and generally copying the syntax I see being used.

Edit: My attempts at modding are now concealed by a spoiler to prevent an overly obtrusive post.

Spoiler :

My Addition to the Civ4BuildInfo.xml:
Code:
		<BuildInfo>
			<Type>BUILD_Hill</Type>
			<Description>TXT_KEY_BUILD_HILL</Description>
			<Help/>
			<PrereqTech>TECH_PLASTICS</PrereqTech>
			<iTime>2000</iTime>
			<iCost>100</iCost>
			<bKill>0</bKill>
			<ImprovementType>IMPROVEMENT_HILL</ImprovementType>
			<RouteType>NONE</RouteType>
			<TerrainChange>TERRAIN_HILL</TerrainChange>
			<EntityEvent>ENTITY_EVENT_BUILD</EntityEvent>
			<FeatureStructs>
				<FeatureStruct>
					<FeatureType>FEATURE_FOREST</FeatureType>
					<PrereqTech/>
					<iTime>250</iTime>
					<iProduction>30</iProduction>
					<bRemove>1</bRemove>
				</FeatureStruct>
				<FeatureStruct>
					<FeatureType>FEATURE_JUNGLE</FeatureType>
					<PrereqTech/>
					<iTime>400</iTime>
					<iProduction>0</iProduction>
					<bRemove>1</bRemove>
				</FeatureStruct>
			</FeatureStructs>
			<HotKey>KB_T</HotKey>
			<bAltDown>0</bAltDown>
			<bShiftDown>0</bShiftDown>
			<bCtrlDown>1</bCtrlDown>
			<iHotKeyPriority>0</iHotKeyPriority>
			<Button>Art/Interface/Buttons/baseterrain/Hill.dds</Button>
		</BuildInfo>

My Addition to the CIV4UnitInfos.xml (for each different worker unit)
Code:
				<Build>
					<BuildType>BUILD_HILL</BuildType>
					<bBuild>1</bBuild>
				</Build>

My Addition to the CIV4ImprovementInfos.xml
Code:
		<ImprovementInfo>
			<Type>IMPROVEMENT_HILL</Type>
			<Description>TXT_KEY_BUILD_HILL</Description>
			<Civilopedia>TXT_KEY_IMPROVEMENT_LAND_WORKED_PEDIA</Civilopedia>
			<ArtDefineTag>ART_DEF_IMPROVEMENT_BUILD_HILL</ArtDefineTag>
			<YieldChanges>
				<iYieldChange>1</iYieldChange>
				<iYieldChange>1</iYieldChange>
				<iYieldChange>0</iYieldChange>
			</YieldChanges>
			<bActsAsCity>0</bActsAsCity>
			<bHillsMakesValid>0</bHillsMakesValid>
			<bFreshWaterMakesValid>0</bFreshWaterMakesValid>
			<bRiverSideMakesValid>0</bRiverSideMakesValid>
			<bNoFreshWater>0</bNoFreshWater>
			<bRequiresFlatlands>0</bRequiresFlatlands>
			<bRequiresRiverSide>0</bRequiresRiverSide>
			<bRequiresIrrigation>0</bRequiresIrrigation>
			<bCarriesIrrigation>0</bCarriesIrrigation>
			<bRequiresFeature>0</bRequiresFeature>
			<bWater>0</bWater>
			<bGoody>0</bGoody>
			<bPermanent>0</bPermanent>
			<iAdvancedStartCost>-1</iAdvancedStartCost>
			<iAdvancedStartCostIncrease>0</iAdvancedStartCostIncrease>
			<iTilesPerGoody>0</iTilesPerGoody>
			<iGoodyRange>0</iGoodyRange>
			<iFeatureGrowth>0</iFeatureGrowth>
			<iUpgradeTime>0</iUpgradeTime>
			<iAirBombDefense>-1</iAirBombDefense>
			<iDefenseModifier>0</iDefenseModifier>
			<iHappiness>0</iHappiness>
			<iPillageGold>0</iPillageGold>
			<bOutsideBorders>1</bOutsideBorders>
			<TerrainMakesValids>
				<TerrainMakesValid>
					<TerrainType>TERRAIN_DESERT</TerrainType>
					<bMakesValid>1</bMakesValid>
				</TerrainMakesValid>
				<TerrainMakesValid>
					<TerrainType>TERRAIN_TUNDRA</TerrainType>
					<bMakesValid>1</bMakesValid>
				</TerrainMakesValid>
					<TerrainMakesValid>
					<TerrainType>TERRAIN_GRASS</TerrainType>
					<bMakesValid>1</bMakesValid>
				</TerrainMakesValid>
				<TerrainMakesValid>
					<TerrainType>TERRAIN_PLAINS</TerrainType>
					<bMakesValid>1</bMakesValid>
				</TerrainMakesValid>
			</TerrainMakesValids>
			<FeatureMakesValids/>
			<ImprovementPillage/>
			<ImprovementUpgrade/>
			<TechYieldChanges/>
			<RouteYieldChanges/>
			<WorldSoundscapeAudioScript/>
			<bGraphicalOnly>1</bGraphicalOnly>
		</ImprovementInfo>

My Addition to the CIV4ArtDefines_Improvement.xml
Code:
		<ImprovementArtInfo>
			<Type>ART_DEF_IMPROVEMENT_BUILD_HILL</Type>
			<bExtraAnimations>0</bExtraAnimations>
			<fScale>2</fScale>
			<fInterfaceScale>1.0</fInterfaceScale>
			<NIF>Art/Structures/Improvements/LandWorked/sm_farm_house.nif</NIF>
			<KFM>Art/Structures/Improvements/LandWorked/sm_farm_house.kfm</KFM>
			<Button>,Art/Interface/Buttons/baseterrain/Hill.dds</Button>
		</ImprovementArtInfo>


Currently I'm getting an error when I load the version of the mod that I have changed that says that the tag BUILD_HILL in the Civ4UnitInfos.xml is incorrect.

Please help me figure out what I am doing wrong.


EDIT:
It was a capitalization error on my part, now I'm having some sort of Art bug where after the hill is completed it eats the worker and what is left behind is more of a crater than a hill.

The TERRAIN_HILL if i recall is just a dummy.
Changing the terrain to TERRAIN_HILL will mess up things as the plot itself is not really a hill.
The plottype itself has to be changed to PLOT_HILLS, not the terrain type
 
I have gone ahead and done an svn update in an attempt to run the latest version (636) in debug mode. I have version 636 for my Rise of Mandkind - A New Dawn folder as well so both the source files and the mod folder itself are according to SVN.

Upon running the mod in debug mode, I get an assert from line 2601 in CvInfos.cpp for TECH_PREREQS stating that "There are more siblings than memory allocated for them in SetGlobalUnitInfo." Below is the exact line of code where the assert fails:

FAssertMsg((iNumSibs <= GC.getNUM_AND_TECH_PREREQS()) ,"There are more siblings than memory allocated for them in SetGlobalUnitInfo");

According to my understanding of the above, it seems there is a disparity with how many elements there are in the XML file and how many the DLL is actually expecting. If this is the case, I am trying to understand why as both the source files are exactly as per the svn at version 636.

I have not done any local modifications whatsoever.
 
I have gone ahead and done an svn update in an attempt to run the latest version (636) in debug mode. I have version 636 for my Rise of Mandkind - A New Dawn folder as well so both the source files and the mod folder itself are according to SVN.

Upon running the mod in debug mode, I get an assert from line 2601 in CvInfos.cpp for TECH_PREREQS stating that "There are more siblings than memory allocated for them in SetGlobalUnitInfo." Below is the exact line of code where the assert fails:

FAssertMsg((iNumSibs <= GC.getNUM_AND_TECH_PREREQS()) ,"There are more siblings than memory allocated for them in SetGlobalUnitInfo");

According to my understanding of the above, it seems there is a disparity with how many elements there are in the XML file and how many the DLL is actually expecting. If this is the case, I am trying to understand why as both the source files are exactly as per the svn at version 636.

I have not done any local modifications whatsoever.

This isn't causing any troubles if you run the final dll and not in debug mode. It's caused by the fact that there's a limit to the number of prereq techs that a tech can have. In some previous revision I've modified Future Tech prereq; now FT requires 6 or 7 techs which is beyond the limit imposed via xml, but this can be changed in some xml file, I don't remember where. Anyway it isn't causing any trouble in gameplay, prereq techs which are beyond the limit number are simply ignored (say you need 7 techs to reach FT and the limit is 6, the seventh tech is simply ignored as a prereq).
 
45°38'N-13°47'E;12430258 said:
This isn't causing any troubles if you run the final dll and not in debug mode. It's caused by the fact that there's a limit to the number of prereq techs that a tech can have. In some previous revision I've modified Future Tech prereq; now FT requires 6 or 7 techs which is beyond the limit imposed via xml, but this can be changed in some xml file, I don't remember where. Anyway it isn't causing any trouble in gameplay, prereq techs which are beyond the limit number are simply ignored (say you need 7 techs to reach FT and the limit is 6, the seventh tech is simply ignored as a prereq).
Yes I was able to get this to work in release mode; As long as this assert has no adverse affects on gameplay or overall functionality I am certainly happy to ignore it.
 
Vokarya has working knowledge of this. When he was redoing C2C tech tree it was ran into several times.

JosEPh
 
45°38'N-13°47'E;12430258 said:
This isn't causing any troubles if you run the final dll and not in debug mode. It's caused by the fact that there's a limit to the number of prereq techs that a tech can have. In some previous revision I've modified Future Tech prereq; now FT requires 6 or 7 techs which is beyond the limit imposed via xml, but this can be changed in some xml file, I don't remember where. Anyway it isn't causing any trouble in gameplay, prereq techs which are beyond the limit number are simply ignored (say you need 7 techs to reach FT and the limit is 6, the seventh tech is simply ignored as a prereq).

You mean this?
Code:
	<Define>
		<DefineName>NUM_OR_TECH_PREREQS</DefineName>
		<iDefineIntVal>4</iDefineIntVal>
	</Define>
	<Define>
		<DefineName>NUM_AND_TECH_PREREQS</DefineName>
		<iDefineIntVal>4</iDefineIntVal>
	</Define>

GlobalDefines.xml
 
Top Bottom