Building replacement doesn't show up in remod

isnorden

Amnesiac Modder
Joined
Jul 6, 2012
Messages
608
Location
Madison, Wisconsin, USA
I love jpbar's Danish Stave Church mod, but see three problems with it as written:

  1. I am already using a mod designed for Denmark which replaced the Norwegian Ski Infantry with Longboats (a must-have for any proper Viking!).
  2. In my opinion, the Stave Church should replace Temples altogether, instead of requiring one to be built first. Monasteries still existed in medieval Denmark, too...
  3. Finally, I think the Mandir building and Mysticism technology are out of place in Norse culture. They're perfect for India, China, and similar meditation-focused civs--but in Denmark?


I've tried my hand at a remod that would solve all three problems; however, my playtests keep showing regular Temples as a building choice for the Danes. Could someone more experienced please figure out what I've coded wrong? I really appreciate everybody's help!
 
You can have more than 2 UU/UBs; however, they will not show up on the various panels that show that information... but you can still build them and they are usable in game.

I believe Whoward69 made a mod that allows more than 2 to be shown, but it involves changing actual game files as well as using mod files so it may or may not suit your purposes. If someone who uses your mod also uses that one and invokes the added steps required, they will have screens showing all your uu/ub above 2.
 
You can have more than 2 UU/UBs; however, they will not show up on the various panels that show that information... but you can still build them and they are usable in game.

I believe Whoward69 made a mod that allows more than 2 to be shown, but it involves changing actual game files as well as using mod files so it may or may not suit your purposes. If someone who uses your mod also uses that one and invokes the added steps required, they will have screens showing all your uu/ub above 2.



*nods* I actually gave my remod a dependency on the mod you're thinking of, so that players could see the new building. (Incidentally, I found and corrected a few errors since the original post--but the Stave Church still isn't showing as a building choice when a city's production list pops up.)
 
I love jpbar's Danish Stave Church mod, but see three problems with it as written:

  1. I am already using a mod designed for Denmark which replaced the Norwegian Ski Infantry with Longboats (a must-have for any proper Viking!).
  2. In my opinion, the Stave Church should replace Temples altogether, instead of requiring one to be built first. Monasteries still existed in medieval Denmark, too...
  3. Finally, I think the Mandir building and Mysticism technology are out of place in Norse culture. They're perfect for India, China, and similar meditation-focused civs--but in Denmark?


I've tried my hand at a remod that would solve all three problems; however, my playtests keep showing regular Temples as a building choice for the Danes. Could someone more experienced please figure out what I've coded wrong? I really appreciate everybody's help!

Well, my mod is more for Civilization: Gods and Kings, not Denmark: Gods and Kings. ;) But, I’m glad you like it, despite its “problems”!

I saw your comment on my Workshop page, but couldn’t respond because I’m away on a little trip right now and I forgot my Steam login (don’t feel like resetting it). Anyway, I was going to tell you to feel free to do with it as you like, and I’m glad you took initiative and did so. Mods are contributions to the community, and anybody that doesn’t wish for their work to inspire other works (as long as they’re not complete copies) probably should keep their files local and private.

Also, I actually was going to release a standalone version of it (which replaces the temple instead; like the scenario) for those that aren’t really onboard with the new tech and further progression of faith buildings, since it would be a simple mod to write (especially after making the first one). But, if your remod basically uses the same design intent (bonuses, etc.) adjusted to the Temple’s tech level, then it’ll certainly save me the trouble!

As Craig said, I was going to recommend whoward69’s sweet mod which alters the display of uniques. :)

Also, I took a peek at your file here on my laptop.

Near line 108, you&#8217;re missing an </Update>. Perhaps that breaks the entire file and is the reason you&#8217;re not seeing your modifications; I don&#8217;t know.

Also, these aren&#8217;t errors, but perhaps you may have overlooked them after copying the code over:

The PrereqTech is still set to Theology, instead of the default game&#8217;s Philosophy, and you may want to update that as well if it's not intentional. (Though, I&#8217;m pretty sure this would still function, and while playing as Denmark, their version of the Temple will just be available at Theology instead, alongside the Garden, etc.)

