Bug Reporting

I get Python exceptions after creating a new reminder and also at the beginning of the turn when the reminder pops up. I don't see the reminder text when it pops up, just the Python exception.

Sorry I don't have any screenshots or savegame files right now. I'll post some later if you have trouble duplicating the problem. BUG 2.30.

P.S. Awesome update---love the full PLE and new wide-screen stuff!!
 
I get Python exceptions after creating a new reminder and also at the beginning of the turn when the reminder pops up.

Both of these problems have been fixed in SVN.

If you'd like to just get this fix and avoid dealing with SVN, replace the entire contents of the file [Custom]Assets/Python/Contrib/ReminderEventManager.py with the following version.

PHP:
##-------------------------------------------------------------------
## Modified from reminder by eotinb
## by Ruff and EF
##-------------------------------------------------------------------
## Reorganized to work via CvCustomEventManager
## using Civ4lerts as template.
## CvCustomEventManager & Civ4lerts by Gillmer J. Derge
##-------------------------------------------------------------------
## EF: Turned into a real queue, can be disabled
##-------------------------------------------------------------------

from CvPythonExtensions import *
import CvUtil
import Popup as PyPopup
import BugUtil
import SdToolKit

import BugAlertsOptions
BugAlerts = BugAlertsOptions.getOptions()

import autolog
g_autolog = autolog.autologInstance()

gc = CyGlobalContext()

SD_MOD_ID = "Reminders"
SD_QUEUE_ID = "queue"

# Used to display flashing end-of-turn text
g_turnReminderTexts = None

class ReminderEventManager:

	def __init__(self, eventManager):

		ReminderEvent(eventManager, self)

		self.reminders = ReminderQueue()
		self.endOfTurnReminders = ReminderQueue()
		self.reminder = None

		# additions to self.Events
		moreEvents = {
			CvUtil.EventReminderStore       : ('', self.__eventReminderStoreApply,  self.__eventReminderStoreBegin),
			CvUtil.EventReminderRecall      : ('', self.__eventReminderRecallApply, self.__eventReminderRecallBegin),
			CvUtil.EventReminderRecallAgain : ('', self.__eventReminderRecallAgainApply, self.__eventReminderRecallAgainBegin),
		}
		eventManager.Events.update(moreEvents)

	def __eventReminderStoreBegin(self, argsList):
		header = BugUtil.getPlainText("TXT_KEY_REMINDER_HEADER")
		prompt = BugUtil.getPlainText("TXT_KEY_REMINDER_PROMPT")
		ok = BugUtil.getPlainText("TXT_KEY_MAIN_MENU_OK")
		cancel = BugUtil.getPlainText("TXT_KEY_POPUP_CANCEL")
		popup = PyPopup.PyPopup(CvUtil.EventReminderStore, EventContextTypes.EVENTCONTEXT_SELF)
		popup.setHeaderString(header)
		popup.setBodyString(prompt)
		popup.createSpinBox(0, "", 1, 1, 100, 0)
		popup.createEditBox("", 1)
		popup.addButton(ok)
		popup.addButton(cancel)
		popup.launch(False, PopupStates.POPUPSTATE_IMMEDIATE)

	def __eventReminderStoreApply(self, playerID, userData, popupReturn):
		if (popupReturn.getButtonClicked() != 1):
			reminderTurn = popupReturn.getSpinnerWidgetValue(0) + gc.getGame().getGameTurn()
			reminderText = popupReturn.getEditBoxString(1)
			reminder = Reminder(reminderTurn, reminderText)
			self.reminders.push(reminder)
			if (g_autolog.isLogging() and BugAlerts.isLogReminders()):
				g_autolog.writeLog("Reminder: On Turn %d, %s" % (reminderTurn, reminderText))

	def __eventReminderRecallBegin(self, argsList):
		self.showReminders(False)

	def __eventReminderRecallApply(self, playerID, userData, popupReturn):
		if (popupReturn.getButtonClicked() != 1):
			if (self.reminder):
				self.endOfTurnReminders.push(self.reminder)
				self.reminder = None

	def __eventReminderRecallAgainBegin(self, argsList):
		self.showReminders(True)

	def __eventReminderRecallAgainApply(self, playerID, userData, popupReturn):
		if (popupReturn.getButtonClicked() != 1):
			if (self.reminder):
				# Put it back into the queue for next turn
				self.reminder.turn += 1
				self.reminders.push(self.reminder)
				self.reminder = None

	def showReminders(self, endOfTurn):
		global g_turnReminderTexts
		thisTurn = gc.getGame().getGameTurn() + 1
		if (endOfTurn):
			queue = self.endOfTurnReminders
			prompt = BugUtil.getPlainText("TXT_KEY_REMIND_NEXT_TURN_PROMPT")
			eventId = CvUtil.EventReminderRecallAgain
		else:
			g_turnReminderTexts = ""
			queue = self.reminders
			# endTurnReady isn't firing :(
