[BNW] Units and dummy building not being inserted into tables?

A_Wandering_Man

Chieftain
Joined
Oct 31, 2019
Messages
47
Location
Canada
Hi all. I'm working on a mod to add the Gerudo from LoZ (a friend of mine wanted some help to create his take on them), and I've run into a couple issues. I am just working in XML as I don't have experience with other types of coding (and I only have cursory experience with XML, but anyway). I've made a mod previously where the units and dummy building worked as intended, and I can't find where I went wrong with this one...

Firstly, the units: they aren't showing up, and the units they replace don't appear in the tech tree any longer. The database log says they don't exist in the units table, but I used the same method that has worked previously, and I can't find any syntax errors (that being said, I suspect there might be some hiding in there, I just can't find it).

Secondly, the dummy building: the log says it isn't showing up in the buildings table, much like the units aren't showing up in the units table, but again I used the same method that has worked previously to make a functioning dummy building. The rest of the UA works, so I don't think it's an issue with it not being connected to the civ/leader.

I've attached the mod and the database log (I just renamed it so i could save it as a txt file) (ignore the errors that don't have "NCLJ" or "Gerudo" in them, they're from other, working, mods; mostly by competent mod authors haha)

Any help is greatly appreciated!
 

Attachments

From Your Building file:
Code:
[COLOR="Blue"]<GreatWorkCount>-1</GreatWorkCount>
			<FaithCost>-1</FaithCost>[/COLOR]
within this chunk of the code
Code:
	<Buildings>
		<Row>
			<Type>BUILDING_NCLJ_GERUDO</Type>
			<BuildingClass>BUILDINGCLASS_NCLJ_GERUDO</BuildingClass>
			<Cost>-1</Cost>
			<PrereqTech>NULL</PrereqTech>
			[COLOR="Blue"]<GreatWorkCount>-1</GreatWorkCount>
			<FaithCost>-1</FaithCost>[/COLOR]
			<MinAreaSize>-1</MinAreaSize>
			<NeverCapture>true</NeverCapture>
			<NukeImmune>true</NukeImmune>
			<PortraitIndex>19</PortraitIndex>
			<IconAtlas>BW_ATLAS_1</IconAtlas>
			<Description>TXT_KEY_BUILDING_NCLJ_GERUDO</Description>
		</Row>
	</Buildings>
When you copy-pasted from the forum you got the html instructions for color-coding within forum code boxes that used to work with the old version of the CFC forum but no longer do and now are actually shown as part of the "code" within the code-box.

------------------------------------

It isn't obvious to me either where the error is but there has to be an error within your units file. The very first thing I would do is eliminate all the clutter. If you are leaving a column empty or leaving it at the default '0' value, I'd eliminate the column entirely from your <Units> definitions. I'd also eliminate al the stuff that is commented out. Unneeded clutter at this point is your worst enemy.
 
And also disable any and all mods that are not 100% required in order for your mod to function. You are fighting a messy database.log stemming from other mods that are malformed or else are spitting error messages into the logs from their compatibility code for bridging to the code within other mods but only when those other mods are also enabled. All this is making it virtually impossible to make any coherent sense out of the messages in Database.log.
 
Thanks for the tips. To clarify, I can remove the lines with the 0's or defaults without it breaking anything? The bit about the colour thing is helpful! I don't know how I missed that... Will come back with a new database log and results from my tests in a few hours...
 
Ah, I solved it! Turning off the other mods made the issue very apparent -- I had neglected to change one of the names from the Mohawk Warrior unit I used as a template, and I ran into the non-unique tag issue. Removing the colour thing seems to have fixed the UA-dummy as well!

Thanks, Lee! Everything seems to be working now.
 
Back
Top Bottom