Would someone take a look at my code?

paisvalencia

Chieftain
Joined
Jun 9, 2014
Messages
40
So I've been working on this mod project for Aragon. The gameplay is up and running, but the UI still doesn't appear no matter what I do. I've been playing around with it for several months now and I'm very much frustrated.
If someone could take a look at my code and tell me what I'm doing wrong, it'd be a huge help! I'd also be immensely grateful, since I'd finally be able to release the civ which, gameplay-wise, has been working for months.
 
Basically the .modinfo, since I'm pretty sure that's where the problem lies. I don't know what I'm missing, though.

The .modinfo goes like this:

<?xml version="1.0" encoding="utf-8"?>
<Mod id="9714df4c-13e9-4e6c-a454-d729971ce86f" version="1">
<Properties>
<Name>Crown of Aragon - Jaume I</Name>
<Description>Adds the Crown of Aragon with Jaume I as its leader.</Description>
<Teaser>The Crown of Aragon under Jaume I, for a true religious experience.</Teaser>
<Authors>nasulon</Authors>
<SpecialThanks>civfanatics</SpecialThanks>
<CompatibleVersions>1.2, 2.0</CompatibleVersions>
</Properties>
<FrontEndActions>
<UpdateDatabase id="Aragon_ConfigDatabase">
<File>Core/Aragon_Jaume_I_Config.xml</File>
</UpdateDatabase>
<UpdateIcons id="Aragon_ConfigIcons">
<File>UI/Aragon_Icons_Buildings.xml</File>
<File>UI/Aragon_Icons_Units.xml</File>
<File>UI/Aragon_Icons_Civilizations.xml</File>
<File>UI/Aragon_Icons_Leaders.xml</File>
</UpdateIcons>
<UpdateText id="Aragon_ConfigText">
<File>Text/Aragon_Jaume_I_AgendaText.xml</File>
<File>Text/Aragon_Jaume_I_Jaume_IText.xml</File>
<File>Text/Aragon_Jaume_I_CivPedia.xml</File>
<File>Text/Aragon_Jaume_I_ConfigText.xml</File>
<File>Text/Aragon_Jaume_I_Diplotext.xml</File>
<File>Text/Aragon_Jaume_I_GossipText.xml</File>
<File>Text/Aragon_Jaume_I_CityName.xml</File>
</UpdateText>
<UpdateArt id="Aragon_Art">
<File>Crown of Aragon - Jaume I.dep</File>
</UpdateArt>
</FrontEndActions>
<InGameActions>
<UpdateDatabase id="Aragon_Gameplay">
<File>Core/Aragon_Jaume_I_Agenda.xml</File>
<File>Core/Aragon_Jaume_I_Civ.xml</File>
<File>Core/Aragon_Jaume_I_Leader.xml</File>
<File>Core/Aragon_Jaume_I_Buildings.xml</File>
<File>Core/Aragon_Jaume_I_Units.xml</File>
<File>Core/Aragon_Jaume_I_CityName.xml</File>
<File>Core/Aragon_Jaume_I_Colors.xml</File>
<File>Core/Aragon_Jaume_I_Gossip.xml</File>
<File>Core/LeaderBackground.xml</File>
</UpdateDatabase>
<UpdateIcons id="Aragon_Icons">
<File>UI/Aragon_Icons_Buildings.xml</File>
<File>UI/Aragon_Icons_Units.xml</File>
<File>UI/Aragon_Icons_Civilizations.xml</File>
<File>UI/Aragon_Icons_Leaders.xml</File>
</UpdateIcons>
<UpdateText id="Text">
<File>Text/Aragon_Jaume_I_AgendaText.xml</File>
<File>Text/Aragon_Jaume_I_Jaume_IText.xml</File>
<File>Text/Aragon_Jaume_I_CivPedia.xml</File>
<File>Text/Aragon_Jaume_I_ConfigText.xml</File>
<File>Text/Aragon_Jaume_I_Diplotext.xml</File>
<File>Text/Aragon_Jaume_I_GossipText.xml</File>
<File>Text/Aragon_Jaume_I_CityName.xml</File>
</UpdateText>
<UpdateArt id="Art">
<File>Crown of Aragon - Jaume I.dep</File>
</UpdateArt>
<ImportFiles>
<File>Art/Aragon_Jaume_I_Diplomacy.dds</File>
<File>Art/Aragon_Jaume_I_Foreground.dds</File>
<File>Art/Aragon_Pressure.dds</File>
<File>Art/Aragon_Overlay.dds</File>
<File>Art/Aragon22.dds</File>
<File>Art/Aragon256.dds</File>
<File>Art/Aragon30.dds</File>
<File>Art/Aragon36.dds</File>
<File>Art/Aragon44.dds</File>
<File>Art/Aragon45.dds</File>
<File>Art/Aragon48.dds</File>
<File>Art/Aragon50.dds</File>
<File>Art/Aragon32.dds</File>
<File>Art/Aragon55.dds</File>
<File>Art/Aragon64.dds</File>
<File>Art/Aragon80.dds</File>
<File>Art/AragonLlotja38.dds</File>
<File>Art/AragonLlotja32.dds</File>
<File>Art/AragonLlotja128.dds</File>
<File>Art/AragonLlotja50.dds</File>
<File>Art/AragonLlotja55.dds</File>
<File>Art/AragonLlotja45.dds</File>
<File>Art/AragonLlotja64.dds</File>
<File>Art/AragonLlotja80.dds</File>
<File>Art/AragonLlotja256.dds</File>
<File>Art/Aragon_Jaume_I_Leader256.dds</File>
<File>Art/Aragon_Jaume_I_Leader32.dds</File>
<File>Art/Aragon_Jaume_I_Leader45.dds</File>
<File>Art/Aragon_Jaume_I_Leader50.dds</File>
<File>Art/Aragon_Jaume_I_Leader55.dds</File>
<File>Art/Aragon_Jaume_I_Leader64.dds</File>
<File>Art/Aragon_Jaume_I_Leader80.dds</File>
<File>Art/AlmogaverUnitFlag256.dds</File>
<File>Art/AlmogaverUnitFlag32.dds</File>
<File>Art/AlmogaverUnitFlag38.dds</File>
<File>Art/AlmogaverUnitFlag50.dds</File>
<File>Art/AlmogaverUnitFlag80.dds</File>
<File>Art/AlmogaverUnitFlag55.dds</File>
<File>Art/AlmogaverUnitFlag45.dds</File>
<File>Art/AlmogaverUnitFlag64.dds</File>
<File>Art/AlmogaverUnitPortraits95.dds</File>
<File>Art/AlmogaverUnitPortraits256.dds</File>
<File>Art/AlmogaverUnitPortraits200.dds</File>
<File>Art/AlmogaverUnitPortraits38.dds</File>
<File>Art/AlmogaverUnitPortraits50.dds</File>
<File>Art/AlmogaverUnitPortraits70.dds</File>
</ImportFiles>
</InGameActions>
<Files>
<File>ArtDefs/Civilizations.artdef</File>
<File>ArtDefs/Cultures.artdef</File>
<File>ArtDefs/FallbackLeaders.artdef</File>
<File>ArtDefs/Leaders.artdef</File>
<File>ArtDefs/Units.artdef</File>
<File>Core/Aragon_Jaume_I_Agenda.xml</File>
<File>Core/Aragon_Jaume_I_Buildings.xml</File>
<File>Core/Aragon_Jaume_I_CityName.xml</File>
<File>Core/Aragon_Jaume_I_Civ.xml</File>
<File>Core/Aragon_Jaume_I_Colors.xml</File>
<File>Core/Aragon_Jaume_I_Config.xml</File>
<File>Core/Aragon_Jaume_I_Gossip.xml</File>
<File>Core/Aragon_Jaume_I_Leader.xml</File>
<File>Core/Aragon_Jaume_I_Units.xml</File>
<File>Core/LeaderBackground.xml</File>
<File>Art/Aragon_Jaume_I_Diplomacy.dds</File>
<File>Art/Aragon_Jaume_I_Foreground.dds</File>
<File>Art/Aragon_Pressure.dds</File>
<File>Art/Aragon_Overlay.dds</File>
<File>Art/Aragon22.dds</File>
<File>Art/Aragon256.dds</File>
<File>Art/Aragon30.dds</File>
<File>Art/Aragon36.dds</File>
<File>Art/Aragon44.dds</File>
<File>Art/Aragon45.dds</File>
<File>Art/Aragon48.dds</File>
<File>Art/Aragon50.dds</File>
<File>Art/Aragon32.dds</File>
<File>Art/Aragon55.dds</File>
<File>Art/Aragon64.dds</File>
<File>Art/Aragon80.dds</File>
<File>Art/AragonLlotja38.dds</File>
<File>Art/AragonLlotja32.dds</File>
<File>Art/AragonLlotja128.dds</File>
<File>Art/AragonLlotja50.dds</File>
<File>Art/AragonLlotja55.dds</File>
<File>Art/AragonLlotja45.dds</File>
<File>Art/AragonLlotja64.dds</File>
<File>Art/AragonLlotja80.dds</File>
<File>Art/AragonLlotja256.dds</File>
<File>Art/Aragon_Jaume_I_Leader256.dds</File>
<File>Art/Aragon_Jaume_I_Leader32.dds</File>
<File>Art/Aragon_Jaume_I_Leader45.dds</File>
<File>Art/Aragon_Jaume_I_Leader50.dds</File>
<File>Art/Aragon_Jaume_I_Leader55.dds</File>
<File>Art/Aragon_Jaume_I_Leader64.dds</File>
<File>Art/Aragon_Jaume_I_Leader80.dds</File>
<File>Art/AlmogaverUnitFlag256.dds</File>
<File>Art/AlmogaverUnitFlag32.dds</File>
<File>Art/AlmogaverUnitFlag38.dds</File>
<File>Art/AlmogaverUnitFlag50.dds</File>
<File>Art/AlmogaverUnitFlag80.dds</File>
<File>Art/AlmogaverUnitFlag55.dds</File>
<File>Art/AlmogaverUnitFlag45.dds</File>
<File>Art/AlmogaverUnitFlag64.dds</File>
<File>Art/AlmogaverUnitPortraits95.dds</File>
<File>Art/AlmogaverUnitPortraits256.dds</File>
<File>Art/AlmogaverUnitPortraits200.dds</File>
<File>Art/AlmogaverUnitPortraits38.dds</File>
<File>Art/AlmogaverUnitPortraits50.dds</File>
<File>Art/AlmogaverUnitPortraits70.dds</File>
<File>Crown of Aragon - Jaume I.dep</File>
<File>Text/Aragon_Jaume_I_CityName.xml</File>
<File>Text/Aragon_Jaume_I_CivPedia.xml</File>
<File>Text/Aragon_Jaume_I_ConfigText.xml</File>
<File>Text/Aragon_Jaume_I_Diplotext.xml</File>
<File>Text/Aragon_Jaume_I_Jaume_IText.xml</File>
<File>Text/Aragon_Jaume_I_GossipText.xml</File>
<File>Text/Aragon_Jaume_I_AgendaText.xml</File>
<File>UI/Aragon_Icons_Buildings.xml</File>
<File>UI/Aragon_Icons_Units.xml</File>
<File>UI/Aragon_Icons_Civilizations.xml</File>
<File>UI/Aragon_Icons_Leaders.xml</File>
<File>XLPs/Icons.xlp</File>
</Files>
</Mod>
 
  1. Zip the version of the mod the game is actually trying to use, which will be found as a sub-folder in ~\Documents\My Games\Sid Meier's Civilization VI\Mods. Zip the whole sub-folder for your mod.
  2. Don't zip the modbuddy project folder for now, mostly because the last time I tried to use Asset Editor I also experienced one of the many error messages people are currently having with it, so I can't use the project to create a mod even if I wanted to if the mod contains any cooked assets.
  3. To attach the zip to a forum post, look for a button called Upload A File when composing your thread reply: this button opens a browse menu where you can select the zipped folder to attach directly to a forum post.
  4. If the zipped folder is too large for the forum to accept then upload the zipped mod to a file-sharing site such as dropbox and provide a link where the mod can be downloaded.
    • Mediafire is not really a very good choice any more because they have become rife with spam and malware, as well as attempts to get you to download unwanted and uneeded kludge by confusing the layout of the download pages. You'll note for example that Mediafire links are no longer allowed on Steam, whereas CFC (this site) and dropbox links are still allowed.
