Something about my custom unit is preventing my mod from working properly.

DoktorApplejuce

Champion of Kirkwall
Joined
Apr 9, 2015
Messages
582
Location
Canada
When I go into the civilization selection list after loading up my mod, everything that should come after my Civ alphabetically is missing. Furthermore, the unique unit that's a part of the civ doesn't show up, and when the civ is selected, the entire menu screen simply disappears.

A look at my error logs show the following:
"[21955.546] Invalid Reference on Civilization_UnitClassOverrides.UnitType - "UNIT_ANTIVAN_CROW" does not exist in Units"

However, I have no idea why this would be, as it does exist, and I've gone around multiple times to make sure it's defined the same way each time it's referenced, yet it still refuses to work.

I guarantee you that what ever it is, it's a really stupid mistake or oversight on my part, but right now, I cant see it. If anyone else is able to (the file is included in this post), I would very much appreciate it.
 
You have numerous texture loading issues, but whether from bad dds compression rates or what else I am not sure.

I have never seen quite that same breakage of the Civilization Selection Screen before, so you've got that going for you if nothing else :)

The problem with your unit is:
Code:
[752635.062] table Unit_FreePromotions has no column named Type
[752635.062] In Query - insert into Unit_FreePromotions('UnitType', 'Type') values (?, ?);
[752635.062] In XMLSerializer while updating table Unit_FreePromotions from file XML/Units/CIV5Units.xml.
Get in the habit of looking through the whole Database.log file before zeroing-in on any one set of error codes. Otherwise you miss the error that was reported farther up, and which is giving you the info on the root-cause of file discard-failures.

Also remember that when the error logs are saying that "such-and-such" is an invalid reference becaue it does not exist in a game-table, that has nothing to do with what is included within your mod. It is telling you that no such unit, building, leader, civilization, etc., exists within the game's database. In such cases you need to start looking for what is causing the game to reject and discard entire file(s) of xml or sql.
 
@LeeS
The broken screen happens to me every time when something is wrong with my UU or UB. :)
 
@LeeS
The broken screen happens to me every time when something is wrong with my UU or UB. :)
He isn't getting the usual lack of a scroll-bar (which is what happens when any one civ does not have at least two uniques). In the "no scroll-bar" problem the list of civs one can see at least fills the available space of the selection screen.
 
He isn't getting the usual lack of a scroll-bar (which is what happens when any one civ does not have at least two uniques). In the "no scroll-bar" problem the list of civs one can see at least fills the available space of the selection screen.
I know. :)
I got that mentioned black screen ever so often playing around with UU and UAs...
 
When I go into the civilization selection list after loading up my mod, everything that should come after my Civ alphabetically is missing. Furthermore, the unique unit that's a part of the civ doesn't show up, and when the civ is selected, the entire menu screen simply disappears.

A look at my error logs show the following:
"[21955.546] Invalid Reference on Civilization_UnitClassOverrides.UnitType - "UNIT_ANTIVAN_CROW" does not exist in Units"

However, I have no idea why this would be, as it does exist, and I've gone around multiple times to make sure it's defined the same way each time it's referenced, yet it still refuses to work.

I guarantee you that what ever it is, it's a really stupid mistake or oversight on my part, but right now, I cant see it. If anyone else is able to (the file is included in this post), I would very much appreciate it.

Instead of using
Code:
[B][I]<Type>PROMOTION_CAN_MOVE_AFTER_ATTACKING</Type>[/I][/B]

Use
Code:
[B][I]<PromotionType>PROMOTION_CAN_MOVE_AFTER_ATTACKING</PromotionType>[/I][/B]

That is the correct tag instead of Type. You might want to doublecheck CAN_MOVE_AFTER_ATTACKING with the game files for promotions and make sure that is the correct Syntax, I can't remember offhand, and I'm at work so I can't look at my files. It might be all 1 word.
 
In addition Doc, I highly recommend you goto Whoward's site www.picknmixmods.com and download and use modbuilder.jar (his java program).. it is awesome at creating combat units, and it will create and convert icon pictures for you... his syntax is always correct when it produces a unit.. however, you will probably still have to go in and tweak a few things.

It is a phenomenal timesaver when making units.
 
You have numerous texture loading issues, but whether from bad dds compression rates or what else I am not sure.

I have never seen quite that same breakage of the Civilization Selection Screen before, so you've got that going for you if nothing else :)

That's actually (mostly) because I don't have any .dds files in my mod yet, (Map, Dawn of man, Diplo image, etc.) aside from the icons. I wanted to make sure the scripting was working before adding any of that in. The art is the easy part for me, and I like getting the hard part over and done with first.

Another part of that is that I'm tinkering with creating a new luxury resource; something that I apparently am doing wrong.

The problem with your unit is:
Code:
[752635.062] table Unit_FreePromotions has no column named Type
[752635.062] In Query - insert into Unit_FreePromotions('UnitType', 'Type') values (?, ?);
[752635.062] In XMLSerializer while updating table Unit_FreePromotions from file XML/Units/CIV5Units.xml.
Get in the habit of looking through the whole Database.log file before zeroing-in on any one set of error codes. Otherwise you miss the error that was reported farther up, and which is giving you the info on the root-cause of file discard-failures.

Also remember that when the error logs are saying that "such-and-such" is an invalid reference becaue it does not exist in a game-table, that has nothing to do with what is included within your mod. It is telling you that no such unit, building, leader, civilization, etc., exists within the game's database. In such cases you need to start looking for what is causing the game to reject and discard entire file(s) of xml or sql.

Ah, there it is. Like I said, probably a stupid oversight on my part. And like you said, I do definitely need to get in the habit on not zeroing in on just one small part. Thank you!
 
