Need Help With Unit Resource Costs

Khazaris

Chieftain
Joined
May 25, 2015
Messages
7
I've just started creating my first mod that adds a custom civ to the game. I'm attempting to make a unique longswordsman and have done so, but I don't know how to remove the cost of iron, which is what I want the unit's ability to be. Can anyone help me with this?
 
Thanks for the reply! That's simple enough lol. But now another question. I tried to load my mod for the first time and the new civilization doesn't appear at all, either to be selected for play or in the civilopedia. I double checked and it's not disabled in the XML entry and I'm not sure where else to look.
 
This is unfortunately not enough information and way too vague for us to be able to provide any help.

Please zip up and attach your mod and enable logging to provide your error logs. You might also want to check out LeeS' common novice modder mistakes thread.

If the entire Civ does not appear, you may have more serious errors (most commonly oversight, though occasionally it's modders not understanding how the XML works) which is causing the Civ to fail to be recognized properly. Going through all those possibilities would just be random guessing on our part.
 
I zipped it up. The error logs are in the folder
 

Attachments

  • Archadia (v 1).zip
    334.1 KB · Views: 21
Note: None of your Art files are imported into VFS, so they will not appear in the game.

As for your issues, the Database.log is showing you tons of errors which you need to fix. Learning to read these will be a must as you continue to troubleshoot your mods (both presently, and in the future.)

First:
[109698.937] columns Language, Tag are not unique
[109698.937] While executing - 'insert into Language_en_US('Tag', 'Text') values (?, ?);'
[109698.937] In XMLSerializer while inserting row into table insert into Language_en_US('Tag', 'Text') with values (TXT_KEY_CITY_NAME_REYKJAVIK, Reykjavik, ).
[109698.937] In XMLSerializer while updating table Language_en_US from file XML/New Text/GameText.xml.

This is telling you that you have a duplication error. Know that this game absolutely hates duplicates of any kind and it will vomit all over you for attempting to do so. This error is pointing you to several things: First, not unique -- duplication error. What is being duplicated? It tells you the relevant TXT_KEY entry, and finally, the file that it occurred in. This city name appears to be one in use by the Dutch already, so you cannot add it again. You can still use it, just don't try to add it into the database again. As a result of this error, the game discarded this entire file causing your Civ to have no text entries defined.

This can be seen with the slew of later errors:
Spoiler :
[109700.203] Invalid Reference on Civilizations.Adjective - "TXT_KEY_CIV_ARCH_ADJECTIVE" does not exist in Language_en_US
[109700.250] Invalid Reference on Civilizations.ShortDescription - "TXT_KEY_CIV_ARCH_SHORT_DESC" does not exist in Language_en_US
[109700.281] Invalid Reference on Civilizations.Description - "TXT_KEY_CIV_ARCH_DESC" does not exist in Language_en_US
[109700.328] Invalid Reference on Civilization_CityNames.CityName - "TXT_KEY_CITY_NAME_ARCHADES" does not exist in Language_en_US
[109700.328] Invalid Reference on Civilization_CityNames.CityName - "TXT_KEY_CITY_NAME_DALMASCA" does not exist in Language_en_US
[109700.328] Invalid Reference on Civilization_CityNames.CityName - "TXT_KEY_CITY_NAME_RABANASTRE" does not exist in Language_en_US
[109700.328] Invalid Reference on Civilization_CityNames.CityName - "TXT_KEY_CITY_NAME_LUXERION" does not exist in Language_en_US
[109700.328] Invalid Reference on Civilization_CityNames.CityName - "TXT_KEY_CITY_NAME_NOVA_CHRYSALIA" does not exist in Language_en_US
[109700.328] Invalid Reference on Civilization_CityNames.CityName - "TXT_KEY_CITY_NAME_NALBINA" does not exist in Language_en_US
[109700.328] Invalid Reference on Civilization_CityNames.CityName - "TXT_KEY_CITY_NAME_WINDHELM" does not exist in Language_en_US
[109700.328] Invalid Reference on Civilization_CityNames.CityName - "TXT_KEY_CITY_NAME_BALFONHEIM" does not exist in Language_en_US
[109700.328] Invalid Reference on Civilization_CityNames.CityName - "TXT_KEY_CITY_NAME_ETHERIUS" does not exist in Language_en_US
[109700.328] Invalid Reference on Civilization_CityNames.CityName - "TXT_KEY_CITY_NAME_APOCALYPTA" does not exist in Language_en_US
[109700.328] Invalid Reference on Civilization_CityNames.CityName - "TXT_KEY_CITY_NAME_ROZZARIA" does not exist in Language_en_US
[109700.328] Invalid Reference on Civilization_CityNames.CityName - "TXT_KEY_CITY_NAME_LINDBLUM" does not exist in Language_en_US
[109700.328] Invalid Reference on Civilization_CityNames.CityName - "TXT_KEY_CITY_NAME_KAZAROS" does not exist in Language_en_US
[109700.328] Invalid Reference on Civilization_CityNames.CityName - "TXT_KEY_CITY_NAME_ALDHAM" does not exist in Language_en_US
[109701.687] Invalid Reference on Units.Help - "TXT_KEY_UNIT_HELP_IMPERIAL_ELITE" does not exist in Language_en_US
[109701.812] Invalid Reference on Units.Description - "TXT_KEY_UNIT_IMPERIAL_ELITE" does not exist in Language_en_US

Next:
[109698.937] PRIMARY KEY must be unique
[109698.937] While executing - 'insert into Leaders('ID', 'Type', 'Description', 'Civilopedia', 'CivilopediaTag', 'ArtDefineTag', 'VictoryCompetitiveness', 'WonderCompetitiveness', 'MinorCivCompetitiveness', 'Boldness', 'DiploBalance', 'WarmongerHate', 'DenounceWillingness', 'DoFWillingness', 'Loyalty', 'Neediness', 'Forgiveness', 'Chattiness', 'Meanness', 'PortraitIndex', 'IconAtlas') values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);'
[109698.937] In XMLSerializer while inserting row into table insert into Leaders('ID', 'Type', 'Description', 'Civilopedia', 'CivilopediaTag', 'ArtDefineTag', 'VictoryCompetitiveness', 'WonderCompetitiveness', 'MinorCivCompetitiveness', 'Boldness', 'DiploBalance', 'WarmongerHate', 'DenounceWillingness', 'DoFWillingness', 'Loyalty', 'Neediness', 'Forgiveness', 'Chattiness', 'Meanness', 'PortraitIndex', 'IconAtlas') with values (0, LEADER_VAYNE, TXT_KEY_LEADER_VAYNE, TXT_KEY_LEADER_VAYNE_PEDIA, TXT_KEY_CIVILOPEDIA_LEADERS_VAYNE, Sweden_Gustavus_Adolphus_Scene.xml, 8, 7, 3, 8, 3, 2, 7, 4, 4, 4, 5, 7, 7, 2, EXPANSION_LEADER_ATLAS, ).
[109698.937] In XMLSerializer while updating table Leaders from file XML/Leaders/Civ5Leader_Vayne.xml.

This is also a very serious error. Again, the log is telling you that you have a duplicate somewhere. It happens to be in the Leaders table, and also tells you that it's from your Leaders file. The problem is that you have attempted to define an ID of 0 -- you should never have to touch ID's in any table. Doing so will typically only cause problems, and should only be done for very specific reasons and only if you are doing some very advanced modding! The ID's of the standard game tables are already set to auto-increment, so you never have to deal with it. As a result of this error, this entire file was also discarded thus leaving your Civ without a leader.

This can be seen as part of the later slew of errors:
Spoiler :
[109700.328] Invalid Reference on Civilization_Leaders.LeaderheadType - "LEADER_VAYNE" does not exist in Leaders

First steps would be to fix those issues.
 
I appreciate the help a lot. Thank you! :)

