1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  3. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  4. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  5. Dismiss Notice
  6. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

Kublai Khan

Discussion in 'Civ5 - Creation & Customization' started by jmelnick, Feb 21, 2012.

  1. jmelnick

    jmelnick Bad Mod Skills, Big Ideas

    Joined:
    Dec 10, 2011
    Messages:
    180
    Location:
    New Jersey
    Almost finished.... a mod of Kublai Khan and the Yuan Dynasty.

    Since I don't have ModBuddy or any SDK tools to help me debug, does anyone want to give it a shot?
     

    Attached Files:

  2. Putmalk

    Putmalk Chieftain

    Joined:
    Sep 26, 2010
    Messages:
    2,613
    Location:
    New York
    I don't notice any immediate errors with syntax or spelling. I'm actually surprised you did all this without ModBuddy. However, in your .modinfo, you have lines:

    Code:
    <File md5="1BA039F29F750827BA9D0809EB27FABC">HebrewAtlas128.dds</File>
    
    which should be:

    Code:
    <File md5="1BA039F29F750827BA9D0809EB27FABC" import="1">HebrewAtlas128.dds</File>
    
    Basically, for all .dds's, set import="1", and for the .xml's, set import="0". Hopefully that solves your problem!

    Be sure to enable logging and when you load up the mod, check the Database.log for any help on any errors.

    Now I'll take a closer look to see if you have any common spelling errors. However, try the modifications to the .modinfo, see if they make the mod work.

    EDIT: Yeah, the .xml looks airtight.
     
  3. jmelnick

    jmelnick Bad Mod Skills, Big Ideas

    Joined:
    Dec 10, 2011
    Messages:
    180
    Location:
    New Jersey
    Thanks! I'll check all the imports
     
  4. jmelnick

    jmelnick Bad Mod Skills, Big Ideas

    Joined:
    Dec 10, 2011
    Messages:
    180
    Location:
    New Jersey
    This is now the .modinfo file:

    Spoiler :
    <?xml version="1.0" encoding="utf-8"?>
    <Mod id="415ee375-11f6-49df-b092-96c20b5ca0d2" version="1">
    <Properties>
    <Name>Yuan Civilization</Name>
    <Stability>Beta</Stability>
    <Description>A mod of Kublai Khan and the Yuan Dynasty</Description>
    <Authors>Justin Melnick</Authors>
    <AffectsSavedGames>1</AffectsSavedGames>
    <MinCompatibleSaveVersion>0</MinCompatibleSaveVersion>
    <SupportsSinglePlayer>1</SupportsSinglePlayer>
    <SupportsMultiplayer>1</SupportsMultiplayer>
    <SupportsMac>1</SupportsMac>
    <ReloadLandmarkSystem>0</ReloadLandmarkSystem>
    <ReloadUnitSystem>0</ReloadUnitSystem>
    </Properties>
    <Dependencies />
    <References />
    <Blocks />
    <Files>
    <File md5="0D7C101DB8DA0E8B6E2C75692E6E68C2" import="0">kublai.xml</File>
    <File md5="1BA039F29F750827BA9D0809EB27FABC" import="1">HebrewAtlas128.dds</File>
    <File md5="A436DB1C1FBBDBAC62076FBA0035A4B7" import="1">HebrewAtlas256.dds</File>
    <File md5="C280474A7CEEB0FB2CB1CF82A8621F35" import="1">HebrewAtlas32.dds</File>
    <File md5="6C1F87F2383BA8FD5DF26DDF1AA09103" import="1">HebrewAtlas45.dds</File>
    <File md5="4BFE85BDBBD3E9BE479327F044B4BAAD" import="1">HebrewAtlas64.dds</File>
    <File md5="00EC75DD92A3FAFA8C2DD097C2B622E6" import="1">HebrewAtlas80.dds</File>
    <File md5="AAF34988BF12437EA97F73AF0570DD87" import="1">yuan map.jpeg</File>
    <File md5="0901E405B67E38F16306931E3BE2B9CD" import="1">LeaderAtlas128.dds</File>
    <File md5="77CD4D1A338092C292896DCA7BA7384E" import="1">LeaderAtlas256.dds</File>
    <File md5="2EE68B23AFBCDDA7277CDA311D29A7A9" import="1">LeaderAtlas64.dds</File>
    <File md5="D961B61DF63BF4B0C169ECE83C6CCAFD" import="1">kublai.jpg</File>
    </Files>
    <Actions>
    <OnModActivated>
    <UpdateDatabase>kublai.xml</UpdateDatabase>
    </OnModActivated>
    </Actions>
    </Mod>


    This mod appears under "Browse Mods," allowing it to be checked. However, it doesn't pop up when choosing a Civ.

    The .zip folder has been changed to include this .modinfo file.
     
  5. Putmalk

    Putmalk Chieftain

    Joined:
    Sep 26, 2010
    Messages:
    2,613
    Location:
    New York
    Okay, once again I'll look at it, this time loading it up into Civ 5 and seeing what the problem. I'll get it done tomorrow, promise. ;)
     
  6. jmelnick

    jmelnick Bad Mod Skills, Big Ideas

    Joined:
    Dec 10, 2011
    Messages:
    180
    Location:
    New Jersey
    This is the Database.log file AFTER quitting Civ5 and after loading all stuff.

    Spoiler :
    [283.661] constraint failed
    [283.661] While executing - 'INSERT INTO ArtDefine_StrategicView(StrategicViewType, TileType, Asset) VALUES(?,?,?)'
    [285.617] Validating Foreign Key Constraints...
    [285.619] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
    [285.619] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
    [285.619] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
    [286.800] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_PRIVATEER" does not exist in Units
    [286.800] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_SPANISH_GALLEON" does not exist in Units
    [286.800] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_SPANISH_TREASURE CART" does not exist in Units
    [286.800] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_DANISH_LONGBOAT" does not exist in Units
    [286.800] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_SAXON_HUSCARL" does not exist in Units
    [286.800] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_POLYNESIAN_WAR_CANOE" does not exist in Units
    [286.800] Failed Validation.
    [289.014]
    -- SQLite Memory Statistics --
    Memory Usage:
    [Cur] [Max]
    Malloc: 300080 2405128
    PageCache: 4368 4375
    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
    ------------------------------
    [317.260] constraint failed
    [317.260] While executing - 'insert into Language_en_US('Tag', 'Text') values (?, ?);'
    [317.260] In XMLSerializer while inserting row into table Language_en_US('Tag', 'Text') with values (TXT_KEY_CITY_NAME_KARAKORUM, Karakorum, ).
    [317.260] In XMLSerializer while updating table Language_en_US from file kublai.xml.
    [317.261] columns Language, Tag are not unique
     
  7. jmelnick

    jmelnick Bad Mod Skills, Big Ideas

    Joined:
    Dec 10, 2011
    Messages:
    180
    Location:
    New Jersey
    Thanks so so much!
     
  8. Putmalk

    Putmalk Chieftain

    Joined:
    Sep 26, 2010
    Messages:
    2,613
    Location:
    New York
    Database.log is telling you that "TXT_KEY_CITY_NAME_KARAKORUM" is the problem. Try renaming it to "TXT_KEY_CITY_NAME_YUAN_KARAKORUM" or something (renaming the tag in Civilization_CityNames as well) and try it out. If there are duplicate tag names (if TXT_KEY_CITY_NAME_KARAKORUM exists in vanilla Civ 5, for example) then the entire file will fail. Since you never separated parts of your mod into different .xml's, if one thing is wrong the entire file will fail and you won't see your civilization.

    If you separated your files, then only the text file would fail, and your civ would be running but with "TXT_KEY..." stuffs everywhere, which would direct you to the problem. ;)

    This is judging by the database.log only. Go rename the tag and try again. Let me know what happens.
     
  9. Androrc the Orc

    Androrc the Orc Chieftain

    Joined:
    Apr 19, 2004
    Messages:
    1,616
    Location:
    Vienna, Austria
    He doesn't even need to put in the city's name in his mod at all, since it already came with the Mongols, he can just use that tag and delete his extra tag definition.
     
  10. jmelnick

    jmelnick Bad Mod Skills, Big Ideas

    Joined:
    Dec 10, 2011
    Messages:
    180
    Location:
    New Jersey
    I renamed only the Karakorum... like you said to YUAN_KARAKORUM. Bout to go test it. I think I may have realized something else though..... The mod I took the file structure from (Hebrew mod) uses Ramesses from Egypt as its LH. However, my Kublai.jpg that I imported for the DoM I also intended to use for my AI LH. Is that possible? Can I import a file twice? If yes, what would be the code for that?
     
  11. jmelnick

    jmelnick Bad Mod Skills, Big Ideas

    Joined:
    Dec 10, 2011
    Messages:
    180
    Location:
    New Jersey
    Still some error!
    Gotta change all cities.

    All cities changed now from TXT_KEY_CITY_NAME_(...) to TXT_KEY_CITY_NAME_YUAN_(...)

    Testing in Civ5 now.

    Once tested, it said with texture error, unable to load "YUAN64.dds" This file doesn't exist!!!

    Next, I changed all the files that say "HebrewAtlas(#).dds" to "YuanAtlas(#).dds" in both the name and .modinfo

    Same texture load error: "Unable to load texture [YUANAtlas64.dds]

    Even with this Texture error, Database.log shows NO errors.
     
  12. jmelnick

    jmelnick Bad Mod Skills, Big Ideas

    Joined:
    Dec 10, 2011
    Messages:
    180
    Location:
    New Jersey
    HE SHOWED UP!!! It said KUBLAI_KHAN- Yuan

    When I went to click on him, it had another texture error for the yuan map.jpeg file though.

    As an AI player, Civ5 crashed.
    How can I change his name to be Kublai Khan, not KUBLAI_KHAN? I'm afraid to change one thing and the whole mod will fall.
     
  13. human machine

    human machine Chieftain

    Joined:
    Jan 25, 2009
    Messages:
    32
    You have 3 TXT_KEYs that have his name in Caps (TXT_KEY_LEADER_KUBLAI_KHAN, TXT_KEY_LEADER_KUBLAI_KHAN_PEDIA and TXT_KEY_CIVILOPEDIA_LEADERS_KUBLAI_KHAN). Change these to lower case and it should show up fine.

    For your image crashes, try converting the jpeg to dds. The vannilla game uses dds for these images and that may be your problem
     
  14. jmelnick

    jmelnick Bad Mod Skills, Big Ideas

    Joined:
    Dec 10, 2011
    Messages:
    180
    Location:
    New Jersey
    Thanks- just did that. Will see now.

    Converted my .jpeg and .jpg to .dds, testing now.

    My two .jpg and .jpeg files were converted but now the texture error is unable to load the .dds file!
     
  15. jmelnick

    jmelnick Bad Mod Skills, Big Ideas

    Joined:
    Dec 10, 2011
    Messages:
    180
    Location:
    New Jersey
    Started to change the .dds file from the Hebrew civ to show Kublai Khan.. got a texture error.

    What does this mean?
     
  16. CivOasis

    CivOasis Ahuizotl

    Joined:
    Jun 22, 2011
    Messages:
    2,990
    Location:
    Sawaiki
    :eek: My god, did I hear you're doing this without modbuddy?
    :bowdown:
     
  17. jmelnick

    jmelnick Bad Mod Skills, Big Ideas

    Joined:
    Dec 10, 2011
    Messages:
    180
    Location:
    New Jersey
    yes you did, I have Mac AppStore Civ5 so no SDK!
     
  18. Androrc the Orc

    Androrc the Orc Chieftain

    Joined:
    Apr 19, 2004
    Messages:
    1,616
    Location:
    Vienna, Austria
    Did you do the import=1 thing in modinfo?
     
  19. jmelnick

    jmelnick Bad Mod Skills, Big Ideas

    Joined:
    Dec 10, 2011
    Messages:
    180
    Location:
    New Jersey
    Yes, everything is correctly imported... I think.

    If you could check on the file attached and see if everything is running smoothly it would be great.
     
  20. Androrc the Orc

    Androrc the Orc Chieftain

    Joined:
    Apr 19, 2004
    Messages:
    1,616
    Location:
    Vienna, Austria
    I'm not sure if letter case can be a problem, but in case it can, you've named the file "Kublai.dds" in the xml, while the actual file is "kublai.dds".

    There is also the issue of image dimensions - AFAIK the leader image should be 1600x900, while yours is 572x485.

    There is also the thing that you didn't make a xml description of the leader's "scene" so he wouldn't appear on the leader diplomacy screen, despite appearing during the "Dawn of Man".
     

Share This Page