Call to arms: Figure out a way to get mods to pick up changes in ArtDefines

Nope. :(

Been taking time out to do some lua modding today. I'm getting SICK of all the roadblocks up wherever we go trying to mod anything. I'm actually bloody angry now. I almost feel like Firaxis are back at HQ going 'OH NO, THEY'VE MANAGED TO MOD X DESPITE ALL OUR EFFORTS TO STOP THEM'

My sentiments exactly. Once you dive deep enough into the modding you will realize that civ5 is in fact quite less moddable than civ4, everything is 10x more of a pain in the ass, and most of the things we actually want to do are impossible atm. Poo on firaxis. I probably wont even think about modding civ5 again for 6 months, just too much headache, not to mention its a pretty poor game atm anyways.
 
Shaun Seckman is the guy behind modbuddy, nexus etc, and since he doens't seem to visit the wiki for the last time, maybe we send him a message directly?

Only found him on facebook Moderator Action: Nice to know, but *snip*.
Maybe if somebody of you could write him some competent words :D
 
Shaun Seckman is the guy behind modbuddy, nexus etc, and since he doens't seem to visit the wiki for the last time, maybe we send him a message directly?

Only found him on facebook Moderator Action: Nice to know, but *snip*.
Maybe if somebody of you could write him some competent words :D

I would say that contacting a developer on his personal Facebook page about a problem you're having with a modding tool is extremely inappropriate. While it is frustrating, you really just have to be patient. Think about how you would feel if a customer at your work contacted you in your personal life to complain about your work.
 
Shaun Seckman is the guy behind modbuddy, nexus etc, and since he doens't seem to visit the wiki for the last time, maybe we send him a message directly?

Only found him on facebook Moderator Action: Nice to know, but *snip*.
Maybe if somebody of you could write him some competent words :D

:lol::lol::lol::lol::lol: Stalk much? :lol::lol::lol:
 
You only have yourself to blame if anyone can see your personal info.

Agreed. He isn't the smartest to use his real-name on facebook, along with god knows how many other people, but that doesn't make poncratias's post less amusing to me.

I would like to steer the rest of this post back on topic but I think we have been pretty much shot down here. Good work on trying though guys. At least we got units to hold us over for a while :)
 
So, I have good news and I have bad news.

The good news is that you *can* easily mod wonders. The bad news is you can't do it through mods. The only way I've found to do it is to put the modified XML file in the Civ 5 install folder.

For example, I changed the Stonehenge wonder to use the Colossus model instead:

attachment.php


I did this by:
* Creating an XML file named civ5artdefines_wonders.xml that contains the following:
Code:
<?xml version="1.0" encoding="utf-8"?>
<WonderArtInfos xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Civ5ArtDefineSchemas_Wonders.xsd">
	<WonderArtInfo>
		<Type>STONEHENGE</Type>
		<WonderArtState state="Any">
			<fScale>0.05</fScale>
			<Granny>Assets/Buildings/Wonders/Colossus/Colossus.fxsxml</Granny>
		</WonderArtState>
	</WonderArtInfo>
        <!-- All of the other wonders found in the base game must also go into this file; otherwise they'll be invisible! -->
</WonderArtInfos>

* Placed the file in C:\Program Files (x86)\Steam\steamapps\common\sid meier's civilization v\resource\Common

