How to add customized graphics through a mod?

ambrox62

Emperor
Joined
Mar 24, 2005
Messages
1,294
I'm trying to add customized graphics (buildings) through a mod.
I've both a mod:
http://forums.civfanatics.com/downloads.php?do=file&id=16261
and gr2 buildings:
http://forums.civfanatics.com/downloads.php?do=file&id=16232
http://forums.civfanatics.com/downloads.php?do=file&id=16231
http://forums.civfanatics.com/downloads.php?do=file&id=16230
but I didn't find a way to link them togheter.
Basically, I didn't understand how to CiV graphics work and how to add new graphics.

I saw in the database a customized "trading post" improvement, but it doesn't use a mod (it overwrites original 2K files)
I also saw custom units which use a mod, and I did several attempts to replicate such mod architecture, but it doesn't work in game for my buildings.

Does anyone help me in such task?
 
A good question. I have some ideas about graphic convertions for Civ5 an tried to add some of them via mod, but failed so far. The game just ignores modified civ5artdifines_wonder.xml, for example.

Lets start with a "simple" question - does someone know how to change fScale of an existing wonder in mod?
 
tried to add some of them via mod, but failed so far

Do babylonians and incas add building arts to the game? I haven't these DLCs.
If they add building arts to the game, the answer may be there.
 
The game just ignores modified civ5artdifines_wonder.xml, for example.

In my test, city graphic disappear instead. CiV shows the terrain "under" the city. The city is still there, but without building art. I put the modded civ5artdefines_wonder.xml in the root of my mod, like I saw in the unit mods.
 
Lets start with a "simple" question - does someone know how to change fScale of an existing wonder in mod?

I tried all text below unsuccessfully.
I'm convincing myself that 2K doesn't want custom graphics in order to sell their DLCs
Every further attempts to mod graphics in CiV it's waste of time
Thanks Shafer; best wishes for your next job

Code:
<?xml version="1.0" encoding="utf-8"?>
<WonderArtInfos>
	<WonderArtInfo>
		<Update>
			<Set fScale="0.20"/>
			<Where Type="STONEHENGE"/>
		</Update>
	</WonderArtInfo>
</WonderArtInfos>


<?xml version="1.0" encoding="utf-8"?>
<WonderArtInfos>
	<WonderArtInfo>
		<WonderArtState state="Any">
			<Update>
				<Set fScale="0.20"/>
				<Where Type="STONEHENGE"/>
			</Update>
		</WonderArtState>
	</WonderArtInfo>
</WonderArtInfos>


<?xml version="1.0" encoding="utf-8"?>
<WonderArtInfos>
	<WonderArtInfo>
		<WonderArtState>
			<Update>
				<Set fScale="0.20"/>
				<Where Type="STONEHENGE"/>
			</Update>
		</WonderArtState>
	</WonderArtInfo>
</WonderArtInfos>
 
Do babylonians and incas add building arts to the game? I haven't these DLCs.
If they add building arts to the game, the answer may be there.

Babylon got Walls of Babylon as unique building. There are 2 xml files for arts:

wall_of_babylon.fxsxml
Code:
<Asset>
	<Mesh file="wall_of_Babylon.gr2"/>
	<Texture file="Wall_of_Babylon_DIFF.dds"/>
	<Texture file="Wall_of_Babylon_SREF.dds"/>
</Asset>

civ5artdefines_walls_babylon.xml
Code:
<?xml version="1.0" encoding="utf-8" ?>
<WallArtInfos>
  <WallArtInfo>
    <Type>ART_DEF_BUILDING_WALLS_OF_BABYLON</Type>
    <fScale>0.05</fScale>
    <Granny>Wall_of_Babylon.gr2</Granny>
  </WallArtInfo>
</WallArtInfos>
 
These files are quite different from the vanilla ones

The tag <WallArtInfos> is specific for the babylonian wall. Probably it's managed directly through the game code.

Since CiV release three months have gone.
Did anyone know a 2K official statement about how to add custom 3D graphic to the game?
 
