mrrandomplayer
Hopeless Situation Warrior
Is there a way in the C++ editor to automatically debug for the XML file?
Traceback (most recent call last):
File "<string>", line 1, in ?
File "<string>", line 52, in load_module
File "CvEventInterface", line 13, in ?
File "<string>", line 52, in load_module
File "CvRFCEventManager", line 12, in ?
File "<string>", line 52, in load_module
File "CvRFCEventHandler", line 7, in ?
File "<string>", line 52, in load_module
File "RiseAndFall", line 214, in ?
File "RiseAndFall", line 636, in RiseAndFall
NameError
:
name 'self' is not defined
Failed to load python module CvEventInterface.
ERR: Call function onEvent failed. Can't find module CvEventInterface
ERR: Call function onEvent failed. Can't find module CvEventInterface
ERR: Call function onEvent failed. Can't find module CvEventInterface
Allocating zero or less memory in CvXMLLoadUtility::SetVariableListTagPair
Tag: BUILDING_CHRISTIAN_SHRINE in Info class was incorrect
dawnOfManArt = {
iEgypt : "ART_DOM_EGYPT",
iIndia : "ART_DOM_INDIA",
iChina : "ART_DOM_CHINA",
iBabylonia : "ART_DOM_BABYLONIA",
iGreece : "ART_DOM_GREECE",
iCarthage : "ART_DOM_PHOENICIA",
iPersia : "ART_DOM_PERSIA",
iRome : "ART_DOM_ROME",
iTamils : "ART_DOM_TAMILS",
iEthiopia : "ART_DOM_ETHIOPIA",
iJapan : "ART_DOM_JAPAN",
iKorea : "ART_DOM_KOREA",
iMaya : "ART_DOM_MAYA",
iByzantium : "ART_DOM_BYZANTIUM",
iVikings : "ART_DOM_VIKINGS",
iArabia : "ART_DOM_ARABIA",
iTibet : "ART_DOM_TIBET",
iMoors : "ART_DOM_MOORS",
iIndonesia : "ART_DOM_INDONESIA",
iKhmer : "ART_DOM_KHMER",
iSpain : "ART_DOM_SPAIN",
iFrance : "ART_DOM_FRANCE",
iEngland : "ART_DOM_ENGLAND",
iHolyRome : "ART_DOM_HOLY_ROME",
iRussia : "ART_DOM_RUSSIA",
iMali : "ART_DOM_MALI",
iPoland : "ART_DOM_POLAND",
iItaly : "ART_DOM_ITALY",
iPortugal : "ART_DOM_PORTUGAL",
iInca : "ART_DOM_INCA",
iAztecs : "ART_DOM_AZTECS",
iMongolia : "ART_DOM_MONGOLIA",
iMughals : "ART_DOM_MUGHALS",
iTurkey : "ART_DOM_TURKEY",
iThailand : "ART_DOM_THAILAND",
iCongo : "ART_DOM_CONGO",
iNetherlands : "ART_DOM_NETHERLANDS",
iGermany : "ART_DOM_GERMANY",
iAmerica : "ART_DOM_AMERICA",
iArgentina : "ART_DOM_ARGENTINA",
iBrazil : "ART_DOM_BRAZIL",
}
pActivePlayer = gc.getPlayer(CyGame().getActivePlayer())
iActivePlayer = CyGame().getActivePlayer()
artKey = con.dawnOfManArt[iActivePlayer]
screen.addDDSGFC("Civilization Image", ArtFileMgr.getInterfaceArtInfo([COLOR="Blue"]artKey[/COLOR]).getPath(), self.X_TEXT_PANEL, self.Y_TEXT_PANEL, self.W_TEXT_PANEL, self.H_TEXT_PANEL, WidgetTypes.WIDGET_GENERAL, -1, -1 )
You should be able to simply cut and paste the whole dict into CvDawnOfMan.py. The only other thing to do is renaming the variables to refer to Consts, i.e. iEgypt becomes con.iEgypt and so on.
<?xml version="1.0"?>
<!-- edited with XMLSPY v2004 rel. 2 U (http://www.xmlspy.com) by Tim McCracken (Firaxis Games) -->
<!-- Sid Meier's Civilization 4 -->
<!-- Copyright Firaxis Games 2005 -->
<!-- -->
<!-- Global Defines -->
<Civ4Defines xmlns="x-schema:CIV4GlobalDefinesSchema.xml">
<Define>
<!-- edead: change this to 0 if you want autosaves work during AI autoplay for some reason -->
<DefineName>NO_AUTOSAVE_DURING_AUTOPLAY</DefineName>
<iDefineIntVal>1</iDefineIntVal>
</Define>
<!-- Leoreth: if set to 1, UHV goals are not checked for AI civilizations so they can never complete them (increases speed)
set to 0 to reenable them -->
<Define>
<DefineName>NO_AI_UHV_CHECKS</DefineName>
<iDefineIntVal>1</iDefineIntVal>
</Define>
<Define>
<DefineName>AI_SLAVE_VALUE</DefineName>
<iDefineIntVal>100</iDefineIntVal>
</Define>
<!--
Leoreth: define how often these optional civs should appear
value=0 Civilization never appears
value>0 Civilization roughly appears in every i-th game, where i is the entered value
(so to make this civilization appear every time, enter 1)
Note that if certain civilizations are controlled by the player, these civs will spawn regardless to provide a historical opponent
-->
<Define>
<DefineName>PLAYER_OCCURENCE_TAMILS</DefineName>
<iDefineIntVal>1</iDefineIntVal> <!-- default: 1 -->
</Define>
<Define>
<DefineName>PLAYER_OCCURENCE_TIBET</DefineName>
<iDefineIntVal>1</iDefineIntVal> <!-- default: 1 -->
</Define>
<Define>
<DefineName>PLAYER_OCCURENCE_MOORS</DefineName>
<iDefineIntVal>1</iDefineIntVal> <!-- default: 1 -->
</Define>
<Define>
<DefineName>PLAYER_OCCURENCE_POLAND</DefineName>
<iDefineIntVal>1</iDefineIntVal> <!-- default: 1 -->
</Define>
<Define>
<DefineName>PLAYER_OCCURENCE_CONGO</DefineName>
<iDefineIntVal>1</iDefineIntVal> <!-- default: 1 -->
</Define>
<Define>
<DefineName>PLAYER_OCCURENCE_ARGENTINA</DefineName>
<iDefineIntVal>1</iDefineIntVal> <!-- default: 1 -->
</Define>
<Define>
<DefineName>PLAYER_OCCURENCE_BRAZIL</DefineName>
<iDefineIntVal>1</iDefineIntVal> <!-- default: 1 -->
</Define>
<!-- Disable the respawn by setting the value to 0 -->
<Define>
<DefineName>PLAYER_REBIRTH_MEXICO</DefineName>
<iDefineIntVal>1</iDefineIntVal>
</Define>
<Define>
<DefineName>PLAYER_REBIRTH_COLOMBIA</DefineName>
<iDefineIntVal>1</iDefineIntVal>
</Define>
[B][COLOR="Red"]<Define>
<DefineName>PLAYER_REBIRTH_VENICE</DefineName>
<iDefineIntVal>1</iDefineIntVal>
</Define>
[/COLOR][/B]
<!--
BULL User Settings
This file is used only when BULL is running without BUG, but it will cause no harm to include it with BUG.
Copyright (c) 2009 The BUG Mod.
-->
etc etc etc
Traceback (most recent call last):
File "<string>", line 1, in ?
File "<string>", line 52, in load_module
File "CvEventInterface", line 13, in ?
File "<string>", line 52, in load_module
File "CvRFCEventManager", line 12, in ?
File "<string>", line 52, in load_module
File "CvRFCEventHandler", line 7, in ?
File "<string>", line 35, in load_module
File "<string>", line 13, in _get_code
File "RiseAndFall", line 3182
utils.makeUnit(con.iWarrior, iCiv, tPlot, 2)
^
SyntaxError: invalid syntax