* Restarted the game (it won't take effect unless you do this!)

I suspect Firaxis simply ran out of time to implement this for mods, but they'll likely do so soon so they can use it themselves.

It sucks that you can't do this through a "mod" per se, but at least it can be done.
 

Attachments

  • Civ5Screen0037.jpg
    Civ5Screen0037.jpg
    75.2 KB · Views: 463
That sounds promising but changing is one thing and adding something is another. Have you tried to add a new wonder(new art work) this way?
 
ok ok, maybe i was a little too frustrated and angry, maybe i got overwhelmed....^^
sometimes i just wanna run into fireaxis office and scream in their face "WTH DID U THINK???!!!"
but ok, i'll be nice and stay in my cave.

@topic
Yes, the way eviltypeguy is doing it works!
It basically overwrites the original artdefines files, which you can see via unpacking the fpk files.
You can also add new stuff and new art this way (at least in theory, haven't tried it out yet)!

Downsides:
As this is done by overwriting old stuff, you can use only ONE change at a time, unless you merge them together manually.

You can't make it as a mod-browser-mod, only manual install.
 
ok ok, maybe i was a little too frustrated and angry, maybe i got overwhelmed....^^
sometimes i just wanna run into fireaxis office and scream in their face "WTH DID U THINK???!!!"
but ok, i'll be nice and stay in my cave.

:lol: I think we all feel like this sometimes. We all have (using lemmy's words) hit roadblocks and it is very frustrating. I didn't mean to come off hostile towards you just to clear that up, I just thought it funny is all.

Back on topic though can you let us know when you try it out and post screenshots! Although ya maybe we can't do it through mod browser yet? but I would still love to replace a few things myself for the time being.
 
As this is done by overwriting old stuff, you can use only ONE change at a time, unless you merge them together manually.

Actually, I've just discovered it's even more annoying than that. Read on.

You can't make it as a mod-browser-mod, only manual install.

Right. So, the problem as far as I can tell from digging around in the game executables and DLLs with a hex editor, is that while they intended for their to be a reload system for landmarks and units, they never actually completely implemented the one for landmarks, and they don't appear to have one for wonders at all. Period.

From what I've determined, the game first checks for the individual XML files at startup in the resources/* directories and loads the information from them. Only if files don't exist, does it then look in the fpk archives and loads any information found in individual files in those same directories that use the same filenames.

This means you can only override the contents of an entire file -- not just part of it. It also means that my earlier example wouldn't work right. While it correctly overrides the art assets for the Stonehenge wonder, it also fails to define any of the graphics for the other Wonders, so when you build them, they're invisible :eek:

My bad. So what that would mean is that the civ5artdefines_wonders.xml you install would have to contain a copy of all the information found in the base game's civ5artdefines_wonders.xml plus any overrides and new wonders. I've verified that if you do that, then you can override a single Wonder and retain all the existing ones properly.

I believe sometime afterwards, the game calls cvWonderLibrary::ReloadAssets during startup which then calls cvWonderLibrary::BindAsset using the granny model specified in the XML as it initialises the graphics engine.

I've also confirmed that even if you use the debug panel to manually trigger a reload of landmarks or all assets, that changes to the civ5artdefines_wonders.xml aren't registered.

Now another important thing to realise is that landmarks have nothing to do with wonders. Landmarks are those little things that great people can build like the +5 culture landmark a great artist can build, or the manufactory the great engineer can build I believe.

Oh, and finally, the approach I mentioned for changing wonders above has the unfortunate effect of changing the standard single player game as well -- not just when you go through the mods menu. Yeah, that sucks too. Clearly this is just a part of the game Firaxis didn't have time to implement modding for properly.
 
I'd also like to note that my quick hack of changing which model was used for Stonehenge has another caveat. The game appears to place wonders using information found in the graphics file for the wonder. In other words, if you set Stonehenge to use the Colossus model, then if you build the Colossus in the same city, you won't see another Colossus model.

It's either that, or it binds the assets using the actual model file names internally, and won't display the same one twice.
 
Yes, you can add new wonders.

attachment.php


In your mod, create a file called wonders.xml that contains the following:

Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Created by ModBuddy on 10/30/2010 3:19:28 PM -->
<GameData>
	<Language_en_US>
		<Row Tag="TXT_KEY_BUILDING_BROADWAY">
			<Text>Broadway</Text>
		</Row>
	</Language_en_US>
	<Buildings>
		<Row>
			<Type>BUILDING_BROADWAY</Type>
			<BuildingClass>BUILDINGCLASS_BROADWAY</BuildingClass>
			<Cost>100</Cost>
			<Description>TXT_KEY_BUILDING_BROADWAY</Description>
			<Civilopedia>TXT_KEY_BUILDING_BROADWAY</Civilopedia>
			<Quote></Quote>
			<ArtDefineTag>BROADWAY</ArtDefineTag>
			<MaxStartEra>ERA_ANCIENT</MaxStartEra>
			<SpecialistType>SPECIALIST_ARTIST</SpecialistType>
			<GreatPeopleRateChange>2</GreatPeopleRateChange>
			<CultureRateModifier>100</CultureRateModifier>
			<NukeImmune>true</NukeImmune>
			<HurryCostModifier>-1</HurryCostModifier>
			<MinAreaSize>-1</MinAreaSize>
			<ConquestProb>100</ConquestProb>
			<Happiness>1</Happiness>
			<IconAtlas>BW_ATLAS_2</IconAtlas>
			<PortraitIndex>2</PortraitIndex>
			<WonderSplashImage>WonderConceptStonehedge.dds</WonderSplashImage>
			<WonderSplashAudio></WonderSplashAudio>
			<DisplayPosition>4</DisplayPosition>
		</Row>
	</Buildings>
	<BuildingClasses>
		<Row>
			<Type>BUILDINGCLASS_BROADWAY</Type>
			<DefaultBuilding>BUILDING_BROADWAY</DefaultBuilding>
			<Description>TXT_KEY_BUILDING_BROADWAY</Description>
			<MaxGlobalInstances>1</MaxGlobalInstances>
		</Row>
	</BuildingClasses>
</GameData>

An XML file named broadway.fxsxml must be created in the directory C:\Program Files (x86)\Steam\steamapps\common\sid meier's civilization v\resource\Common containing the following:

Code:
<Asset>
  <Mesh file="Eiffel_Tower.gr2" source="Max" />
  <Texture file="HB_EiffelTower_DIFF.dds" source="Max" />
  <Texture file="HB_EiffelTower_SREF.dds" source="Max" />
  <Texture file="Generic_Grey_8.dds" source="Max" />
  <DecisionTree file="Wonder_DecisionTree.ddtxml" source="Tool" />
</Asset>

An XML file named civ5artdefines_wonders.xml must be created in directory C:\Program Files (x86)\Steam\steamapps\common\sid meier's civilization v\resource\Common containing the following:

Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Created with Liquid XML Studio - FREE Community Edition 7.1.4.1284 (http://www.liquid-technologies.com) -->
<WonderArtInfos xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Civ5ArtDefineSchemas_Wonders.xsd">
	<!-- WONDER BROADWAY **************************************** -->
	<WonderArtInfo>
		<Type>BROADWAY</Type>
		<WonderArtState state="Any">
			<fScale>0.05</fScale>
			<Granny>broadway.fxsxml</Granny>
		</WonderArtState>
	</WonderArtInfo>
        <!-- remaining wonder art info data from original civ5artdefines_wonders.xml must go here; otherwise all other wonders will be invisible! -->
</WonderArtInfos>

The upside of this approach is that the new art you've defined for your wonder won't affect the normal single player game. The new wonder will only show up if the user activates your mod, since that's what actually adds the building data for the wonder to the game database.

The downside of this approach is that, through a significant amount of trial and error, I've determined that graphics files (.dds) and the xml "graphics" files (.fxsxml) for wonders can't be delivered in your mod. So if you have .gr2, .dds files, etc. they all have to be in C:\Program Files (x86)\Steam\steamapps\common\sid meier's civilization v\resource\Common at game startup since that's the point at which wonder graphics get loaded.
 

Attachments

  • broadway.jpg
    broadway.jpg
    74.2 KB · Views: 420
Well Firaxis just destroyed my first mod :(. Luckly I did only reskin. If I would model entirely new wonder probably it would be also the last mod for civ5 :(

Do all people get's similliar result when adding a wonder, hmm traditional way?
http://forums.civfanatics.com/showpost.php?p=9875771&postcount=19

Nope. :(

I'm getting SICK of all the roadblocks up wherever we go trying to mod anything. I'm actually bloody angry now. I almost feel like Firaxis are back at HQ going 'OH NO, THEY'VE MANAGED TO MOD X DESPITE ALL OUR EFFORTS TO STOP THEM'

That is also my point of view :(.
Luckly we have people like you, lemmy or Deliverator who did a lot of the job that should be done by Firaxis if they want to call civ5 THE MOST MODDABLE GAME!
Well civ2 was more moddable than civ5. And that's a shame for Firaxis.
 
Well Firaxis just destroyed my first mod :(. Luckly I did only reskin. If I would model entirely new wonder probably it would be also the last mod for civ5 :(

Do all people get's similliar result when adding a wonder, hmm traditional way?
http://forums.civfanatics.com/showpost.php?p=9875771&postcount=19

Yes, your city will go invisible if you attempt to use a mod to add a new wonder with a new set of graphics. The only approach that works (currently) is the one I've documented here.
 
OK thx, I'll try it in personal mod. I'll release simplified version without 3d graphics connected to mod.
 
From new patch release note:

- Fixed "Reload Landmark System" mod flag to now refresh landmarks defined in "ArtDefine_Landmarks".

Haven't tested yet but we should now be able to mod more than just unit graphics.
 
Yeah. Tomorrow, if time'll allow I'll try if adding graphics to map works.
 
Back
Top Bottom