The logs can't be any more specific about where? I don't suppose there's any way to make them? Or something I can run the SQL through to check for syntax errors?
Use a standalone SQLite managerand let your files run against CIV5CoreDatabase (the main game) or CIV5DebugDatabase (the last modded database snapshot). You can find both in Documents/My Games/Civ.../cache.
The german BNW files for example give out hundreds of TXT_KEY_ errors right from Firaxis. So... Yeah, that's not your fault.
Code:
UPDATE Buildings SET WonderSplashAudio='AS2D_WONDER_QUOTE_'||Type WHERE BuildingClass.MaxGlobalInstances > 0;
Basically, there's 42 new wonders and I didn't want to be bothered to write out a toggleable UPDATE statement for every single one for wonder audio, so I just tried to circumvent it with this... it's apparently wrong? I'm guessing I'd have to borrow a line from whoward's code he posted earlier on this page to select the buildingclass?
May I suggest an even more easy way?
You are adding every much stuff, so is there a way you can distinguish between new and old items in your code?
For example, I always use BUILDING_SPM_Name, TECH_SPM_Name, UNIT_SPM_Name and so on. That way, you can 1) see what you did and 2) make changes to your stuff and don't touch vanilla code.
Code:
UPDATE Buildings SET WonderSplashAudio = 'AS2D_WONDER_AW_QUOTE_'||Type WHERE Type LIKE 'BUILDING_AW_WONDER_%';
Is there a minimum number of civs that need to exist in the game? Because I deleted all the 43 standard ones and replaced them with... what, 10, I think?
I will never understand why one would delete game data. I know Paz had made a good tutorial about it, but seriously, why don't you set them AIPlayable and Playable = 0 and ShowInPedia = 0?
No hasseling around with deletio errors...
Also, the minimum required number of civs is 7.
But I'm wondering if anyone else has experienced this weirdness.
Another thing about SQL... I've never seen anyone write their game text in SQL. Does SQL not work for that or is it just that XML is syntactically easier for writing text in?
So unless you plan somehow on re-recreating the Firaxis-made wonders, you've got some issues to work through. Most likely you'll have to undo some portion of the work your SQL UPDATE did. Unless you use Belzhorash's solution.
But Belzhorash's solution still does not address the issue that WonderSplashAudio is a reference to a ScriptID within the table Audio_2DSounds, so there must be a <Row> within Audio_2DSounds that has a matching ScriptID. That <Row> with that ScriptID will also have a column SoundID, which is in turn a reference to a <Row> within the table Audio_Sounds, where the <Row> with the matching SoundID defines a sound file and the LoadType for that file. And you need the referenced xxxx.mp3 file to be part of your mod. Are you really doing all this ?
May I suggest an even more easy way?
You are adding every much stuff, so is there a way you can distinguish between new and old items in your code?
For example, I always use BUILDING_SPM_Name, TECH_SPM_Name, UNIT_SPM_Name and so on. That way, you can 1) see what you did and 2) make changes to your stuff and don't touch vanilla code.
Code:
UPDATE Buildings SET WonderSplashAudio = 'AS2D_WONDER_AW_QUOTE_'||Type WHERE Type LIKE 'BUILDING_AW_WONDER_%';
Mmm... my wonders aren't prefixed like that. :/ They're just called BUILDING_%, since I wasn't sure if the game engine would start choking uncontrollably if I prefixed them with WONDER_. My code was set up the way it was for a reason, which was this: The mod deletes all of Firaxis' wonders and replaces them with 42 completely new ones.
I might have forgotten to mention it, or more likely I didn't think it would become a point of issue. I'm not sure.
So unless you plan somehow on re-recreating the Firaxis-made wonders, you've got some issues to work through. Most likely you'll have to undo some portion of the work your SQL UPDATE did. Unless you use Belzhorash's solution.
But Belzhorash's solution still does not address the issue that WonderSplashAudio is a reference to a ScriptID within the table Audio_2DSounds, so there must be a <Row> within Audio_2DSounds that has a matching ScriptID. That <Row> with that ScriptID will also have a column SoundID, which is in turn a reference to a <Row> within the table Audio_Sounds, where the <Row> with the matching SoundID defines a sound file and the LoadType for that file. And you need the referenced xxxx.mp3 file to be part of your mod. Are you really doing all this ?
Yes, I'm not just pulling random AS2Ds out of thin air. And I'm aware of how to add sound, since I've done it with music and have at least observed how it's done with DOM speeches.
I did assume that the LoadType is DynamicResident, since I have no idea what any of them do and I just picked which one I'm familiar with.
And no, I wasn't planning on recreating all Firaxis' wonders; quite the contrary in fact. If you'll look back on the last page, I was asking whoward how to delete all wonders... (except for 42 of them, which are the ones I added)
---
At any rate, I also found out that the wonders file is chock full of syntax errors (42 of them involve numbers I put floating outside of comments to prefix each line that defined a wonder, which I forgot to remove ) and I think I solved several of the buildings file syntactical errors, so hopefully the game will stop complaining about nonexistent UBs when I playtest again.
Also, whoward, if you're reading this:
Code:
DELETE FROM Buildings WHERE Type IN
(SELECT b.Type FROM Buildings b, BuildingClasses bc
WHERE bc.MaxGlobalInstances > [B][COLOR="Blue"]1[/COLOR][/B] OR bc.MaxPlayerInstances > 0
AND bc.Type = b.BuildingClass AND b.Cost > 0);
Where MaxGlobalInstances is greater than 1? Like a wonder that can be built a maximum of 2 times in the world instead of just 1? Or did I miss something?
No worries. I just wanted to make sure you weren't overlooking one of the most obvious reasons why such a mod might fail (ie, non-consistency in Firaxis naming conventions leading to those irksome gotchas).
I'd also assume unless you hear otherwise from whoward that last thing was a typo and he meant to type:
Code:
WHERE bc.MaxGlobalInstances > 0 OR bc.MaxPlayerInstances > 0
I can't think of any instances where Firaxis used MaxGlobalInstances of "2" or greater. It's all either omitted (resulting in the default "-1" :ie, unlimited) or they've used "1".
because if I'm understanding the rest of it I think you'll get a "false positive" for the Recycling Center. Depends on what the rest of your mod is doing wrt the need/lack-thereof for the Recycling Center.
So, does SQL really work with text? I've run it through a database until I've rid the file of syntax errors, yet the game still just displays TXT_KEYs.
I don't know if this has anything to do with it:
Code:
[58106.675] too many terms in compound SELECT
There's about a thousand lines of text, but they're in INSERT, not SELECT...
That's an error, so it will be having some effect. Just because you don't understand the error doesn't mean you can ignore it. It will be causing the file (and hence the database transaction) to fail.
If you have lots of files updating the database in your mod, cross-reference the time stamp (the 58106.675 bit) with the numbers in stopwatch.log as that'll tell you which file was being processed when the error occured
[...]
cross-reference the time stamp (the 58106.675 bit) with the numbers in stopwatch.log as that'll tell you which file was being processed when the error occured
I had to do this once, but for some reason it didn't quite match up.. I'm not sure if there's a delay or something, but there's my experience. I ended up having to simply make a best guess as to the most recent file prior to the particular timestamp instead.
If you have lots of files updating the database in your mod, cross-reference the time stamp (the 58106.675 bit) with the numbers in stopwatch.log as that'll tell you which file was being processed when the error occured
ToggleVoiceActing is the only one with any SELECT statement:
Spoiler:
Code:
UPDATE Buildings SET WonderSplashAudio='AS2D_WONDER_QUOTE_'|[B][COLOR="Red"]|[/COLOR][/B]Type WHERE Type IN
(SELECT b.Type FROM Buildings b, BuildingClasses bc
WHERE b.BuildingClass == bc.Type AND bc.MaxGlobalInstances > -1 AND b.Type IN(
'BUILDING_WONDER_0',
'BUILDING_WONDER_1',
'BUILDING_WONDER_2',
'BUILDING_WONDER_3',
'BUILDING_WONDER_4',
'BUILDING_WONDER_5',
'BUILDING_WONDER_6',
'BUILDING_WONDER_7',
'BUILDING_WONDER_8',
...continue the chain...,
'BUILDING_WONDER_41')
);
Is 42 too many items to handle? Is this even a compound SELECT? (I was under the impression that that would be a SELECT nested in another SELECT...) But sure enough, none of the wonders in the database have any WonderSplashAudio...
At the bold red bar I'm getting a ModBuddy syntax error saying something like "Syntax error, expected: id_simple string number ( not + - ~"...
Now, I don't know what to think of the comma error, since I've added it manually to a database and it presented no syntax errors... but I also can't initially find the text in any of the localization databases...?
Actually, couldn't find a comma error in any of the files... does it refer to the absence of a comma next to the vertical bar?
Welp, I eliminated all errors except for the compound SELECT one, which I guess has to correspond to the text since it's still not working, but that still doesn't make sense since it's just INSERT INTO, and not SELECT...
My mod's also crashing right before the DOM screen shows. I must've checked building and unit reference spelling a thousand times and can't find any mistakes. But I did replace all of the CSs with 20 of my own; is anyone aware of a minimum number of CSs that need to exist in order to prevent a crash?
Welp, I eliminated all errors except for the compound SELECT one, which I guess has to correspond to the text since it's still not working, but that still doesn't make sense since it's just INSERT INTO, and not SELECT...
But my mod still crashes for no reason I can ascertain. I've checked unit and building references so many times...
I'm out of ideas of what could be wrong, so... I guess... I have to do the unthinkable...
(Mod Attachment!) (WARNING: Big download! >209 MB)
...and just hope that not just anyone decides to download for spoilers.
The 'Global' part of this column is that it affects every city in the empire:
Code:
GlobalGreatPeopleRateModifier
So do you really want every university-replacement constructed in the empire to boost great people generation in every city by 10%, to a cumulative total of who knows what ?
These are nope without a dll or an lua implimentation (which you might have already, since I haven't had a chance to look through the whole thing) to get around the game's stock table-hook-ups limitations:
The table does not work for faith or culture. Some believe it does work with the stock game hook-ups, but they are paying too much attention to the mouse-over tooltips for the specialists and not paying any attention to the mouse-hover tool-tips for the city yields box. Or, for that matter, the total empire yields. In any event, this is a global-effect table not a local-to-city effects table. Rows in this table affect all cities anywhere in the empire. [edit] By this, I mean the effects will also stack from multiple copies of the building being present in the same empire in addition to the effect being implimented everywhere in the empire for a single instance of the building being constructed within an empire.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.