1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Help! My mod isn't working right! Only some things update properly.

Discussion in 'Mod Creation Help' started by Thorburne, Sep 24, 2017.

  1. Thorburne

    Thorburne Centurion

    Joined:
    Aug 21, 2005
    Messages:
    1,449
    Gender:
    Male
    Location:
    Carney, MD
    Good afternoon,

    After almost a year since Civ 6 was released, I am still frustrated by the production issues with the early game. The eras flying by quickly (even on epic or marathon speed) and wonders completing several eras after their designated era are particularly bothersome. Many early special units are worthless as by the time you can build one or two, you've already passed their relative era. According to game time, I often hit the Medieval era by around 500 BC and the Renaissance shortly after that (before AD). This is extremely frustrating.

    So, I decided to build a simple mod. After hours of searching for guides on how to use modbuddy properly, I finally got one pieced together. Nothing too fancy. I made a spreadsheet of techs, civics, buildings, wonders, and units and set forth adjusting the base costs of each for the first 4 eras (Ancient through Renaissance). For techs and civics, I increased the costs with ancient at 2.5x vanilla costs and stepping down to 2x for classical, 1.5x for medieval, and 1.1-1.25x for renaissance.

    For buildings and wonders, it was the opposite. Ancient era buildings and wonders were 0.25x the vanilla costs, Classical were 0.5x vanilla, Medieval were 0.75x, and 0.9x for Renaissance. With Units, I did the same, however, I added a few other changes. I also reduced the costs of air units, especially fighters, and set the strategic resources for many units that were missing them, especially unique units. I understand the reason that the developers went against giving UUs a strategic resource requirement, however, I feel that change has lessoned the importance of strategic resources.

    Anyway, after several attempts and more digging to figure out Civ VI Modbuddy, I finally got the mod to load in the game. Well, here is the problem. When I loaded up a game (with the mod), the costs for Techs and Civics updated correctly. However, all buildings and wonders had a production cost of 828 (which is the cost that I set for Forbidden City, Great Zimbabwe, and Venetian Arsenal. I tried separating buildings and wonders, into two different xml files, but this still occurred. For units, some used the new costs while others retained their vanilla costs. What is going on here?

    I've included a compressed copy of my mod if anybody can take a look and assist.

    On a final note, this is just the first phase of a slightly bigger mod that I would like to build. Eventually, I also want to add in several ancient city-states from around the Mediterranean (like Troy, etc.) and build a map that focuses on the Mediterranean world (similar to the map I did for Civ V in my sig). Of course, I am going to school full time, so how long before I can finish, I am not sure. But, in the meantime, I want to get this complete and start testing the balance.
     

    Attached Files:

  2. Thorburne

    Thorburne Centurion

    Joined:
    Aug 21, 2005
    Messages:
    1,449
    Gender:
    Male
    Location:
    Carney, MD
    Additional Info:

    I created a new mod and placed everything in the same file. I didn't put the entries for wonders, however. When I loaded up the game, I made sure that the first mod was disabled and the new one was enabled. I loaded up a game in standard speed and the same results were produced. For units, the only ones that updated correctly were Builder, Settler, Trader, and Hoplite. Those had all of the new cost values while everything else had the vanilla cost values.

    Even though I removed the wonders entry, it still loaded with the 828 cost for all buildings. This is very frustrating. It should not be this difficult for such a simple edit.
     
  3. LeeS

    LeeS Imperator

    Joined:
    Jul 23, 2013
    Messages:
    6,335
    Location:
    Illinois, USA
    You have multiple syntax errors:
    1. In an Update, "where" != "Where"
      • This is wrong
        Code:
        <Update>
        	<where BuildingType="BUILDING_HANGING_GARDENS" />
        	<Set Cost="45"/>
        </Update>
      • This is neeeded instead
        Code:
        <Update>
        	<Where BuildingType="BUILDING_HANGING_GARDENS" />
        	<Set Cost="45"/>
        </Update>
    2. In an Update, there can only be one "Set" for each update.
      • This is wrong and will cause a fatal xml-syntax error
        Code:
        <Update>
        	<Where UnitType="UNIT_HEAVY_CHARIOT"/>
        	<Set Cost="16"/>
        	<Set StrategicResource="RESOURCE_HORSES"/>
        </Update>
      • This is neeeded instead
        Code:
        <Update>
        	<Where UnitType="UNIT_HEAVY_CHARIOT"/>
        	<Set Cost="16" StrategicResource="RESOURCE_HORSES"/>
        </Update>
    3. My assumption is that the "where" portion here at the very end of the file is being ignored because of improper syntax and only the "Set" potion of this Update is being implemented:
      Code:
      <Update>
      	<where BuildingType="BUILDING_VENETIAN_ARSENAL" />
      	<Set Cost="828"/>
      </Update>
      It is applied to all buildings (and wonders) registered into table <Buildings> because the following is in fact valid syntax to make a global change to everything within the given table:
      Code:
      <Update>
      	<Set Cost="828"/>
      </Update>
    Also,
    • what you attached is not a mod but rather the project from within modbuddy for a mod, and is not reflecting necessarily what the game is seeing within the actual mod in the game's mods folder.
    • If two or more mods have the same mod ID # and version number and are in the game's mods folder then all manner of undesirable effects will ensue even if only one of these mods is enabled because when the game inspects these mods it can attempt to conflate all the mods with the same ID and version numbers into one "composite" mod with varying degrees of success in-game.
    • The game should be reporting various errors to you in the Database.log file.
    • In civ6 when the game encounters a fatal syntax error within a file, it keeps everything that has been "read-into" the database from that file up to that point and dicards the remainder of the file's contents. This generally confuses the inexperienced mod-maker because it seems like their mod is loading, when in fact only part of it is loading.
     
    ShiroToraRyu and Noble Zarkon like this.
  4. Noble Zarkon

    Noble Zarkon Civ IV Emperor EQM Moderator Hall of Fame Staff Supporter GOTM Staff

    Joined:
    Sep 6, 2012
    Messages:
    4,717
    Gender:
    Male
    Location:
    Gibraltar
  5. Thorburne

    Thorburne Centurion

    Joined:
    Aug 21, 2005
    Messages:
    1,449
    Gender:
    Male
    Location:
    Carney, MD
    Thank you for your input. I have made the adjustments and I am going to test it out. What you said makes sense, so hopefully these changes will do the trick. I'll update once I have checked it out and ran through my test.
     
  6. Thorburne

    Thorburne Centurion

    Joined:
    Aug 21, 2005
    Messages:
    1,449
    Gender:
    Male
    Location:
    Carney, MD
    Thank you so much @LeeS !

    I tested it out and everything worked after making the corrections you suggested.

    I played a little, then went back in and adjusted the production for Ancient units (I raised them up a bit from what I originally set them). So far, I am liking the change. I'm playing Epic with America. Normally, I play Rome because they get the free monument (meaning early production can go elsewhere). Now, it seems to work better with room to choose and time to plan and enjoy the eras that your in.

    I'll see how it goes and maybe I'll release this little mod for others to try out.
     
    Noble Zarkon and ShiroToraRyu like this.

Share This Page