#			prompt = BugUtil.getPlainText("TXT_KEY_REMIND_END_TURN_PROMPT")
#			eventId = CvUtil.EventReminderRecall
			prompt = BugUtil.getPlainText("TXT_KEY_REMIND_NEXT_TURN_PROMPT")
			eventId = CvUtil.EventReminderRecallAgain
		yes = BugUtil.getPlainText("TXT_KEY_POPUP_YES")
		no = BugUtil.getPlainText("TXT_KEY_POPUP_NO")
		while (not queue.isEmpty()):
			nextTurn = queue.nextTurn()
			if (nextTurn > thisTurn):
				break
			elif (nextTurn < thisTurn):
				# invalid (lost) reminder
				queue.pop()
			else:
				self.reminder = queue.pop()
				if (g_autolog.isLogging() and BugAlerts.isLogReminders()):
					g_autolog.writeLog("Reminder: %s" % self.reminder.message)
				if (not endOfTurn):
					if (g_turnReminderTexts):
						g_turnReminderTexts += ", "
					g_turnReminderTexts += self.reminder.message
				if (BugAlerts.isShowRemindersLog()):
					CyInterface().addMessage(CyGame().getActivePlayer(), True, 10, self.reminder.message, 
											 None, 0, None, ColorTypes(8), 0, 0, False, False)
				if (BugAlerts.isShowRemindersPopup()):
					popup = PyPopup.PyPopup(eventId, EventContextTypes.EVENTCONTEXT_SELF)
					popup.setHeaderString(self.reminder.message)
					popup.setBodyString(prompt)
					popup.addButton(yes)
					popup.addButton(no)
					popup.launch(False)

	def clearReminders(self):
		self.reminders.clear()
		self.endOfTurnReminders.clear()
		global g_turnReminderTexts
		g_turnReminderTexts = None
	
	def setReminders(self, queue):
		self.reminders = queue


class AbstractReminderEvent(object):

	def __init__(self, eventManager, *args, **kwargs):
		super(AbstractReminderEvent, self).__init__(*args, **kwargs)

class ReminderEvent(AbstractReminderEvent):

	def __init__(self, eventManager, reminderManager, *args, **kwargs):
		super(ReminderEvent, self).__init__(eventManager, *args, **kwargs)

		eventManager.addEventHandler("kbdEvent", self.onKbdEvent)
		eventManager.addEventHandler("EndGameTurn", self.onEndGameTurn)
		eventManager.addEventHandler("endTurnReady", self.onEndTurnReady)
		eventManager.addEventHandler("GameStart", self.onGameStart)
		eventManager.addEventHandler("OnLoad", self.onLoadGame)
		eventManager.addEventHandler("OnPreSave", self.onPreSave)

		self.eventMgr = eventManager
		self.reminderManager = reminderManager

	def onKbdEvent(self, argsList):
		eventType,key,mx,my,px,py = argsList
		if ( eventType == self.eventMgr.EventKeyDown ):
			theKey=int(key)
			# If ALT + M or CTRL + ALT + R was hit, show dialog box to set up reminder
			if ((theKey == int(InputTypes.KB_M) and self.eventMgr.bAlt)
			or (theKey == int(InputTypes.KB_R) and self.eventMgr.bAlt and self.eventMgr.bCtrl)):
				if (BugAlerts.isShowReminders()):
					self.eventMgr.beginEvent(CvUtil.EventReminderStore)
					return 1
		return 0

	def onEndGameTurn(self, argsList):
		'Called at the end of the end of each full game turn'
		iGameTurn = argsList[0]

		g_turnReminderTexts = None
		if (BugAlerts.isShowReminders()):
			self.eventMgr.beginEvent(CvUtil.EventReminderRecall)

	def onEndTurnReady(self, argsList):
		iGameTurn = argsList[0]
		
		if (gc.getPlayer(iPlayer).isHuman()):
			if (BugAlerts.isShowReminders()):
				self.eventMgr.beginEvent(CvUtil.EventReminderRecallAgain)