For new luxury, I recommend looking for a mod that adds new luxury resources and copy the code and credit the author. I believe New Luxuries is one, as well as Beyond the Future has Titanium as a resource. One is luxury one is strategic.
 
For new luxury, I recommend looking for a mod that adds new luxury resources and copy the code and credit the author. I believe New Luxuries is one, as well as Beyond the Future has Titanium as a resource. One is luxury one is strategic.

I'm using the Argentine Republic mod as my base for it. The problem is the FontIcon file. It looks like I'm doing everything they did, yet I'm getting an error message saying it couldn't be loaded. Any ideas?
 

Attachments

  • (Dragon Age Mod Project) - Antiva (v 1).civ5mod
    3 MB · Views: 69
Posting said error messages would be nice. Do you actually have the .dds and corresponding .ggxml files available, and all of the related database entries entered?

As far as new Luxury goes, your approach depends on if you want this resource spread over the map to be claimed by anyone, or if you want this resource unique to your Civ.
 
Posting said error messages would be nice. Do you actually have the .dds and corresponding .ggxml files available, and all of the related database entries entered?

As far as new Luxury goes, your approach depends on if you want this resource spread over the map to be claimed by anyone, or if you want this resource unique to your Civ.

Great point. I believe Indonesia has some unique luxury resources, that would be a good base to go off of.

I've never messed with the fonts in the game, so I can't help you there. There has got to be a good font tutorial or posts on civfanatics somewhere though.
 
Posting said error messages would be nice. Do you actually have the .dds and corresponding .ggxml files available, and all of the related database entries entered?

As far as new Luxury goes, your approach depends on if you want this resource spread over the map to be claimed by anyone, or if you want this resource unique to your Civ.

The error message reads, "Could not load font XML file". I'm assuming it has something to do with the ggxml file, since that's the part I know the least about. I did go ahead and change the ggxml file that I copied from the above mentioned Argentina mod so as to reference the correct dds file, and that's the only change I made to it.

The resource is supposed to be unique to the civ itself, and can only be acquired by building the civ's unique building.
 
If that's the case, you don't need to mess with anything related to adding resources to the map. Just attach the resource to a building after it's been added into the game properly.

The .ggxml file itself doesn't do anything -- you need to define the other database tables (IconFontTextures and IconFontMapping) to use said .ggxml file.

I assume you've looked at my Holo mod previously for other things, so I'll suggest it again if you still have a copy of it available. Check my Holo mod for her unique Apples resource.

Of interest to you would be:
  • Holo-AppleFontIcon.dds
  • Holo-AppleFontIcon.ggxml (Note the filename must be the same as the dds file.)
  • HoloApplesResource.xml
The Apples resource itself is granted via a dummy building.
 
If that's the case, you don't need to mess with anything related to adding resources to the map. Just attach the resource to a building after it's been added into the game properly.

The .ggxml file itself doesn't do anything -- you need to define the other database tables (IconFontTextures and IconFontMapping) to use said .ggxml file.

I assume you've looked at my Holo mod previously for other things, so I'll suggest it again if you still have a copy of it available. Check my Holo mod for her unique Apples resource.

Of interest to you would be:
  • Holo-AppleFontIcon.dds
  • Holo-AppleFontIcon.ggxml (Note the filename must be the same as the dds file.)
  • HoloApplesResource.xml
The Apples resource itself is granted via a dummy building.

Alright, I copied what your mod has, and thankfully, the error message is no longer popping up, however the font icon isn't actually showing up as it should:

 
Is the .dds defined / saved properly?

I think so? Well, I guess it would have to not be, since it's not loading, but everything I'm seeing looks right.

Code:
<glyphgen>
	<textures width="22" height="22">
		<texture name="" src="AntivanLeather_FontIcon.dds" allowcolor="1" alloweffects="1" inuse="1" />
	</textures>
	<styles count="1">
		<style name="">
			<layers count="1">
				<layer tex="" />
			</layers>
		</style>
	</styles>
	<glyphs fudgeadv="0" ascadj="-6" spacing="0" count="1" height="0" ascent="0" descent="0">
		<glyph ch="1" u="0" v="0" width="22" height="22" a="0" b="22" c="0" originx="0" originy="22" />
	</glyphs>
	<imports count="0"/>
	<toolonly>
		<metainfo pt="0.000000" width="256" height="256" alphabias="64" maxsize="256" bestfit="0" pow2="1" freetype="2" fontsrc="" />
		<glyphsets>
			<set name="GlyphSetAscii" />
		</glyphsets>
	</toolonly>
</glyphgen>

Code:
	<IconFontMapping>
		<Row>
			<IconName>ICON_RES_ANTIVAN_LEATHER</IconName>
			<IconFontTexture>ICON_FONT_TEXTURE_ANTIVAN_LEATHER</IconFontTexture>
			<IconMapping>1</IconMapping>
		</Row>
	</IconFontMapping>
	<IconFontTextures>
		<Row>
			<IconFontTexture>ICON_FONT_TEXTURE_ANTIVAN_LEATHER</IconFontTexture>
			<IconFontTextureFile>AntivanLeather_FontIcon</IconFontTextureFile>
		</Row>
	</IconFontTextures>
 

Attachments

  • (Dragon Age Mod Project) - Antiva (v 1).civ5mod
    3 MB · Views: 44
Is "layer tex" correct?
I think that should be "layer text"?
 
Code:
	<imports />
Only change I made. The boots start showing up as an icon in the trade screen.

Every lux resource added by a wonder that I looked at had that line done in that way. So far as the game-code is concerned, a wonder is a building and a building is no different from a wonder except for the limitations added to the BuildingClass definitions.
 
Top Bottom