Modders Guide to Beyond the Sword

Where do I place the Audio files? If that is what you are asking here is the answer. MODS/{YOUR MOD}/ASSETS/XML/AUDIO
your modules go into MODS/{YOUR MOD}/MODULES

Note Audio files can NOT be in modular form. they must include the Universal audio files found on the Plug and play Forum. Got any new audio entries to add into the file.. submit them and I'll add them right in.

And if a front-end program is used, then a work-around for the Audio files not being modular can be accomplished by a simple batch routine copy....which we will use in the WoC if we don't get the SDK re-coded to accept modular Audio.


Just want to second this. After recognising that everybody would have to edit the ini to activate modular loading explicitly, I nearly decided not to do my mods in a modular fashion to keep people from stumbling. The advantage of modular xml on the other hand is not negligible, so I will go for it with the hope a future patch for BtS will fix this default value to 1.

Actually the WoC will be setting that variable for the player.....so people don't have to manually edit the INI because we think Firaxis really made a mistake here.
 
And if a front-end program is used, then a work-around for the Audio files not being modular can be accomplished by a simple batch routine copy....which we will use in the WoC if we don't get the SDK re-coded to accept modular Audio.




Actually the WoC will be setting that variable for the player.....so people don't have to manually edit the INI because we think Firaxis really made a mistake here.

Agreed! Should we petition for a patch? that changes this?
 
Just curious as the work around for audio files would actually have to take a Audio Script and actually write the data and the Scripts into the Xml files. Or do you see another work around?

