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

[Vanilla] Having difficulty with localization and requirements

Discussion in 'Mod Creation Help' started by Zoythrus, Jan 17, 2018.

  1. Zoythrus

    Zoythrus Chieftain

    Joined:
    Jul 11, 2012
    Messages:
    36
    Hello,

    I'm trying to make a simple mod, and stuff isn't working properly. Specifically, despite having a localization file that gives everything text, and it being properly inserted into the .modinfo, nothing seems to actually use that text.

    Also, I'm having some difficulty wrapping my mind around requirements, as there's like, 3-4 different sections and I'm not too sure how to properly use them. Could someone lead me to a guide about them if one exists? I couldn't seem to find one.

    Oh, one last question, I want to give all mines by this civ +1 production, but all the additional yield examples I can find rely upon the bonus having a requirement, like "when adjacent to a district" or whatever. Can't I just give them a flat bonus?

    Here's my mod as it currently stands, and nothing seems to work the way I want it to, despite not getting any useful errors that I can find.

    (Also, 100 points to whomever first figures out what civ I'm trying to remake.)
     

    Attached Files:

  2. LeeS

    LeeS Imperator

    Joined:
    Jul 23, 2013
    Messages:
    5,187
    Location:
    Illinois, USA
    1. This
      Code:
          <UpdateText id="ConfigText">
            <File>Localisation.sql</File>
          </UpdateText>
      and
      Code:
          <UpdateText id="Text">
            <Criteria>LeaderCriteria</Criteria>
            <File>Localisation.sql</File>
          </UpdateText>
      do not match to this filename
      Code:
          <File>Vengir_Localisation.sql</File>
      This error will be reported in modding.log.
    2. You should not really need the
      Code:
      <Criteria>LeaderCriteria</Criteria>
      Some people have figured out how to make the criteria settings work but for the most part having that in the modinfo file just seems to cause troubles.
     
  3. raen

    raen Coat of Arms

    Joined:
    May 12, 2003
    Messages:
    1,611
    Location:
    Portugal
  4. Zoythrus

    Zoythrus Chieftain

    Joined:
    Jul 11, 2012
    Messages:
    36
    Thank you, LeeS! I completely forgot about the fact that I changed the name.

    And I'll take a look at it, raen.


    UPDATE:
    Despite changing the name of the localization file, and making sure all the text names match up, nothing seems to be showing up ingame. Any ideas?
     
    Last edited: Jan 18, 2018
    raen likes this.
  5. Zoythrus

    Zoythrus Chieftain

    Joined:
    Jul 11, 2012
    Messages:
    36
    I apologize for the double post, but I'm still stuck. I've fixed a ton of the issues, but the text still refuses to show up ingame. Also worth noting, the unique unit seems to have been made generic, as I've seen Barbarians use it, too. I'm royally stumped. I've tried everything I can think of, but I can't seem to make anything work.
     

    Attached Files:

  6. raen

    raen Coat of Arms

    Joined:
    May 12, 2003
    Messages:
    1,611
    Location:
    Portugal
    Hi, why do you have some backslashes? I think that´s breaking all text from loading in database.

    Examples:
    "Stay away and you won\'t get involved."
    "Fine, let\'s go back to peace."
     
  7. LeeS

    LeeS Imperator

    Joined:
    Jul 23, 2013
    Messages:
    5,187
    Location:
    Illinois, USA
    1. From Database.log:
      • This will be related to a syntax error in the text sql file:
        Code:
        [258191.091] [Localization] ERROR: near "t": syntax error
      • These are because you are attempting to load a file with info for the in-game side of the database into the front-end side of the database:
        Code:
        [258191.088] [Configuration] ERROR: no such table: Types
        [258191.090] [Configuration] ERROR: no such table: LoadingInfo
      • These will be because you repeated a designation of "RequirementSetId" in table "RequirementSets", which is not allowed:
        Code:
        [258312.534] [Gameplay] ERROR: UNIQUE constraint failed: RequirementSets.RequirementSetId
        [258312.534] [Gameplay] ERROR: UNIQUE constraint failed: RequirementSets.RequirementSetId
      Any of these errors will cause the game to cease reading anything from within the file where the error occurs
    2. From Modding.log:
      • These appear to be incorrect usages in modinfo file or else you've still got file name mis-matches:
        Code:
        [258184.964] ERROR: Invalid file reference in action, did you forgot to add it in <Files>? - Vengir.dep
        [258184.964] ERROR: Invalid file reference in action, did you forgot to add it in <Files>? - Mod.Art.xml
        [258184.967] ERROR: Invalid file reference in action, did you forgot to add it in <Files>? - Mod.Art.xml
        [258184.968] ERROR: Invalid file reference in action, did you forgot to add it in <Files>? - Vengir.dep
      • These are because the syntax and other errors reported in Database.log:
        Code:
        [258191.088] Status: ModdingUpdateConfigurationDatabase - Loading Vengir_Civilizations.sql
        [258191.088] Warning: ModdingUpdateConfigurationDatabase - Error Loading SQL.
        [258191.089] Status: ModdingUpdateConfigurationDatabase - Loading Vengir_Config.sql
        [258191.090] Status: ModdingUpdateConfigurationDatabase - Loading Vengir_Leaders.sq;
        [258191.090] Warning: ModdingUpdateConfigurationDatabase - Error Loading SQL.
        [258191.090] Status: LocalizedText - Loading Vengir_Localisation.sql
        [258191.091] Warning: LocalizedText - Error Loading SQL.
    3. You don't have your swordsman tied to a trait in order to tie it back to the leader or civilization
    4. Both PLAYER_CLEARS_BARBARIAN_CAMPS and PLAYER_IGNORES_BARBARIAN_CAMPS already exist within table <RequirementSets> as part of the base game. You cannot thereofore attempt to re-define them within your mod.
    5. Not sure where your error is in the text file, but I note your are using BaseGameText instead of using LocalizedText with Tag, Language, and Text columns
     
  8. Zoythrus

    Zoythrus Chieftain

    Joined:
    Jul 11, 2012
    Messages:
    36
    Because commas are used in SQL to denote specific stuff, and the contractions were messing that up. Backslashes were used in another mod, so I used them here and they seem to work as escape characters.

    And thank you, LeeS, as usual. I'm still trying to get a hang of the new Civ6 stuff, which seems rather obtuse compared to the Civ5 stuff. Would you happen to know of any civ mod creation guides that cover the changes between Civ5 and Civ6 modding? That'd be really helpful.
     
  9. LeeS

    LeeS Imperator

    Joined:
    Jul 23, 2013
    Messages:
    5,187
    Location:
    Illinois, USA
  10. LeeS

    LeeS Imperator

    Joined:
    Jul 23, 2013
    Messages:
    5,187
    Location:
    Illinois, USA
    For the contraction error issue in SQL, use as Sukritact does
    Code:
    ('LOC_CITY_NAME_XIAN',  	'Chang’an'),
    He's using the "smartquotes" character, which civ6 will recognize.

    Civ5 as I recall will not accept the "smartquote" character.
     
  11. Zoythrus

    Zoythrus Chieftain

    Joined:
    Jul 11, 2012
    Messages:
    36
    I fixed the language issues by removing the backslash, and I'll look into the smart quotes idea.
    Is it just me or does Civ6 modding seem a little less capable than Civ5 modding? I mean, I can't even have the civ start out with a tech or unit, which seems like a step backwards.
    If you actually know of a way to get them to start with a unit that isn't a Warrior or an additional tech, I'd love to know. Maybe even an automatic boost when they research something?

    Oh, could you please explain what you meant by "You don't have your swordsman tied to a trait in order to tie it back to the leader or civilization." I have them as a trait in the Vengir_Civilization.sql, and I'm not too sure where else this needs to be added.
     
  12. LeeS

    LeeS Imperator

    Joined:
    Jul 23, 2013
    Messages:
    5,187
    Location:
    Illinois, USA
    nothing in the unit definition that I saw, like here:
    Code:
    <Row UnitType="UNIT_ROMAN_LEGION" BaseMoves="2" Cost="110" AdvisorType="ADVISOR_CONQUEST"
        BaseSightRange="2" ZoneOfControl="true" Domain="DOMAIN_LAND" FormationClass="FORMATION_CLASS_LAND_COMBAT"
        Name="LOC_UNIT_ROMAN_LEGION_NAME" Description="LOC_UNIT_ROMAN_LEGION_DESCRIPTION"
        PurchaseYield="YIELD_GOLD" BuildCharges="1" PromotionClass="PROMOTION_CLASS_MELEE" Maintenance="2"
        Combat="40" MandatoryObsoleteTech="TECH_REPLACEABLE_PARTS"
        TraitType="TRAIT_CIVILIZATION_UNIT_ROMAN_LEGION"
        PrereqTech="TECH_IRON_WORKING"/>
     
  13. Zoythrus

    Zoythrus Chieftain

    Joined:
    Jul 11, 2012
    Messages:
    36
    Ah! Now I get it. I thought you were talking about some trait definition in the Civilization or Leader file. My apologies.

    Now I'm trying to get their abilities to work. Slowly understanding how the requirements function, and a ton of trial and error.

    Here's my file once again, should you wish to look it over.
     

    Attached Files:

Share This Page