Zagaroth
Chieftain
- Joined
- Nov 27, 2009
- Messages
- 60
So, my UU was working just fine using the preexisting template, but I was trying to clean it up a bit, as it had a default reference to an ability, and I was just flat adjusting the stats rather than giving a unique ability. Removing the lines to an ability is what seems to have broken it, causing the unit to no longer be available. So I attempted to fix it by recreating those references, and it still didn't fix it.
Database.log is giving me this error:
[939298.254] [Gameplay] ERROR: near "(": syntax error
I checked the built database via DB Browser, and the unit is not to be found. And I made sure I was checking the xp2 units table. So, somehow I broke something that makes it not want to build the unit. I looked at the UU file in Notepad++ as well, but I'm not seeing anything that appears to need fixing. So, here's my UU code. I also attached the Build copy (copied it and changed its extension to .txt so I could upload it)
If anyone can spot where my brain has decided to become blind, it'd be appreciated.
Database.log is giving me this error:
[939298.254] [Gameplay] ERROR: near "(": syntax error
I checked the built database via DB Browser, and the unit is not to be found. And I made sure I was checking the xp2 units table. So, somehow I broke something that makes it not want to build the unit. I looked at the UU file in Notepad++ as well, but I'm not seeing anything that appears to need fixing. So, here's my UU code. I also attached the Build copy (copied it and changed its extension to .txt so I could upload it)
Code:
-----------------------------------------------
-- Types
-----------------------------------------------
INSERT INTO Types
(Type, Kind )
VALUES ('TRAIT_CIVILIZATION_ZAG_KAWAII_METAL_EMPIRE_UU', 'KIND_TRAIT' ),
('UNIT_ZAG_KAWAII_METAL_EMPIRE_UU', 'KIND_UNIT' ),
('ABILITY_ZAG_KAWAII_METAL_EMPIRE_UU', 'KIND_ABILITY' );
-----------------------------------------------
-- Tags
-----------------------------------------------
INSERT INTO Tags
(Tag, Vocabulary )
VALUES ('CLASS_ZAG_KAWAII_METAL_EMPIRE_UU', 'ABILITY_CLASS' );
-----------------------------------------------
-- TypeTags
-----------------------------------------------
INSERT INTO TypeTags
(Type, Tag )
VALUES ('UNIT_ZAG_KAWAII_METAL_EMPIRE_UU', 'CLASS_ZAG_KAWAII_METAL_EMPIRE_UU' ),
('ABILITY_ZAG_KAWAII_METAL_EMPIRE_UU', 'CLASS_ZAG_KAWAII_METAL_EMPIRE_UU' );
INSERT INTO TypeTags (Type, Tag)
SELECT 'UNIT_ZAG_KAWAII_METAL_EMPIRE_UU', Tag
FROM TypeTags
WHERE Type = 'UNIT_SWORDSMAN';
-----------------------------------------------
-- Traits
-----------------------------------------------
INSERT INTO Traits
(TraitType, Name, Description)
VALUES ('TRAIT_CIVILIZATION_ZAG_KAWAII_METAL_EMPIRE_UU', 'LOC_UNIT_ZAG_KAWAII_METAL_EMPIRE_UU_NAME', 'LOC_UNIT_ZAG_KAWAII_METAL_EMPIRE_UU_DESCRIPTION');
-----------------------------------------------
-- CivilizationTraits
-----------------------------------------------
INSERT INTO CivilizationTraits
(CivilizationType, TraitType )
VALUES ('CIVILIZATION_ZAG_KAWAII_METAL_EMPIRE', 'TRAIT_CIVILIZATION_ZAG_KAWAII_METAL_EMPIRE_UU' );
-----------------------------------------------
-- Units
-----------------------------------------------
INSERT INTO Units (
UnitType,
Name,
Description,
TraitType,
BaseMoves,
Cost,
PurchaseYield,
AdvisorType,
Combat,
RangedCombat,
Range,
BaseSightRange,
ZoneOfControl,
Domain,
StrategicResource,
FormationClass,
PromotionClass,
Maintenance,
MandatoryObsoleteTech,
PrereqTech,
PrereqCivic
)
SELECT ('UNIT_ZAG_KAWAII_METAL_EMPIRE_UU', -- UnitType
'LOC_UNIT_ZAG_KAWAII_METAL_EMPIRE_UU_NAME', -- Name
'LOC_UNIT_ZAG_KAWAII_METAL_EMPIRE_UU_DESCRIPTION', -- Description
'TRAIT_CIVILIZATION_ZAG_KAWAII_METAL_EMPIRE_UU', -- TraitType
3,
Cost,
PurchaseYield,
AdvisorType,
42,
RangedCombat,
Range,
BaseSightRange,
ZoneOfControl,
Domain,
StrategicResource,
FormationClass,
PromotionClass,
Maintenance,
MandatoryObsoleteTech,
PrereqTech,
PrereqCivic
)
FROM Units
WHERE UnitType = 'UNIT_SWORDSMAN';
-----------------------------------------------
-- UnitUpgrades
-----------------------------------------------
INSERT INTO UnitUpgrades (Unit, UpgradeUnit)
SELECT 'UNIT_ZAG_KAWAII_METAL_EMPIRE_UU', UpgradeUnit
FROM UnitUpgrades
WHERE Unit = 'UNIT_MUSKETMAN';
-----------------------------------------------
-- UnitAiInfos
-----------------------------------------------
INSERT INTO UnitAiInfos (UnitType, AiType)
SELECT 'UNIT_ZAG_KAWAII_METAL_EMPIRE_UU', AiType
FROM UnitAiInfos
WHERE UnitType = 'UNIT_SWORDSMAN';
-----------------------------------------------
-- UnitReplaces
-----------------------------------------------
INSERT INTO UnitReplaces
(CivUniqueUnitType, ReplacesUnitType )
VALUES ('UNIT_ZAG_KAWAII_METAL_EMPIRE_UU', 'UNIT_SWORDSMAN' );
-----------------------------------------------
-- UnitAbilities
-----------------------------------------------
INSERT INTO UnitAbilities
(UnitAbilityType, Name, Description )
VALUES ('ABILITY_ZAG_KAWAII_METAL_EMPIRE_UU', 'LOC_ABILITY_ZAG_KAWAII_METAL_EMPIRE_UU_NAME', 'LOC_ABILITY_ZAG_KAWAII_METAL_EMPIRE_UU_DESCRIPTION' );
If anyone can spot where my brain has decided to become blind, it'd be appreciated.