Results 1 to 13 of 13

Thread: Having a problem with Mods and Text Files

  1. #1

    Having a problem with Mods and Text Files

    So, sometimes my Mods just won't read my text files. They continue to show up as TXT_KEY_WHATEVER, despite having the proper files in the mod itself.

    Any ideas?

  2. #2
    Join Date
    Apr 2011
    Location
    Near Portsmouth, UK
    Posts
    1,067
    One or more of your TXT_KEY_ values confilcts with a value in the core game or another mod.

    Enable logging and check the database.log to find the culprit value(s)

  3. #3
    Quote Originally Posted by whoward69 View Post
    One or more of your TXT_KEY_ values confilcts with a value in the core game or another mod.

    Enable logging and check the database.log to find the culprit value(s)
    I figured it was something like that. However, even if I change both the TXT_KEY_ and the actual Text to items which definitely do not exist in the standard game, it's still not showing up. It's almost as if the Mod is stuck reading it wrong.

    How do I enable logging so I can check the values? Thanks.

  4. #4
    Join Date
    Apr 2011
    Location
    Near Portsmouth, UK
    Posts
    1,067
    in config.ini, towards the end there's a line like LoggingEnabled = 0, make it 1

  5. #5
    Sorry for the one more noob question but where do I find the database.log file?

    Also, if the Mod encounters the error (say with my text file) does it stop all the following entries from loading correctly even if they are correct?

  6. #6
    Join Date
    Apr 2011
    Location
    Near Portsmouth, UK
    Posts
    1,067
    C:\Users\{USERNAME}\Documents\My Games\Sid Meier's Civilization 5\Logs\Database.log

    If it only has stuff like
    Code:
    30166.162] constraint failed
    [30166.162] While executing - 'INSERT INTO ArtDefine_StrategicView(StrategicViewType, TileType, Asset) VALUES(?,?,?)'
    [30171.778] Validating Foreign Key Constraints...
    [30171.778] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
    [30171.778] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
    [30171.778] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
    [30173.136] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_HITTITE_WARCHARIOT" does not exist in Units
    [30173.136] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_SUMERIAN_PHALANX" does not exist in Units
    [30173.136] Failed Validation.
    in and then some statistics, you don't have logging enabled.

    ONE error in an XML file will fail the entire file, but other files will load (unless they also have errors)

    HTH

    W

  7. #7
    I suggest you use a prefix on your LUA global variables and XML keys. It prevents conflicts between mods.
    Something like TXT_KEY_IGE_BLAHBLAH

  8. #8
    I finally fixed all my text problems last night, thanks to all your help.

    Since you guys have been so helpful, I'm wondering if you can also help me with the last two big problems I'm having.

    --The first is getting the new UU I added have his icon appear during Strategic View. I didn't create anything custom, simply using the Huscarl/Seaxmen graphic/icon from the Fall of Rome scenario.

    I copied this out of the scenarios files:

    <GameData>
    <ArtDefine_StrategicView>
    <Replace>
    <StrategicViewType>ART_DEF_UNIT_GADRAUHTS_SWORDSMA N</StrategicViewType>
    <TileType>Unit</TileType>
    <Asset>SV_Gadraught.dds</Asset>
    </Replace>
    </ArtDefine_StrategicView>
    </GameData>

    But it doesn't work. The art define for the unit is unchanged and worked to get the 3d model into the game, but no icon appears during strategic view.


    --The second thing is I'm having trouble getting a static leaderhead to work.

    I made a static leaderhead dds file, and enabled it in the VFS. Along with an xml file that's basically:

    <LeaderScene FallbackImage="ModLeader1Diplo.dds">
    </LeaderScene>

    With the art define tag of the leader the xml file.

    Again, this is basically how I've seen it done in every mod and scenario.

    However, it doesn't work. I only get a grey screen with the message "No scene loaded for this leader" on the top.

    I just don't understand what I'm missing.

  9. #9
    Join Date
    Apr 2011
    Location
    Near Portsmouth, UK
    Posts
    1,067
    Is the space in "_SWORDSMA N" a copy-and-paste error?

    Does the file SV_Gadraughts.dds exist and has "Import into VFS" set to true?

    Finally, as always, what's in the logs?

  10. #10
    Quote Originally Posted by whoward69 View Post
    Is the space in "_SWORDSMA N" a copy-and-paste error?

    Does the file SV_Gadraughts.dds exist and has "Import into VFS" set to true?

    Finally, as always, what's in the logs?
    Yeah, sorry, that's just a copy and paste typo.

    SV_Gadraughts.dds is a file from the Fall of Rome scenario that the scenario calls (it's not my own). I've tried using just the XML above (assuming tat the file can be found in the base assets like all the scenario files) and extracting it and putting it in my mod manually with VFS to true. Neither works. Then I tried renaming everything in case that also caused problems and nothing.

    The logs, assuming its the same logs you mentioned above, don't say anything about the unit or any of its xml or art assets.

    It just doesn't appear in game and I have no idea why.

  11. #11
    Quote Originally Posted by flygongengar View Post
    Yeah, sorry, that's just a copy and paste typo.

    SV_Gadraughts.dds is a file from the Fall of Rome scenario that the scenario calls (it's not my own). I've tried using just the XML above (assuming tat the file can be found in the base assets like all the scenario files) and extracting it and putting it in my mod manually with VFS to true. Neither works. Then I tried renaming everything in case that also caused problems and nothing.

    The logs, assuming its the same logs you mentioned above, don't say anything about the unit or any of its xml or art assets.

    It just doesn't appear in game and I have no idea why.
    So I found this old thread at civfanatics talking about problems with getting Strategic View icons from showing up:

    http://forums.civfanatics.com/showthread.php?t=395223

    Was this ever fixed? It seems to be talking about custom icons though and not ones in the games assets themselves.

  12. #12
    Join Date
    Jun 2010
    Location
    Lancaster, UK
    Posts
    7,088
    Scenarios are mods themselves, architecturally speaking, so their assets may not be in the VFS except when the scenario is loaded (I honestly have no idea, it's just possible).

    I believe there was work done in the patch or expansion on making it easier to add new unit graphics, which probably includes strategic icons. I think there are some example mods on the Workshop giving some examples of that.

  13. #13
    Join Date
    Apr 2011
    Location
    Near Portsmouth, UK
    Posts
    1,067
    As Sam says, the whole system of adding unit art and sv icons has changed - any post NOT talking about making changes to the database via standard GameData XML/SQL is wrong (ie any post that mentions extracting the artdefine files and editing them directly)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •