Modifying MAX_CHAR_COUNTs -- Possible?

Psiven

Chieftain
Joined
Mar 23, 2011
Messages
12
I wonder if any of the more experienced modders know why this change doesn't work. I recompiled the (K-Mod) DLL with the following minor change:

Code:
CvDefines.h #69

// Char Count limit for edit boxes
#define PREFERRED_EDIT_CHAR_COUNT	(64) // City name upper limit?, default=15
#define MAX_GAMENAME_CHAR_COUNT		(32) // Menu game name, default=32
#define MAX_PLAYERINFO_CHAR_COUNT	(64) // Leader/Empire/Adj, default=32

I've had a hell of a time locating the various parts of code that actually reference these limits, and I fear that they actually be hardcoded in the executable itself. I have not been able to find all of the code for the Rename City edit boxes, but I did find this snippet which directly references the PLAYERINFO limit:

Code:
CvDLLButtonPopup.cpp #2240

bool CvDLLButtonPopup::launchDetailsPopup(CvPopup* pPopup, CvPopupInfo &info)
{
	if (!info.getOption1())
	{
		gDLL->getInterfaceIFace()->popupSetHeaderString(pPopup, gDLL->getText("TXT_KEY_POPUP_DETAILS_TITLE"));

		gDLL->getInterfaceIFace()->popupSetBodyString(pPopup, gDLL->getText("TXT_KEY_MENU_LEADER_NAME"));
		gDLL->getInterfaceIFace()->popupCreateEditBox(pPopup, GET_PLAYER(GC.getGameINLINE().getActivePlayer()).getName(), WIDGET_GENERAL, gDLL->getText("TXT_KEY_MENU_LEADER_NAME"), 0, POPUP_LAYOUT_STRETCH, 0, MAX_PLAYERINFO_CHAR_COUNT);
		gDLL->getInterfaceIFace()->popupAddSeparator(pPopup);
		gDLL->getInterfaceIFace()->popupSetBodyString(pPopup, gDLL->getText("TXT_KEY_MENU_CIV_DESC"));
		gDLL->getInterfaceIFace()->popupCreateEditBox(pPopup, GET_PLAYER(GC.getGameINLINE().getActivePlayer()).getCivilizationDescription(), WIDGET_GENERAL, gDLL->getText("TXT_KEY_MENU_CIV_DESC"), 1, POPUP_LAYOUT_STRETCH, 0, MAX_PLAYERINFO_CHAR_COUNT);
		gDLL->getInterfaceIFace()->popupAddSeparator(pPopup);
		gDLL->getInterfaceIFace()->popupSetBodyString(pPopup, gDLL->getText("TXT_KEY_MENU_CIV_SHORT_DESC"));
		gDLL->getInterfaceIFace()->popupCreateEditBox(pPopup, GET_PLAYER(GC.getGameINLINE().getActivePlayer()).getCivilizationShortDescription(), WIDGET_GENERAL, gDLL->getText("TXT_KEY_MENU_CIV_SHORT_DESC"), 2, POPUP_LAYOUT_STRETCH, 0, MAX_PLAYERINFO_CHAR_COUNT);
		gDLL->getInterfaceIFace()->popupAddSeparator(pPopup);
		gDLL->getInterfaceIFace()->popupSetBodyString(pPopup, gDLL->getText("TXT_KEY_MENU_CIV_ADJ"));
		gDLL->getInterfaceIFace()->popupCreateEditBox(pPopup, GET_PLAYER(GC.getGameINLINE().getActivePlayer()).getCivilizationAdjective(), WIDGET_GENERAL, gDLL->getText("TXT_KEY_MENU_CIV_ADJ"), 3, POPUP_LAYOUT_STRETCH, 0, MAX_PLAYERINFO_CHAR_COUNT);
		gDLL->getInterfaceIFace()->popupAddSeparator(pPopup);
	}
	else if ...

This seems to suggest that it directly uses those character limits for the start-of-game customization menu. But in-game, there is no difference to the default limit of 32, and city names are still limited to 15. I don't expect it to look good having names that are way too long, but I was hoping it would at least sort of work. Are these #defines actually deprecated, and the true values lie within the realm of the hardcoded untouchable elements of the GUI?
 
Back
Top Bottom