It's conceivable that it isn't using custom game code, but instead determining the tag name from data files somewhere. However, I haven't been able to see where.
 
I tried working on this, too, as the civ4 Hungary mod I made contains pretty much buildings that I'd keep using for civ5 as well. However, I couldn't even convert the fbx to a granny file, not even with the IndieStoneNexusBuddy. It simply complained about missing animations. Adding empty ones didn't work either. I'd be happy if one of you could tell me - maybe by giving a short step-by-step guide - how to do this.

If they really don't want us to mod building art, they start to suck really. This whole game is currently at beta stadium at best, even after three patches or so. I have seen pretty primitive bugs when playing with my older brother through LAN. Seriously, I wouldn't have awaited that a released game suffers such bugs. Not to mention all this steam sh:):). I'm actually thinking about writing a guide how to play through internet without the use of steam. Not a big deal actually, but could help some people that are not that fit with computers, but could also be useful to users that have illegal copies, which is the reason why I didn't do it so far. Anyways, preventing us from modding building art would be pretty barefaced considering all the rubbish they forced us to do / use / suffer...
 
I'm actually thinking about writing a guide how to play through internet without the use of steam.

...er...you should ask for moderator approval before opening a thread about that...mmh...no, i advice you to do so.


@problem: I'm a bit confused here, why adding buildings doesn't work. At the end it should partially use the same routine like for adding units, and this works, right?
 
The whole problem stands on the shoulders of the RAD-Tools component Granny and *HOW* Firaxis created its own proprietary but still tricky gr2 format.

If some devs could simply come out and reveal what exactly they have altered to render these files completely uneditable or without any Import/Export support (straight forward documentation at best!)... then, anyone would be able to create entirely new models (in free Blender or heavily_gimmicky_costly 3dsMax, etc) for proper integration into CiV.

Seriously, i fully expected Nexus to become considerably more effective than it was (even after patch v1135) if only to allow true conversion processing. Plugins included.

In fact, i believe we were told quite clearly that this game would be a huge step ahead to allow great control by modders with some specific ModBuddy tools.
So far, it certainly lacks essential Modeling assets.
Paid for, i should add.
 
I found out how to export to gr2 using IndieStoneNexusBuddy - simply pressed the wrong buttons before. However, with the granny viewer from this page, I was able to view that gr2, so it seems the file is okay although civ5 might want something special about it. My problem was, that I couldn't find any file containing the art defs for the buildings so far. I guess that's what others were thinking about here, too. I found the xml containing the buildings infos, I found fxsxmls (or whatever) and I found files containing the artdefs for units and wonders. But no such artdefs for buildings yet... I used the wonders art defs, but the building didn't work. The building was listed in the civilopedia, but not in the citys buildlist. So I couldn't check the art actually, although I don't think it would work.

I'd be curious to see what others have done so far, it seemed to be hard to find any valuable info about this topic. Also, from what I heard, den is said to have found out how to get wonders into the game. If that's true, the gr2 format shouldn't be the problem anymore as I can't imagine they use different versions for buildings and wonders. Unfortunately, I was told that he doesn't share his knowledge. Don't know why.

Anyways, I'd appreciate it if people could put together whatever they found out. Similar to what they did in the leaderhead thread.
 
My problem was, that I couldn't find any file containing the art defs for the buildings so far. I guess that's what others were thinking about here, too. I found the xml containing the buildings infos, I found fxsxmls (or whatever) and I found files containing the artdefs for units and wonders. But no such artdefs for buildings yet... I used the wonders art defs, but the building didn't work. The building was listed in the civilopedia, but not in the citys buildlist. So I couldn't check the art actually, although I don't think it would work.

Currently you find building art defines into civ5artdefines_wonders.xml (harbour, lighthouse, stadium, ecc...)

As stated in the posts above, any attempts to introduce custom graphics or to modify the vanilla civ5artdefines_wonders.xml through a mod have failed
Imo, it isn't matter of nexusbuddy.
2k doesn't want that modders are able to manage CiV graphics. What Lemmy/Captain/Deliverator did with units in order to add them to the game, is a workaround far away from a standard modding process (replacing the original unit artdefines isn't modding imo).
I would expect a Kael-like tutorial by 2K to learn how to add custom graphics to CiV, but 2K (intentionally) didn't write it.
 
