Precursor
Howdy! So I've used Godot to make some casual games and was considering using it for some more serious projects. Now normally I wouldn't really care much about my scripts being exposed but as some of my plans involve a significant multiplayer competitive focus, both in direct competition and in high-score competitions, I don't like the idea of having all my code plain-as-day and, more importantly, editable by anyone who has a text editor and a curiosity towards the PCK file.
This is a real problem for, as an example, submitting something like a high-score. It is too easy to change a == to a !=, a false to true, or even just print out variables (such as any security data being passed around, even things like nonces and whatnot). I tested this myself and it took all of a minute to break things by editing the PCK file (albeit it was a dummy test project).
Goal
I just want some basic encryption for my scripts. It doesn't need to deter hackers but it needs to be enough where they would actually have to un-encrypt, edit, and re-encrypt the code to actually get somewhere. This will push away most, if not all, casual users that gain some curiosity. Heavens knows when I was younger seeing a file with plain text was just begging to be tinkered with just to see what would happen. I want to discourage that since this can impact other players.
What I've Tried
I saw the option for "Script Encryption" when exporting, given you provided a key. Looking at the docs I need to build things myself with a specific environment variable set. Simple enough. I have built the Godot engine from the source code with the encryption environment variable set to my generated key as well as release and debugging templates for HTML5 (the target I am currently testing, but I will be using it on others as well. I also plan to distribute some PCK files for extensions and tweaks). All of these had the environment variable set.
I ran the custom build, specified the custom templates, entered the key and nothing. All the scripts are still plain as day and editable from the PCK file.
Am I doing something wrong? Does this not do what I am expecting it to do? Can someone point me in the right direction here?
I am not sure if what I am trying to do is something that is actually properly implemented or not and would like some clarification.
If this is not something that is natively supported in Godot, is there any way I can do this manually myself? If it is I would love for someone to slap me and say, "You misunderstood this bit, fool!"