Pazyryk
Deity
- Joined
- Jun 13, 2008
- Messages
- 3,584
I figured this out in another thread with some kind help from others.
As an example, here's a screenshot from a game where I've modmodded Queen of the Iceni to use Boudica as a leaderhead image (rather than Elizabeth as is currently the case in version 3):
Two points to start with. First, this is really just a "workaround." I think there will be a more elegant solution in some patch or after modders get into the dll. Second, it's all or nothing, at least for now. You can have all 2D still images for all leaderheads, or all 3D animations, but not both in the same game.
Short version:
I'll use my modmoding of the Queen of the Iceni mod to illustrate the process. If you want to follow all the details, download that mod. Note that my walkthrough is based on Queen of Iceni (v 3), which uses Elizabeth for both 3D animation and 2D "fallback" art. If Kael fixes this to to use Boudica art, then some of the details will be wrong even though the walkthrough should still make sense.
Step 1. Go into your GraphicsSettingsDX11.ini (should be somewhere like ...\Documents\My Games\Sid Meier's Civilization 5) and make and save this change:
Now I'm not sure whether a mod can change graphic settings. (If someone knows, please post.) For now, unfortunately, if your mod uses 2D leaderheads then you will have to instruct the mod user to do the step above.
If you just want to change 3D animations to 2D stills for base Civ5 leaders, you're done.
If you want to make Queen of Iceni use the Boudica image, then you need to make some changes.
Open up Leader_Boudica.xml (in MODS/Queen of Iceni (v 3)/XML/Leaders/). You'll see that ArtDefineTag is currently set to Elizabeth_scene.xml. This tells the game where to get both the 3D animation (when UseScreenShots = 1) and the 2D still image (when UseScreenShots = 1). If you search for Elizabeth_scene.xml, however, you won't find it unless you've "unpacked the PAK." Here's how to unpack the PAK (note: this will take a while and you don't need to do for our present purposes):
If you do this, you can now find Elizabeth_scene.xml (on my machine it's at C:\Program Files\Steam\steamapps\common\sid meier's civilization v\resource\Common). If you didn't, it doesn't matter because here are it's contents in full:
The important piece for our purposes is FallbackImage="Elizabeth.dds". This is telling the base game where to get the 2D still image when UseScreenShots = 1. In Queen of Iceni (v 3), ArtDefineTag (in Leader_Boudica.xml) points to Elizabeth_scene.xml, which points to both Elizabeth 3D animation and Elizabeth 2D still image. So here's how to fix this situation...
First, go into Leader_Boudica.xml and change ArtDefineTag to Boudica_scene.xml.
Second, you need a functioning Boudica_scene.xml file. You will notice that the mod already has a Boudica_scene.xml file that has a single line in it. As far as I can tell, the mod as it is (version 3) doesn't use this file at all (I don't think anything references it) and it won't work anyway (as it is). What I did is copy the entire contents of Elizabeth_scene.xml (you can copy from my code block above) into Boudica_scene.xml. Then make one change: make FallbackImage="Boudica.dds".
That's all you need to change. The mod already "knows about" Boudica_scene.xml and Boudica.dds. You can see this if you look in Queen of the Iceni (v 3).modinfo. So if you are adding a new leader, you will need to create a new leader_scene.xml file and a new leader.dds image (use GIMP and instructions found in other threads). You don't need to add them to "Actions" or "Contents" but, after you build your mod, you might want to check to see that they are listed under files in your mod's .modinfo file.
Image Stretching issue
One thing that I've noticed after playing with this is that the game engine will stretch (or shrink, I think) the .dds image to the max available space (your screen X or Y limit, whichever it hit first) filling in the side or top-bottom gaps with black. That can look pretty bad if you start with a 600x600 image. The best you can do in this situation is embed the image in a big black frame. It's still annoying to me, however, because it's going to get re-sized for each user (depending on screen size) and I can't stop that. Maybe that's only annoying to me because I'm a stickler about image quality. I'm sure the dll will get modded eventually to give full control to the modder (so, for example, you could have more modest size leader images that don't fill up the whole screen as in civ4).
As an example, here's a screenshot from a game where I've modmodded Queen of the Iceni to use Boudica as a leaderhead image (rather than Elizabeth as is currently the case in version 3):
Spoiler :
Short version:
- To see 2D leaderheads (and only 2D leaderheads), you have to set UseScreenShots = 1 in GraphicsSettingsDX11.ini. If your mod uses 2D leaderheads, then you are just going to have to tell the mod-user to do this. (Yes, that sucks. But that is the case unless someone tells me that a mod can alter graphic settings.) [Edit: from Kruelgor below, if the player uses DX9 then there is no need for this change.]
- Add your leaderhead 2D art (as a leader.dds image; see note on image stretching at the bottom of this post).
- Set ArtDefineTag for your leader to "leader_scene.xml".
- Create "leader_scene.xml" in your mod by copying an existing one or my code block below (copied from Elizabeth_scene.xml). Change FallbackImage in this file to point to your leader's .dds image.
- That's it. You don't need to add leader_scene.xml or leader.dds to Actions, but you might want to check that they get listed in "files" in your modinfo file after you build.
I'll use my modmoding of the Queen of the Iceni mod to illustrate the process. If you want to follow all the details, download that mod. Note that my walkthrough is based on Queen of Iceni (v 3), which uses Elizabeth for both 3D animation and 2D "fallback" art. If Kael fixes this to to use Boudica art, then some of the details will be wrong even though the walkthrough should still make sense.
Step 1. Go into your GraphicsSettingsDX11.ini (should be somewhere like ...\Documents\My Games\Sid Meier's Civilization 5) and make and save this change:
Code:
; Whether or not to use static screenshots of leaders (this is the default for min-spec machines)
UseScreenShots = 1
If you just want to change 3D animations to 2D stills for base Civ5 leaders, you're done.
If you want to make Queen of Iceni use the Boudica image, then you need to make some changes.
Open up Leader_Boudica.xml (in MODS/Queen of Iceni (v 3)/XML/Leaders/). You'll see that ArtDefineTag is currently set to Elizabeth_scene.xml. This tells the game where to get both the 3D animation (when UseScreenShots = 1) and the 2D still image (when UseScreenShots = 1). If you search for Elizabeth_scene.xml, however, you won't find it unless you've "unpacked the PAK." Here's how to unpack the PAK (note: this will take a while and you don't need to do for our present purposes):
Spoiler :
Start Nexus
Click Nexus tab
Click Script Browser
Select Extract PAK, then Run Script
Go get some coffee, read the newspaper for a while...
Click Nexus tab
Click Script Browser
Select Extract PAK, then Run Script
Go get some coffee, read the newspaper for a while...
Code:
<LeaderScene lights ="Elizabeth_Lights.gr2" camera="Elizabeth_Camera.fxsxml" MatteShadowTint="1.00" ColorKey="Elizabeth_COLORKEY.tga" cubemap_prefix ="Elizabeth" FallbackImage="Elizabeth.dds">
<HackLightSettings color="255,255,255" direction="-0.2,-0.99,-0.2" intensity="0.7" />
<BloomSettings max_width="9.07" scale="2.12" min="1.00" ></BloomSettings>
<LeaderObject model="English_Elizabeth.fxsxml"> </LeaderObject>
<BackgroundObject model="Elizabeth_Scene.fxsxml" ></BackgroundObject>
<BackgroundObject model="Elizabeth_Scene_VFX.fxsxml" ></BackgroundObject>
</LeaderScene>
First, go into Leader_Boudica.xml and change ArtDefineTag to Boudica_scene.xml.
Second, you need a functioning Boudica_scene.xml file. You will notice that the mod already has a Boudica_scene.xml file that has a single line in it. As far as I can tell, the mod as it is (version 3) doesn't use this file at all (I don't think anything references it) and it won't work anyway (as it is). What I did is copy the entire contents of Elizabeth_scene.xml (you can copy from my code block above) into Boudica_scene.xml. Then make one change: make FallbackImage="Boudica.dds".
That's all you need to change. The mod already "knows about" Boudica_scene.xml and Boudica.dds. You can see this if you look in Queen of the Iceni (v 3).modinfo. So if you are adding a new leader, you will need to create a new leader_scene.xml file and a new leader.dds image (use GIMP and instructions found in other threads). You don't need to add them to "Actions" or "Contents" but, after you build your mod, you might want to check to see that they are listed under files in your mod's .modinfo file.
Image Stretching issue
One thing that I've noticed after playing with this is that the game engine will stretch (or shrink, I think) the .dds image to the max available space (your screen X or Y limit, whichever it hit first) filling in the side or top-bottom gaps with black. That can look pretty bad if you start with a 600x600 image. The best you can do in this situation is embed the image in a big black frame. It's still annoying to me, however, because it's going to get re-sized for each user (depending on screen size) and I can't stop that. Maybe that's only annoying to me because I'm a stickler about image quality. I'm sure the dll will get modded eventually to give full control to the modder (so, for example, you could have more modest size leader images that don't fill up the whole screen as in civ4).