I mean It would be no problem to maintain a Universal File system on this. Although I seem to have no input on my PnP forum as of yet :(
 
Just curious as the work around for audio files would actually have to take a Audio Script and actually write the data and the Scripts into the Xml files. Or do you see another work around?

I mean It would be no problem to maintain a Universal File system on this. Although I seem to have no input on my PnP forum as of yet :(

I noticed your PnP forum is quiet....but it should be bustling with folks....kinda like the WoC project, we haven't really gotten rolling yet.

I am not the coder so I don't know the specifics, but we might re-write some of the modular stuff to accommodate having multiple mods and using parts from each.

Personally I think it was unwise to not have all the XML modular, but we really have to ask Impaler, not Firaxis on this one :D
 
Small question about the new python callback defines. According to CvGlobals.h, they are exposed to python, but when trying to read a value, I get this error message:

Code:
AttributeError: 'CyGlobalContext' object has no attribute 'getUSE_ON_UNIT_CREATED_CALLBACK'

Is there any other way to access the values from python?
 
Hi,
My idea is to create a mod to slightly improve the Stealth Bomber.
In Civ II: CTP, the stealth bomber could carry nuclear missiles.
If anyone could implement that that would be a great mod,
the idea would be so that enemy civilisations wouldn't be able to detect the missile till its too late, a stealth fighter would be pretty cool too.

I could do the Mod if someone could tell me which things to edit, if its a XML issue.
I got the idea from Day 4 of 24.

See ya

CrashOverride
 
I found a few bugs with the Unit Art Styles. Firstly if something is incorrectly referenced in the CIV4UnitArtStyleInfos.xml (to an artdefines that doesn't exist) then it won't mention it in the XML check but instead crash when it's starting a new game.. it's not necessarily a bug but it could kill someone if they don't know why their mod keeps crashing unexpectedly.

Secondly (this one's really annoying me) this might be a problem with either the new CEO units or it could be a problem with the Unit Art Styles - I tried to add flavoured African missionaries to my game using the Art Styles, but instead of my new missionary graphics replacing the missionaries they're referenced to - they replace the CEO units. I just can't work it out, my only conclusion is that they're near each other in the worldbuilder menu.

I can go into more detail if you like (which CEO is being replaced by which missionary etc.) It's really.. unusual.
 
Actually the WoC will be setting that variable for the player.....so people don't have to manually edit the INI because we think Firaxis really made a mistake here.

Is there an easy way to set this value for the user without actually changing the user's "CivilizationIV.ini" or do I have to comment out every occurence of ...
Code:
if (gDLL->isModularXMLLoading()) 
{
	...
}
... in the SDK source files? (not the "..." part of course)

Agreed! Should we petition for a patch? that changes this?

Wrote something like a petition for the Modular-XML-Loading-Default-Value-Issue in the bug thread for "Beyond the Sword". If someone has the urge to give it more weight, feel free to post there.
 
Is there an easy way to set this value for the user without actually changing the user's "CivilizationIV.ini" or do I have to comment out every occurence of ...
Code:
if (gDLL->isModularXMLLoading()) 
{
	...
}
... in the SDK source files? (not the "..." part of course)



Wrote something like a petition for the Modular-XML-Loading-Default-Value-Issue in the bug thread for "Beyond the Sword". If someone has the urge to give it more weight, feel free to post there.

I am not a coder....you would have to drop over to the WoC Forum and talk to mrgenie or Impaler I suppose.
 
Chug: Did you by chance happen to use the UnitClass of the Missionary your trying to modify rather then its Type?? If so the game would determine its index on one list but then produce the effect via a different list that can produce a slight off set bumping an effect to something else.
 
This is what I had in the ArtStyleTypeInfos.xml under the African flavour:

Spoiler XML :
<StyleUnit>
<UnitType>ART_DEF_UNIT_JEWISH_MISSIONARY</UnitType>
<UnitMeshGroup>
<EarlyArtDefineTag>ART_DEF_UNIT_JEWISH_MISSIONARY_AFRICAN</EarlyArtDefineTag>
<LateArtDefineTag>ART_DEF_UNIT_JEWISH_MISSIONARY_AFRICAN</LateArtDefineTag>
<MiddleArtDefineTag>ART_DEF_UNIT_JEWISH_MISSIONARY_AFRICAN</MiddleArtDefineTag>
</UnitMeshGroup>
</StyleUnit>
<StyleUnit>
<UnitType>ART_DEF_UNIT_CHRISTIAN_MISSIONARY</UnitType>
<UnitMeshGroup>
<EarlyArtDefineTag>ART_DEF_UNIT_CHRISTIAN_MISSIONARY_AFRICAN</EarlyArtDefineTag>
<LateArtDefineTag>ART_DEF_UNIT_CHRISTIAN_MISSIONARY_AFRICAN</LateArtDefineTag>
<MiddleArtDefineTag>ART_DEF_UNIT_CHRISTIAN_MISSIONARY_AFRICAN</MiddleArtDefineTag>
</UnitMeshGroup>
</StyleUnit>
<StyleUnit>
<UnitType>ART_DEF_UNIT_ISLAMIC_MISSIONARY</UnitType>
<UnitMeshGroup>
<EarlyArtDefineTag>ART_DEF_UNIT_ISLAMIC_MISSIONARY_AFRICAN</EarlyArtDefineTag>
<LateArtDefineTag>ART_DEF_UNIT_ISLAMIC_MISSIONARY_AFRICAN</LateArtDefineTag>
<MiddleArtDefineTag>ART_DEF_UNIT_ISLAMIC_MISSIONARY_AFRICAN</MiddleArtDefineTag>
</UnitMeshGroup>
</StyleUnit>
<StyleUnit>
<UnitType>ART_DEF_UNIT_HINDU_MISSIONARY</UnitType>
<UnitMeshGroup>
<EarlyArtDefineTag>ART_DEF_UNIT_HINDU_MISSIONARY_AFRICAN</EarlyArtDefineTag>
<LateArtDefineTag>ART_DEF_UNIT_HINDU_MISSIONARY_AFRICAN</LateArtDefineTag>
<MiddleArtDefineTag>ART_DEF_UNIT_HINDU_MISSIONARY_AFRICAN</MiddleArtDefineTag>
</UnitMeshGroup>
</StyleUnit>
<StyleUnit>
<UnitType>ART_DEF_UNIT_BUDDHIST_MISSIONARY</UnitType>
<UnitMeshGroup>
<EarlyArtDefineTag>ART_DEF_UNIT_BUDDHIST_MISSIONARY_AFRICAN</EarlyArtDefineTag>
<LateArtDefineTag>ART_DEF_UNIT_BUDDHIST_MISSIONARY_AFRICAN</LateArtDefineTag>
<MiddleArtDefineTag>ART_DEF_UNIT_BUDDHIST_MISSIONARY_AFRICAN</MiddleArtDefineTag>
</UnitMeshGroup>
</StyleUnit>
<StyleUnit>
<UnitType>ART_DEF_UNIT_CONFUCIAN_MISSIONARY</UnitType>
<UnitMeshGroup>
<EarlyArtDefineTag>ART_DEF_UNIT_CONFUCIAN_MISSIONARY_AFRICAN</EarlyArtDefineTag>
<LateArtDefineTag>ART_DEF_UNIT_CONFUCIAN_MISSIONARY_AFRICAN</LateArtDefineTag>
<MiddleArtDefineTag>ART_DEF_UNIT_CONFUCIAN_MISSIONARY_AFRICAN</MiddleArtDefineTag>
</UnitMeshGroup>
</StyleUnit>
<StyleUnit>
<UnitType>ART_DEF_UNIT_TAOIST_MISSIONARY</UnitType>
<UnitMeshGroup>
<EarlyArtDefineTag>ART_DEF_UNIT_TAOIST_MISSIONARY_AFRICAN</EarlyArtDefineTag>
<LateArtDefineTag>ART_DEF_UNIT_TAOIST_MISSIONARY_AFRICAN</LateArtDefineTag>
<MiddleArtDefineTag>ART_DEF_UNIT_TAOIST_MISSIONARY_AFRICAN</MiddleArtDefineTag>
</UnitMeshGroup>
</StyleUnit>


The regular African flavour (settler, worker, warrior etc.) units worked ok, and the art defines file is the same as always but heres one for example:

Spoiler XML :
<UnitArtInfo>
<Type>ART_DEF_UNIT_HINDU_MISSIONARY_AFRICAN</Type>
<Button>,Art/Interface/Buttons/Units/Missionary_Hindu.dds,Art/Interface/Buttons/Unit_Resource_Atlas.dds,4,3</Button>
<fScale>0.46</fScale>
<fInterfaceScale>1.0</fInterfaceScale>
<bActAsLand>0</bActAsLand>
<bActAsAir>0</bActAsAir>
<NIF>Art/Units/Missionary/AFRICAN/Hindu/Hindu_Missionary_fx.nif</NIF>
<KFM>Art/Units/Missionary/Hindu/Hindu_Missionary.kfm</KFM>
<SHADERNIF>Art/Units/Missionary/AFRICAN/Hindu/Hindu_Missionary_fx.nif</SHADERNIF>
<ShadowDef>
<ShadowNIF>Art/Units/01_UnitShadows/UnitShadow.nif</ShadowNIF>
<ShadowAttachNode>BIP Pelvis</ShadowAttachNode>
<fShadowScale>0.8</fShadowScale>
</ShadowDef>
<fBattleDistance>0.35</fBattleDistance>
<fRangedDeathTime>0.31</fRangedDeathTime>
<bActAsRanged>0</bActAsRanged>
<TrainSound>AS2D_UNIT_BUILD_UNIT</TrainSound>
<AudioRunSounds>
<AudioRunTypeLoop/>
<AudioRunTypeEnd/>
</AudioRunSounds>
</UnitArtInfo>


I have all the correct files in the folder structure and everything. I'm considering just for those units that I will have to make it the old way.
 
In <UnitType> you need to put the Type of the unit not its ArtDef, for example UNIT_JEWISH_MISSINARY as its defined on the UnitInfos.xml, thus your getting the mis-indexing I suspected
 
Is it possible to modularize Civ4PromotionInfos.xml? In my house mod I:

1) Copied over the full BTS Civ4PromotionInfos
2) Removed all entries but Intercept 1, Intercept 2, and Sentry
3) Changed the schema in the file header to my mod's unit schema
4) Fixed the Intercept 1 and Intercept 2 bug where it stated it could be given to air units.
5) Removed naval units from Sentry's UnitCombats
6) Copy-pasted the entire Sentry promotion
7) Changed the Type of the new promotion to PROMOTION_NAVALSENTRY
6) Increased the sight range to 2 and restricted it to naval units