The problem with modinfo files is they in and of themselves often don't tell us much of anything without the rest of the mod to look at as well. And I cannot see by looking at your modinfo file any red flags.

Also, what exactly do you mean by "UI" ? To me that would normally imply a modder is attempting to rewrite the lua User Interface files the game uses to create one or more of the game's pop-up panels or game-screens. Other people use the term to refer to Icons for units or buildings or for leader background scenes.
 
For some reason Modbuddy doesn't work on my PC since Gathering Storm released, so I'm doing things manually. That's probably why it's taking me so long, but it shouldn't mean it's impossible, right?
Anyway, here's the whole mod (and thank you for helping me out, I was almost about to give up):
 

Attachments

  • Aragonese Crown - Jaume I.zip
    4.4 MB · Views: 59
By the way, by UI I meant the icons, background etc., some of it appears, some of it doesn't, some of it appears in weird ways or only at times...

Edit: The .zip I sent above is actually of an outdated version, sorry. Here's the more recent one:
 

Attachments

  • Aragonese Crown.zip
    4.4 MB · Views: 63
Last edited:
I've been looking into it on and off over the weekend (but did not end up having as much time as desired to do so) and have no complete solution as yet, but right off the bat there is this:
Code:
		<IconDefinitions>
		<Row Name="ICON_UNIT_ALMOGAVER" Atlas="ICON_ATLAS_UNITS_ARAGON" Index="19"/>
		<Row Name="ICON_UNIT_ALMOGAVER_FOW" Atlas="ICON_ATLAS_UNITS_FOW_ARAGON" Index="19"/>
		<Row Name="ICON_UNIT_ALMOGAVER_PORTRAIT" Atlas="ICON_ATLAS_UNIT_ALMOGAVER_PORTRAITS" Index="0"/>
		</IconDefinitions>