You also may want to rebalance the flavor values, to better guide along the helpless AI. :D

The strategy text for the Stave Church still needs to be adjusted. I see you substituted &#8220;Temple&#8221; in for &#8220;Monastery&#8221;, but more needs to be reworded.

The statbox text. Since you&#8217;re giving Denmark a unique 3rd &#8220;unique&#8221;, you may want to insert text which describes whoward69&#8217;s Longboat. I honestly was unsure of this text tag and only added it because I came across it during searches. I figured it wouldn&#8217;t hurt to update it so it&#8217;s displayed correctly (wherever that may be). I&#8217;m not sure what it refers to and how it&#8217;s displayed on the interface. My guess was that it was for some kind of hover text over civilization names which conveniently lists the leader name and unique names. <shrug>
 
Well, my mod is more for Civilization: Gods and Kings, not Denmark: Gods and Kings. ;) But, I&#8217;m glad you like it, despite its &#8220;problems&#8221;!

Hey, I've modded (and re-modded) for other civs too; my mind isn't that one-track. :lol: It's just that I'm a stickler for cultural flavor--especially when I've studied that culture in real life. (My decision to give India a new UA, which I tacked onto a more general urban-happiness mod, was made in the same spirit.)

jpbar81 said:
I saw your comment on my Workshop page, but couldn&#8217;t respond because I&#8217;m away on a little trip right now and I forgot my Steam login (don&#8217;t feel like resetting it). Anyway, I was going to tell you to feel free to do with it as you like, and I&#8217;m glad you took initiative and did so. Mods are contributions to the community, and anybody that doesn&#8217;t wish for their work to inspire other works (as long as they&#8217;re not complete copies) probably should keep their files local and private.

As soon as I've corrected and playtested the remod, I'd like to go ahead and upload the "third unique" version; thank you for spotting the missing </update> tag! :thanx:


jpbar81 said:
The strategy text for the Stave Church still needs to be adjusted. I see you substituted &#8220;Temple&#8221; in for &#8220;Monastery&#8221;, but more needs to be reworded.

OK, will do!

jpbar81 said:
The statbox text. Since you&#8217;re giving Denmark a unique 3rd &#8220;unique&#8221;, you may want to insert text which describes whoward69&#8217;s Longboat. I honestly was unsure of this text tag and only added it because I came across it during searches. I figured it wouldn&#8217;t hurt to update it so it&#8217;s displayed correctly (wherever that may be). I&#8217;m not sure what it refers to and how it&#8217;s displayed on the interface. My guess was that it was for some kind of hover text over civilization names which conveniently lists the leader name and unique names. <shrug>



I'm not that good at formattimg onscreen text. but I'll give it a shot. :)
 
Even after supplying the missing </update> and deleting the Ski Infantry. my mod won't allow the Stave Church to replace the Temple. My opening screen for Harald even keeps the infantry icon after I clean out the cache; does anybody else out there see an error I've overlooked? Please help if you can! I've updated the remod to my latest (still non-functioning) version.


:cry::wallbash::badcomp:
 
I finally got this mod to substitute buildings correctly; however, it kept referring to the Stave Church as a "TXT_KEY_BUILDING_STAVE_CHURCH_DESC". This surprised me, since I thought I had double-checked the code--

Code:
	<Language_en_US>

		<Update>
			<Where Tag="TXT_KEY_BUILDING_STAVE_CHURCH_DESC"/>
			<Set Text="Stave Church"/>
		</Update>
		<Update>
			<Where Tag="TXT_KEY_BUILDING_STAVE_CHURCH_STRATEGY"/>
			<Set Text="(Longish breakdown of game effects snipped for space here.)" />
		</Update>
		<Update>
			<Where Tag="TXT_KEY_CIV5_BUILDINGS_STAVE_CHURCH_TEXT"/>
			<Set Text="(Long paragraph snipped for space here.)"/>
		</Update>
		<Update>
			<Where Tag="TXT_KEY_CIV5_DENMARK_STATBOX"/>
			<Set Text="[NEWLINE]        Leader: Bluetooth[NEWLINE]        Unique Unit: Berserker[NEWLINE]        Unique Building: Stave Church"/>
		</Update>

	<