#				return 1

	def onGameStart(self, argsList):
		'Called when a new game is started'
		self.reminderManager.clearReminders()
#		return 1

	def onLoadGame(self, argsList):
		'Called when a game is loaded'
		self.reminderManager.clearReminders()
		queue = SdToolKit.sdGetGlobal(SD_MOD_ID, SD_QUEUE_ID)
		if (queue):
			self.reminderManager.setReminders(queue)
			SdToolKit.sdSetGlobal(SD_MOD_ID, SD_QUEUE_ID, None)
#		return 1

	def onPreSave(self, argsList):
		"Called before a game is actually saved"
		if (not self.reminderManager.reminders.isEmpty()):
			SdToolKit.sdSetGlobal(SD_MOD_ID, SD_QUEUE_ID, self.reminderManager.reminders)
#		return 1


class Reminder(object):

	def __init__(self, turn, message):
		self.turn = turn
		self.message = message


class ReminderQueue(object):

	def __init__(self):
		self.queue = []

	def clear(self):
		self.queue = []

	def size(self):
		return len(self.queue)

	def isEmpty(self):
		return len(self.queue) == 0

	def nextTurn(self):
		if (self.isEmpty()):
			return -1
		return self.queue[0].turn

	def push(self, reminder):
		for i, r in enumerate(self.queue):
			if (reminder.turn < r.turn):
				self.queue.insert(i, reminder)
				return
		self.queue.append(reminder)

	def pop(self):
		if (self.isEmpty()):
			return None
		return self.queue.pop(0)
Glad you're enjoying the new stuff. More is on the way. :)
 
Thanks! I encountered another minor issue: Clicking on Mansa Musa in the military advisor does not show his Axeman that is standing right next to my army in neutral territory (just left of the advisor in the screenshot). It only shows his units that are in his own territory. I'm using BUG 2.30, Bhruic's 1.21, and *cough* my own little mod that gives me all the traits, UU's, and UB's :). Hopefully that last one won't screw up the ability to load the file, but if so, I can post my mod files (only 2 of them).

 

Attachments

Clicking on Mansa Musa in the military advisor does not show his Axeman that is standing right next to my army in neutral territory (just left of the advisor in the screenshot). It only shows his units that are in his own territory.

Yes, the first tab of the BUGMA is still quite a work in progress. I'll take a look at it and hopefully get some time to complete it ASAP.

I can post my mod files (only 2 of them).

Actually, if you wouldn't mind, that sounds like a fun thing to try out. Could you PM/email them to me please? :)
 
@EmperorFool: I tried your new ReminderEventManager.py and didn't see any changes. I wonder if maybe there's another dependency. No big deal though... since the reminder alert (albeit without text) still fires, I'm not gimped that much, and it's even more motiviation for me to try out SVN :).

Yes, the first tab of the BUGMA is still quite a work in progress. I'll take a look at it and hopefully get some time to complete it ASAP.

The bug is quite strange. I noticed a few turns later that a couple of Mansa Musa's Chariots that surfaced in neutral territory were in fact included in the BUGMA, but that original Axeman still wasn't. I didn't do anything weird with that Axeman like gift it or anything like that.

While I'm thinking about it, I have a suggestion for the BUGMA: I find that I miss the ability to see at a glance how many of a certain unit type I have in the world. I wonder if it might be possible to restore that old behavior as a new tab in the BUGMA.

Actually, if you wouldn't mind, that sounds like a fun thing to try out. Could you PM/email them to me please? :)