Your images only have one icon, so Index # 19 is impossible.

Fixing this however does not instantly solve the issue. My suspicion is that the icon files have not been saved correctly to dds format or you have made a mistake somewhere in your ArtDefs, which is easy to do as it is not a simple system to master.

I'll try to take a deeper look later this week.
 
Thank you for taking the time to look at it!
Honestly, I don't know what the index's actually do, so I've set all of them (in buildings and units) to "1".
The civilization and leader icon, however, do appear -although they do so only ingame. I tried moving the ImportFiles command to the FrontEnd in the .modinfo and the icons appeared in the menu except the colours of the civ icon were all messed up. I was thinking of figuring out which icon size that one is and make it the colour i want it to be w/o the civ colours xml, then putting those files in the FrontEnd part, but I might just be messing it up further.
And I've probably definitely made more than one error in the .artdef files, it's the part where I least know what I'm doing, heh.
 
I should probably share the updated version of the mod, I managed to get the leader body working among other things.
 

Attachments

  • Aragonese Crown - Jaume I.zip
    9.1 MB · Views: 73
The "Index" value for icons refers to the image number within an Icon File. So if your set of dds files have four images arranged 2 x 2 (ie, two rows of two columns), then the Index numbers for the four images will be as
0 | 1
2 | 3
But if you have arranged the file with 2 rows of four columns each then the Index numbers for these images will be as
0 | 1 | 2 | 3
4 | 5 | 6 | 7
The upper left-most image is always Index # 0 for the images within that file. So a set of Icon Files that have only one image will use only Index # 0.

And all the images within a "sheet" (ie, an ATLAS) must have the same image positioned in the same place so far as the index number placement is concerned regardless of the image-size for an individual file. A building cannot for example have its Icon at Index #0 for the 256-sized file, and at Index #3 for the 128-sized file.
 
Oh okay, I think I understand. I put the indexes as 0 across the board, although you're right, it still doesn't work.
I don't think it's a problem with the .dds, though, since some of the other icons are working at times, as I explained earlier. So I guess the issue is probably in the .artdefs or the .modinfo
 
Top Bottom