I also made sure to import the XML file into the VFS:

Code:
  <Files>
    <File md5="41A5428D8BF94665AA48B13654D7386D" import="1">XML/stave-church_remod.xml</File>
  </Files>
  <Actions>
    <OnModActivated>
      <UpdateDatabase>XML/stave-church_remod.xml</UpdateDatabase>
    </OnModActivated>
  </Actions>

I was test-running this mod by itself when the name bug appeared, so inter-mod conflict isn't to blame. So I'm stumped...where did I go wrong again? Please help if you can!
 
XML files that update the database shouldn't be imported into VFS.

As for checking for errors in XML files, it's best to enable logging, and check database.log
 
XML files that update the database shouldn't be imported into VFS.

As for checking for errors in XML files, it's best to enable logging, and check database.log

I corrected the import value but still get the mis-displayed name. Here's a transcript from database.log--

Code:
[12962.312] constraint failed
[12962.312] While executing - 'INSERT INTO ArtDefine_StrategicView(StrategicViewType, TileType, Asset) VALUES(?,?,?)'
[12983.390] Validating Foreign Key Constraints...
[12983.390] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[12983.390] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[12983.390] Invalid Reference on ArtDefine_Landmarks.LayoutHandler - "SPECIAL" does not exist in ArtDefine_LandmarkTypes
[12985.640] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_HITTITE_WARCHARIOT" does not exist in Units
[12985.640] Invalid Reference on UnitGameplay2DScripts.UnitType - "UNIT_SUMERIAN_PHALANX" does not exist in Units
[12985.640] Failed Validation.
[12986.687] 
-- SQLite Memory Statistics --
Memory Usage:
		[Cur]		[Max]
Malloc:		389272		32950144
PageCache:	4375		4982
LookAside:	0		0
Scratch:	0		1

Static Buffer Overflows:
		[TooLarge]	[NoSpace]
PageCache:	0		29426880
Scratch:	0		0

Largest Allocations:
Malloc:		131072
PageCache:	1160
Scratch:	6664

Prepared Statements:
Current:		10
------------------------------

Which parts show the error from this particular mod? I'm sure it isn't the UNIT_FOO references, since neither of them appear there. If you can make more sense of the log than I can, please help; I'd appreciate that very much!
 
I tried substituting <row> for <update> in the name-setting sections of this mod; that actually made the bug worse (the Ski Infantry's name and icon reappeared in spite of a deletion in the code). Here's a copy of the latest version, if you're willing to have a look...
 
The log you posted looks like when using unmodded game. Are you sure you have enabled logging in config.ini, and checked the log after the game loads the mod?
 
The log you posted looks like when using unmodded game. Are you sure you have enabled logging in config.ini, and checked the log after the game loads the mod?

OK, with logging enabled I got this transcript. The natural-wonder message has nothing to do with my mod (which never mentions them); the other error might be relevant, but I don't know how to locate it--

Code:
-- SQLite Memory Statistics --
Memory Usage:
		[Cur]		[Max]
Malloc:		505464		32955912
PageCache:	4380		4982
LookAside:	0		0
Scratch:	0		1

Static Buffer Overflows:
		[TooLarge]	[NoSpace]
PageCache:	0		29428040
Scratch:	0		0

Largest Allocations:
Malloc:		131072
PageCache:	1160
Scratch:	6640

Prepared Statements:
Current:		24
------------------------------
[57020.688] no such column: Type
[57020.688] In Query - select * from Natural_Wonder_Placement where Type = ? LIMIT 1

So, where is the nonexistent Type column that's causing the trouble? Please help if you can!
 
I'm home now and I just took a look at your new mod. I have some requests if you could please address them:

1. This is the second time where you've kind of denounced my own mod (here and within the description of your modmod). I'd very much appreciate it if you could write in a manner that describes your mod as more of an "alternative" rather than an "upgrade" to mine. Basically, referencing my mod and then simply listing what you've modified instead of comparing to mine and using words like "problems" or "makes no sense" to describe my own mod's features.

2. I'd also appreciate it if you did not use the composite image I've created for my own mod, just to differentiate them more. There are plenty of images of them within Google alone. For your convenience, I've even whipped-up a really quick one for you to use if you like it. It'll have a better resolution than the one you're currently using too.

3. Lastly, I would rather you used my Steam username (jpbar81) rather than my real name within your mod's description (perhaps whoward69 would like that same). I'm not really popular at all within the Steam Community (haha) and I'm sure players will find my workshop easier by searching with my username since there's no link.

Thanks. :)