I seem to have fixed those issues, my civilization was available and had the ability I gave it and its unique unit. Now I just need to learn how to import my art files to VFS. Being a noob is exhausting lol

EDIT: Looked around ModBuddy and found where to set Import to VFS to true.
ANOTHER EDIT: Apparently that doesn't fix it.
 
We were all there in the beginning. The important thing is the willingness to learn from these mistakes.

Importing files into VFS is thankfully very easy. Simply select the files in ModBuddy, and on the side there should be a panel to set VFS status to "true."
 
I set them to true but it still says it can't load the files. After I set them I saved all and rebuilt it so I'm not sure what I missed.
 
Ok I looked over my error logs and all I saw were two errors: 1 for a missing entry for the adjective for my civilization (which I corrected) & the other for a missing entry for some text for my unique unit (which I can't find what's missing). Though I admit there could have been something important I didn't understand. The most recent logs are in my attachment too
 

Attachments

  • Archadia (v 1).zip
    347.9 KB · Views: 20
Your texture atlas files are most likely saved incorrectly, as I don't believe I see an Alpha layer in them, and thus, even if it technically works, you won't see anything because everything is "hidden."

Also, if you only have a single icon, it's fairly wasteful to use the entire 8x8 atlas template; you can safely cut it down a bit (and redefine the number of icons per column and row to match.)
 
I added an alpha channel to all my art files and now the game loads them and my icon appears! :D However there is a large black box surrounding the icon. Is that caused by the alpha layer? Or do I need to remove the black surrounding the icon in the image layer? & Thanks again for all the help
 
Yes, that is caused by the Alpha layer. An alpha layer is simply regions of black (hidden) and white (visible) and sometimes shades of grey (varying levels of visibility.)

Without an alpha layer, it was effectively all black; thus, hiding the entire icon.
If you've just added an alpha layer without touching it, then you've likely added an all-white alpha layer, and this will cause everything to be displayed -- even the black areas outside of the icon's 'circle.' This is normally used in the slightly-more-advanced icons, such as my current avatar, to create the effect of certain parts of the icon to "stick outside" of the circle.

What you will be looking to do is to alter your alpha layer so that you have a white circle matching the size and position of your icon, and then everything else around it will be black.
 
Top Bottom