Longer Eras - Historic -- bugfix

pocholo_simeone

Chieftain
Joined
Jan 16, 2019
Messages
1
Hello. I installed this mod recently ( Longer Eras - Historic - https://steamcommunity.com/sharedfiles/filedetails/?id=220412890 ) and at the end it says that there is a 'undesirable' bug. The thing is you must return ResearchPercent back to normal (100) and triple the technology costs to compensate. Now let's see how that goes in SQL.


Triple all technology (ALL: Vanilla, DLC and mod):

UPDATE Technologies
SET Cost = 3 * Cost;


And this to triple any tech added after the load of this mod:

CREATE TRIGGER TripleTechnologies
AFTER INSERT
ON Technologies
BEGIN
UPDATE Technologies
SET Cost = 3 * Cost
WHERE Type = New.Type
END;


Now to update the ResearchPercent (I set it to 150, I think it is more balanced, to further slow down human progress hahah):
(1)
UPDATE Gamespeeds
SET ResearchPercent = '150'
WHERE Type = 'GAMESPEED_HISTORIC';


And now, just because I can, I'm removing all of the rest of Gamespeeds:

DELETE FROM Gamespeeds
WHERE Type <> 'GAMESPEED_HISTORIC';

THIS DOES NOT WORK. The Civ5DebugDatabase still displays all 5 Gamespeeds (including the new modded Historic).
Also doesn't work the above (1) to reduce the ResearchPercent to 150, GAMESPEED_HISTORIC still has 400.


P.S. this was just in case the Gamespeed was added after my mod. Not necessary any more, I set a dependency.

--CREATE TRIGGER GamespeedHistoric150
--AFTER INSERT
--ON Gamespeeds
--WHEN New.Type = 'GAMESPEED_HISTORIC'
--BEGIN
-- UPDATE Gamespeeds
-- SET ResearchPercent = '150'
-- WHERE Type = 'GAMESPEED_HISTORIC'
--END;

Any help in the Gamespeed issue??
Thanks in advance
 
GameSpeeds

Check your code for proper capitalization, and check Database.log (after enabling logging whoward69's enable error logging tutorial) for any error messages related to your code. Be aware however for errors in SQL files all you will get is a cryptic message like "Near ; syntax error".

In XML table-name capitalization is not important but I cannot remember whether this is true for SQL. I always use Upper/Lower as the table was defined by Firaxis in order to avoid any of these upper/lower issues.

Also ensure that your SQL file is being loaded as an UpdateDatabase type of action: whoward69's what ModBuddy setting for what file types tutorial
 
Top Bottom