Firerunner
Chieftain
- Joined
- Aug 1, 2011
- Messages
- 7
Okay, this is probably a silly beginner problem somewhere that is easily fixed, but I've been spending a couple hours trying to find the error and have become none the wiser.
What I am attempting to do is to create a new mod to grant AI units a combat bonus on higher difficulties to increase the challenge when going to war, and decided the most logical way to do this was to grant all their units free promotions increasing combat strength ala Morale from the national wonder.
However, when I add an XML file to the mod, it doesn't seem to get loaded, even when I've added it to OnModActivated under the mod properties. At least, that is my deduction from the Live tuner error messages when starting the game: [string "C:\..."]:30: attempt to index field 'PROMOTION_EMPERORAI' (a nil value) coupled with the fact that the promotions I defined in the XML aren't present in the UnitPromotions table when I look for them in the console.
This is the Database log:
This is the XML log:
As far as I can tell from looking around these are normal and not indicative of errors on my end, right?
Note: Right now the .lua file will grant the promotion to all units (including the player), which I'm aware of and using to test it more easily.
I've attached the mod in its current state in a zip file, any pointers to what I'm doing wrong would be greatly appreciated.
What I am attempting to do is to create a new mod to grant AI units a combat bonus on higher difficulties to increase the challenge when going to war, and decided the most logical way to do this was to grant all their units free promotions increasing combat strength ala Morale from the national wonder.
However, when I add an XML file to the mod, it doesn't seem to get loaded, even when I've added it to OnModActivated under the mod properties. At least, that is my deduction from the Live tuner error messages when starting the game: [string "C:\..."]:30: attempt to index field 'PROMOTION_EMPERORAI' (a nil value) coupled with the fact that the promotions I defined in the XML aren't present in the UnitPromotions table when I look for them in the console.
This is the Database log:
Spoiler :
[27541.071] constraint failed
[27541.071] While executing - 'INSERT INTO ArtDefine_StrategicView(StrategicViewType, TileType, Asset) VALUES(?,?,?)'
[27544.300] Validating Foreign Key Constraints...
[27544.300] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[27544.300] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[27544.300] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[27545.174] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_PRIVATEER" does not exist in Units
[27545.174] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_SPANISH_GALLEON" does not exist in Units
[27545.174] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_SPANISH_TREASURE CART" does not exist in Units
[27545.174] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_DANISH_LONGBOAT" does not exist in Units
[27545.174] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_SAXON_HUSCARL" does not exist in Units
[27545.174] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_POLYNESIAN_WAR_CANOE" does not exist in Units
[27545.174] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_HITTITE_WARCHARIOT" does not exist in Units
[27545.174] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_SUMERIAN_PHALANX" does not exist in Units
[27545.174] Failed Validation.
[27545.548]
-- SQLite Memory Statistics --
Memory Usage:
[Cur] [Max]
Malloc: 287688 2406080
PageCache: 3527 3742
LookAside: 45 1878
Scratch: 0 1
Static Buffer Overflows:
[TooLarge] [NoSpace]
PageCache: 0 0
Scratch: 0 0
Largest Allocations:
Malloc: 65280
PageCache: 1160
Scratch: 5128
Prepared Statements:
Current: 5
[27541.071] While executing - 'INSERT INTO ArtDefine_StrategicView(StrategicViewType, TileType, Asset) VALUES(?,?,?)'
[27544.300] Validating Foreign Key Constraints...
[27544.300] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[27544.300] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[27544.300] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[27545.174] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_PRIVATEER" does not exist in Units
[27545.174] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_SPANISH_GALLEON" does not exist in Units
[27545.174] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_SPANISH_TREASURE CART" does not exist in Units
[27545.174] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_DANISH_LONGBOAT" does not exist in Units
[27545.174] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_SAXON_HUSCARL" does not exist in Units
[27545.174] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_POLYNESIAN_WAR_CANOE" does not exist in Units
[27545.174] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_HITTITE_WARCHARIOT" does not exist in Units
[27545.174] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_SUMERIAN_PHALANX" does not exist in Units
[27545.174] Failed Validation.
[27545.548]
-- SQLite Memory Statistics --
Memory Usage:
[Cur] [Max]
Malloc: 287688 2406080
PageCache: 3527 3742
LookAside: 45 1878
Scratch: 0 1
Static Buffer Overflows:
[TooLarge] [NoSpace]
PageCache: 0 0
Scratch: 0 0
Largest Allocations:
Malloc: 65280
PageCache: 1160
Scratch: 5128
Prepared Statements:
Current: 5
This is the XML log:
Spoiler :
[27544.285] **** Validating Game Database *****
[27545.174] Performing Localization Checks
[27545.174] Checking Tag Format...
[27545.174] Note: Tags must only use [A-Z_] characters, start with 'TXT_KEY_', and be under 128 characters long.
[27545.190] Validating UnitGameplay
[27545.190] Number of selection sounds doesn't match number of units.
[27545.190] Validating Notifications
[27545.190] **** VALIDATION FAILED *****
[27545.190] Validation Took 0.912791 seconds
[27545.548] **** Validating Prefetch Process *****
[27545.548] **** Validation Success *****
[27545.548] SetGlobalActionInfo
[27545.548]
-- SQLite Memory Statistics --
Memory Usage:
[Cur] [Max]
Malloc: 287688 2406080
PageCache: 3527 3742
LookAside: 45 1878
Scratch: 0 1
Static Buffer Overflows:
[TooLarge] [NoSpace]
PageCache: 0 0
Scratch: 0 0
Largest Allocations:
Malloc: 65280
PageCache: 1160
Scratch: 5128
Prepared Statements:
Current: 5
[27545.174] Performing Localization Checks
[27545.174] Checking Tag Format...
[27545.174] Note: Tags must only use [A-Z_] characters, start with 'TXT_KEY_', and be under 128 characters long.
[27545.190] Validating UnitGameplay
[27545.190] Number of selection sounds doesn't match number of units.
[27545.190] Validating Notifications
[27545.190] **** VALIDATION FAILED *****
[27545.190] Validation Took 0.912791 seconds
[27545.548] **** Validating Prefetch Process *****
[27545.548] **** Validation Success *****
[27545.548] SetGlobalActionInfo
[27545.548]
-- SQLite Memory Statistics --
Memory Usage:
[Cur] [Max]
Malloc: 287688 2406080
PageCache: 3527 3742
LookAside: 45 1878
Scratch: 0 1
Static Buffer Overflows:
[TooLarge] [NoSpace]
PageCache: 0 0
Scratch: 0 0
Largest Allocations:
Malloc: 65280
PageCache: 1160
Scratch: 5128
Prepared Statements:
Current: 5
As far as I can tell from looking around these are normal and not indicative of errors on my end, right?
Note: Right now the .lua file will grant the promotion to all units (including the player), which I'm aware of and using to test it more easily.
I've attached the mod in its current state in a zip file, any pointers to what I'm doing wrong would be greatly appreciated.
