Add a new building and improvement with 3D model

danrell

Warlord
Joined
Jan 5, 2007
Messages
291
Location
Hong Kong
Request by Ekmek



Civ5 Test Improvement - Airfield
Download
--------------------------------------------------------------------------------------------------------------------------



Civ5 Test Wonder - Temple of Heaven
Download
--------------------------------------------------------------------------------------------------------------------------
I will try to write the tutorial to explain how to add the 3D model with my bad english... :(
 
 
Ok, I write the tutorial, please don't mind my bad english...

Frist, you need some tools and some blender's skill, then download the Civ5 3DModel Edit Toolpacks and install in this order :

01. Python 2.6.6
02. PyFFI 2.1.9
03. Blender 2.49b
04. Blender NIF Scripts 2.5.7.12
05. Blender Scripts PY Files
06. Indie Stone Nexus Buddy 0.5a
07. IndieStoneMaterialMaker
08. NifSkope 1.0.22
09. Gr2 Viewer 2.8.44.0
10. Adobe Photoshop DDS Plugin / another edit DDS program

*1-7 indispensable

Civ5 3DModel Edit Toolpacks
--- Part1 ---
--- Part2 ---
--- Part3 ---
--- Part4 ---
--- Part5 ---
--- Part6 ---
 
 
 

Attachments

  • Civ5 Test Improvement - Factory.rar
    486.3 KB · Views: 575
Now download the "Civ5 Test Improvement - Airfield" and "Civ5 Test Wonder - Temple of Heaven", unpack and put it into :
C:\Program Files (x86)\Steam\steamapps\common\sid meier's civilization v\Assets\DLC\Expansion\DLC\Expansion <------ add a new folder, must not be wrong

you can open the game and test it (not in mod), I set the prereq tech is AGRICULTURE, so you can test it when in turn 1.

1) 3D Model
Let me edit it, go to
C:\Program Files (x86)\Steam\steamapps\common\sid meier's civilization v\Assets\DLC\Expansion\DLC\Expansion\Test_Improvement\Airfield_Model
there are 2 era and 3 state improvements, 6 models, you need understand what is HB, PL, it's the name used of the 3D model's states
UnderConstruction=HB
Constructed=n\a
Pillaged=PL

Use these for template, create\convert a new model to replace it, for the example, I used the Factory.nif in attach files.

Open the Factory.nif with Nifskope, then export to .obj file


open the Airfield_Era1.blend and import the .obj file


make the proper position and scale it, like this


add the texture


then right click the airport and delete it


export to .FBX


export setting


Open Indie Stone Nexus Buddy 0.5a and import the .FBX file
press the add, chosse BuildingShader



following the next pic then press save gr2


change the name to "Factory_Era1" after save, we can open the Factory_Era1.gr2 with the gr2 viewer


find the "Airfield_Era1.fxsxml" rename it to "Factory_Era1.fxsxml" then open it with notes
and change this :
<Mesh file="Airfield_Era1.gr2" source="Max" /> ---> Factory_Era1.gr2

It's a simply and a quick way, you also can add the landmark, etc...
Now you can create the Factory_HB, Factory_PL, Era1, Era2, Era3..... and different angles, different art types, different civ types... This easier than make a unit.
I created 6 factories's model for next part, Era1_HB, Era1, Era1_PL, Era2_HB, Era2, Era2_PL.
(The wonder's step is same of the improvement.)

2) XML
I modified 5 XML files for improvement \ 3 XML files for Wonder,
you can use another way (SQL?) when you understand what I change.

improvement changed :
Civ5ArtDefines_Landmarks_Expansion.xml
Civ5ArtDefines_LandmarkTypes_Expansion.xml
CIV5Builds_Expansion.xml
CIV5Improvements_Expansion.xml
CIV5Units.xml

Wonder changed :
Civ5ArtDefines_Expansion_Wonders.xml
CIVBuildingClasses_Expansion.xml
CIV5Buildings_Expansion.xml

Open the files and search "test" , you can see what I changed.
In this case, you need change all "Airfield" to "Factory".

Explain some xml, open my Civ5ArtDefines_Landmarks_Expansion.xml

<LandmarkArtInfo>
<ImprovementType>ART_DEF_IMPROVEMENT_AIRFIELD</ImprovementType>
<ResourceType>ART_DEF_RESOURCE_ALL</ResourceType>
<Era>Ancient</Era>controlled the Era
<State>UnderConstruction</State>This controlled the States, 3 types and "any", so we can make 3 models to use this, but the wonder haven't this tag so I can't make the wonder have "under construction" states.
<fScale>1.0</fScale>
<FXSXML>Airfield_Era1_HB.fxsxml</FXSXML>This your 3D model name
<LayoutHandler>SNAPSHOT</LayoutHandler>There will be appear different types if set "RANDOM" e.g. BARBARIAN_CAMP, you can make different angles, different art types to use that.
<bTerrainContour>False</bTerrainContour>
</LandmarkArtInfo>