------

Now, to help you with your issue.

The reason your text isn't displaying correctly is because I believe you're trying to upgrade a text tag that doesn't exist.

For the description text you have TXT_KEY_BUILDING_STAVE_CHURCH_DESC and it should be TXT_KEY_BUILDING_STAVE_CHURCH (without the DESC).

That's all; it should work now. ;) Yes, Firaxis doesn't seem to follow a set of standards when it comes to this and other things, since some descriptions are labeled as xxx_DESC and others are just xxx. :crazyeye:

Also, for the strategy text you have:

"...It takes less time to build because of the simpler construction and cheaper material; however..."

Yet, the production cost still equals that of a Temple (100). It's just a minor inaccuracy, unless I'm missing something else.

Well, that's it... good luck!

Borgund_stave_church.jpg

512 x 512
 
I'm home now and I just took a look at your new mod. I have some requests if you could please address them:

1. This is the second time where you've kind of denounced my own mod (here and within the description of your modmod). I'd very much appreciate it if you could write in a manner that describes your mod as more of an "alternative" rather than an "upgrade" to mine. Basically, referencing my mod and then simply listing what you've modified instead of comparing to mine and using words like "problems" or "makes no sense" to describe my own mod's features.

I apologize for the negative tone in both my OP and the description; when version 5 goes up today, I promise to reword the offending parts. :wishes for a crossing-my-heart smiley:

jpbar81 said:
2. I'd also appreciate it if you did not use the composite image I've created for my own mod, just to differentiate them more. There are plenty of images of them within Google alone. For your convenience, I've even whipped-up a really quick one for you to use if you like it. It'll have a better resolution than the one you're currently using too.

Considering that I normally use real photo scans for my work, I feel foolish for taking the picture you chose for the original mod. Please accept my apology--and my thanks for your offering a substitute! :thanx:

lpbar81 said:
3. Lastly, I would rather you used my Steam username (jpbar81) rather than my real name within your mod's description (perhaps whoward69 would like that same). I'm not really popular at all within the Steam Community (haha) and I'm sure players will find my workshop easier by searching with my username since there's no link.

:agree: Different people feel different about real names used online; I'll respect your request here, of course.
------



jpbar81 said:
Now, to help you with your issue.

The reason your text isn't displaying correctly is because I believe you're trying to upgrade a text tag that doesn't exist.

For the description text you have TXT_KEY_BUILDING_STAVE_CHURCH_DESC and it should be TXT_KEY_BUILDING_STAVE_CHURCH (without the DESC).
That's all; it should work now. ;) Yes, Firaxis doesn't seem to follow a set of standards when it comes to this and other things, since some descriptions are labeled as xxx_DESC and others are just xxx. :crazyeye:

Also, for the strategy text you have:

"...It takes less time to build because of the simpler construction and cheaper material; however..."

Yet, the production cost still equals that of a Temple (100). It's just a minor inaccuracy, unless I'm missing something else.

Well, that's it... good luck!


Thank you for being a hundred times more thoughtful and agreeable than I've been this whole time; I feel like a major jerk for hurting your feelings, especially in a request for help. :cringe:

As far as the FOO versus FOO_DESC inconsistency: I too wish Firaxis had stuck to one naming scheme. I wonder how many other modders have made errors for the same reason? Whoever updates Kael's guide next should warn people!
 
Back
Top Bottom