Circumventing mod load order issues with database triggers

Ah, yes - the tag in Buildings is "Type", not "BuildingType" as called in the reference tables - thanks for pointing that out!

That initial insert is a great idea and will probably even make my code more elegant - SQL offers a bit more flexibility in this regard, anyway.

EDIT: Works like a charm now, thanks again for the pointers!
 
Is that ModBuddy's usual behaviour on that keyword or am I doing something wrong?

ModBuddy has a very limited understanding of SQL, it complains about lots of things - just ignore it and get a proper SQL utility, such as the FireFox plugin or the standalone SQLiteSpy
 
Is it possible to use the triggers to make a building that is added unique to a single civilization? I have gotten the building added to the game, but I can't figure out how to make it only be built by my civ. Thanks in advance (Though I'll probably end up saying thanks again when/if my question is answered).
 
You don't need triggers (or anything fancy) at all, just add an entry in the <Civilization_BuildingClassOverrides> table to make it a Unique Building (UB)

(If you need more details, please start a new thread in the main C&C forum)
 
This code:
Code:
CREATE TRIGGER NewUnitName
AFTER INSERT ON Language_en_US
BEGIN
END;
gives error in database.log: " no such table: main.Language_en_US". Any ideas why?
 
Back
Top Bottom