open my Civ5ArtDefines_Expansion_Wonders.xml

<WonderArtInfo>
<Type>TEMPLE OF HEAVEN</Type>
<WonderArtState state="Any">
<fScale>0.05</fScale>
<Granny>Temple_Of_Heaven.fxsxml</Granny>
</WonderArtState>
</WonderArtInfo>
It's very simply, only scale and the filename, I tried change the state="Any">, but nothing to change, so I think the wonder's state maybe controlled in 3D model...

I don't know whether to be detailed enough, if someone known more, welcome to completion it, thank you :)
&#12288;
&#12288;
 

Attachments

  • snap2745.jpg
    snap2745.jpg
    182.6 KB · Views: 14,082
  • snap2746.jpg
    snap2746.jpg
    190.6 KB · Views: 13,911
  • snap2747.jpg
    snap2747.jpg
    169.8 KB · Views: 13,874
  • snap2750.jpg
    snap2750.jpg
    157.4 KB · Views: 13,848
  • snap2748.jpg
    snap2748.jpg
    152.6 KB · Views: 13,872
  • snap2751.jpg
    snap2751.jpg
    265.5 KB · Views: 13,711
  • snap2757.jpg
    snap2757.jpg
    248.7 KB · Views: 13,482
  • snap2754.jpg
    snap2754.jpg
    140.3 KB · Views: 13,573
  • snap2755.jpg
    snap2755.jpg
    70.8 KB · Views: 13,506
  • Export Setting.jpg
    Export Setting.jpg
    56.3 KB · Views: 13,568
now Civ5 modding can take off :goodjob:
 
Yes!!!

One thing I want to do in my mod is to use some existing wonder art as plot improvements. It works except the "under construction"/"constructed" states are all messed up. I hope your tutorial will help me understand the states a little better.
 
Yes!!!

One thing I want to do in my mod is to use some existing wonder art as plot improvements. It works except the "under construction"/"constructed" states are all messed up. I hope your tutorial will help me understand the states a little better.

The improvements's "under construction"/"constructed" states are controlled in XML.
But the wonder's state is controlled in 3D model :confused:("under construction"/"constructed" states are in the same 3D model). I can't make the wonder have "under construction" states at this moment because I can't import the original .gr2 files.
 
The improvements's "under construction"/"constructed" states are controlled in XML.
But the wonder's state is controlled in 3D model :confused:("under construction"/"constructed" states are in the same 3D model). I can't make the wonder have "under construction" states at this moment because I can't import the original .gr2 files.

Thanks. So if I understand correctly, they can't be converted but have to be "made from scratch".
 
Looks like the first steps I had wanted to take: I can't do original 3D/animated work to save my life, although I've wanted to "mod in" several structures that don't fit the existing artdefines. Here's hoping your tutorial becomes avaiable soon. and that a graphics-newbie on a tight budget can use it reasonably well!
 
The improvements's "under construction"/"constructed" states are controlled in XML.
But the wonder's state is controlled in 3D model :confused:("under construction"/"constructed" states are in the same 3D model). I can't make the wonder have "under construction" states at this moment because I can't import the original .gr2 files.

when I looked at it a long long time ago it looked like the models were on top of each other but they had bones and somehow the animation turned one off when it needed to.
 
when I looked at it a long long time ago it looked like the models were on top of each other but they had bones and somehow the animation turned one off when it needed to.

So perhaps an expert could "dissect' the existing art asset and rebuild as an improvement? If I wasn't busy coding Lua (and soon C++) I'd try to learn this 3D art stuff.
 
So perhaps an expert could "dissect' the existing art asset and rebuild as an improvement? If I wasn't busy coding Lua (and soon C++) I'd try to learn this 3D art stuff.

Its fairly easy to extract the models from grany viewer. But I'd have to see if the textures aren't encrypted.

Which Wonders are you looking at adding?
 
Eventually I'll use almost all of the pre-Industrial ones for my Éa mod. If I had to prioritize a few I'd say Stonehenge, Oracle and Mausoleum of Halicarnassus.
 
Eventually I'll use almost all of the pre-Industrial ones for my Éa mod. If I had to prioritize a few I'd say Stonehenge, Oracle and Mausoleum of Halicarnassus.

Ok, and I'll do the windmill too. But I'm hoping danrell gets the rest of the tut out soon.
 
Moderator Action: Thread made sticky here, as it is both a tutorial and a graphics pack.
 
Open Indie Stone Nexus Buddy 0.5a and import the .obj file
press the add, chosse BuildingShader

Is it obj file or FBX? I didn't see obj mentioed before

Also the pictures aren't showing. I particularly need the one for building shader. I don't recall the option before :/
 
Top Bottom