Help using flame feature nif file from FFH2

euskingc

Chieftain
Joined
Oct 22, 2008
Messages
72
Hello Folks,

I'm trying to import the flame feature from FFH2 into my mod, with no luck, the flame just won't display.


The button works.
The sound works.
The text works.
It even functions properly (damages units, reduces yield, etc)

But it's invisible.

No matter what I seem to try, I can't get it to appear. Now, it seems to me they just took the goody hut model, and removed all the huts and rocks, left only the open flame, and blew it up 30 times the size. Code below. I've looked it over a half dozen times at least and I just can't spot anything wrong.

Or is there a limited number of features?


Spoiler :

<FeatureArtInfo>
<Type>ART_DEF_FEATURE_FLAMES</Type>
<bAnimated>1</bAnimated>
<bRiverArt>0</bRiverArt>
<TileArtType>TILE_ART_TYPE_NONE</TileArtType>
<LightType>LIGHT_TYPE_SUN</LightType>
<fScale>30.0</fScale>
<fInterfaceScale>1.0</fInterfaceScale>
<Button>Art/Interface/Buttons/TerrainFeatures/Flames.dds</Button>
<FeatureVariety>
<FeatureArtPieces>
<FeatureArtPiece>
<ModelFile>Art/Terrain/Features/Flames/tribalvillage.nif</ModelFile>
<Connections></Connections>
</FeatureArtPiece>
</FeatureArtPieces>
<FeatureDummyNodes/>
<bGenerateRotations>0</bGenerateRotations>
<VarietyButton>Art/Interface/Buttons/TerrainFeatures/Flames.dds</VarietyButton>
</FeatureVariety>
</FeatureArtInfo>
 
There is no limit to the number of features that I have discovered yet. You can only have one per tile. (In C2C we can sort of have more but it causes display issues.)

In our XML the ModelFile tag is inside the FeatureVariety tag. eg for storm

Code:
		<FeatureArtInfo>
			<Type>ART_DEF_FEATURE_STORM</Type>
			<bAnimated>1</bAnimated>
			<bRiverArt>0</bRiverArt>
			<TileArtType>TILE_ART_TYPE_NONE</TileArtType>
			<LightType>LIGHT_TYPE_SUN</LightType>
			<fScale>1.0</fScale>
			<fInterfaceScale>1.0</fInterfaceScale>
			<Button>Art/Interface/Buttons/TechTree/weather_control.dds</Button>
			<FeatureVariety>
				<FeatureArtPieces>
					<FeatureArtPiece>
						<ModelFile>Art/Effects/sunami/Sunami.nif</ModelFile>
						<Connections/>
					</FeatureArtPiece>
				</FeatureArtPieces>
				<FeatureDummyNodes/>
				<bGenerateRotations>0</bGenerateRotations>
				<VarietyButton>Art/Interface/Buttons/TechTree/weather_control.dds</VarietyButton>
			</FeatureVariety>
		</FeatureArtInfo>

Ignore that I misread your XML
 
Are you sure you then correctly pointed to that ART_DEFINE in CIV4FeatureInfos.xml? If it were pointing to incorrect file, you'd get an error (a red sphere). If it's invisible, can it be that it currently just doesn't have any art assigned?
 
Could the .nif file possibly be referencing a texture that isn't where it's supposed to be?

I've checked the flame in the firepit in the normal goody hut, and it's working properly, but the blown up version just doesn't seem to want to. It works fine in the FFH2 mod, but as soon as I bring it over.. nope.
=)

I've checked it over a dozen times and my eyes just don't see any error. No pink, just invisible.

