regenerate map

It was caused by another fix (whack-a-mole) but is fixed in the latest BUG code (not released yet). Sorry for the inconvenience, but the next releases of BUG and BAT will have this again. You might try turning off Unit Naming as that might allow you to regenerate. Once you get a map you like, you can turn it back on.
 
I installed BUG Mod 4.3 (BUGMod_4.3.exe) and have the same issue.

Turning off Unit Naming did not solve the problem.
 
You'll have to wait for the next release of BUG for the fix. We are planning a release pretty soon (couple weeks maybe).
 
I'm looking forward to it.

I should also add that other than this minor bug, BUG has increased my gameplay experience significantly. The Strategy Layer deserves special mention in this regard.
 
I noticed this problem with BUG 4.3
I found it was caused by Module: Reminders.
During Reminders' initialization, it invoked SdToolKit.sdModInit('Reminders').
Namely, {'Reminders':{}} would be dumped into CyGame's scriptdata.
It means !GC.getGameINLINE().getScriptData().empty() is true, thus 'Regenerate Map' button will not be rendered.

I figured out a solution. We just need to change a few lines in SdToolKit.py.

sdModInit: old
Code:
def sdModInit( ModID ):
	try:
		cyTable = pickle.loads( CyGameInstance.getScriptData() )
	except:
		cyTable = {}
	if ( not cyTable.has_key(ModID) ):
		cyTable = sdModFixCase(ModID, cyTable) # Check for capitalization difference and fix in case of permanent change.
	if ( not cyTable.has_key(ModID) ):
		cyTable[ModID] = pickle.dumps({})      # Initialize with an empty table.
		sdEcho('Mod Data Initialized : %s %s' %(ModID, cyTable.has_key(ModID)))
	CyGameInstance.setScriptData( pickle.dumps(cyTable) )
	return {}

sdModInit: new
Code:
def sdModInit( ModID ):
	try:
		cyTable = pickle.loads( CyGameInstance.getScriptData() )
	except:
		cyTable = {}
	if ( not cyTable.has_key(ModID) ):
		cyTable = sdModFixCase(ModID, cyTable) # Check for capitalization difference and fix in case of permanent change.
#	if ( not cyTable.has_key(ModID) ):
#		cyTable[ModID] = pickle.dumps({})      # Initialize with an empty table.
#		sdEcho('Mod Data Initialized : %s %s' %(ModID, cyTable.has_key(ModID)))
#	CyGameInstance.setScriptData( pickle.dumps(cyTable) )
	return {}

sdModFixCase: old
Code:
def sdModFixCase( ModID, cyTable ):
	for i, k in enumerate(cyTable):
		if (k.upper() == ModID.upper()):
			szStringData = cyTable[k]
			cyTable[ModID] = szStringData
			del cyTable[k]
			sdEcho('Mod Data Fixed : %s : %s (was %s)' %(ModID, cyTable.has_key(ModID), k))
			break
	return cyTable

sdModFixCase: new
Code:
def sdModFixCase( ModID, cyTable ):
	for i, k in enumerate(cyTable):
		if (k.upper() == ModID.upper()):
			szStringData = cyTable[k]
			cyTable[ModID] = szStringData
			del cyTable[k]
			CyGameInstance.setScriptData( pickle.dumps(cyTable) )
			sdEcho('Mod Data Fixed : %s : %s (was %s)' %(ModID, cyTable.has_key(ModID), k))
			break
	return cyTable

sdModSave: old
Code:
def sdModSave( ModID, mTable ):
	try:
		cyTable = pickle.loads( CyGameInstance.getScriptData() )
	except:
		cyTable = sdModInit(ModID)
	cyTable[ModID] = pickle.dumps(mTable)
	CyGameInstance.setScriptData( pickle.dumps(cyTable) )
	return 0

sdModSave: new
Code:
def sdModSave( ModID, mTable ):
	try:
		cyTable = pickle.loads( CyGameInstance.getScriptData() )
	except:
		cyTable = sdModInit(ModID)
	
	if mTable:
		cyTable[ModID] = pickle.dumps(mTable)
		CyGameInstance.setScriptData( pickle.dumps(cyTable) )
	else:
		if ModID in cyTable:
			del cyTable[ModID]
		if cyTable:
			CyGameInstance.setScriptData( pickle.dumps(cyTable) )
		else:
			CyGameInstance.setScriptData( '' )
	return 0

In general, the rule is empty dict = nil.
We don't dump empty dict cyTable. We don't add empty dict to cyTable.
Then, CyGame's scriptdata will be empty, which means we can use 'Regenerate Map' again.
 
Top Bottom