Sure, actually they're small enough to just post here as spoilers. Note that in cases of multiple choices for UU or UB, I just picked my favorite. (You can't have more than one available at a time... later entries seem to overwrite previous ones). It'd be easy to change though... just search the same file for the alternative UU or UB xml key and replace it.

It's definitely a blatant instant-gratification thing, satisfying the urge to try out the best of all civs at the same time, and I should warn you, it will be frustrating to go back to a normal civ after trying it, lol.

1. Replace lines 2021-2054 of \Beyond the Sword\Assets\XML\Civilizations\CIV4CivilizationInfos.xml (Buildings through Free Techs) with the following:

Spoiler :
Code:
            <Buildings>
                <Building>
                    <BuildingClassType>BUILDINGCLASS_WALLS</BuildingClassType>
                    <BuildingType>BUILDING_CELTIC_DUN</BuildingType>
                </Building>
                <Building>
                    <BuildingClassType>BUILDINGCLASS_CASTLE</BuildingClassType>
                    <BuildingType>BUILDING_SPANISH_CITADEL</BuildingType>
                </Building>
                <Building>
                    <BuildingClassType>BUILDINGCLASS_BARRACKS</BuildingClassType>
                    <BuildingType>BUILDING_ZULU_IKHANDA</BuildingType>
                </Building>
                <Building>
                    <BuildingClassType>BUILDINGCLASS_STABLE</BuildingClassType>
                    <BuildingType>BUILDING_MONGOL_GER</BuildingType>
                </Building>
                <Building>
                    <BuildingClassType>BUILDINGCLASS_GRANARY</BuildingClassType>
                    <BuildingType>BUILDING_INCAN_TERRACE</BuildingType>
                </Building>
                <Building>
                    <BuildingClassType>BUILDINGCLASS_AQUEDUCT</BuildingClassType>
                    <BuildingType>BUILDING_KHMER_BARAY</BuildingType>
                </Building>
                <Building>
                    <BuildingClassType>BUILDINGCLASS_LIGHTHOUSE</BuildingClassType>
                    <BuildingType>BUILDING_VIKING_TRADING_POST</BuildingType>
                </Building>
                <Building>
                    <BuildingClassType>BUILDINGCLASS_HARBOR</BuildingClassType>
                    <BuildingType>BUILDING_CARTHAGE_COTHON</BuildingType>
                </Building>
                <Building>
                    <BuildingClassType>BUILDINGCLASS_OBELISK</BuildingClassType>
                    <BuildingType>BUILDING_NATIVE_AMERICA_TOTEM</BuildingType>
                </Building>
                <Building>
                    <BuildingClassType>BUILDINGCLASS_COLOSSEUM</BuildingClassType>
                    <BuildingType>BUILDING_BABYLON_GARDEN</BuildingType>
                </Building>
                <Building>
                    <BuildingClassType>BUILDINGCLASS_THEATRE</BuildingClassType>
                    <BuildingType>BUILDING_BYZANTINE_HIPPODROME</BuildingType>
                </Building>
                <Building>
                    <BuildingClassType>BUILDINGCLASS_CUSTOM_HOUSE</BuildingClassType>
                    <BuildingType>BUILDING_PORTUGAL_FEITORIA</BuildingType>
                </Building>
                <Building>
                    <BuildingClassType>BUILDINGCLASS_COURTHOUSE</BuildingClassType>
                    <BuildingType>BUILDING_HOLY_ROMAN_RATHAUS</BuildingType>
                </Building>
                <Building>
                    <BuildingClassType>BUILDINGCLASS_JAIL</BuildingClassType>
                    <BuildingType>BUILDING_INDIAN_MAUSOLEUM</BuildingType>
                </Building>
                <Building>
                    <BuildingClassType>BUILDINGCLASS_GROCER</BuildingClassType>
                    <BuildingType>BUILDING_PERSIAN_APOTHECARY</BuildingType>
                </Building>
                <Building>
                    <BuildingClassType>BUILDINGCLASS_MARKET</BuildingClassType>
                    <BuildingType>BUILDING_ROMAN_FORUM</BuildingType>
                </Building>
                <Building>
                    <BuildingClassType>BUILDINGCLASS_BANK</BuildingClassType>
                    <BuildingType>BUILDING_ENGLISH_STOCK_EXCHANGE</BuildingType>
                </Building>
                <Building>
                    <BuildingClassType>BUILDINGCLASS_SUPERMARKET</BuildingClassType>
                    <BuildingType>BUILDING_AMERICAN_MALL</BuildingType>
                </Building>
                <Building>
                    <BuildingClassType>BUILDINGCLASS_LIBRARY</BuildingClassType>
                    <BuildingType>BUILDING_ARABIAN_MADRASSA</BuildingType>
                </Building>
                <Building>
                    <BuildingClassType>BUILDINGCLASS_OBSERVATORY</BuildingClassType>
                    <BuildingType>BUILDING_FRENCH_SALON</BuildingType>
                </Building>
                <Building>
                    <BuildingClassType>BUILDINGCLASS_UNIVERSITY</BuildingClassType>
                    <BuildingType>BUILDING_KOREAN_SEOWON</BuildingType>
                </Building>
                <Building>
                    <BuildingClassType>BUILDINGCLASS_LABORATORY</BuildingClassType>
                    <BuildingType>BUILDING_RUSSIAN_RESEARCH_INSTITUTE</BuildingType>
                </Building>
                <Building>
                    <BuildingClassType>BUILDINGCLASS_FORGE</BuildingClassType>
                    <BuildingType>BUILDING_MALI_MINT</BuildingType>
                </Building>
                <Building>
                    <BuildingClassType>BUILDINGCLASS_FACTORY</BuildingClassType>
                    <BuildingType>BUILDING_GERMAN_ASSEMBLY_PLANT</BuildingType>
                </Building>
                <Building>
                    <BuildingClassType>BUILDINGCLASS_COAL_PLANT</BuildingClassType>
                    <BuildingType>BUILDING_JAPANESE_SHALE_PLANT</BuildingType>
                </Building>
                <Building>
                    <BuildingClassType>BUILDINGCLASS_LEVEE</BuildingClassType>
                    <BuildingType>BUILDING_NETHERLANDS_DIKE</BuildingType>
                </Building>
            </Buildings>
            <Units>
                <Unit>
                    <UnitClassType>UNITCLASS_WARRIOR</UnitClassType>
                    <UnitType>UNIT_INCAN_QUECHUA</UnitType>
                </Unit>
                <Unit>
                    <UnitClassType>UNITCLASS_AXEMAN</UnitClassType>
                    <UnitType>UNIT_SUMERIAN_VULTURE</UnitType>
                </Unit>
                <Unit>
                    <UnitClassType>UNITCLASS_SPEARMAN</UnitClassType>
                    <UnitType>UNIT_ZULU_IMPI</UnitType>
                </Unit>
                <Unit>
                    <UnitClassType>UNITCLASS_CHARIOT</UnitClassType>
                    <UnitType>UNIT_PERSIA_IMMORTAL</UnitType>
                </Unit>
                <Unit>
                    <UnitClassType>UNITCLASS_WAR_ELEPHANT</UnitClassType>
                    <UnitType>UNIT_KHMER_BALLISTA_ELEPHANT</UnitType>
                </Unit>
                <Unit>
                    <UnitClassType>UNITCLASS_MUSKETMAN</UnitClassType>
                    <UnitType>UNIT_ETHIOPIAN_OROMO_WARRIOR</UnitType>
                </Unit>
                <Unit>
                    <UnitClassType>UNITCLASS_PIKEMAN</UnitClassType>
                    <UnitType>UNIT_HOLY_ROMAN_LANDSKNECHT</UnitType>
                </Unit>
                <Unit>
                    <UnitClassType>UNITCLASS_MACEMAN</UnitClassType>
                    <UnitType>UNIT_JAPAN_SAMURAI</UnitType>
                </Unit>
                <Unit>
                    <UnitClassType>UNITCLASS_SWORDSMAN</UnitClassType>
                    <UnitType>UNIT_AZTEC_JAGUAR</UnitType>
                </Unit>
                <Unit>
                    <UnitClassType>UNITCLASS_HORSE_ARCHER</UnitClassType>
                    <UnitType>UNIT_CARTHAGE_NUMIDIAN_CAVALRY</UnitType>
                </Unit>
                <Unit>
                    <UnitClassType>UNITCLASS_CUIRASSIER</UnitClassType>
                    <UnitType>UNIT_SPANISH_CONQUISTADOR</UnitType>
                </Unit>
                <Unit>
                    <UnitClassType>UNITCLASS_RIFLEMAN</UnitClassType>
                    <UnitType>UNIT_ENGLISH_REDCOAT</UnitType>
                </Unit>
                <Unit>
                    <UnitClassType>UNITCLASS_MARINE</UnitClassType>
                    <UnitType>UNIT_AMERICAN_NAVY_SEAL</UnitType>
                </Unit>
                <Unit>
                    <UnitClassType>UNITCLASS_WORKER</UnitClassType>
                    <UnitType>UNIT_INDIAN_FAST_WORKER</UnitType>
                </Unit>
                <Unit>
                    <UnitClassType>UNITCLASS_ARCHER</UnitClassType>
                    <UnitType>UNIT_MALI_SKIRMISHER</UnitType>
                </Unit>
                <Unit>
                    <UnitClassType>UNITCLASS_CROSSBOWMAN</UnitClassType>
                    <UnitType>UNIT_CHINA_CHOKONU</UnitType>
                </Unit>
                <Unit>
                    <UnitClassType>UNITCLASS_CATAPULT</UnitClassType>
                    <UnitType>UNIT_KOREAN_HWACHA</UnitType>
                </Unit>
                <Unit>
                    <UnitClassType>UNITCLASS_KNIGHT</UnitClassType>
                    <UnitType>UNIT_ARABIA_CAMELARCHER</UnitType>
                </Unit>
                <Unit>
                    <UnitClassType>UNITCLASS_CAVALRY</UnitClassType>
                    <UnitType>UNIT_RUSSIA_COSSACK</UnitType>
                </Unit>
                <Unit>
                    <UnitClassType>UNITCLASS_TANK</UnitClassType>
                    <UnitType>UNIT_GERMAN_PANZER</UnitType>
                </Unit>
                <Unit>
                    <UnitClassType>UNITCLASS_CARAVEL</UnitClassType>
                    <UnitType>UNIT_PORTUGAL_CARRACK</UnitType>
                </Unit>
                <Unit>
                    <UnitClassType>UNITCLASS_GALLEON</UnitClassType>
                    <UnitType>UNIT_NETHERLANDS_OOSTINDIEVAARDER</UnitType>
                </Unit>
            </Units>
            <FreeUnitClasses>
                <FreeUnitClass>
                    <UnitClassType>UNITCLASS_SETTLER</UnitClassType>
                    <iFreeUnits>1</iFreeUnits>
                </FreeUnitClass>
            </FreeUnitClasses>
            <FreeBuildingClasses>
                <FreeBuildingClass>
                    <BuildingClassType>BUILDINGCLASS_PALACE</BuildingClassType>
                    <bFreeBuildingClass>1</bFreeBuildingClass>
                </FreeBuildingClass>
            </FreeBuildingClasses>
            <FreeTechs>
                <FreeTech>
                    <TechType>TECH_FISHING</TechType>
                    <bFreeTech>1</bFreeTech>
                </FreeTech>
                <FreeTech>
                    <TechType>TECH_THE_WHEEL</TechType>
                    <bFreeTech>1</bFreeTech>
                </FreeTech>
                <FreeTech>
                    <TechType>TECH_AGRICULTURE</TechType>
                    <bFreeTech>1</bFreeTech>
                </FreeTech>
                <FreeTech>
                    <TechType>TECH_HUNTING</TechType>
                    <bFreeTech>1</bFreeTech>
                </FreeTech>
                <FreeTech>
                    <TechType>TECH_MYSTICISM</TechType>
                    <bFreeTech>1</bFreeTech>
                </FreeTech>
                <FreeTech>
                    <TechType>TECH_MINING</TechType>
                    <bFreeTech>1</bFreeTech>
                </FreeTech>
            </FreeTechs>