Spoiler :
<FeatureInfo>
<Type>FEATURE_FLAMES</Type>
<Description>TXT_KEY_FEATURE_FLAMES</Description>
<Civilopedia>TXT_KEY_FEATURE_FLAMES_PEDIA</Civilopedia>
<ArtDefineTag>ART_DEF_FEATURE_FLAMES</ArtDefineTag>
<YieldChanges>
<iYieldChange>-3</iYieldChange>
<iYieldChange>-3</iYieldChange>
<iYieldChange>-3</iYieldChange>
</YieldChanges>
<RiverYieldChange/>
<HillsYieldChange/>
<iMovement>2</iMovement>
<iSeeThrough>1</iSeeThrough>
<iHealthPercent>-25</iHealthPercent>
<iDefense>-25</iDefense>
<iAppearance>0</iAppearance>
<iDisappearance>5000</iDisappearance>
<iGrowth>0</iGrowth>
<iTurnDamage>-25</iTurnDamage>
<bNoCoast>0</bNoCoast>
<bNoRiver>0</bNoRiver>
<bNoAdjacent>0</bNoAdjacent>
<bRequiresFlatlands>0</bRequiresFlatlands>
<bRequiresRiver>0</bRequiresRiver>
<bAddsFreshWater>0</bAddsFreshWater>
<bImpassable>0</bImpassable>
<bNoCity>0</bNoCity>
<bNoImprovement>0</bNoImprovement>
<bVisibleAlways>0</bVisibleAlways>
<bNukeImmune>0</bNukeImmune>
<OnUnitChangeTo/>
<TerrainBooleans>
<TerrainBoolean>
<TerrainType>TERRAIN_GRASS</TerrainType>
<bTerrain>1</bTerrain>
</TerrainBoolean>
<TerrainBoolean>
<TerrainType>TERRAIN_PLAINS</TerrainType>
<bTerrain>1</bTerrain>
</TerrainBoolean>
<TerrainBoolean>
<TerrainType>TERRAIN_TUNDRA</TerrainType>
<bTerrain>1</bTerrain>
</TerrainBoolean>
<TerrainBoolean>
<TerrainType>TERRAIN_ASH</TerrainType>
<bTerrain>1</bTerrain>
</TerrainBoolean>
<TerrainBoolean>
<TerrainType>TERRAIN_WASTELAND</TerrainType>
<bTerrain>1</bTerrain>
</TerrainBoolean>
<TerrainBoolean>
<TerrainType>TERRAIN_LAVAFIELD</TerrainType>
<bTerrain>1</bTerrain>
</TerrainBoolean>
<TerrainBoolean>
<TerrainType>TERRAIN_SNOW</TerrainType>
<bTerrain>1</bTerrain>
</TerrainBoolean>
</TerrainBooleans>
<FootstepSounds>
<FootstepSound>
<FootstepAudioType>FOOTSTEP_AUDIO_HUMAN</FootstepAudioType>
<FootstepAudioScript>AS3D_UN_FOOT_UNIT_MUD</FootstepAudioScript>
</FootstepSound>
<FootstepSound>
<FootstepAudioType>FOOTSTEP_AUDIO_HUMAN_LOW</FootstepAudioType>
<FootstepAudioScript>AS3D_UN_FOOT_UNIT_LOW_MUD</FootstepAudioScript>
</FootstepSound>
<FootstepSound>
<FootstepAudioType>FOOTSTEP_AUDIO_ANIMAL</FootstepAudioType>
<FootstepAudioScript>AS3D_UN_ANIMAL_FOOT_LARGE_MUD</FootstepAudioScript>
</FootstepSound>
<FootstepSound>
<FootstepAudioType>FOOTSTEP_AUDIO_ANIMAL_LOW</FootstepAudioType>
<FootstepAudioScript>AS3D_UN_ANIMAL_FOOT_LARGE_LOW_MUD</FootstepAudioScript>
</FootstepSound>
<FootstepSound>
<FootstepAudioType>FOOTSTEP_AUDIO_HORSE</FootstepAudioType>
<FootstepAudioScript/>
</FootstepSound>
<FootstepSound>
<FootstepAudioType>LOOPSTEP_WHEELS</FootstepAudioType>
<FootstepAudioScript/>
</FootstepSound>
<FootstepSound>
<FootstepAudioType>ENDSTEP_WHEELS</FootstepAudioType>
<FootstepAudioScript/>
</FootstepSound>
<FootstepSound>
<FootstepAudioType>LOOPSTEP_WHEELS_2</FootstepAudioType>
<FootstepAudioScript/>
</FootstepSound>
<FootstepSound>
<FootstepAudioType>ENDSTEP_WHEELS_2</FootstepAudioType>
<FootstepAudioScript/>
</FootstepSound>
<FootstepSound>
<FootstepAudioType>LOOPSTEP_TANK</FootstepAudioType>
<FootstepAudioScript/>
</FootstepSound>
<FootstepSound>
<FootstepAudioType>ENDSTEP_TANK</FootstepAudioType>
<FootstepAudioScript/>
</FootstepSound>
<FootstepSound>
<FootstepAudioType>LOOPSTEP_MOD_ARMOUR</FootstepAudioType>
<FootstepAudioScript/>
</FootstepSound>
<FootstepSound>
<FootstepAudioType>ENDSTEP_MOD_ARMOUR</FootstepAudioType>
<FootstepAudioScript/>
</FootstepSound>
<FootstepSound>
<FootstepAudioType>LOOPSTEP_ARTILLERY</FootstepAudioType>
<FootstepAudioScript/>
</FootstepSound>
<FootstepSound>
<FootstepAudioType>ENDSTEP_ARTILLERY</FootstepAudioType>
<FootstepAudioScript/>
</FootstepSound>
</FootstepSounds>
<WorldSoundscapeAudioScript>ASSS_FIRE_SELECT_AMB</WorldSoundscapeAudioScript>
<EffectType>NONE</EffectType>
<iEffectProbability>0</iEffectProbability>
<iAdvancedStartRemoveCost>0</iAdvancedStartRemoveCost>
</FeatureInfo>


<FeatureArtInfo>
<Type>ART_DEF_FEATURE_FLAMES</Type>
<bAnimated>1</bAnimated>
<bRiverArt>0</bRiverArt>
<TileArtType>TILE_ART_TYPE_NONE</TileArtType>
<LightType>LIGHT_TYPE_SUN</LightType>
<fScale>30.0</fScale>
<fInterfaceScale>1.0</fInterfaceScale>
<Button>Art/Interface/Buttons/TerrainFeatures/Flames.dds</Button>
<FeatureVariety>
<FeatureArtPieces>
<FeatureArtPiece>
<ModelFile>Art/Terrain/Features/Flames/tribalvillage.nif</ModelFile>
<Connections></Connections>
</FeatureArtPiece>
</FeatureArtPieces>
<FeatureDummyNodes/>
<bGenerateRotations>0</bGenerateRotations>
<VarietyButton>Art/Interface/Buttons/TerrainFeatures/Flames.dds</VarietyButton>
</FeatureVariety>
</FeatureArtInfo>


And the file path, where the art is located, copied and pasted to be sure I'm not making any errors, is:
Sid Meier's Civilization 4\Beyond the Sword\Mods\Silmarillion\Assets\Art\Terrain\Features\Flames
and tribalvillage.nif is in there, the same one I borrowed.
 
Ay, that was indeed missing from the release...
I've re-included it but still no change.
Though I should mention at one point, as a test, I had dumped the entire contents of the ffh2 art folder (including unpacked stuff from the pak) into my own folder to see if it made it a difference. It made none. Still no flame.

At this point I'm just reaching... and I can't understand why it would... but if the xml is intact, and ALL of the art was present... could it have possibly been python or sdk change related?
 
Well, I've made some changes that still give a flame, to 80% satisfactory result.

When it comes to .nif files, I know just enough to be dangerous, I'm afraid.


I deleted the whole of the contents of the flame folder that I and ffh2 were using, and simply replaced it with the contents of the Art/Effects/Flames folder, and used the fx_fire_campfire.nif instead, modified the xml accordingly, and I now have working flames. So thank you both again!
I wouldn't have thought to try it that way otherwise. I don't know that it's identical to what you see in ffh2, but, hey, it'll do.

The 20% problem lies here, however:
Both the fx_fire_campfire.nif and the fx_cities_irradiated.nif files use the fx_fire_glow.dds file located in art/shared. But I intentionally broke the fx_fire_glow.dds file so I could use fx_cities_irradiated.nif as a shadowy seas feature. Since the glowing is broken, the shadowy seas work properly, but the Flames feature doesn't have the glow it should, just the flames.

(If I can figure out what I'm doing, I'd eventually like to make a working blackish-greyish "glow" .dds to make the blackvapours of angband and nan dungortheb... but for now what I have, the same as the shadowy seas, will do)

Now I've tried moving the original fx_fire_glow.dds into the same folder as the new fx_fire_campfire.nif, but it seems intent on getting the .dds file from the shared folder, so I opened the fx_fire_campfire.nif with nifscope, clicked on the little coloured gear-looking thing beside the relvant fx_fire_glow.dds texture, and set the file path so it uses the file in its own folder rather than the shared folder, and then hit save as, and closed it.
I had hoped that would work, but anytime I've tried doing anything of the sort with nifscope in the past, it simply hasn't worked, and has acted like the (redefined/new-file-path-)texture didn't exist. Or put another way, it simply ignores my orders to look for the texture in the specified place, but 'runs home to momma' and goes ahead and gets it from wherever it was getting it from in the first place.
As I mentioned, I know just enough to be dangerous, so is there something in this process that I'm missing?


EDIT:
So, I've noticed that no matter where you tell the accursed .nif to get the dds file from, if it can get an identically named file from the shared folder instead, it ignores me and does that. I don't know why, but it does. But if instead of telling it to take a file of the same name from somewhere OTHER than the shared folder, I actually change the file name to something that doesn't exist in shared, and tell it to find that in a specific location, well then it can't find what it's looking for in shared, cant run home to momma, so it finally listens to me and looks where I tell it to. So odd.

So in practice, I renamed the broken fx_fire_glow.dds to fx_fire_glow_grey.dds, put it in the shadowy seas folder, and told the nif to take the texture from it's own folder (as usual), but yep, since the name is changed to something other than a file that exists in the shared folder, it seems to work.
And so now I can have my flames and shadowy seas too =)

But black vapours, not yet. I don't quite know how to darken the glow without breaking it and having the same effect as the shadowy seas. It was actually a broken attempt at that, that I'm using for the shadowy seas dds.
 
Top Bottom