Quick Modding Questions Thread

This is not doable with XML and not easily doable with Python, so SDK is the way to go.

Yeah I thought so, and I already set up a new XML-Tag for Buildings, but I am a bit lost when it comes to the details as to what I have to do for it to actually work. As in, I am stuck on Step 3 of Kael´s tutorial here. I have a working XML-tag that doesn´t do anything yet. I suppose I could copy most of the code from the tag for civics, but when I take a look at CvCity.cpp I got no clue where I´d put it.
 
Is it possible to preset trade deals in worldbuilder via text editting? If no-one knows I'll try to do some investigation into it.

EDIT: I may have asked this before.
 
What would happen if I placed temples, cathedrals and monastries into cities via world-builder and did not make their religions present in the actual city. Would they eventually become present in the city over time.

I am thinking a better world representation would be to have the religious buildings in the cities, but base the actual 'presence' in them in accordance with the nation demographics. e.g. if a nation is 95% Christian all the cities in that nation would be 'Christian' only. If a nation has say 10-20% or more of another religion than I would include that religion as well.
 
It would appear that the tag <ReligionChanges/> would be used to determine the affects of the buildings. I note in the base mod I am developing my scenario this has not being set. What is the code example I would have to have to use it. The Modwiki is not much help in this regard.

EDIT: found it

Code:
			<ReligionChanges>
				<ReligionChange>
					<ReligionType>RELIGION_JUDAISM</ReligionType>
					<iReligionChange>1</iReligionChange>
				</ReligionChange>
			</ReligionChanges>
 
Hello everyone!
Here is my question.
I found nice graphics for Water-well improvement, and have this idea where workers could build it in middle of area that doesn't have any water access to use it as water source to build farms etc.

The only question is how to set up the improvement in such way that it becomes water source? If its possible at all with xml?

thanks!
 
Thanks the_J! I will look at it.

In the main time here is another question.

I always liked how Privateers could rampage enemy waters without declaring war so i wanted to make a land unit like that.

I made sort of a land pirate unit that I called Buccaneer, and gave it properties:

<bHiddenNationality>1</bHiddenNationality>
<bAlwaysHostile>1</bAlwaysHostile>

The unit generally works great, however has an issue that, unless I am actually at war with civ in question, they will not attack their cities. Instead they will move right in and can sit there peacefully as if I would have open border policy with them. Which doesn't seem very realistic at all :)

I tried setting them to :

<bNoCapture>1</bNoCapture> - that normally prevents them capturing cities, but it still allows them to freely enter them.

Any suggestions how to work around this?

thanks!
 
That is weird.. I thought hidden nationality and always hostile made them work like barbarians....How strange...

I have a Q about buildings, can buildings be set to stop 2 building being built in the same city.

Like you can build a food market OR a luxury market but not both, one stops the other.

Is this a BTS thing or was it added by mods..
 

That is weird.. I thought hidden nationality and always hostile made them work like barbarians....How strange...

It doesn't, that's the problem.
The AI can't handle these 2 tags, if not the right unit AI is assigned to the unit.
And the privateer AI is sadly an AI for water units, and doesn't work on land. And with another unit AI type the AI will just not use this type of unit correctly.


I have a Q about buildings, can buildings be set to stop 2 building being built in the same city.

Like you can build a food market OR a luxury market but not both, one stops the other.

Is this a BTS thing or was it added by mods..

Can be done by Python. I'm not sure, but I think this might be available somewhere :dunno:.
 
Hi,

I would like to give the effects of selfmade world wonders, which are defined in the Civ4BuildingInfos.xml to every member of the team which has build it. Unfortunatly I didn´t find any tag so far. Any ideas which one could help.

bTeamShare didn´t work in two tests.

Thx
 
Anyone knows if and how, in Civ4CivicOptions.xml TraitNoUpkeeps works? I just put TRAIT_INDUSTRIOUS between the tags, but it doesn't seem to have an effect. No errors though.

EDIT: Also, is there somewhere to find a list of Icons to use for in Strategies especially, like [ICON_FOOD] and [ICON_STRENGTH]?
 
It doesn't, that's the problem.
The AI can't handle these 2 tags, if not the right unit AI is assigned to the unit.
And the privateer AI is sadly an AI for water units, and doesn't work on land. And with another unit AI type the AI will just not use this type of unit correctly.

thank the_J
I guess I will have to come up with work aroudn somehow.

Another big question.

I want to add a mid stage for graphics for workers.
Normally they go from Ancient to Modern.
I got the graphics for medieval worker, but not sure how to get it to be assigned properly.
I go the art part worked out but I need to tell the game when to switch to it.

I think it has to do with this lines in units info:

<UnitMeshGroup>
<iRequired>2</iRequired>
<EarlyArtDefineTag>ART_DEF_UNIT_WORKER</EarlyArtDefineTag>
<LateArtDefineTag>ART_DEF_UNIT_WORKERMODERN</LateArtDefineTag>
</UnitMeshGroup>


I need to insert my new medieval worker info in here somehow, but these tags have to define elsewhere...

any suggestions? ;)


UPDATE: figured it out ;)

If anyone else needs this info:

You need to add <MiddleArtDefineTag>ART_DEF_UNIT_WORKER_MEDIEVAL</MiddleArtDefineTag> to unit info file

where ART_DEF_UNIT_WORKER_MEDIEVAL is your new unit art in art file,
and modify civ art info file for say Europeans to:

<MiddleArtDefineTag>ART_DEF_UNIT_WORKER_MEDIEVAL</MiddleArtDefineTag>

;)
 
New question for today :)

I would like to know where can i control how often do barbarians spawn?
I found that normal barbarians are too few, while raging barbarians are way too many :)

Same for wild animals please

Also a related question where is determined which units are available to barbarians to use? Also how is it controlled how fast barbarian tech/units advances?

thanks!
 
That is the delay until they start to show up. The actual numbers are linked with the iUnownedTilesPerBarbarianUnit and iUnownedTilesPerGameAnimal. The target number of barbs (or animals) is the number of plots that nobody owns divided by that number.
 
something I am curious about.

I know that each AI leader has religion preference.
However I also know that each leader will switch to any religion which is more beneficial to him at the moment, regardless of which religion he has as preferred.

My question is: if I am playing with "select religion by choice when discovered" game setting, when AI discovers religion tech - do they choose randomly, or do they follow their encoded preference at least here?
 
Depends on the mod if any. They will choose pretty much randomly on vanilla BTS I believe (unless the favorite religion was implemented then which I'm not sure of.) In C2C, however, utilizing Divine Prophets as well, they will very much choose according to their personalities. Without Divine Prophets, they will select their favorite religion first and a random any other religion thereafter. In vanilla bts, there isn't much cause to have them select specific ones outside of historical flavor alone.
 
I have one question. In Rise from Erebus 1.4, there are no "opening menu sound" - don't work. Why? I look in AudioDefines.xml and Audio2DScripts.xml. There is sound define in xml. files. But in Sound folder, there are no "sound for opening menu". I am put sounds from FFH2, all as they are define in AudioDefines.xml, but they don't work again. Sounds and speeches work in game, but "opening menu sound" don't work. How they are turn off "opening menu sound"? Where is that?

Note: I am not turn off music in my Civs options, and sounds work in other mods.
 
Top Bottom