2. Replace lines 25623-25632 of \Beyond the Sword\Assets\XML\CIV4LeaderHeadInfos.xml (Traits section) with the following:

Spoiler :
Code:
            <Traits>
                <Trait>
                    <TraitType>TRAIT_AGGRESSIVE</TraitType>
                    <bTrait>1</bTrait>
                </Trait>
                <Trait>
                    <TraitType>TRAIT_CHARISMATIC</TraitType>
                    <bTrait>1</bTrait>
                </Trait>
                <Trait>
                    <TraitType>TRAIT_CREATIVE</TraitType>
                    <bTrait>1</bTrait>
                </Trait>
                <Trait>
                    <TraitType>TRAIT_EXPANSIVE</TraitType>
                    <bTrait>1</bTrait>
                </Trait>
                <Trait>
                    <TraitType>TRAIT_FINANCIAL</TraitType>
                    <bTrait>1</bTrait>
                </Trait>
                <Trait>
                    <TraitType>TRAIT_IMPERIALIST</TraitType>
                    <bTrait>1</bTrait>
                </Trait>
                <Trait>
                    <TraitType>TRAIT_INDUSTRIOUS</TraitType>
                    <bTrait>1</bTrait>
                </Trait>
                <Trait>
                    <TraitType>TRAIT_ORGANIZED</TraitType>
                    <bTrait>1</bTrait>
                </Trait>
                <Trait>
                    <TraitType>TRAIT_PHILOSOPHICAL</TraitType>
                    <bTrait>1</bTrait>
                </Trait>
                <Trait>
                    <TraitType>TRAIT_PROTECTIVE</TraitType>
                    <bTrait>1</bTrait>
                </Trait>
                <Trait>
                    <TraitType>TRAIT_SPIRITUAL</TraitType>
                    <bTrait>1</bTrait>
                </Trait>
            </Traits>
 
