Quick Modding Questions Thread

Ah, I have finally realised what the problem is! It turns out that modbuddy was saving the .sql files in ANSI encoding - when I saved the files as UTF-8 instead the accents appeared just fine. Thanks very much for your help! :)

I am curious - is there a way to configure ModBuddy to use UTF-8 encoding? Or is it a case of using another program to open the file(s) in question and re-saving?

Special characters have been a modding annoyance of mine for ages.
 
XML files display being encoded as utf-8 at the top of the file. SQL files do not so it may only be an issue with how SQL files are handled.

edit to clarify -- for files created in Modbuddy
 
Last edited:
XML files display being encoded as utf-8 at the top of the file. SQL files do not so it may only be an issue with how SQL files are handled.

Yeah, so it is possible to save a SQL file with a specific encoding (using most of the flexible, all-purpose text editors). I had previously thought that it was perhaps an XML vs. SQL limitation - but trying various encoding combinations I never had any luck.

Last night, however, I definitively made a special character work via a SQL file and it appeared in-game in the Civilopedia text. Applying that same special character to a city name, however, resulted in the generic [X] symbol. This makes me wonder whether it is a font limitation, more than an encoding limitation. Although, in the same thought, I know for a fact I have seen mods use special characters within city names (and other on-map items, like rivers, etc). I may just bite the bullet and try a whole host of special characters to see if there is some level of support based on which character is used. Or perhaps just inspect the fonts. That's a more technical way to analyse that theory.
 
I recall there being a tool in civ 5 that could turn a map into .lua format. Is there anything like it for civ 6?
 
I'm creating a mod which reduces the strategic and luxury resources on a map to zero. I've already got that part working, but I am thinking that it will handicap the AI too much.

My thought now is to just give the AI some luxuries and +4 of a strategic resource per turn. I know that this sort of stuff already exists in the games (jeans and Hattusa). But I just don't know how to do this right now. Could someone point me to a mod which gives people free luxuries and strategic resources? Thanks!
 
Hi everyone!

I am currently working on a mod which adds some custom civs, and I wanted to make unique units with peculiar workings. One is able to cause disaster while the other would reduce loyalty either upon defeating an enemy or by using a spread charge.

However, I haven't any way to make the loyalty unit work. I found the UnitCommands with the Dissent command, however, I have no idea how to affix it on a certain unit.
The disaster unit just mimicks the soothsayer, however, it's only available when using Apocalypse mode. Does anyone know if there's a way to make it always work when using GS?

Thanks for any input
 
Is changing a unit's type (Melee vs Anti Cavalry) basically just a find/replace process of going through all the lines that say "MELEE" and changing them to say "ANTI_CAVALRY" ?

Is there anything else you really need to do besides updating the Upgrade unit and the cost/move/combat strength as relevant?

Trying to make the Gaesatae a Spearman replacement instead of Warrior.
 
A foul error when I rearranged Tech tree to add more tier in Classical Era and Renaissance.
A tech that shouldn't be researchable in Ancient Era (4000 BC Turn1) is unlocked.

In my previous attempt. researching order was worse.... the new tech 'Heavy Armor' which I placed them in Classical Era (in place of Iron Working which I moved it earlier) was cheaper than Mining!!!.

