Sid Meier's Civilization VI

Sid Meier's Civilization VI

Warfare Expanded Complete Edition
Flactine 2020 年 2 月 5 日 下午 8:59
UnitUpgrades Broken
All WE units can't be upgrades to Vanilla units.
I tried put "INSERT INTO UnitUpgrades" table into a independence .sql file, then the Upgrades is worked.
最后由 Flactine 编辑于; 2020 年 2 月 21 日 上午 1:47
< >
正在显示第 1 - 15 条,共 20 条留言
tenthousandimmortals 2020 年 2 月 11 日 下午 8:20 
@Flactine
How did you get it to work? I created a new .sql file, then called it WarfareExpanded_Unit_Upgrades.sql and put it right next to the other files in the data folder for the mod. Into the file I just copied the INSERT INTO UnitUpgrades (Unit, UpgradeUnit) table. I did not delete the old table in the WarfareExpanded_Units.sql file. What am I doing wrong?
Flactine 2020 年 2 月 11 日 下午 8:22 
@tenthousandimmortals
You should also edit .modinfo file:
Add your SQL into <Files> and <UpdateDatabase id="Gameplay">
Hizkiyahu  [开发者] 2020 年 2 月 12 日 下午 11:55 
This needs to be done in the WarfareExpanded_Text_zh_Hans_CN.xml file not WarfareExpanded_Units.sql
Hizkiyahu  [开发者] 2020 年 2 月 13 日 上午 4:30 
I noticed he bug is also in the HK file as well. Should be fixed now with the latest update.
Kajaker 2020 年 2 月 14 日 下午 11:14 
After the latest update unit upgrade is broken. I can not upgrade many units any longer.
LionQ 2020 年 2 月 16 日 上午 7:11 
引用自 Kajaker
After the latest update unit upgrade is broken. I can not upgrade many units any longer.
I'm running into the same problem. None of my Units can upgrade. :steamsad:
Hizkiyahu  [开发者] 2020 年 2 月 17 日 上午 12:13 
OK I think I have a fix here. Edit ACT.sql in the ACT mod and change
INSERT INTO Units_XP2
(UnitType, CanEarnExperience, CanFormMilitaryFormation)
VALUES ('UNIT_AIRCRAFT_CARRIER', 0, 0);

to

INSERT OR REPLACE INTO Units_XP2
(UnitType, CanEarnExperience, CanFormMilitaryFormation)
VALUES ('UNIT_AIRCRAFT_CARRIER', 0, 0);

then edit ACTweak.modinfo and add

<Properties>
<LoadOrder>99900</LoadOrder>
</Properties>

to

<UpdateDatabase id="NewAction">
***** INSERT HERE *****
<File>ACT.sql</File>
</UpdateDatabase>

Then remove reference to ACT_MOD.sql as it is not needed.

Upgrades will work again and logs will be clean.
最后由 Hizkiyahu 编辑于; 2020 年 2 月 17 日 上午 12:21
Cobber [1st M.I.] 2020 年 2 月 17 日 上午 5:08 
Following Hizkiyahu's instructions above I can confirm that it has definitely cleaned my database log of a couple of Unique Constraint Failure references, so I believe that aspect of this fix has worked as desired and intended. I cannot comment on the upgrades working themselves per se, as I have only just started a new game and haven't reached that point in it yet. I will advise once I have reached that point on whether that aspect of the fix worked as desired or not.
Cobber [1st M.I.] 2020 年 2 月 17 日 上午 5:13 
This fix has also cleaned the modding and lua logs as far as I can see.
ThreeFourOneDP 2020 年 2 月 18 日 上午 12:50 
Since I don't know where else to bring this up, I attempted to make a mod (first time for civ 6) which would go along with this on (for myself) in an attempt to prevent being able to learn techs that unlock units 2 up in the promotion line, making it a requirement to learn the 1st upgrade before being able to research tech required for the 3rd upgrade. I adjusted the 'prerequisite tech' stuff, but it didn't seem to make a difference in my game. I have completed the mod and the files are good, but it doesn't seem to work upon applying it. Any chance you could help me figure out what i did wrong?
(Edit) The issue may be that i adjusted the base game (vanilla) files as opposed to the Gathering Storm files. Problem is, when i go to the tech files for the expansions there is limited info and little to nothing on prerequisite techs which led me to believe the base game files would do the trick...idk though.
最后由 ThreeFourOneDP 编辑于; 2020 年 2 月 18 日 上午 1:39
Hizkiyahu  [开发者] 2020 年 2 月 18 日 上午 2:24 
It is a bit risky directly editing base game files. I would recommend making a mod and use it to update the database. Sometimes if you are making a mod like this you may need to start a new game for the mod to apply.
ThreeFourOneDP 2020 年 2 月 18 日 上午 8:05 
引用自 Hizkiyahu
It is a bit risky directly editing base game files. I would recommend making a mod and use it to update the database. Sometimes if you are making a mod like this you may need to start a new game for the mod to apply.
ya sorry if i wasnt clearer but i was making a mod, just based on the vanilla files as opposed to the DLC files
GLB_TH 2020 年 2 月 19 日 上午 1:49 
I use R&F 1.0.0.341 (443561), unit upgrades where broken since a few days. I finally found the bug (after learning a bit of sql and civ 6 modding). The table Units_XP2 did not exist and caused the bug. I added the line

CREATE TABLE IF NOT EXISTS Units_XP2 (UnitType VARCHAR, ResourceMaintenanceAmount INTEGER, ResourceCost INTEGER, ResourceMaintenanceType VARCHAR, TourismBomb INTEGER, CanEarnExperience BOOLEAN, TourismBombPossible BOOLEAN, CanFormMilitaryFormation BOOLEAN, MajorCivOnly BOOLEAN);

(that I found WE_Armored_Assault_Units.sql) in the file WarfareExpanded_Units.sql
Hizkiyahu  [开发者] 2020 年 2 月 20 日 下午 11:18 
Not sure why this was an issue as Units_XP2 in not used or needed by R&F so it should not need this table.
GLB_TH 2020 年 2 月 21 日 上午 1:27 
The line that caused the bug (in WarfareExpanded_Units.sql) is

DELETE FROM Units_XP2 WHERE UnitType = 'UNIT_INFANTRY' AND EXISTS (SELECT name FROM sqlite_master WHERE type='table' AND name='Units_XP2');

It can not execute with R&F because Units_XP2 does not exist. And them all subsequent lines are not executed. (It seems that you can not write DELETE FROM table ... if the table does not exist even with a WHERE statement that test the table existence).

There is the same problem in the file WarfareExpanded_Units_Changes.sql with an UPDATE statement:

UPDATE Units_XP2 SET ResourceMaintenanceType = 'RESOURCE_OIL'
WHERE UnitType ='UNIT_BATTLESHIP' AND EXISTS (SELECT name FROM sqlite_master WHERE type='table' AND name='Units_XP2');

and none of the subsequent lines are executed since this line caused a bug. But the UnitsUpgrade table is normaly modified after this line...

Another way to deal with the problem is likely to change the order of the statements in the files : puting references to Units_XP2 at the end. But I prefer the solution I wrote in the previous message : creating the table because it prevent the bug.
< >
正在显示第 1 - 15 条,共 20 条留言
每页显示数: 1530 50