[R&F] Help with Icons? Can't figure out how to add them in.

Foulweather

Warlord
Joined
Aug 6, 2016
Messages
100
Location
Seattle, WA
This is my first mod attempt, and I've pretty much completed my traits using Josh's template, but I've had a difficult time figuring out how to add the icons. I've read through most of the forum threads on icons, but either they don't help my particular problems, or (usually the case) they're way over my head since I'm so new to this (I have no idea what it means to cook an asset, for example). Kind of feeling I'm at the end of my string working on these icons, and there's no sense releasing a mod if the icons are random or blank.

I have made a civ icon that appears on the leader selection screen, and on my city banners, but in the World Rankings screen it only appears when grayed out. When the icon circle is filled with color, it's the dreaded question mark icon.

I also get an error every time I re-open Asset Editor that says "There's an XLP in your pantry that has the same File Name as another XLP but has a different Package Name which is not allowed. Expected Package: UI/Icons, Invalid Package: Icons". I've searched my mod for the text 'UI/Icons' and can't find anything that says that, so I don't know where that's coming from.

I've been able to use existing building icons (Market and Shrine) for my unique buildings and an existing unit icon (Saka Horse Archer) for my unique unit, and although it appears in the game, my unique building icon doesn't appear on the leader selection screen. (For some reason I get the Chemamull icon for my unique building).

Following Leugi's tutorial, I was able to slightly modify an exising unit to make a new unit artdef, so that unit finally appears in game properly! (yay for small miracles; thank you Leugi!).

I've created a unique unit portrait, per Leugi's Tutorial, but it doesn't appear in game; it defaults to the Settler portrait. I created unique unit icons also per the tutorial, but I wasn't able to add them to the XLP. I kept getting an error that told me my Entity was out of date, and I had to sync my pantry before reimporting it, and I can't figure out how to do that. (Which is why I thereafter used the Saka Horse Archer icon instead; close enough!). And yes, I have tried restarting Asset Editor several times, but nothing changed.

I've tried to create a new .dds for a Historic Moment image for my building, but when I try to export it into an XLP, I get an error "Export failed because a texture could not be initialized from the input file."

I've tried to add the ArtDef references and XLPs to my Mod.Art, so I'm not sure what the problem(s) are.

Really wish there was a more easily approachable way to do all this. Does anybody have any ideas, experience with, or suggestions on any of these errors?
 
The m_PackageName name in your .xlp needs to match the name of the file. It sounds like the name of your XLP is Icons.xlp but you have changed the Package Name to something else which is why the string 'UI/Icons' doesn't show up when you search for it - if you change it back to 'UI/Icons' it should resolve it. In other words, the error message tells you exactly what the issue is.
 
I don't get it. My "Icons.xlp" includes:

</m_Version>
<m_ClassName text="UITexture"/>
<m_PackageName text="Icons"/>
<m_Entries>
So my Package Name does match the name of my .xlp file. If I change my Package Name to "UI/Icons" while keeping my file name "Icons.xlp", none of my icons work, obviously, and it doesn't let me change the file name to anything containing a "/".

Item and file names cannot contain the character /​

My ModArt file also simply refers to "Icons", so I don't really even know where the UI/Icons reference is coming from. I don't really know what I'm supposed to change here.
 
You can edit Icons.xlp outside of the Asset Editor. Personally, I only use the Asset Editor for importing textures - I just edit the files as text. Here's what my Icons.xlp looks like.

Code:
<?xml version="1.0" encoding="UTF-8" ?>
<AssetObjects:XLP>
    <m_Version>
        <major>4</major>
        <minor>0</minor>
        <build>260</build>
        <revision>754</revision>
    </m_Version>
    <m_ClassName text="UITexture"/>
    <m_PackageName text="UI/Icons"/>
    <m_Entries>
        <Element>
            <m_EntryID text="MOARUnitsFlags_22"/>
            <m_ObjectName text="MOARUnitsFlags_22"/>
        </Element>
       ....
    </m_Entries>
    <m_AllowedPlatforms>
        <Element>WINDOWS</Element>
        <Element>LINUX</Element>
        <Element>MACOS</Element>
        <Element>IOS</Element>
    </m_AllowedPlatforms>
</AssetObjects:XLP>
 
Well, I've fixed the icons. Thank you for your assistance!

I figured out I didn't have all the proper sizes of icons created (for example, I didn't have the size 22 created that Deliverator had above). Adding the extras fixed the problem with the World Rankings screen. I was also grabbing my unique building icon from the generic buildings atlas instead of the atlas I had created, which was why I kept getting Chemamull. Oops. I think I was also trying to add the icons into my Modbuddy file manually; once I placed them on the desktop I was able to add them to my XLP no problem. Also finally gotten my Historic Moment art to load properly, though now I need to work on making the art match the Firaxis style.

As for the error "There's an XLP in your pantry that has the same File Name as another XLP" I was getting when I opened Asset Editor, well, it's still there every time I re-open Asset Editor, but it really isn't causing me any problems getting my icons in the game now. Funny, I had thought that was what was holding me back, but it was a lot of other little things instead.
 
Top Bottom