1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Civ4 BtS Art Definition Checker

Discussion in 'Civ4 - Mod Components' started by isenchine, Sep 8, 2014.

  1. isenchine

    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:
     
  2. platyping

    platyping Sleeping Dragon

    Joined:
    Oct 22, 2010
    Messages:
    4,626
    Location:
    Emerald Dreams
    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.
     
  3. keldath

    keldath LivE LonG AnD PrOsPeR

    Joined:
    Dec 20, 2005
    Messages:
    6,366
    Location:
    israel
    god bless you isenchine .


    and platy ofc.
     
  4. skyfire

    skyfire Chieftain

    Joined:
    Jan 25, 2009
    Messages:
    283
    Location:
    Leeuwarden, Holland
    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:
     
  5. keldath

    keldath LivE LonG AnD PrOsPeR

    Joined:
    Dec 20, 2005
    Messages:
    6,366
    Location:
    israel
    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.
     
  6. skyfire

    skyfire Chieftain

    Joined:
    Jan 25, 2009
    Messages:
    283
    Location:
    Leeuwarden, Holland
    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.
     
  7. platyping

    platyping Sleeping Dragon

    Joined:
    Oct 22, 2010
    Messages:
    4,626
    Location:
    Emerald Dreams
    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.
     
  8. isenchine

    isenchine Empress

    Joined:
    Oct 18, 2010
    Messages:
    1,774
    Location:
    Brussels, Belgium
    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:
     
  9. skyfire

    skyfire Chieftain

    Joined:
    Jan 25, 2009
    Messages:
    283
    Location:
    Leeuwarden, Holland
    Yes there it is! It was already put there by the base modder of this mod dacubz.
    What should i do with this file?

    Thank you isenchine for this tool and the help and thanks to keldath for helping me searching for the crash
     
  10. isenchine

    isenchine Empress

    Joined:
    Oct 18, 2010
    Messages:
    1,774
    Location:
    Brussels, Belgium
    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.
     
  11. skyfire

    skyfire Chieftain

    Joined:
    Jan 25, 2009
    Messages:
    283
    Location:
    Leeuwarden, Holland
    Thanx. That's what i needed to know. Unfortunatly i have run out of ideas.
     
  12. Dumanios

    Dumanios MLG

    Joined:
    Oct 24, 2008
    Messages:
    4,874
    You are doing god's work.

    Great!
     

Share This Page