Cyphose
y tho
- Joined
- Feb 1, 2016
- Messages
- 181
I used to be reasonably proficient at modding back in the Civ5 days, and now Civ6 has finally gotten around to intriguing me, so I started modding here as well. A lot of the same principles apply, so normally I'm able to find the problem... but some things leave me stumped, and that's what this thread is for. I don't know how often I'll be using it, but it will undoubtedly be better than making a new thread every time I have a new question.
At any rate, here's what's giving me grief at the moment:
At any rate, here's what's giving me grief at the moment:
I'm currently making a mod to change the base game tooltips to not suck. It's called Tips are Tools, and if details would help you diagnose the problem, you can read about it here.
Some things in the game (mostly buildings) don't have initial descriptions to update--their <Description> field in the database is empty. Because I want to add descriptions, I have to update their building definitions too. Nothing fancy, let's take the Library:
Of course, the LOC_BUILDING_LIBRARY_DESCRIPTION is defined elsewhere. The creation of the localization tag works fine, it just seems to be updating the building definitions that's causing issues. All of these updates are in a separate file, called "Updates.xml", because it requires an UpdateDatabase action instead of UpdateText.
Currently, what my mod does upon starting a game is hang at a black screen and then send you back to the main menu. From what I've read, this is the universal Civ6 sign of "mistakes were made," so after a bit of investigating, I decided to remove any action on Updates.xml and my mod started the game fine. That narrows it down to where the problem is, but I'm not sure how to fix it.
Here's what I know:
Thanks in advance for any help anyone can provide. I have another question to ask, but it's not nearly as important, just more of an annoyance. I'll leave that for afterward, since a game-crashing bug is far more critical.Some things in the game (mostly buildings) don't have initial descriptions to update--their <Description> field in the database is empty. Because I want to add descriptions, I have to update their building definitions too. Nothing fancy, let's take the Library:
Code:
<GameData>
<Buildings>
<Update>
<Where BuildingType="BUILDING_LIBRARY" />
<Set Description="LOC_BUILDING_LIBRARY_DESCRIPTION" />
</Update>
</Buildings>
</GameData>
Currently, what my mod does upon starting a game is hang at a black screen and then send you back to the main menu. From what I've read, this is the universal Civ6 sign of "mistakes were made," so after a bit of investigating, I decided to remove any action on Updates.xml and my mod started the game fine. That narrows it down to where the problem is, but I'm not sure how to fix it.
Here's what I know:
- The game is parsing Updates.xml. I checked DebugGameplay.sqlite and all the changes in the file were made in the database.
- Updates.xml used to work fine. For some reason, presumably after making a change I don't remember making, it started crashing the game.
- My logs aren't pointing me in any direction in particular. They'll be linked below. These lines stick out to me:
Code:
[2051945.568] [Gameplay] ERROR: near "Update": syntax error [2051945.571] [Gameplay] ERROR: near "Update": syntax error [2051945.571] [Gameplay]: Validating Foreign Key Constraints... [2051945.586] [Gameplay]: Passed Validation. [2051945.586] [Gameplay] ERROR: near "Update": syntax error [2051945.586] [Gameplay] ERROR: near "Update": syntax error