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

What's wrong with my mod?

Discussion in 'Civ5 - Creation & Customization' started by Dryhad, Jan 8, 2011.

  1. Dryhad

    Dryhad Prince

    Joined:
    Feb 23, 2006
    Messages:
    451
    So I've got this mod, as attached, which is supposed to replace the social policies but doesn't actually do anything. The game makes no complaints, and acts as though everything is fine. I understand that this means there is some error in the XML and rather than throw out an error the game simply ignores the file completely (who's brilliant idea was that, I wonder?). Obviously, as the mod only has one non-text file, it doesn't do very much without it. The logs say nothing, and I've been unable to find any errors so the way I see it either:
    a) There's an error I glossed over, which may be as little as a misplaced comma.
    b) There's an error I'm not aware is an error. I referred extensively to the core files so I doubt this is the case, but it's certainly possible.
    c) I have made no specific error, but there's some obvious step I'm missing that isn't in any of the tutorials because it's so obvious.
    Whatever the case, I figure a few extra sets of eyes (not to mention much greater experience than mine) can't hurt. Can anyone help?

    ETA: See post #9 for new problem.
     

    Attached Files:

  2. Formulapower

    Formulapower Warlord

    Joined:
    Nov 5, 2007
    Messages:
    148
    I am having the same problem with my mod...I think I am not using ModBuddy incorrectly. I use the build option and my mod shows up in the game but when I Install it and try to play nothng change from the original game. Does any one have a Write-up about how to use Modbuddy and get your mod to work in the game??
     
  3. magzhi

    magzhi Warlord

    Joined:
    May 23, 2010
    Messages:
    197
    Try to check "OnModActivated" part (I haven't looked at mod this is just guessing)
     
  4. Dryhad

    Dryhad Prince

    Joined:
    Feb 23, 2006
    Messages:
    451
    Would you mind looking at the mod? I do have the "OnModActivated"s, if that's what you mean. I may not have done them right, as ModBuddy gives alarmingly little support for so vital a piece. Would you mind actually looking and seeing if it's done right? I posted the files for exactly this reason.
     
  5. DragonBlood87

    DragonBlood87 Chieftain

    Joined:
    Jan 3, 2009
    Messages:
    82
    Location:
    Georgia, U.S.A.
    I've been having the same sort of issue; I've double- and triple-checked Kael's guide to make sure I'm doing everything right, but to no avail. OnModActivated / UpdateDatabase / [Path] is entered, I'm activating it in the Mod list, I'm using the proper syntax; everything has been done according to the guide.

    Mine is just a simple XML value update; I even narrowed it down to one value being changed (tweaking the Monument cost, just for something easy to notice) just to make sure it couldn't be a typo or incorrect syntax that I missed.

    However, when I start Civ 5, activate the mod, and start a new game (from the Mod menu), I can see that the game is still using the default value. I'm also able to confirm that it hasn't been updated by looking at the game's cached CoreDatabase with SQLite.

    Code:
    <GameData>
    	<Buildings>
    		<Update>
    			<Where Type="BUILDING_MONUMENT"/>
    			<Set Cost="1"/>
    		</Update>
    	</Buildings>
    </GameData>
    I've also tried the <Set> tag a few others ways I've seen them done:
    Code:
    <Set>
         Cost="1"
    </Set>
    Code:
    <Set>
         <Cost>1</Cost>
    </Set>
    None of them have worked.


    ModBuddy builds it without a problem, and nothing about it shows up in the debug logs. I'm stumped at this point.
     
  6. Creativus

    Creativus Chieftain

    Joined:
    Oct 3, 2010
    Messages:
    41
    Location:
    Hungary
    Dryhad,

    I looked into your files and I think if you would like to delete some branches you should do it like this:

    <GameData>
    <PolicyBranchTypes>
    <Delete type="POLICY_BRANCH_TRADITION"/>
    </PolicyBranchTypes>
    </GameData>

    DragonBlood87,

    Just an idea, add first the 'Where Type' Row and then the 'Set' row:

    <GameData>
    <Buildings>
    <Update>
    <Where Type="BUILDING_MONUMENT"/>
    <Set Cost="1"/>
    </Update>
    </Buildings>
    </GameData>

    Also increase the cost of the building, maybe it is too low, the cost changes with game speeds, so it can be an issue.

    Creativus
     
  7. Dryhad

    Dryhad Prince

    Joined:
    Feb 23, 2006
    Messages:
    451
    Just to be clear, you understand that what I'm trying to do is wipe everything (in the policy and policy branch bits) and start new? When I put
    Code:
    	<PolicyBranchTypes>
    		<Delete/>
    		<Row>
    			<ID>0</ID>
    			<Type>POLICY_BRANCH_TRADITION</Type>
    			<Description>TXT_KEY_POLICY_BRANCH_TRADITION</Description>
    			<Help>TXT_KEY_POLICY_BRANCH_TRADITION_HELP</Help>
    			<Title>TXT_KEY_TRADITION_TITLE</Title>
    			<FreePolicy>POLICY_TRADITION</FreePolicy>
    		</Row>
    		...
    	</PolicyBranchTypes>
    
    I don't mean for it to delete the Tradition branch, I mean for it to delete all branches and then put Tradition back in. Sure, I could have deleted those I wasn't using and edited Tradition, but I find it much easier to think about this way. No having to worry about "is there something like this already and if so is it worth using <Update> rather than <Delete>?" Better just for the mod data replace the core data. That's the way I'm used to from Civ 4.

    Still, there's a possibility that <Delete/> doesn't work in the way I expected (and the tutorial claimed) so I'll give it a go deleting things individually just in case. Thanks for the suggestion.
    ETA: No, that didn't work either. :(
     
  8. DragonBlood87

    DragonBlood87 Chieftain

    Joined:
    Jan 3, 2009
    Messages:
    82
    Location:
    Georgia, U.S.A.
    Isn't that what I have...? Anyways, I was under the impression that the order of the Where and Set tags doesn't matter.

    Retried it as halving the cost instead of setting it to 1, still not updating in-game. :(
     
  9. Dryhad

    Dryhad Prince

    Joined:
    Feb 23, 2006
    Messages:
    451
    Ok, doing some digging elsewhere I've found that policy modding requires editing the interface files. Unfortunately all sources are silent as to what this editing entails. Does anyone have any idea what I need to change in SocialPolicyPopup? I've made what I took to be the obvious changes (involving references to those policies I've deleted, and adding in references to my own) to no effect.
     
  10. Creativus

    Creativus Chieftain

    Joined:
    Oct 3, 2010
    Messages:
    41
    Location:
    Hungary
    DragonBlood87,

    Sorry, I wanted to write to do it in the opposite way :). I also tried it and didn't work for me. It seems the problem is to build monument you do not need any tech (this is the only building except the palace but that is different). What I did I added a tech requirement and then I could change the cost to 10.

    <GameData>
    <Buildings>
    <Update>
    <Set PrereqTech="TECH_THE_WHEEL"/>
    <Where Type="BUILDING_MONUMENT"/>
    </Update>
    <Update>
    <Set Cost="10"/>
    <Where Type="BUILDING_MONUMENT"/>
    </Update>
    </Buildings>
    </GameData>

    Maybe you can add it to agriculture, which is a free tech.

    Creativus
     
  11. DragonBlood87

    DragonBlood87 Chieftain

    Joined:
    Jan 3, 2009
    Messages:
    82
    Location:
    Georgia, U.S.A.
    I'll give it a try later tonight, but that still doesn't make sense to me; I don't see why updating the numerical value in one SQL field would require changes anywhere else. This is a lot more confusing than it initially seems. =/
     

Share This Page