Quick Modding Questions Thread

You probably didn't have the iAppearance set to something non-zero. 4 out of the 6 features in BtS have this set to 0 because the are placed via feature specific mechanisms. The only 2 that do not have it set to 0 are the oasis (500) and flood plains (which always appear wherever the can because they have it at 10000).
 
Does anyone know how to set a wonder to give a bonus towards building projects, as the space elevator does? I keep looking at the XML and I can't see anything that makes the Space elevator special in any way.
 
Can someone post links for NIFSKOPE, Blender, 3ds MAX, gimp.. i can google it, its not problem, but i don't know which plugin/scripts i must download and which version i must use. All my programs are stay on my old HDD.
 
Does anyone know how to set a wonder to give a bonus towards building projects, as the space elevator does? I keep looking at the XML and I can't see anything that makes the Space elevator special in any way.

<iGlobalSpaceProductionModifier>50</iGlobalSpaceProductionModifier>
Look again then :D

Only applied for space projects, so nope
 
Can someone post links for NIFSKOPE, Blender, 3ds MAX, gimp.. i can google it, its not problem, but i don't know which plugin/scripts i must download and which version i must use. All my programs are stay on my old HDD.

- http://www.blender.org/
- http://niftools.sourceforge.net/wiki/NifTools , you need PyFFI and the plugin, as well as Nifskope
- http://www.gimp.org/

Versions...no idea, but I'd take the latest.


Guess a "useful programs" thread might be necessary.
 
Does anyone know where the early / middle / late art define tags in UnitArtStyleTypeInfos are told which eras they apply to and if there's a way to change them without recompiling the whole game?

Like if I wanted MiddleArtDefineTag to apply to just medieval instead of medieval and renaissance, or if I wanted to give each era its own definetag?
 
Does anyone know where the early / middle / late art define tags in UnitArtStyleTypeInfos are told which eras they apply to and if there's a way to change them without recompiling the whole game?

Like if I wanted MiddleArtDefineTag to apply to just medieval instead of medieval and renaissance, or if I wanted to give each era its own definetag?

CvInfos.cpp. You'd have to recompile the DLL. Here's the code that decides which eras belongs to which art type - simple math based on total number of eras. Adding art info for every single era would be a lot more DLL work, though.

Code:
const CvArtInfoUnit* CvUnitInfo::getArtInfo(int i, EraTypes eEra, UnitArtStyleTypes eStyle) const
{
	if ((eEra > GC.getNumEraInfos() / 2) && !CvString(getLateArtDefineTag(i, eStyle)).empty())
	{
		return ARTFILEMGR.getUnitArtInfo(getLateArtDefineTag(i, eStyle));
	}
	else if ((eEra > GC.getNumEraInfos() / 4) && !CvString(getMiddleArtDefineTag(i, eStyle)).empty())
	{
		return ARTFILEMGR.getUnitArtInfo(getMiddleArtDefineTag(i, eStyle));
	}
	else
	{
		return ARTFILEMGR.getUnitArtInfo(getEarlyArtDefineTag(i, eStyle));
	}
}
 
So what happens when someone adds or takes away an era?

The same math will be used. Middle art type is used if current era is greater than total eras / 4 but not greater than total eras / 2, rounded down. You'd have to go down to 5 eras to ensure the middle tag is used for just one era (the 2nd one).

There are many other XML files that have to be updated if you add or remove any eras though.
 
I am restructuring the Art files for my mod but the buttons for civs don't seem to appear now that I have moved them out of the Interface folder. I have moved them to a new folder at Art/Civilizations/America/America_Button.dds

Is there some requirement that Buttons be located in the interface folder(Yes, I did change the XML in Civ4ArtDefines_Civilizations)?

Here's my XML code in case I have made an obvious mistake:

Spoiler :
<CivilizationArtInfo>
<Type>ART_DEF_CIVILIZATION_AMERICA</Type>
<Button>Art/Civilizations/America/America_Button.dds</Button>
<Path>Art/Civilizations/America/America_Flag.dds</Path>
<bWhiteFlag>0</bWhiteFlag>
</CivilizationArtInfo>
 
