Civ4 BtS Art Definition Checker

isenchine

Empress
Joined
Oct 18, 2010
Messages
1,774
Location
Brussels, Belgium
:king: On this day of my coronation as an Emperor, I grant you this, fellow mortals: a mod which is not a mod, a mod component which is not a mod component but rather is a "mod utility".

It will check if you have unused or missing art definitions.

Python code: platyping

Idea: isenchine

DOWNLOAD

9 Sept. 2014: please note that platyping has rewritten the code and it is now included in his Platy UI: see this post in his thread. His code was adopted here too as a standalone component.

This utility is presented as a separate (small) mod: ArtDefChecker.
Install it as any other mod in the folder C:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword\Mods or whatever works for you.

Important: you will have to edit with a text editor the python file ArtDefChecker.py located in the Assets/Python/Screens folder. In it, near the top, you will find further instructions how to include your mod's files in the review.

Then load BtS, load ArtDefChecker, start a game on a tiny map (it really doesn't matter) or simply double click on the ArtDefChecker.CivBeyondSwordSave file included!

When the game is loaded and you are on the main screen of the game, press the 'Ctrl Key' and the 'F9 Key' together to start the checking. A special screen will appear with a dropdown menu containing 2 options, UNUSED ART_DEF or MISSING ART_DEF. That's it.

Fortunately, you should see nothing in the 'MISSING ART_DEF' section, otherwise your game should crash on you sooner or later.

The 'UNUSED ART_DEF' tells you that you could clean up a bit the ART_DEF file if you want. It is not mandatory.

CAUTION: the ART_DEF_UNIT_SIEGE_TOWER is an exception as it is the only ART_DEF_UNIT called by the dll, not by the xml. It will appear wrongly in the list of 'UNUSED ART_DEF' but do not delete it or crash guaranteed!

The missing art is not covered by this utility. For that, use the tool CivChecker by davidlallen.

Why did I do it like that?: because to check the code, I deleted an ART_DEF in my own mod and the game crashed while loading leaving me without access to this screen! :D

Ideally, this should be an EXE running outside the game but I simply don't have the skills to do so. Do I see somebody volunteering? :goodjob:
 
Rather than writing warning here about the siege tower which most people will just read and forget, or don't bother reading at all, you might as well tell the code to ignore it.
 
Nice, you may have solved my crash isenchine. But i'm not sure what to do now.
Civ4ScreenShot0000.JPG

The unit is nowhere to be found. :confused::confused::confused:
 
go to the file -
unitinfo.xml -
youll fine that you have an entry of that art line - but you have none in the civunitart.xml under xml/art.

the games looks for an art, and its not there.

told you your crash is art :)


and again,
isenchine, you are superb.

Yes i understood that. But it isn't there. That's the weird thing. I was really happy when it found a missing art file. But now i'm confused.
 
It would be helpful to point out directly which is the unit using that art define.
And rather than 3 different screens, one would be enough with a dropdown menu to alter between units, buildings etc.
 
Nice, you may have solved my crash isenchine. But i'm not sure what to do now.
View attachment 382160

The unit is nowhere to be found. :confused::confused::confused:

The text is misleading - see improved version by Platy.

This said, it comes from the file CIV4UnitArtStyleTypeInfos.xml in the XML/Civilizations folder. It is the replacement art for NONE unit (!) for the UNIT_ARTSTYLE_GREENLANDIC which is attributed to every civilization except for the Barbarians! Quite an heresy! :nuke:
 
I have no idea what was the idea behind that UNIT_ARTSTYLE_GREENLANDIC. That file CIV4UnitArtStyleTypeInfos is there to give flavour style to same basic units. BtS is by region, some mods do it per country.

I would restore BtS file, give back European, Middle East, South America etc. unit styles to all civilizations and then specialise depending on units you have. For example, if you have art for Japanese destroyers, create a Japanese flavour etc. Look in the BtS file how it is done.

This said, this file is probably not the cause of your crash as otherwise the game would crash on any unit created.
 
Top Bottom