isau
Deity
- Joined
- Jan 15, 2007
- Messages
- 3,071
Hi folks,
This was an attempt to edit Catherine's spies so they appear with Masonry instead of Castles. I've noticed running this code doesn't update the database at all, and creates a Crash to Desktop after ending turn 1. Is there some specific limitation on inserting or updating the Modifiers, Requirements, or RequirementSets tables that we know of? That's the error that seems to show in the Database log.
Here is the SQL:
Errors from the database log suggest the table is locked. Is this true or do I just have a SQL error?
[Gameplay]: While executing - 'Select RequirementId from RequirementSetRequirements where RequirementSetId = ?'
[553041.321] [Gameplay] ERROR: database table is locked: RequirementSetRequirements
[553041.321] [Gameplay]: While executing - 'Select RequirementId from RequirementSetRequirements where RequirementSetId = ?'
[553041.479] [Gameplay] ERROR: database table is locked: Modifiers
[553041.479] [Gameplay]: While executing - 'SELECT mods.ModifierId FROM Modifiers mods INNER JOIN TypeTags tags ON mods.ModifierType = tags.Type WHERE tags.Tag = 'DIPLOMACY_MODIFIER''
[553041.479] [Gameplay] ERROR: database table is locked: Modifiers
[
This was an attempt to edit Catherine's spies so they appear with Masonry instead of Castles. I've noticed running this code doesn't update the database at all, and creates a Crash to Desktop after ending turn 1. Is there some specific limitation on inserting or updating the Modifiers, Requirements, or RequirementSets tables that we know of? That's the error that seems to show in the Database log.
Here is the SQL:
Code:
-- Unique Spy: Unlock at Masonry instead of Castles
-- Create the base requirement and its arguments
INSERT INTO Requirements (RequirementId, RequirementType) VALUES ('REQUIRES_TECHNOLOGY_MASONRY', 'REQUIREMENT_PLAYER_HAS_TECHNOLOGY') ;
INSERT INTO RequirementArguments (RequirementId, Name, Type, Value) VALUES ('REQUIRES_TECHNOLOGY_MASONRY', 'TechnologyType', 'ARGTYPE_IDENTITY', 'TECH_MASONRY' );
-- Create a requirementset that consists solely of our new requirement
INSERT INTO RequirementSetRequirements (RequirementSetId, RequirementId) VALUES ('PLAYER_HAS_MASONRY_TECHNOLOGY', 'REQUIRES_TECHNOLOGY_MASONRY') ;
-- Update Catherine's existing UNIQUE_LEADER_ADD_SPY ability to point to our new requirement set
UPDATE Modifiers SET SubjectRequirementSetId='PLAYER_HAS_MASONRY_TECHNOLOGY' WHERE ModifierID='UNIQUE_LEADER_ADD_SPY' AND ModifierType='MODIFIER_PLAYER_GRANT_SPY' ;
Errors from the database log suggest the table is locked. Is this true or do I just have a SQL error?
[Gameplay]: While executing - 'Select RequirementId from RequirementSetRequirements where RequirementSetId = ?'
[553041.321] [Gameplay] ERROR: database table is locked: RequirementSetRequirements
[553041.321] [Gameplay]: While executing - 'Select RequirementId from RequirementSetRequirements where RequirementSetId = ?'
[553041.479] [Gameplay] ERROR: database table is locked: Modifiers
[553041.479] [Gameplay]: While executing - 'SELECT mods.ModifierId FROM Modifiers mods INNER JOIN TypeTags tags ON mods.ModifierType = tags.Type WHERE tags.Tag = 'DIPLOMACY_MODIFIER''
[553041.479] [Gameplay] ERROR: database table is locked: Modifiers
[