• Our friends from AlphaCentauri2.info are in need of technical assistance. If you have experience with the LAMP stack and some hours to spare, please help them out and post here.

ArtDefs for new District and Building. Need help.

OleksaAS

Chieftain
Joined
Sep 30, 2017
Messages
2
I'm trying to make mod and one issue is to replace ENCAMPMENT and BARRACKS with DISTRICT_SICH and BUILDING_UKR_KURIN.
When Mod is loaded, new District and new Building can be find in TechTree, you can build them and use, but the tile where district sitiuated is empty.
I want to use the ENCAMPMENT graphics for DISTRICT_SICH.
Using analogy with creating new Units, I've added Districts.artdef and Landmarks.artdef files to my Mod, copied whole ENCAMPMENT Element, and paste at last line the following:
<m_Name text="DISTRICT_SICH"/>.
Also in Landmarks.artdef I've changed all BARRACKS to BUILDING_UKR_KURIN.
In Mod.Art.xlm I've added the following:
<Element>
<consumerName text="Landmarks"/>
<relativeArtDefPaths>
<Element text="Districts.artdef"/>
<Element text="Landmarks.artdef"/>
</relativeArtDefPaths>
<libraryDependencies>
<Element text="CityBuildings"/>
<Element text="TileBase"/>
<Element text="RouteDecalMaterial"/>
</libraryDependencies>
<loadsLibraries>true</loadsLibraries>
</Element>
Unfrotunately, it doesn't work - the tile is empty. I can't find any information about how to create your own District, so I need help!
 

Attachments

I dont know what can be, but I can tell you when I make my own artdefs I only put there my things, and erase all that is from the game itself.

Also, I have a couple of districts and I didnt had to alter landmarks.artdef too, if you mix with this file maybe its the problem.

If even this dont work, maybe looking at my Portugal´s mod, I have districts, improvements and buildings.

PS: For me appears empty when I copy a type to another, imagine a building I want to be an improvement, or an improvement that is not originally built on water. Maybe mixing with landmarks will help to this!
 
For your Districts.artdef create a new element under District and name it the name of your district from your districts .xml game data file. Save. Under that, click the Landmark section and for the Xref field choose your district from the drop down menu. Save. See spoiler for screen shot.

Spoiler Districts.artdef Screen Shot :

upload_2017-10-14_3-29-25.png



For your Landmarks.artdef create a new element under Districts and name it the name of your district from your districts .xml game data file. Under that, click the BuildingSets section, add a new element and name it EMPTY, don't put anything in it. Save. Now click on the BaseVariants section, add a new element and for the Set_HeroBuildings field select EMPTY from the drop down menu, then for the Asset field choose whatever asset you want your district to use (put simply, the Asset tells it what to look like). Save. See spoiler for screen shot.

Spoiler Landmarks.artdef Screen Shot :

upload_2017-10-14_3-39-20.png



For your Mod.Art.xml:

Code:
<Element>
            <consumerName text="Landmarks"/>
            <relativeArtDefPaths>               
                <Element text="Districts.artdef"/>
                <Element text="Landmarks.artdef"/>
            </relativeArtDefPaths>
            <libraryDependencies>
                <Element text="CityBuildings"/>
                <Element text="TileBase"/>
                <Element text="RouteDecalMaterial"/>
            </libraryDependencies>
            <loadsLibraries>true</loadsLibraries>
        </Element>
<Element>
            <consumerName text="StrategicView_Sprite"/>
            <relativeArtDefPaths>
                <Element text="Buildings.artdef"/>
                <Element text="Districts.artdef"/>
            </relativeArtDefPaths>
            <libraryDependencies>
                <Element text="StrategicView_Sprite"/>
                <Element text="StrategicView_DirectedAsset"/>
            </libraryDependencies>
            <loadsLibraries>true</loadsLibraries>
        </Element>

For your Project Properties under In-Game Actions; Add Action; Type: UpdateArt; Files: (Mod Art Dependency File), Districts.artdef, and Landmarks.artdef. Save All. Build Project. See spoiler for screen shot.

Spoiler Project Properties Screen Shot :

upload_2017-10-14_3-48-38.png



I believe that is all, don't think I missed anything. Let me know if that works for you.
 
Thanks a lot! Unfortunately didn't have much time recently to work with the Mod. I will follow your advise and let you know!
 
Back
Top Bottom