Looking for A Mod

Bradbro

Chieftain
Joined
Jun 8, 2014
Messages
6
Location
California, USA
Are there any mods that force you to finish the current era before you move on to the next one? 'Cause I think I've heard of one. Although I may have just made it up in my head. :lol:
 
Never updated to BNW (as the TechTree UI code changed significantly), but the SQL should still work with BNW

Spoiler :
Code:
-- Add a new Display column to the Tech Prereqs table, and default existing entries to "show"
ALTER TABLE Technology_PrereqTechs ADD COLUMN Display INT DEFAULT 1;

-- Add all the missing prereq techs, setting them to "hide"
INSERT INTO Technology_PrereqTechs(TechType, PrereqTech, Display)
  SELECT DISTINCT t.Type, e.EndTech AS PrereqTech, '0'
  FROM Technologies AS t,
       Technology_PrereqTechs AS r,
	   Technologies AS p,
       (SELECT DISTINCT t.Era, t.Type As EndTech
        FROM Technologies t, Technology_PrereqTechs r, Technologies n
		WHERE t.Type=r.PrereqTech
          AND r.TechType=n.Type
		  AND t.Era!=n.Era) AS e
  WHERE t.Type = r.TechType
    AND r.PrereqTech = p.Type
	AND t.Era != p.Era
	AND e.Era = p.Era
	AND e.EndTech NOT IN (SELECT x.PrereqTech FROM Technology_PrereqTechs x WHERE t.Type = x.TechType);

-- Update the entry in the Defines table to be the maximum number of prereqs for any individual tech
UPDATE Defines 
  SET Value=(SELECT Max(c) FROM (SELECT Count(PrereqTech) AS c FROM Technology_PrereqTechs GROUP BY TechType))
  WHERE Name='NUM_AND_TECH_PREREQS';
 
Thanks, but how do I use that code? I know very little about modding. :blush:

I tried creating a mod using modbuddy with that code and it didn't work, although I might have done something wrong. I created a .sql file in modbuddy, typed all of that in, saved it, and clicked build. When I got in game I could beeline halfway through the tech tree with the mod enabled.
 
Go to the mod properties, Actions tab, and add the SQL file as OnModActivated -> UpdateDatabase. Build the mod again. Then it should work.
 
I did all that and it still didn't work. I could still beeline through the tech tree.

Would me running enhanced UI have anything to do with it not working?
 
Top Bottom