I tried your new ReminderEventManager.py and didn't see any changes.

Yes, I forgot I changed a couple files to fix that. Maybe I'll hold off posting them so you'll try out SVN.

. . .

Nah! But try SVN anyway. ;)

You gotta replace autolog.py in the same directory with this one:

PHP:
## Ruff autologger
## Modified from HOF MOD V1.61.001
## Modified from autolog by eotinb
## contains variables to turn on and off various extra log messages
## Alt+E is always on

import codecs
import os
import os.path
import string
import BugPath
import BugConfigTracker
import BugAutologOptions

BugAutolog = BugAutologOptions.getOptions()

class autologInstance:

#	def __init__(self):

	def setLogFileName(self, LogFileName):
		BugAutolog.setFileName(LogFileName)
		BugAutolog.write()
		
	def isLogging(self):
		return BugAutolog.isLoggingOn()

	def writeLog(self, vMsg, vColor = "Black", vBold = False, vUnderline = False, vPrefix = ""):
		self.openLog()

		if vPrefix != "":
			zMsg = "%s %s" % (vPrefix, vMsg)
		else:
			zMsg = vMsg

		## determine type of message
		zStyle = BugAutolog.getFormatStyle()
		if (zStyle < 0
		or zStyle > 3): zStyle=0

		if zStyle == 0: # no formatting so do nothing
			zMsg = zMsg

		elif zStyle == 1:  # html formatting
			if vBold:
				zMsg = "<b>%s</b>" % (zMsg)
			if vUnderline:
				zMsg = "<u>%s</u>" % (zMsg)
			if (vColor != "Black"
			and BugAutolog.isColorCoding()):
				zMsg = "<span style=\"color: %s\">%s</span>" % (vColor, zMsg)

			zMsg = "%s<br>" % (zMsg)

		else: # forum formatting
			if vBold:
				zMsg = "[b]%s[/b]" % (zMsg)
			if vUnderline:
				zMsg = "[u]%s[/u]" % (zMsg)
			if (vColor != "Black"
			and BugAutolog.isColorCoding()):
				if zStyle == 2:  # color coding with "
					zMsg = "[color=\"%s\"]%s[/color]" % (vColor, zMsg)
				else:  # color coding without "
					zMsg = "[color=%s]%s[/color]" % (vColor, zMsg)

		zMsg = "%s\r\n" % (zMsg)

		self.log.write(zMsg)
		self.closeLog()

	def openLog(self):
		szPath = BugAutolog.getFilePath()
		if (not szPath or szPath == "Default"):
			szPath = BugPath.findOrMakeDir("Autolog")
		if (not os.path.isdir(szPath)):
			os.makedirs(szPath)
		szFile = os.path.join(szPath, BugAutolog.getFileName())
		self.log = codecs.open(szFile, 'a', 'utf-8')
		BugConfigTracker.add("Autolog_Log", szFile)

	def closeLog(self):
		self.log.close()