Code:
[3436173.274] [Localization]: StartupErrorMessages.xml
[3436173.275] [Localization]: Input XML does not contain database entry tags. GameData, GameInfo or Database
[3436195.400] [Localization]: Validating Foreign Key Constraints...
[3436195.400] [Localization]: Passed Validation.
[3436195.715] [Configuration]: Validating Foreign Key Constraints...
[3436195.716] [Configuration]: Passed Validation.
[3436230.529] [FullTextSearch]: Initializing FullTextSearch
[3436247.314] [Gameplay]: Validating Foreign Key Constraints...
[3436247.347] [Gameplay]: Passed Validation.
[3436255.366] [Configuration]: Validating Foreign Key Constraints...
[3436255.367] [Configuration]: Passed Validation.
[3436267.830] [HallofFame]: Database found. Checking versions...
[3436267.856] [HallofFame]: Database is up-to-date!
[3436297.427] [FullTextSearch]: FTS - Creating Context
[3436311.434] [FullTextSearch]: FTS - Creating Context
[3436514.297] [Configuration]: Validating Foreign Key Constraints...
[3436514.443] [Configuration]: Passed Validation.
[3436907.647] [Gameplay]: Validating Foreign Key Constraints...
[3436907.771] [Gameplay]: Passed Validation.
[3436946.699] [Database] ERROR: no such table: BaseGameText
[3436946.699] [Database]: In Query - insert into BaseGameText('Tag', 'Text') values (?, ?);
[3436946.699] [Database]: In XMLSerializer while updating table BaseGameText from file C:/Users/CITs/Documents/My Games/Sid Meier's Civilization VI/Mods/ZaabSpicey/ZaabSpicey_TechnologiesText.xml.
[3437063.054] [FullTextSearch]: FTS - Creating Context
[3437063.091] [FullTextSearch]: FTS - Creating Context
[3437066.965] [FullTextSearch]: FTS - Creating Context
[3437067.732] [FullTextSearch]: FTS - Creating Context
[3437075.335] [FullTextSearch]: FTS - Creating Context
[3437674.820] [FullTextSearch]: FullTextSearch - Shutting down
I donno how to crack this tuff nut. This is my big mod project WIP which i'm testing the first phase (new unit and new graphical representations of existings for Ancient and Classical Era). and codings had never been easy.
https://drive.google.com/file/d/18YKMhphcXbXAEMEisw7NnCXLULMo1yn2/view?usp=sharing

Can anyone inspect and check if there's anything wrong with my project please.
 
I'm downloading this now and will take a look for you but a suggestion, perhaps: as the question is about code, I am not sure you should link us to a 2Gb download in order to troubleshoot. It's probably worth creating a version of your project without the artwork so it's more accessible for code-only troubleshooting.
 
Any chance you can help me out a bit by providing some specifics?

I have had a brief look at the mod - but obviously it is doing such a significant overhaul, that honing in on the fault will be made easier if I know where to start. Specifically:

A tech that shouldn't be researchable in Ancient Era (4000 BC Turn1) is unlocked.

Which technology?

In my previous attempt. researching order was worse.... the new tech 'Heavy Armor' which I placed them in Classical Era (in place of Iron Working which I moved it earlier) was cheaper than Mining!!!

Is this still a problem now?

Code:
[3436946.699] [Database] ERROR: no such table: BaseGameText

I have a feeling you are getting this error because your ZaabSpicey_TechnologiesText.xml file is executing as part of an UpdateIcons In-Game Action. I think you did not intend to put this there. I would remove it from there and try again and see if that error goes away.
 
Would it be possible to move a Unique Unit's special ability to being a Civ-specific trait? For instance, instead of the Roman Legion having a build charge, would it be possible to mod Rome so that it grant all of its Land Melee units a build charge?

Not even sure how one would go about doing it, mostly curious if it's even possible.
 
I have a feeling you are getting this error because your ZaabSpicey_TechnologiesText.xml file is executing as part of an UpdateIcons In-Game Action. I think you did not intend to put this there. I would remove it from there and try again and see if that error goes away.

It's better now. (relocated ZaabSpicey_TechnologiesText.xml into UpdateText In-Game Action. but i've yet to try because i'm adding new units at this moment.)
 
Is it possible to exclude adjacencies based on something other than leader/civilization traits?
E.g. I'd like to give the Mahabodhi Temple a bonus that Holy Sites receive +1 faith adjacency from every adjacent woods tile instead of every two tiles. Currently, I'm only able to put the adjacency bonus on top of the existing one.
 
Would it be possible to move a Unique Unit's special ability to being a Civ-specific trait? For instance, instead of the Roman Legion having a build charge, would it be possible to mod Rome so that it grant all of its Land Melee units a build charge?

Not even sure how one would go about doing it, mostly curious if it's even possible.
It would not be very workable even though you can adjust unit build charges via modifiers. The issue is what the unit will be able to build. And that is controlled primarily by table Improvement_ValidBuildUnits and table Route_ValidBuildUnits both of which require a specific statement of the UnitType that can build X. Multiple units can be allowed via these tables to build the same X, but each such unit must be listed individually within the table -- and then any player who owns such a unit can have that unit do the build.