Is there an easy way to refrain a unit from showing up in the pedia page? (Using sevopedia if that matters)

According to somebody else, you could add the optional bGraphical tag to every unit and the schema file, and set it to 1 for the one you don't want to show up.
Don't know myself if that works.

EDIT: And not sure if that works at all with the Sevopedia. Else you'd require a custom hack.

I am restructuring the Art files for my mod but the buttons for civs don't seem to appear now that I have moved them out of the Interface folder. I have moved them to a new folder at Art/Civilizations/America/America_Button.dds

Is there some requirement that Buttons be located in the interface folder(Yes, I did change the XML in Civ4ArtDefines_Civilizations)?

Here's my XML code in case I have made an obvious mistake:

Spoiler :
<CivilizationArtInfo>
<Type>ART_DEF_CIVILIZATION_AMERICA</Type>
<Button>Art/Civilizations/America/America_Button.dds</Button>
<Path>Art/Civilizations/America/America_Flag.dds</Path>
<bWhiteFlag>0</bWhiteFlag>
</CivilizationArtInfo>

No special requirements there.
Did you clear the cache?
If you don't know what I'm talking about: Hold shift down while loading your mod, that should clear it.
 
According to somebody else, you could add the optional bGraphical tag to every unit and the schema file, and set it to 1 for the one you don't want to show up.
Don't know myself if that works.

EDIT: And not sure if that works at all with the Sevopedia. Else you'd require a custom hack.
Hmm seems a bit complicated and might not even work
What if you did something like how you created the custom pages, like if the unit requires this tech it is on a different page. Couldnt you do if it this unit, dont show it up on this page and just dont assign it to another page? Or if not couldnt you assign it to another page and just have that page not be on the list of pages shown
 
Hmm seems a bit complicated and might not even work

Setting one tag on each thing you want to hide is complicated?

Try it with one. If that one disappears from the 'pedia (whichever one you are using) then it works.

As I recall, with the regular Civilopedia it only works for some things without modifications. I don't think it worked at all for the Sevopedia - I had to modify the 'pedia code in FFP to get it to work.

It's a pretty easy change in the Sevopedia to get it to apply to everything since it uses a single function to get the lists of things to display. One line changed in getSortedList and one 2 line member function added to the TraitInfo class it uses to deal with the traits.

Here are the changes you need to add to SevoPediaMain.py. Add the things in red (the comments are what are int he FFP version of this file, which I just copied these from):
Code:
	def getTraitInfo(self, id):
		info = gc.getNewConceptInfo(id)
		if self.isTraitInfo(info):
			
			class TraitInfo:
				def __init__(self, conceptInfo):
					self.conceptInfo = conceptInfo
					sKey = conceptInfo.getType()
					sKey = sKey[sKey.find("TRAIT_"):]
					self.eTrait = gc.getInfoTypeForString(sKey)
					self.traitInfo = gc.getTraitInfo(self.eTrait)
				def getDescription(self):
					return u"%c %s" % (TraitUtil.getIcon(self.eTrait), self.traitInfo.getDescription())
				def getButton(self):
					return self.traitInfo.getButton()
				[B][COLOR="DarkRed"]def isGraphicalOnly(self):	# FFP : do not show items with bGraphicalOnly set to 1
					return self.traitInfo.isGraphicalOnly()[/COLOR][/B]
			
			return TraitInfo(info)
		return None

and

Code:
	def getSortedList(self, numInfos, getInfo, noSort=False):
		list = []
		for i in range(numInfos):
			item = getInfo(i)
			if item [B][COLOR="darkred"]and not item.isGraphicalOnly()[/COLOR][/B]: # FFP : do not show items with bGraphicalOnly set to 1
				list.append((item.getDescription(), i))
		if self.isSortLists() and not noSort:
			list.sort()
		return list
 
No special requirements there.
Did you clear the cache?
If you don't know what I'm talking about: Hold shift down while loading your mod, that should clear it.

Nope. No effect. Also, after switching back to old folder structure it doesn't work there anymore either.

This has been stumping me for a while now. The XML appears correct, the folder structure also appears fine and art isn't the problem (I've tried it with working buttons):mad:.
 
Top Bottom