Step 5: Move your encrypted Lua fileĭepending on what you have encrypted, move your encrypted Lua file to: The destination file should have been created. If the file is a part of gamemode / entities / weapons, I usually suffix the filename with _protected.
This applies when you update a file, when you change encryption method and when you encrypt different files. Step 3: Generate a keyįor safety, avoid reusing keys and do your best to make them unique. Do not forget to create that folder.ĭo not use the garrysmod/data folder because it's writable from the game!īy doing this, you keep clear files for future edits in a safe place. You can choose garrysmod/momo_encryption/myaddon/. Now it's time to move your non-encrypted files into a safe folder, outside of Lua folders. Step 2: Move files that you want to encrypt gamemode / entities / weapons scripts require an additional header before encryption, because they won't be loaded in the same context they usually are otherwise.GM / hook.Add() / ENT / SWEP hooks that happen at initialize time will be ignored because they will be loaded late.Note that, for clientside encrypted files: You need to understand that encrypted files will by loaded by the client after startup because decryption information will arrive late. You need to split parts that can be encrypted and parts that cannot be into 2 different Lua files.Supported scripts are: autorun, autorun/client, gamemode, entities, weapons.You need to make sure that your scripts can be encrypted.
I do not recommend to place them there until I figure out how to include them. I will not deal with encrypted Lua files that include other encrypted Lua files.Įvery console command that I tell you to run is always to be entered in the server's console.įor now I'm a little lost with how to include encrypted files stored in the gamemodes folder. I will try to be clear and easy, but if you have any problem while trying to understand, please post an issue. The API is not documented separately from the code.The guide will help you through the process of encrypting a shared or a client Lua script.Under investigation: do not mix compressed lumps in a map with mostly uncompressed lumps, and vice-versa: the game may crash.Please report such entities in the comment section below! If you see a Lua stack trace then check which entity has caused a crash by browsing the mentioned Lua script. mdmp crash dump file in a text editor that accepts binary files (such as Windows' Notepad or Notepad++) and browse it to the section -Lua Stack Traces-> Server. If the game crashes near the end of the map loading process with entities moved into Lua, then you probably have entities that should be excluded from Lua.If the game crashes early during the map loading process, then the map is probably corrupted.
Originally posted by About cubemaps and other embedded content:When you change the map file name, a few folders in the ZIP file in LUMP_PAKFILE need to be renamed according to the.