This is specifically stated within table Improvement_ValidBuildUnits:
Code:
<Row ImprovementType="IMPROVEMENT_ROMAN_FORT" UnitType="UNIT_ROMAN_LEGION"/>
So the Unique Unit that only Rome is usually allowed to have is the only unit that can build the Unique Improvement.
 
It would not be very workable even though you can adjust unit build charges via modifiers. The issue is what the unit will be able to build. And that is controlled primarily by table Improvement_ValidBuildUnits and table Route_ValidBuildUnits both of which require a specific statement of the UnitType that can build X. Multiple units can be allowed via these tables to build the same X, but each such unit must be listed individually within the table -- and then any player who owns such a unit can have that unit do the build.

This is specifically stated within table Improvement_ValidBuildUnits:
Code:
<Row ImprovementType="IMPROVEMENT_ROMAN_FORT" UnitType="UNIT_ROMAN_LEGION"/>
So the Unique Unit that only Rome is usually allowed to have is the only unit that can build the Unique Improvement.

That's interesting, but now I'm wondering what prevents builders from being able to build any unique improvement. There's obviously something that limits them, and the same restriction presumably applies to the roman fort.

Additionally, if other civ's melee units can build forts, but don't have a build charge, would that cause any issues with the game? Or would those units just spawn with zero build charges?
 
Roman Fort requires Roman Legion -- Roman Legion requires TRAIT_CIVILIZATION_UNIT_ROMAN_LEGION (this is shown directly in table Units for the TraitType of UNIT_ROMAN_LEGION). TRAIT_CIVILIZATION_UNIT_ROMAN_LEGION is tied to Rome via the CivilizationTraits table.
Code:
<Row CivilizationType="CIVILIZATION_ROME" TraitType="TRAIT_CIVILIZATION_DISTRICT_BATH"/>
<Row CivilizationType="CIVILIZATION_ROME" TraitType="TRAIT_CIVILIZATION_UNIT_ROMAN_LEGION"/>
<Row CivilizationType="CIVILIZATION_ROME" TraitType="TRAIT_CIVILIZATION_ALL_ROADS_TO_ROME"/>
Unique Improvements that are tied to a leader or civilization other than a city-state have each their own TraitType registered in table Improvements. Example
Code:
<Row ImprovementType="IMPROVEMENT_CHATEAU" Name="LOC_IMPROVEMENT_CHATEAU_NAME"
Description="LOC_IMPROVEMENT_CHATEAU_DESCRIPTION" Icon="ICON_IMPROVEMENT_CHATEAU" PlunderType="PLUNDER_FAITH"
PlunderAmount="25" Buildable="true" PrereqCivic="CIVIC_HUMANISM" TraitType="TRAIT_CIVILIZATION_IMPROVEMENT_CHATEAU"
SameAdjacentValid="false" RequiresAdjacentBonusOrLuxury="true" Appeal="1"/>
The TraitType TRAIT_CIVILIZATION_IMPROVEMENT_CHATEAU is then assigned to France
Code:
<CivilizationTraits>
     <Row CivilizationType="CIVILIZATION_FRANCE" TraitType="TRAIT_CIVILIZATION_IMPROVEMENT_CHATEAU"/>
</CivilizationTraits>
City-State improvements are tied to the city-state, but every major civilization is assigned a modifier that adjusts valid improvement build actions for these city-state improvements -- the modifiers have a requirement that the effect of the modifier is only implemented when the major civilization qualifies as the suzerain of the individual city state that grants the ability to construct a unique improvement.

The Nihang unit works in the same basic way.
 
I'm working on a mod that duplicates religious beliefs, among other things. Everything seems to be working fine with pantheon duplicates so far, but there seems to be a problem with loading the icon for fire goddess in it's duplicates. Fire goddess standard belief also doesn't load when the mod is activated. I don't think it's a coincidence that it's the only expansion belief among all the other pantheon ones, but i'm still a noob and dunno how to identify where the exact problem is and how to fix it. Any help is appreciated. Here is the log
 

Attachments

  • Database.rar
    898 bytes · Views: 23
Would need the mod folder zipped up from within the ----\Documents\My Games\Sid Meier's Civilization VI\Mods folder to be sure but I suspect a load order issue as to when your mod loads in relation to when the code for the expansion loads.
 
Top Bottom