This worked ok before BTS, the problems I encountered now were:
- Sentry available to scouts right away without prereqs
- Looking at Scouts in the Civilopedia, it showed Combat I as the only available promotion. When I clicked Combat I, it showed all the proper unit types, then I clicked Archers and the game crashed to desktop without an error message.

Here's the first entry in my file:
Spoiler :
Code:
		<PromotionInfo>
			<Type>PROMOTION_SENTRY</Type>
			<Description>TXT_KEY_PROMOTION_SENTRY</Description>
			<Sound>AS2D_IF_LEVELUP</Sound>
			<LayerAnimationPath>NONE</LayerAnimationPath>
			<PromotionPrereq>NONE</PromotionPrereq>
			<PromotionPrereqOr1>PROMOTION_FLANKING1</PromotionPrereqOr1>
			<PromotionPrereqOr2>PROMOTION_COMBAT3</PromotionPrereqOr2>
			<TechPrereq>NONE</TechPrereq>
			<StateReligionPrereq>NONE</StateReligionPrereq>
			<bLeader>0</bLeader>
			<bBlitz>0</bBlitz>
			<bAmphib>0</bAmphib>
			<bRiver>0</bRiver>
			<bEnemyRoute>0</bEnemyRoute>
			<bAlwaysHeal>0</bAlwaysHeal>
			<bHillsDoubleMove>0</bHillsDoubleMove>
			<bImmuneToFirstStrikes>0</bImmuneToFirstStrikes>
			<iVisibilityChange>1</iVisibilityChange>
			<iMovesChange>0</iMovesChange>
			<iMoveDiscountChange>0</iMoveDiscountChange>
			<iAirRangeChange>0</iAirRangeChange>
			<iInterceptChange>0</iInterceptChange>
			<iEvasionChange>0</iEvasionChange>
			<iWithdrawalChange>0</iWithdrawalChange>
			<iCargoChange>0</iCargoChange>
			<iCollateralDamageChange>0</iCollateralDamageChange>
			<iBombardRateChange>0</iBombardRateChange>
			<iFirstStrikesChange>0</iFirstStrikesChange>
			<iChanceFirstStrikesChange>0</iChanceFirstStrikesChange>
			<iEnemyHealChange>0</iEnemyHealChange>
			<iNeutralHealChange>0</iNeutralHealChange>
			<iFriendlyHealChange>0</iFriendlyHealChange>
			<iSameTileHealChange>0</iSameTileHealChange>
			<iAdjacentTileHealChange>0</iAdjacentTileHealChange>
			<iCombatPercent>0</iCombatPercent>
			<iCityAttack>0</iCityAttack>
			<iCityDefense>0</iCityDefense>
			<iHillsAttack>0</iHillsAttack>
			<iHillsDefense>0</iHillsDefense>
			<iKamikazePercent>0</iKamikazePercent>
			<iRevoltProtection>0</iRevoltProtection>
			<iCollateralDamageProtection>0</iCollateralDamageProtection>
			<iPillageChange>0</iPillageChange>
			<iUpgradeDiscount>0</iUpgradeDiscount>
			<iExperiencePercent>0</iExperiencePercent>
			<TerrainAttacks/>
			<TerrainDefenses/>
			<FeatureAttacks/>
			<FeatureDefenses/>
			<UnitCombatMods/>
			<DomainMods/>
			<TerrainDoubleMoves/>
			<FeatureDoubleMoves/>
			<UnitCombats>
				<UnitCombat>
					<UnitCombatType>UNITCOMBAT_RECON</UnitCombatType>
					<bUnitCombat>1</bUnitCombat>
				</UnitCombat>
				<UnitCombat>
					<UnitCombatType>UNITCOMBAT_MOUNTED</UnitCombatType>
					<bUnitCombat>1</bUnitCombat>
				</UnitCombat>
				<UnitCombat>
					<UnitCombatType>UNITCOMBAT_HELICOPTER</UnitCombatType>
					<bUnitCombat>1</bUnitCombat>
				</UnitCombat>
			</UnitCombats>
			<HotKey/>
			<bAltDown>0</bAltDown>
			<bShiftDown>0</bShiftDown>
			<bCtrlDown>0</bCtrlDown>
			<iHotKeyPriority>0</iHotKeyPriority>
			<Button>,Art/Interface/Buttons/Promotions/Sentry.dds,Art/Interface/Buttons/Promotions_Atlas.dds,5,6</Button>
		</PromotionInfo>

I attached the full file.
 

Attachments

Question: is it possible to link the early, middle, and late artdefinetags to other era's then currently? Now for instance the late artdefinetags kick in with the industrial era. Can it in xml be linked to say the modern era?

On further thought, this might be important for mods who create their own era system, unrelated to the civ4 one.

If I'm not clear, I'm asking for the tags in the code-snippet below:

Spoiler :
<EarlyArtDefineTag>ART_DEF_UNIT_ARCHER_EURASIAN</EarlyArtDefineTag>
<LateArtDefineTag>ART_DEF_UNIT_ARCHER_EUROPEAN</LateArtDefineTag>
<MiddleArtDefineTag> ART_DEF_UNIT_ARCHER_EUROPEAN </MiddleArtDefineTag>
</UnitMeshGroup>
 
Back
Top Bottom