Modding a mod?

renscyv

Chieftain
Joined
Jun 6, 2016
Messages
7
So I got this mod Race for Religion for BNW. I wanted to 'mod' it by editing its files and add some beliefs I thought of. I initially added a pantheon by copying one of its pantheon .xml files and editing it to my liking. After that I updated the .modinfo file and added to the updatedatabase and file tags the appropriate info for this new file I created.

I probably did something wrong or I missed a step since the new pantheon belief didn't show up in game. Can someone point me into a direction so I can fix/improve on this?

NOTE: I won't upload my 'mod-mod' and I only intend to use it privately as I am aware that it might conflict with the creator's interests.

Better yet, can someone help me make it into a separate mini-mod? Catching up with lua's and xml's is pretty hard as you modders seem to have structured/organized your code and files.

Thanks!
 
Good afternoon! The best advice I can give you as a novice myself is to look into enabling logging and seeing if there's a hang up on implementing what you put in. I would say it's virtually impossible to get anything even remotely resembling a release-worthy mod completed without going to the log a hundred times.

If I was to randomly guess on an issue, I would say it's possible that you might be better off changing one of the existing pantheons to whatever you want rather than creating another key entirely. While I'm not familiar with the specifics of that mod (though I have used it. Good mod, though not compatible with CPP), it's quite possible that the keys are being referenced again somewhere that you're not editing, and thus it's not showing up in game. Taking one of the spots of the mods you know do work my help remedy this, though I admit I've never worked with the religion side of things.
 
whoward69's zip your mods and attach tutorial

Even if it is only a mod of a mod, or only if it is for your own personal use, without the mod itself to look at as you have edited it, you are asking us to oiuja-board-intuit what your mistake or problem is.
 
Thanks! Will check the logging first.. I may solve it out myself. If anything weird doesn't show up might try replacing one of those pantheons.. Then check it out again..

Wait it might be nothing but I recall something of a key-value pair in the pantheon .xml files that's not referenced anywhere in the mod.

Spoiler :

<Language_en_US>
<Row Tag="TXT_KEY_BELIEF_GOD_EARTH_SHORT">
<Text>Goddess of Earth</Text>
</Row>
<Row Tag="TXT_KEY_BELIEF_GOD_EARTH">
<Text>Test this :) :) :) :):) :) :) :):) :) :) :):) :) :) :)!</Text>
</Row>
</Language_en_US>


