Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions Ark_Mod_Downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,9 @@ def create_mod_file(self, modid):
with open(os.path.join(self.temp_mod_path, modid, r"WindowsNoEditor\.mod"), "w+b") as f:

modid = int(modid)
f.write(struct.pack('ixxxx', modid)) # Needs 4 pad bits
f.write(struct.pack('Ixxxx', modid)) # Needs 4 pad bits | Changed to unsigned integer "I"
self.write_ue4_string("ModName", f)
self.write_ue4_string("", f)
self.write_ue4_string(f"../../../ShooterGame/Content/Mods/{modid}", f) # Adding full mod path string

map_count = len(self.map_names)
f.write(struct.pack("i", map_count))
Expand All @@ -275,12 +275,11 @@ def create_mod_file(self, modid):
f.write(struct.pack('i', num3))

if "ModType" in self.meta_data:
mod_type = b'1'
mod_type = 1
else:
mod_type = b'0'
mod_type = 0

# TODO The packing on this char might need to be changed
f.write(struct.pack('p', mod_type))
f.write(struct.pack('B', mod_type))
meta_length = len(self.meta_data)
f.write(struct.pack('i', meta_length))

Expand Down