Duplication errors are quite common I've found when merging mods, especially when some of them are older/originated in earlier versions. Here's a quick Python 3 script I wrote last time, to ease the burden of manually looking for strange behaviour. It also counts the amount of each object type, which can be used to determine a mod's size.
import os
object_types = {"BODY_DETAIL_PLAN": ["BODY_DETAIL_PLAN"],
"BODY": ["BODY",
"BODYGLOSS"],
"BUILDING": ["BUILDING_WORKSHOP"],
"CREATURE_VARIATION": ["CREATURE_VARIATION"],
"CREATURE": ["CREATURE"],
"DESCRIPTOR_COLOR": ["COLOR"],
"DESCRIPTOR_PATTERN": ["COLOR_PATTERN"],
"DESCRIPTOR_SHAPE": ["SHAPE"],
"ENTITY": ["ENTITY"],
"INORGANIC": ["INORGANIC"],
"INTERACTION": ["INTERACTION"],
"ITEM": ["ITEM_AMMO",
"ITEM_ARMOR",
"ITEM_FOOD",
"ITEM_GLOVES",
"ITEM_HELM",
"ITEM_PANTS",
"ITEM_SHIELD",
"ITEM_TOOL",
"ITEM_TOY",
"ITEM_TRAPCOMP",
"ITEM_WEAPON"],
"LANGUAGE": ["TRANSLATION",
"SYMBOL",
"WORD"],
"MATERIAL_TEMPLATE": ["MATERIAL_TEMPLATE"],
"PLANT": ["PLANT"],
"REACTION": ["REACTION"],
"TISSUE_TEMPLATE": ["TISSUE_TEMPLATE"]}
def find_object_in_line(line, obj_type):
if ("[" + obj_type + ":") in line:
obj_string = "[" + obj_type + ":"
object_name = ""
index = line.find(obj_string) + len(obj_string)
for i in range(index, len(line)):
if line[i] == "]":
type_amounts[obj_type] += 1
return [obj_type + ":" + object_name, obj_type]
else:
object_name += line[i]
return False
folder_path = os.getcwd() + "raw/objects/"
raw_objects = {}
type_amounts = {}
for x in object_types:
for o in object_types[x]:
type_amounts[o] = 0
print type_amounts
dup_num = 0
rawfilenames = []
for filename in os.listdir(folder_path):
if filename.endswith(".txt"):
rawfilenames.append(filename)
for i in range(len(rawfilenames)):
print "reading file " + str(i+1) + "/" + str(len(rawfilenames))
pos_object_types = False
rawfile = open(folder_path + rawfilenames[i], "r")
for line in rawfile:
if pos_object_types == False:
if "[OBJECT:" in line:
pos_object_types = object_types[line[line.find("[OBJECT:")+8:line.find("]")]]
else:
for try_type in pos_object_types:
obj = find_object_in_line(line, try_type)
if obj is not False:
obj_type = obj[1]
if obj[0] in raw_objects:
raw_objects[obj[0]] += 1
else:
raw_objects[obj[0]] = 1
print len(raw_objects), "objects found."
for t in type_amounts:
print t, type_amounts[t]
print len(raw_objects), "objects found in total."
for o in raw_objects:
if raw_objects[o] > 1:
print "Found", raw_objects[o], "instances of", o
dup_num += 1
print "Done.", dup_num, "duplicated raw entries found."
raw_input("\nPress enter to kill. >>")
Just run it from your main DF folder, with the mods installed in the main raws, or change the "folder_path" to some other folder to check there instead.