This version of NexusBuddy can be used to convert FBX into GR2 - there is no reason this can't be used to make Building or Wonder gr2s as well.

The continuing problem with getting 3D Wonders at the moment seems to be as follows...

If I have the following in civ5artdefines_wonders.xml, trying to get the 3D Maoi statues to work:

Code:
	<WonderArtInfo>
		<Type>MAOI</Type>
		<WonderArtState state="Any">
			<fScale>0.05</fScale>
			<Granny>Assets/Buildings/Wonders/Stonehenge/Stonehenge.fxsxml</Granny>
		</WonderArtState>
	</WonderArtInfo>
	<!-- WONDER STONEHENGE **************************************** -->
	<WonderArtInfo>
		<Type>STONEHENGE</Type>
		<WonderArtState state="Any">
			<fScale>0.05</fScale>
			<Granny>Assets/Buildings/Wonders/Stonehenge/Stonehenge.fxsxml</Granny>
		</WonderArtState>
	</WonderArtInfo>

... and <ArtDefineTag>MAOI</ArtDefineTag> in my mod Buildings xml then the Maoi wonder uses the Pyramid wonder correctly.

If I make a carbon copy of pyramid.fxsxml called moai.fxsxml and reference it like this:
Code:
	<WonderArtInfo>
		<Type>MAOI</Type>
		<WonderArtState state="Any">
			<fScale>0.05</fScale>
			<Granny>moai.fxsxml</Granny>
		</WonderArtState>
	</WonderArtInfo>


then all landmark graphics disappear on beginning to construct the wonder. This symptom is the same as if I enter junk in the Granny field and indicates that the game is not finding moai.fxsxml (not finding fxsxmls generally seems to lead to invisible graphics from what I've seen).

I'll attach my test 3D Maoi Statues mod to see if anyone can figure out. I'm pretty sure that if the fxsxml loading issue was resolved then the graphic would display OK. I have copied the structure of pyramid.gr2 when making maoi.gr2.

I've tried various configurations of the Import into VFS flags to no avail.
 

Attachments

is a workaround far away from a standard modding process (replacing the original unit artdefines isn't modding imo).

To be fair, there is no difference between the way modded Civ5 ArtDefines work and the way Civ4 ArtDefines work - you need to include the whole list in either case. The original artdefines is not replaced but over-riden just like in Civ 4.
 
In the Bablylonian Walls case the artdefines points direct to the gr2 file rather than the fxsxml. Perhaps that would work.

I'm still not sure I buy the fact that Firaxis is deliberately breaking mod support and then leaving it broken. Why would they put development time into Nexus if you don't want graphical modding? It seems more like dismal planning and organisation to me. Still, they need to do a lot more work if they want Civ5 to have the longevity Civ4 has had.
 
May it be that we are all searching in the wrong direction? When I worked on the hungarization of civ5 I found this tutorial: http://wiki.2kgames.com/civ5/index.php/Mods:AddingNewLanguage. Sure, there is no link between languages and buildings, but there is a more general aspect that might be true for both things. The tutorial mentions that one needs to create a new table for the new language. Now, I said I worked on the hungarization and using this tutorial in-deed worked for me (you just need to set the language to english before you edit the config btw...). However, before I found that tutorial, I worked in a similar direction by my own, but did not care for the table. From a civ4 modders view and from the view of the xml it seemed to me that any data needed were given even without the code for the new table. Could it be that we need to create similar tables to be able to add buildings? In this case, the log files should mention some hints. Unfortunately, I'm rather busy with RL right now, so I can't give it a go yet. Could be hard to find out what kind of table we would need, though...

Also, to ease our attempts, maybe someone could prepare a package that is garantueed to have nothing missing and that the art works so that we may have a save point to start at?
 
Back
Top Bottom