class autologRetain:

	def __init__(self):
		bLogFileOpen = False
		bPlayerHuman = False
		Counter = 0
I find that I miss the ability to see at a glance how many of a certain unit type I have in the world.

The plan is to have two or more sorting options that group units (e.g. unit type, location. level, combat type, domain, promotions). You'd then be able to choose your own sorting on the fly.

Real life has been intervening in my BUGability lately, but I'll be back at BUGMA very soon.

It will be frustrating to go back to a normal civ after trying it, lol.

I suspected as much. We'll see how good my willpower is. Thanks for the code.
 
You gotta replace autolog.py in the same directory with this one:

Thanks, that did the trick.

The plan is to have two or more sorting options that group units (e.g. unit type, location. level, combat type, domain, promotions). You'd then be able to choose your own sorting on the fly.

Real life has been intervening in my BUGability lately, but I'll be back at BUGMA very soon.

Sounds cool! And hey, real life is good too, so no worries. Speaking of real life, I'll be moving to San Francisco at the end of the year, so I guess I'll be in your neighborhood.

Cheers,
jray
 
I'll be moving to San Francisco at the end of the year, so I guess I'll be in your neighborhood.

I lived there for seven years and am tempted to return as it's so convenient to get around with lots to do.:goodjob:
 
You're moving to The City itself?