Just asking, can I test the mod out on existing saves? Or should I start a new one everytime? It's pretty tiresome to raise a civ to get a religion just to see if it worked correctly or not..
(I'm modding other games too just for fun and side effects can quite give you paranoia.. lol)
 
  • IGE
    1. Download and then enable the IGE (In-Game Editor)
    2. Use it to give yourself 20-30 Faith after you found your first city.
    3. Press "NEXT TURN" and you should get the pop-up for founding a Pantheon.
  • Found Pantheon Button:
    • William Howard (whoward69) also had a mod that added a "found Pantheon" user button to the religion overview panel IIRC, but I am not sure if it is up-to-date with BNW, or only worked for G&K. See his website http://www.picknmixmods.com/main/home/home.html if you are interested in looking into that to help speed the debuggin process along.
  • You can also use the FireTuner/LiveTuner tool that comes with the ModBuddy etc. SDK, but I am not as expert in using it for things besides setting up test-autoplay as other forum members are. I tend to use IGE only because I am a bit of a curmudgeon in this and IGE was the one I learned to make best use of first.
 
William Howard (whoward69) also had a mod that added a "found Pantheon" user button to the religion overview panel IIRC, but I am not sure if it is up-to-date with BNW
It's part of the "UI - Religion Spread" mod - all of my mods are BNW compatible (old vanilla and G&K ones have been retired and no longer listed on my web-site)
 
Wait do I need to use ModBuddy for the mod I made to work correctly? Or can I make simple mods without such tools?
 
As far as I know you need to use ModBuddy for mods. While it is conceivably possible to not use it, I suppose, if you didn't plan on distributing the mod, I'm guessing that's outside of your ability or interest.

Have you not been using ModBuddy?
 
I'm not using ModBuddy. However the mod I'm modding seem to use ModBuddy..

So ModBuddy is totally unnecessary in my case?
 
You shouldn't need it to just change values, no. I would still open everything in Modbuddy when editing it, though, since it's likely going to help you track down issues before they become issues. It really depends on the extent of your changes. If you need to add more files or such, then you'll need to use ModBuddy. If you're just editing values, you can do that with notepad.
 
So I'll need the ModBuddy I guess. I suppose I'll just start a new mod. Add some beliefs and stuff. Do I still need the SDK stuff? Can I still post here whenever a problem pops up? Thanks for the help, though..
 
I have never used ModBuddy outside of the full SDK on Steam. The SDK was just convenient enough for me to never consider not using it.

If you're going to make a new mod, remember that you can open the existing XML's from the mod you wanted to edit within your new mod. That would likely save you quite a lot of hassle.
 
I really don't understand. TXT_KEY_BELIEF_..._SHORT and TXT_KEY_BELIEF_.. and the actual BELIEF_.. , where are they linked together? Does the game do it for you or is there some file or tool that I don't know of? By the way the replacer method worked..
 
In the CIV5Beliefs.xml file you will find this sort of thing:
Code:
<GameData>
	<Beliefs>
		<Row>
			<Type>BELIEF_FERTILITY_RITES</Type>
			<Description>TXT_KEY_BELIEF_FERTILITY_RITES</Description>
			<ShortDescription>TXT_KEY_BELIEF_FERTILITY_RITES_SHORT</ShortDescription>
			<Pantheon>true</Pantheon>
			<CityGrowthModifier>10</CityGrowthModifier>
		</Row>
	<Beliefs>
</GameData>
Elsewhere in the game's files you will find this sort of thing:
Code:
<GameData>
	<Language_en_US>
		<!-- BELIEF NAMES -->
		<Row Tag="TXT_KEY_BELIEF_FERTILITY_RITES_SHORT">
			<Text>Fertility Rites</Text>
		</Row>
	<Language_en_US>
</GameData>
And in yet another file you will find this:
Code:
<GameData>
	<Language_en_US>
		<Row Tag="TXT_KEY_BELIEF_FERTILITY_RITES">
			<Text>10% faster [ICON_FOOD] Growth Rate</Text>
		</Row>
	<Language_en_US>
</GameData>
  1. This is partly just the way things got organized (such as it was) in the game's files, but mostly with the placement of the TXT_KEY info it has to do with the fact that multpile languages are supported by the game.
  2. When the game sees a TXT_KEY_SOMETHING specified in (for example) the definition of a belief, like as this:
    Code:
    <GameData>
    	<Beliefs>
    		<Row>
    			<Type>BELIEF_FERTILITY_RITES</Type>
    			<Description>TXT_KEY_BELIEF_FERTILITY_RITES</Description>
    			<ShortDescription>[color="blue"]TXT_KEY_BELIEF_FERTILITY_RITES_SHORT[/color]</ShortDescription>
    			<Pantheon>true</Pantheon>
    			<CityGrowthModifier>10</CityGrowthModifier>
    		</Row>
    	<Beliefs>
    </GameData>
    It knows it should look-up the in-game text to be used for that TXT_KEY tag-name based on the language the player is using.
    • Actually what really happens is when the player first installs Civ5, they specify which language they use, and the data for all TXT_KEY tag-names for the language they have specified is then tossed into a database that the game then uses to supply the in-game text the user sees.
  3. This allows the code for the Beliefs, the Buildings, the Units, the Promotions, the Social Policies, etc., etc., to all remain the same, and all that has to change is the information contained within the database for the particular language a player is using.
  4. As a practical matter, the vast majority of all mod-makers and mod-users are able to at least understand English to a sufficient degree that English is almost always used as the 'language' supported by a mod. There are also quite a few mod-makers who speak, say, Espanol as their native language, so these mod-makers will also as a habit give TXT_KEY language support for Espanol.
  5. If I wanted to give support to both English and Espanol in a mod (and I could write proper Espanol) I would do something like this:
    Code:
    <GameData>
    	<Beliefs>
    		<Row>
    			<Type>BELIEF_SHRINE</Type>
    			<Description>TXT_KEY_BELIEF_SHRINE</Description>
    			<ShortDescription>TXT_KEY_BELIEF_SHRINE_SHORT</ShortDescription>
    			<Follower>true</Follower>
    		</Row>
    	</Beliefs>
    	<Buildings>
    		<Update>
    			<Where BuildingClass="BUILDINGCLASS_SHRINE"/>
    			<Set>
    				<FaithCost>120</FaithCost>
    				<UnlockedByBelief>true</UnlockedByBelief>
    			</Set>
    		</Update>
    		<Update>
    			<Where BuildingClass="BUILDINGCLASS_TEMPLE"/>
    			<Set>
    				<FaithCost>120</FaithCost>
    				<UnlockedByBelief>true</UnlockedByBelief>
    			</Set>
    		</Update>
    	</Buildings>
    	<Belief_BuildingClassFaithPurchase>
    		<Row>
    			<BeliefType>BELIEF_SHRINE</BeliefType>
    			<BuildingClassType>BUILDINGCLASS_PAGODA</BuildingClassType>
    		</Row>
    		<Row>
    			<BeliefType>BELIEF_SHRINE</BeliefType>
    			<BuildingClassType>BUILDINGCLASS_SHRINE</BuildingClassType>
    		</Row>
    		<Row>
    			<BeliefType>BELIEF_SHRINE</BeliefType>
    			<BuildingClassType>BUILDINGCLASS_TEMPLE</BuildingClassType>
    		</Row>
    	</Belief_BuildingClassFaithPurchase>
    	<Language_en_US>
    		<Row Tag="TXT_KEY_BELIEF_SHRINE">
    			<Text>Buy Shrines, Temples, and Pagodas with [ICON_PEACE] Faith.</Text>
    		</Row>
    		<Row Tag="TXT_KEY_BELIEF_SHRINE_SHORT">
    			<Text>Fervent Builders</Text>
    		</Row>
    	</Language_en_US>
    	<Language_ES_ES>
    		<Row Tag="TXT_KEY_BELIEF_SHRINE">
    			<Text>Compra Santuarios y Templos y Pagodas con [ICON_PEACE] la Fe.</Text>
    		</Row>
    		<Row Tag="TXT_KEY_BELIEF_SHRINE_SHORT">
    			<Text>Fervientes Constructores</Text>
    		</Row>
    	</Language_ES_ES>
    </GameData>
    • If a player is using English they see "Fervent Builders", but if they are using Espanol, they see "Fervientes Constructores"
    • Note that the text displayed for the TXT_KEY doesn't actually have to have much to do with the name of the TXT_KEY. I called my two TXT_KEYs "TXT_KEY_BELIEF_SHRINE" and "TXT_KEY_BELIEF_SHRINE_SHORT" and yet within the <Text> field I used "Fervent Builders".
    • Also note that the 'Espanol' I got from Google Translator is probably giving all our forum's native speakers of Espanol hives at the moment for the badness of the 'Espanol'. I appologize for this -- I was only interested in a quick practical example of how the language-localization for TXT_KEYS works, I have never published this mangled version of 'Espanol'.
 
Back
Top Bottom