How to get custom traits to show in the Sevopedia in BUG/BBAI

Jaxx

Chieftain
Joined
Jul 25, 2014
Messages
68
Location
Earth
Just like the title says how do I add traits so they appear in the sevopedia in BUG 4.4/Better BAT AI. I have my custom traits working with my added leaders. They show up when looking at the leaders but do not show up in the traits column anywhere. Nothing under spiritual. Any clue as to why?
 
Did you write a text key for the pedia in the gametext XML files?
 
Thanks that worked, also where are the buttons for the traits located as I have pink squares and need to do artdefines for the traits
 
You can make or download buttons and put them into Better BAT AI\Assets\art\Interface\Buttons.

The corresponding XML is in one of the ArtDefines files in the main CIV4 or BTS directories.
 
I have been looking in the all the ArtDefines in Civ4, BTS and BAT and I don't see any of the 11 traits listed in any of those XML :scan: I wanted to keep them all together.

Does it matter what ArtDefine XML I choose to make my buttons in?
 
I have been looking in the all the ArtDefines in Civ4, BTS and BAT and I don't see any of the 11 traits listed in any of those XML :scan: I wanted to keep them all together.

Does it matter what ArtDefine XML I choose to make my buttons in?

The trait art defines are somewhere I can't find, but here they are as assigned by TraitUtil.py in the Python\BUG folder:

Code:
def init():
	"Performs one-time initialization after the game starts up."
	game = gc.getGame()
	global GENERIC_ICON
	GENERIC_ICON = u"%c" % game.getSymbolID(FontSymbols.MAP_CHAR)
	
	addTrait("AGGRESSIVE", game.getSymbolID(FontSymbols.STRENGTH_CHAR), "Art/Interface/Buttons/Promotions/Combat1.dds")
	addTrait("CHARISMATIC", game.getSymbolID(FontSymbols.HAPPY_CHAR), "Art/Interface/Buttons/TechTree/MassMedia.dds")
	addTrait("CREATIVE", gc.getCommerceInfo(CommerceTypes.COMMERCE_CULTURE).getChar(), "Art/Interface/Buttons/TechTree/Music.dds")
	addTrait("EXPANSIVE", game.getSymbolID(FontSymbols.HEALTHY_CHAR), "Art/Interface/Buttons/Actions/Heal.dds")
	addTrait("FINANCIAL", gc.getCommerceInfo(CommerceTypes.COMMERCE_GOLD).getChar(), "Art/Interface/Buttons/TechTree/Banking.dds")
	addTrait("IMPERIALIST", game.getSymbolID(FontSymbols.OCCUPATION_CHAR), "Art/Interface/Buttons/Actions/FoundCity.dds")
	addTrait("INDUSTRIOUS", gc.getYieldInfo(YieldTypes.YIELD_PRODUCTION).getChar(), "Art/Interface/Buttons/TechTree/Industrialism.dds")
	addTrait("ORGANIZED", game.getSymbolID(FontSymbols.TRADE_CHAR), "Art/Interface/Buttons/Buildings/Courthouse.dds")
	addTrait("PHILOSOPHICAL", game.getSymbolID(FontSymbols.GREAT_PEOPLE_CHAR), "Art/Interface/Buttons/TechTree/Philosophy.dds")
	addTrait("PROTECTIVE", game.getSymbolID(FontSymbols.DEFENSE_CHAR), "Art/Interface/Buttons/Promotions/CityGarrison1.dds")
	addTrait("SPIRITUAL", game.getSymbolID(FontSymbols.RELIGION_CHAR), "Art/Interface/Buttons/TechTree/Meditation.dds")

You would just add your traits there and put the buttons in the Buttons folder like you see there.

The SevoPedia pulls them from there like this (See the items in bold):

Code:
def interfaceScreen(self, iConcept):
		self.iLeader = -1
		self.iConcept = iConcept
		info = gc.getNewConceptInfo(iConcept)
		sKey = info.getType()
		sKey = sKey[sKey.find("TRAIT_"):]
		self.iTrait = gc.getInfoTypeForString(sKey)
		
		screen = self.top.getScreen()

		screen.addPanel( self.top.getNextWidgetName(), "", "", False, False, self.X_MAIN_PANE, self.Y_MAIN_PANE, self.W_MAIN_PANE, self.H_MAIN_PANE, PanelStyles.PANEL_STYLE_BLUE50)
		screen.addPanel(self.top.getNextWidgetName(), "", "", False, False, self.X_ICON, self.Y_ICON, self.W_ICON, self.H_ICON, PanelStyles.PANEL_STYLE_MAIN)
		[B]screen.addDDSGFC(self.top.getNextWidgetName(), TraitUtil.getButton(self.iTrait), self.X_ICON + self.W_ICON/2 - self.ICON_SIZE/2, self.Y_ICON + self.H_ICON/2 - self.ICON_SIZE/2, self.ICON_SIZE, self.ICON_SIZE, WidgetTypes.WIDGET_GENERAL, -1, -1 )[/B]

		self.placeLeaders()
		self.placeSpecial()
		self.placeText()

Hope that helps.
 
Top Bottom