Skip to content

Instantly share code, notes, and snippets.

@ExtReMLapin
Created August 18, 2019 12:40
Show Gist options
  • Save ExtReMLapin/17cb276cf813de9d398ec320604a08d8 to your computer and use it in GitHub Desktop.
Save ExtReMLapin/17cb276cf813de9d398ec320604a08d8 to your computer and use it in GitHub Desktop.

So in mordhau you can equip stuff you didn't buy with default mercenaries, i wanted to check if editing thoses mercenaries could allow you to wear any armor (like the king one)

Found the armors were stored in BP_MordhauSingleton.uexp so I made a lil script to split the diff classes in multiple files

if CLIENT then return end


local dataFile = "BP_MordhauSingleton.uexp"


local data = file.Read(dataFile, "DATA")

local merTable = {}
local pos = 1

while (true) do
	local start, _end = string.find(data, "%z%z%z%a-%z\xA8\x06%z%z%z%z%z%z\xD9\x06%z%z%z%z%z%z\x7B.-%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x", pos)
	pos = _end
	if not start then break end
	local strdata = data:sub(start, _end)
	local nameStart = 4
	local nameEnd = string.find(strdata, "%z\xA8")-1

	merTable[strdata:sub(nameStart, nameEnd)] = strdata
end



file.CreateDir("MordhauMercenaries")


for k, v in pairs(merTable) do
	file.Write("MordhauMercenaries/" .. k .. ".txt", v)
end

I managed to edit the huntsman

But server actually found out i "cheated" and reverted the changed to my outfit :

@ExtReMLapin
Copy link
Author

4 hours of reseach for nothing, fml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment