Assinging different *nifs to improvements for different civilizations

tesb

Emperor
Joined
Jan 16, 2010
Messages
1,593
Ok i have a quick question, i tried to give the Infernals (Fall from Heaven Civilization) a different look for their workshops and lumbermills.

i therefore open up the CIV4PlotSystem.xml
there is already an entry for the mines:
Spoiler :

Code:
<ArtRef Name="goal:IMPROVEMENT_MINE">
			<Attribute Class="Improvement">IMPROVEMENT_MINE</Attribute>
			<Attribute Class="Artstyle">ARTSTYLE_INFERNAL</Attribute>
			<Attribute Class="Era">ERA_ALL</Attribute>
			<Attribute Class="Scalar">bIsPartOfImprovement:1</Attribute>
			<Attribute Class="Scalar">bApplyRotation:1</Attribute>
			<Attribute Class="Scalar">NIF:Art/Structures/Improvements/Mine/infernal_mine/undeadminingpost.nif</Attribute>
			<Attribute Class="Scalar"></Attribute>
		</ArtRef>


i go to the end of the specific LNode and add:

Spoiler :

Code:
<ArtRef Name="goal:IMPROVEMENT_WORKSHOP">
			<Attribute Class="Improvement">IMPROVEMENT_WORKSHOP</Attribute>
			<Attribute Class="Artstyle">ARTSTYLE_INFERNAL</Attribute>
			<Attribute Class="Era">ERA_ALL</Attribute>
			<Attribute Class="Scalar">bIsPartOfImprovement:1</Attribute>
			<Attribute Class="Scalar">bApplyRotation:1</Attribute>
			<Attribute Class="Scalar">NIF:Art/Structures/Improvements/Mine/infernal_mine/undeadminingpost.nif</Attribute>
			<Attribute Class="Scalar"></Attribute>
		</ArtRef>


i also add the workshop in the LProduction where the mines are:
Spoiler :

Code:
<LProduction From="PLOT_ROOT">
		<Attribute Class="Improvement">IMPROVEMENT_MINE,IMPROVEMENT_WINDMILL,IMPROVEMENT_FORT,IMPROVEMENT_WORKSHOP</Attribute>
		<Attribute Class="Bonus">BONUS_ALL</Attribute>
		<To Name="Node_12x12"/>
		<To Name="Leaf_LandImprovement_4x4"/>
	</LProduction>



and in an other LPoduction where the mines are too:

Spoiler :

Code:
<LProduction From="PLOT_ROOT" Name="LandImprovementProd">
		<Attribute Class="Improvement">IMPROVEMENT_MINE,IMPROVEMENT_WINDMILL,IMPROVEMENT_FORT,IMPROVEMENT_WORKSHOP</Attribute>
		<Attribute Class="Bonus">NO_BONUS</Attribute>
		<Attribute Class="Scalar">bNotBFS:1</Attribute>
		<To Name="Leaf_LandImprovement_4x4"/>
	</LProduction>




now if i start the game the workshop looks like the mine except that it is somehow twisted:
Spoiler :
attachment.php


anyways, i thought that might be minor since i wanted to use a different nif anyway, however when i use my nif the game would crash. funnily enough the nif would work if i just change it in the artdefines for the workshop improvement.
Spoiler :
attachment.php

doing this however will change the nif for every civilization and i don't want this.
 

Attachments

  • workshop1.jpg
    workshop1.jpg
    118.1 KB · Views: 157
  • workshop2.jpg
    workshop2.jpg
    146.2 KB · Views: 198
it should look like the regular mines. if you look at the first screenshot you will see that the wooden entrance of the "workshop" hovers in the air and is rotated for some reason, whereas the normal mines have a normal entrance.

the path has been correct, since it was the same i used in the second try for the art defines and there it worked, see the second screenshot.


edit: i somehow get the feeling that the CIV4PlotSystem.xml is not the only file that needs change.
 
thanks :)
i could not solve this issue, so i send Geomodder a PM. i hope he has the time and volition to help.

edit: the only workaround i see is to give them a unique improvement instead of those two, but this would be rather bad solution to this problem imho.
 
I read the pm.

The thing that strikes me as odd in the first two xml codes you posted is the empty "<Attribute Class="Scalar"></Attribute>" line in them, tesb. When I compare them with the normal mine improvement xml, I see that the animation (.kfm) code is missing. That might be the reason that the workshop link twists up.
What could be the reason (and probably is) that your mine works well, and your workshop not, is that the improvements have a 'basic' xml reference in assets/xml/art/civ4artdefines_improvement, where the civ4plotLsystem file is largely used for finetuning how the graphics show. Since you use the improvement_workshop tag for your own workshop (thus refer to the basic xml reference in artdefines, and fail to give a proper animation (.kfm) reference in plotLsystem, the game might try to use the workshop.kfm.

So I suggest you fill in the missing .kfm reference, and things could suddenly turn fine. :D
 
hm the problem is that the infernal mine entry i took has no kfm entry (see the first spoiler in the op) either, but the regular mine in the has one:
Spoiler :

Code:
<ImprovementArtInfo>
			<Type>ART_DEF_IMPROVEMENT_MINE</Type>
			<bExtraAnimations>0</bExtraAnimations>
			<fScale>1.0</fScale>
			<fInterfaceScale>1.0</fInterfaceScale>
			<NIF>Art/Structures/Improvements/Mine/Mine.nif</NIF>
			<KFM>Art/Structures/Improvements/Mine/Mine.kfm</KFM>
			<Button>Art/Interface/Buttons/Builds/mine2.dds</Button>
		</ImprovementArtInfo>

so it seems weird that this would be an issue. the second problem is that i have no kfm for that improvement since the animation are stored in the *.nif, for example the smoke is moving the lava is flowing and so on. i will try to either get some working kfm file or i try to delete the kfm of the regular workshop and see if it works.
 
If it doesn't work there's afaik two things more to keep in mind:

- Better create a new improvement tag for your workshop then.
- And tag it in the artdefines and all the PlotLSystem entries you already know of in your first post.

There's a good chance that improvements *need* an external .kfm though. I'm not completely sure, but I seem to remember that it was an issue in my work on the Cultural Diversity mod.
That's all I can think of.
 
ok i was able to fix it, my very thanks.
it was indeed the issue that the workshop had a *kfm while my workshop did not.
what i did:
i removed the *.kfm from the workshop in the artdefines and made a second entry in the CIV4PlotSystem.xml so all other civilizations would use the regular workshop and i added the *kfm of the regular workshop there, so the workshop will have an animation for those civilizations.

an other possibility i have thought of was to merge both *.nifs and just remove the regular workshop from it (just the model not the bones).
 
Back
Top Bottom