Yep, I'm looking to move to/near the downtown area in late December. Cool, I see you're there too. Ping me if you know of any apartment or roommate vacancies... I assume Civ fanaticism is a sufficient credential :lol:.
 
I've noticed something a little strange? If I alt-tab out from CIV, and go back. The log gets a turn behind. The info is still displayed top/middle of the screen, but doesn't go into the viewable log until the turn afterwards.
Will do some more testing to see if Alt-tabbing out at beginning/middle/or end of turn makes any difference. Has anyone else noticed this?
 
Jray - I live in the East Bay, and don't know to many people who live in SF. I know places in that area, but not Downtown SF. Talk to EF for that... he's the city boy.

Balderstrom - I've never noticed that before, but I have a hard time reading the log now. It's set up very poorly... that's an idea of something to mod.... making the log more user friendly.
 
Well I did make a suggestion a while back, about adding at least one more TAB to the Log window & have all trade-type information like CIV-A has X gold to trade/CIV-B has new Techs to Trade/etc show up in the new [ $ ] (or Trade) Tab - possibly the rushing/whipping info here too? I dunno how difficult that would be atm, I also considered having an additional Tab for World + OtherCIV events, and the main log just showing your Empire specific information.
 
FYI, I have switched to the latest SVN, from Bug 2.22 in the middle of my most recent game.
No issues. Opening the Log doesn't crash the game. And options are now changing in-game.
 
Yeah, there was an issue w/ old save games. This is a dif game than the one that was crashing 2.3 - believe that older one somehow got light black|black text in he log. Ruff determined referencing that colour causes CTDs.
 
I have found, after much hair pulling, while working on the Customizable Domestic Advisor.
It is wise to delete the cache (Documents & Settings/<USERNAME>/
Local Settings/Application Data/My Games/Beyond the Sword/cache

Whenever making changes to Mods/CustomAssets,
ie: updating to a newer version of BUG, or changing files.

This apparently can/will get rid of obscure Python Traceback/popup errors.
 
I just noticed that the PLE buttons remained on screen when I went into WorldBuilder. Of course, this is with my own conversion for Fall from Heaven, so can someone confirm whether this happens with a standard BUG install as well or whether I screwed up the code merge somewhere?
 
No it's with the standard BUG install, a carry over from the original PLE. We need to add a HideScreen funtion when the WB is pulled up, just haven't had time to do it yet.
 
Back
Top Bottom