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

.modinfo structure

Discussion in 'Civ6 - Modding Tutorials & Reference' started by Gedemon, Oct 22, 2016.

Thread Status:
Not open for further replies.
  1. PlotinusRedux

    PlotinusRedux Chieftain

    Joined:
    Jul 11, 2013
    Messages:
    196
    I've tried changing the code there by hard-coding self.iDefaultNumberMinor to 20 and it made no difference--you can set it to a *lower* number and that seems to work, but I want to set it to a higher number. If you look above at:

    self.iNumMinorCivs = PlayerManager.GetAliveMinorsCount();

    PlayerManager seems to have already determined the maximum number of minor civs by that point, always to 1.5*number of players actually in the game.
     
  2. LeeS

    LeeS Imperator

    Joined:
    Jul 23, 2013
    Messages:
    5,726
    Location:
    Illinois, USA
    Yeah, you're right. All that part of AssignStartingPlots is doing is getting the default values to use later for determination of luxury spreading and the like, apparently. None of the UI seem to allow you to set the number of city-states, and the game seems to determine the hidden * 1.5 in the game core and then just reports the number assigned based on the data sent out to the playermanager system after the numbers are determined.

    I mean there are no sliders like there were in civ5 to set the number of city-states like there was for Advanced Set-up in Civ5.
     
    Last edited: Nov 20, 2016
  3. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    7,921
    Location:
    France
    A lower number seems to work because AssignStargingPlots does not open slots for CS, but it affects starting plots to the existing ones, and a CS (or major civ) in an open slot who does not have a starting plot will not have any units at the start of the game.
     
  4. zoomer61

    zoomer61 Chieftain

    Joined:
    Nov 16, 2014
    Messages:
    16
    I updated the AssignStartingPlots.lua and that made no impact on the City States.
     
  5. LeeS

    LeeS Imperator

    Joined:
    Jul 23, 2013
    Messages:
    5,726
    Location:
    Illinois, USA
    @PlotinusRedux pointed out my error in thinking this was where the 'override' was occuring. But it appears to be coming from the playermanager system which just seems to be hardwired to create 1.5x CS as there are Major Players actually within a game.

    Posts 61, 62, and 63 wherein I am feasting a little on crow :lol:
     
  6. Horem

    Horem Chieftain

    Joined:
    Apr 1, 2010
    Messages:
    1,716
    Location:
    Wales, UK
    Has anyone tried using the ModArt, UpdateAudio, UpdateARX components of the ModInfo yet?
     
  7. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    7,921
    Location:
    France
    No luck with ModArt, I have absolutly no idea on how to set it, and what to set in the first place ! an artdef file ?

    At least for context I get an error in the log during my tests...
     
  8. thecrazyscot

    thecrazyscot Spiffy

    Joined:
    Dec 27, 2012
    Messages:
    1,736
    Anyone know if we're able to set a specific database update to only run if a specific ruleset is selected? I've a few tests but none successfully at this point. Would be sad if that was beyond the capabilities of the .modinfo file.
     
  9. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    7,921
    Location:
    France
    yes, I have 9 differents rulesets in YnAMP.
     
  10. thecrazyscot

    thecrazyscot Spiffy

    Joined:
    Dec 27, 2012
    Messages:
    1,736
    Ok, thanks. I'll check out your .modinfo file to see what I'm doing wrong.
     
  11. Gedemon

    Gedemon Modder Moderator

    Joined:
    Oct 4, 2004
    Messages:
    7,921
    Location:
    France
  12. thecrazyscot

    thecrazyscot Spiffy

    Joined:
    Dec 27, 2012
    Messages:
    1,736
    Thanks, I figured it out. I had <Ruleset> instead of <RuleSet> :badcomp:
     
  13. LeeS

    LeeS Imperator

    Joined:
    Jul 23, 2013
    Messages:
    5,726
    Location:
    Illinois, USA
    That's important to know, really. Civ5 did not actually care about column capitalizations. I think it also did not care about table-name capitalizations. I know at least it did not care whether you stated <LANGUAGE_EN_US> or the more conventional presentation of <Language_en_US>, but I don't remember that I ever tried any of the other tablenames.

    <Row>, <Update>, <Replace>, <Delete> etc have always required correct upper/lower case usage

    ------------------------------------

    Or was the capitalization issue in the modinfo file? because that might act differently to actual xml files re case sensitivity.
     
    Last edited: Nov 23, 2016
  14. thecrazyscot

    thecrazyscot Spiffy

    Joined:
    Dec 27, 2012
    Messages:
    1,736
    The capitalization issue was in the modinfo file...I didn't actually test column capitalization in a database file so it may still be the way Civ V was for all I know. :dunno:
     
  15. thecrazyscot

    thecrazyscot Spiffy

    Joined:
    Dec 27, 2012
    Messages:
    1,736
    All right, I'm running into another issue. I've attempted to create several different text files to correspond to different rulesets, like so:
    Code:
    <Components>
            <UpdateDatabase id="TCS_DEFAULT_COMPONENT">
                <Items>
                    <File>Data/Default/BuffedYields_Default.xml</File>
                    <File>Data/Default/Buildings_Default.xml</File>
                    <File>Data/Default/Districts_Default.xml</File>
                    <File>Data/Default/Policies_Default.xml</File>
                    <File>Data/Default/Misc_Default.xml</File>
                </Items>
            </UpdateDatabase>
            <UpdateDatabase id="RULESET_ENHANCED">
                <Properties>
                    <RuleSet>RULESET_ENHANCED</RuleSet>
                </Properties>
                <Items>
                    <File>Data/Enhanced/GreatWorks_Enhanced.xml</File>
                    <File>Data/Enhanced/Improvements_Enhanced.xml</File>
                    <File>Data/Enhanced/Policies_Enhanced.xml</File>
                    <File>Data/Enhanced/Units_Enhanced.xml</File>
                    <File>Data/Enhanced/Misc_Enhanced.xml</File>
                </Items>
            </UpdateDatabase>
            <UpdateDatabase id="RULESET_COMPLETE">
                <Properties>
                    <RuleSet>RULESET_COMPLETE</RuleSet>
                </Properties>
                <Items>
                    <File>Data/Enhanced/GreatWorks_Enhanced.xml</File>
                    <File>Data/Enhanced/Improvements_Enhanced.xml</File>
                    <File>Data/Enhanced/Policies_Enhanced.xml</File>
                    <File>Data/Enhanced/Units_Enhanced.xml</File>
                    <File>Data/Enhanced/Misc_Enhanced.xml</File>
                    <File>Data/Complete/Units_Complete.xml</File>
                    <File>Data/Complete/UnitAbilities_Complete.xml</File>
                </Items>
            </UpdateDatabase>
            <LocalizedText id="TCS_DEFAULT_COMPONENT">
                <Items>
                    <File>Text/Default_Text.xml</File>
                </Items>
            </LocalizedText>
            <LocalizedText id="RULESET_ENHANCED">
                <Items>
                    <File>Text/Enhanced_Text.xml</File>
                </Items>
            </LocalizedText>
            <LocalizedText id="RULESET_COMPLETE">
                <Items>
                    <File>Text/Enhanced_Text.xml</File>
                    <File>Text/Complete_Text.xml</File>
                </Items>
            </LocalizedText>
        </Components>
    The config file is set up correctly as I can select the different rulesets from the dropdown menu. However, the Complete_Text.xml file always loads regardless of which ruleset I select in addition to some (not all) of the entries in the other two text files. There are no other Database log errors. The Modding log shows this:
    Code:
    Status: Applying Component - TCS_DEFAULT_COMPONENT
    [2455346.588] Status: Creating database save point.
    [2455346.588] Status: UpdateDatabase - Loading Data/Default/BuffedYields_Default.xml
    [2455346.596] Status: UpdateDatabase - Loading Data/Default/Buildings_Default.xml
    [2455346.597] Status: UpdateDatabase - Loading Data/Default/Districts_Default.xml
    [2455346.598] Status: UpdateDatabase - Loading Data/Default/Policies_Default.xml
    [2455346.599] Status: UpdateDatabase - Loading Data/Default/Misc_Default.xml
    [2455346.599] Status: Successfully released save point.
    [2455346.599] Status: Applied component to game.
    [2455346.600] Status: Applying Component - RULESET_ENHANCED
    [2455346.600] Status: Creating database save point.
    [2455346.600] Status: UpdateDatabase - Loading Data/Enhanced/GreatWorks_Enhanced.xml
    [2455346.601] Status: UpdateDatabase - Loading Data/Enhanced/Improvements_Enhanced.xml
    [2455346.602] Status: UpdateDatabase - Loading Data/Enhanced/Policies_Enhanced.xml
    [2455346.604] Status: UpdateDatabase - Loading Data/Enhanced/Units_Enhanced.xml
    [2455346.605] Status: UpdateDatabase - Loading Data/Enhanced/Misc_Enhanced.xml
    [2455346.605] Status: Successfully released save point.
    [2455346.605] Status: Applied component to game.
    [2455346.605] Status: Applying Component - TCS_DEFAULT_COMPONENT
    [2455346.606] Status: Creating database save point.
    [2455346.606] Status: LocalizedText - Loading Text/Default_Text.xml
    [2455346.608] Status: Successfully released save point.
    [2455346.608] Status: Applied component to game.
    [2455346.609] Status: Applying Component - RULESET_ENHANCED
    [2455346.609] Status: Creating database save point.
    [2455346.609] Status: LocalizedText - Loading Text/Enhanced_Text.xml
    [2455346.610] Status: Successfully released save point.
    [2455346.610] Status: Applied component to game.
    [2455346.611] Status: Applying Component - RULESET_COMPLETE
    [2455346.611] Status: Creating database save point.
    [2455346.611] Status: LocalizedText - Loading Text/Enhanced_Text.xml
    [2455346.612] Status: LocalizedText - Loading Text/Complete_Text.xml
    [2455346.613] Status: Successfully released save point.
    [2455346.613] Status: Applied component to game.
    [2455346.650] Status: Modding Framework - Finished Apply Components
    [2455346.650] Status: Applied all components of enabled mods.
    So the ruleset database updates are loading as I want, but ALL of the localization updates are loading no matter which ruleset I select. Is this standard behavior?
     
    Last edited: Nov 23, 2016
  16. NerdByFate

    NerdByFate Chieftain

    Joined:
    Oct 7, 2016
    Messages:
    82
    Location:
    United States
    As for the localized text files, I think I might know your issue.
    You're doing it like this:

    Code:
    <LocalizedText id="RULESET_ENHANCED">
               <Items>
                    <File>Text/Enhanced_Text.xml</File>
                </Items>
    </LocalizedText>
    Correct me if I'm wrong, but I believe you need to add this before <Items>
    Code:
    <Properties>
                    <RuleSet>RULESET_ENHANCED</RuleSet>
    </Properties>
     
  17. thecrazyscot

    thecrazyscot Spiffy

    Joined:
    Dec 27, 2012
    Messages:
    1,736
    @NerdByFate You're absolutely correct. I need to take a break.
     
  18. LeeS

    LeeS Imperator

    Joined:
    Jul 23, 2013
    Messages:
    5,726
    Location:
    Illinois, USA
    Can you upload a copy of the actual Buildings_Default.xml file ?

    You might have problems with the code within the file or your might have inadvertently gotten hidden characters attached to the file.

    Also, check you did not accidently create a mismatch between the file name and the way the file is referrred to within the modinfo file (I did this a few times in Civ5 before I learned me better and it drove me crazy figuring out why my file wasn't even loading).
     
  19. thecrazyscot

    thecrazyscot Spiffy

    Joined:
    Dec 27, 2012
    Messages:
    1,736
    I actually figured that out...I had a stray </Update> buried on line 543 or something. Thanks for offering to help though!
     
    Olleus likes this.
  20. Lord Yanaek

    Lord Yanaek Chieftain

    Joined:
    Aug 15, 2003
    Messages:
    1,465
    Just to be sure i didn't miss an important announcement (and because the discussion arose in another thread), did anybody manage to load Lua gameplay script when a game is loaded?
    Last time i checked gameplay scripts only worked on newly created games but not after loading a saved game and nobody knew why or how to load them correctly with a saved game, VFS apparently ignored those when loading a game.
     
Thread Status:
Not open for further replies.

Share This Page