N.Core
1st Class of Neoa
Whoopsie, a little minor fix.
Wrong insertion on Unit_ClassUpgrades.
A few changes on the last part of the code:
Also, an experimental fix because I haven't tested this though:
Let me know if this method also works.
(UPDATE) This method worked, but a little redundant if there isn't any mod that adds a unique unit for EE_ADVENTURER.
Wrong insertion on Unit_ClassUpgrades.
A few changes on the last part of the code:
Code:
CREATE TRIGGER EEVP_AdventurerCommandoClassUpgrade_Replace
AFTER INSERT ON Unit_ClassUpgrades
WHEN NEW.UnitType = 'UNIT_EE_ADVENTURER'
BEGIN
UPDATE Unit_ClassUpgrades SET UnitClassType = 'UNITCLASS_COMMANDO' WHERE UnitType IN (SELECT Type FROM Units WHERE Class = 'UNITCLASS_EE_ADVENTURER');
END;
Also, an experimental fix because I haven't tested this though:
Code:
CREATE TRIGGER EEVP_AdventurerCommandoFix
AFTER INSERT ON Units
WHEN NEW.Type IN (SELECT Type FROM Units WHERE Class = 'UNITCLASS_EE_ADVENTURER')
BEGIN
UPDATE Units SET ObsoleteTech = 'TECH_RAILROAD', GoodyHutUpgradeUnitClass = 'UNITCLASS_COMMANDO'
WHERE Type IN (SELECT Type FROM Units WHERE Class = 'UNITCLASS_EE_ADVENTURER');
END;
CREATE TRIGGER EEVP_AdventurerCommandoClassUpgrade_Replace
AFTER INSERT ON Unit_ClassUpgrades
WHEN NEW.UnitType IN (SELECT Type FROM Units WHERE Class = 'UNITCLASS_EE_ADVENTURER')
BEGIN
UPDATE Unit_ClassUpgrades SET UnitClassType = 'UNITCLASS_COMMANDO' WHERE UnitType = NEW.UnitType;
END;
Let me know if this method also works.
(UPDATE) This method worked, but a little redundant if there isn't any mod that adds a unique unit for EE_ADVENTURER.
Attachments
Last edited: