Artdef and dep problems

imariot

Chieftain
Joined
Feb 6, 2017
Messages
2
Hey guys! Finally decided to make an account since im so frustrated haha.. anyways im trying to create a district type. I wrote the .xml and defined it within the game; It shows up and exists no problem. I created the icon.xml and put that in .modinfo file.... once again no issues. The artdef file is literally copy and paste (with the necessary opening and closing tags added) of DISTRICT_CAMPUS. the .dep doesnt seem to want to work. In the logs it says that the artwork was added, but when I build it... nothing. I feel that the issue is in the consumer name. I put Districts in this field and Districts.artdef below. The .artdef is fine because when I copy it into base code it runs. It has to be that d*mn consumername field... but idk thats why im here...
 
I'm just guessing from looking at the Poland DLC, but try this:

Code:
<?xml version="1.0" encoding="UTF-8" ?>
<AssetObjects::GameDependencyData>
    <ID>
        <name text="somename"/>
        <id text="someguid"/>
    </ID>
    <SystemDependencies>
        <Element>
            <ConsumerName text="StrategicView_Sprite"/>
            <ArtDefDependencyPaths>
                <Element text="Districts.artdef"/>
            </ArtDefDependencyPaths>
        </Element>
        <Element>
            <ConsumerName text="StrategicView_Translate"/>
            <ArtDefDependencyPaths>
                <Element text="Districts.artdef"/>
            </ArtDefDependencyPaths>
        </Element>
        <Element>
            <ConsumerName text="WorldView_Translate"/>
            <ArtDefDependencyPaths>
                <Element text="Districts.artdef"/>
            </ArtDefDependencyPaths>
        </Element>
    </SystemDependencies>
</AssetObjects::GameDependencyData>
 
I'm just guessing from looking at the Poland DLC, but try this:

Code:
<?xml version="1.0" encoding="UTF-8" ?>
<AssetObjects::GameDependencyData>
    <ID>
        <name text="somename"/>
        <id text="someguid"/>
    </ID>
    <SystemDependencies>
        <Element>
            <ConsumerName text="StrategicView_Sprite"/>
            <ArtDefDependencyPaths>
                <Element text="Districts.artdef"/>
            </ArtDefDependencyPaths>
        </Element>
        <Element>
            <ConsumerName text="StrategicView_Translate"/>
            <ArtDefDependencyPaths>
                <Element text="Districts.artdef"/>
            </ArtDefDependencyPaths>
        </Element>
        <Element>
            <ConsumerName text="WorldView_Translate"/>
            <ArtDefDependencyPaths>
                <Element text="Districts.artdef"/>
            </ArtDefDependencyPaths>
        </Element>
    </SystemDependencies>
</AssetObjects::GameDependencyData>

I fixed it finally jeezus that took hours without the proper mod tools... it was two things. Consumer had to be District not Districts, and in the Artdef underneath m_Rootcollections I was missing an <Element> tag (and its corresponding closing tag at the end of the code). I.e I was missing a subsection to divide it all up properly... Also im guessing that was the issue because I got fed up and copied the base game .artdef and deleted everything except one district and went from there. I cant believe that took me 6 hrs + to solve... there were a few issues in the .modinfo that needed cleaned up and some other issues/typos but that was the major hiccup.
 
Have a look for a program called XML Marker. You want the free version 1.1 one though. It's pretty ancient but it's really handy for showing XML errors and also for copying from one XML file to another. You can basically select an element in the tree view, right click show in editor and it will select the element and all it's sub content which makes editing a LOT easier.
 
Back
Top Bottom