bouncymischa
Synthetic Genie
For the newest version of Future Worlds, I have an improvement that can potentially replace a Farm or Plantation, so I'd like it to be able to improve all resources that those two improvements can be built on and duplicate their bonus yields. However, since I often use resource-modifying mods like Barathor's More Luxuries, I'd like to do this via SQL rather than simply hard code them in XML. I thought I'd figured out how to do it, but when I start up the mod, the improvement doesn't seem to be able to improve the resources as I'd hoped.
This is the code I'm currently using:
EDIT: I found the mistake -- I was using WHERE (Type = 'IMPROVEMENT_FARM') instead of WHERE (ImprovementType = 'IMPROVEMENT_FARM')! Ahhh, such simple errors...
This is the code I'm currently using:
Code:
INSERT INTO Improvement_ResourceTypes
(ImprovementType, ResourceType)
SELECT ('IMPROVEMENT_FW_FUNGAL_GROWTH'), ResourceType
FROM Improvement_ResourceTypes WHERE (Type = 'IMPROVEMENT_FARM');
INSERT INTO Improvement_ResourceTypes
(ImprovementType, ResourceType)
SELECT ('IMPROVEMENT_FW_FUNGAL_GROWTH'), ResourceType
FROM Improvement_ResourceTypes WHERE (Type = 'IMPROVEMENT_PLANTATION');
INSERT INTO Improvement_ResourceType_Yields
(ImprovementType, ResourceType, YieldType, Yield)
SELECT ('IMPROVEMENT_FW_FUNGAL_GROWTH'), ResourceType, YieldType, Yield
FROM Improvement_ResourceType_Yields WHERE (Type = 'IMPROVEMENT_FARM');
INSERT INTO Improvement_ResourceType_Yields
(ImprovementType, ResourceType, YieldType, Yield)
SELECT ('IMPROVEMENT_FW_FUNGAL_GROWTH'), ResourceType, YieldType, Yield
FROM Improvement_ResourceType_Yields WHERE (Type = 'IMPROVEMENT_PLANTATION');
EDIT: I found the mistake -- I was using WHERE (Type = 'IMPROVEMENT_FARM') instead of WHERE (ImprovementType = 'IMPROVEMENT_FARM')! Ahhh, such simple errors...
Last edited: