How to distribute game assets... without distributing them!
Posted: Mon Oct 01, 2012 2:37 pm
Greetings.
I have a suggestion for modding. As we know now, Subset Games' official position is that mods may not distribute game assets. If they are talking only about not distributing the whole .res file, or that distributing any derivative of that (like a repainted projectile sprite) is forbidden, is not sure, and it is hard to draw a line. Thus, valid concerns were raised in this thread:
viewtopic.php?f=11&t=3165
Concern is - what if my mod makes player ship into an enemy ship? What if my mod uses enemy sprite as playable ship texture? Is this not allowed (since i'm distributing something that is inside game's res file, or is made by altering something inside game's res file), or can this be done. This is naturally an important question because a lot of people would often mod by changing game resouces, not making one from scratch (like, its easier to make a new gun sprite by altering an existing one rather than draw a new one by hand, since it will be hard to fit it into game's general theme, etc etc).
So here's my suggestion!
You can actually encode the mod file using a file from the .res file. Effectively this means using simple method of cryptography (xor), where the key is a randomly or by-hand chosen file from among the game assets. Then, mod is distributed in this encoded form and with a file name that should be used to decode it. Effectively, then only someone who owns the original game assets can decrypt such mod (because only he will have all the original game's files, and he doesnt know in advance which one would be required). If both random choice of a file and transparent decryption is added into the mod manager, the process will be absolutely transparent to the end user and modmaker.
Mod maker just needs to encode his mod before putting it online, at this point a random asset is chosen to act as key, and mod file is encoded. End user must just run the mod manager, and it automatically tries to find the file and decode the mod, and does a checksum so that it can be sure everything went fine.
The code to do this work (encode or decode the mod using xor) is very simple and fast so that it wouldnt be a problem to implement it.
This would allow modmakers to distribute mods that contain base game assets without violating Subset Games's demand that base game assets should not be distributed, because noone can unpack the mod without already owning the base game assets.
I have a suggestion for modding. As we know now, Subset Games' official position is that mods may not distribute game assets. If they are talking only about not distributing the whole .res file, or that distributing any derivative of that (like a repainted projectile sprite) is forbidden, is not sure, and it is hard to draw a line. Thus, valid concerns were raised in this thread:
viewtopic.php?f=11&t=3165
Concern is - what if my mod makes player ship into an enemy ship? What if my mod uses enemy sprite as playable ship texture? Is this not allowed (since i'm distributing something that is inside game's res file, or is made by altering something inside game's res file), or can this be done. This is naturally an important question because a lot of people would often mod by changing game resouces, not making one from scratch (like, its easier to make a new gun sprite by altering an existing one rather than draw a new one by hand, since it will be hard to fit it into game's general theme, etc etc).
So here's my suggestion!
You can actually encode the mod file using a file from the .res file. Effectively this means using simple method of cryptography (xor), where the key is a randomly or by-hand chosen file from among the game assets. Then, mod is distributed in this encoded form and with a file name that should be used to decode it. Effectively, then only someone who owns the original game assets can decrypt such mod (because only he will have all the original game's files, and he doesnt know in advance which one would be required). If both random choice of a file and transparent decryption is added into the mod manager, the process will be absolutely transparent to the end user and modmaker.
Mod maker just needs to encode his mod before putting it online, at this point a random asset is chosen to act as key, and mod file is encoded. End user must just run the mod manager, and it automatically tries to find the file and decode the mod, and does a checksum so that it can be sure everything went fine.
The code to do this work (encode or decode the mod using xor) is very simple and fast so that it wouldnt be a problem to implement it.
This would allow modmakers to distribute mods that contain base game assets without violating Subset Games's demand that base game assets should not be distributed, because noone can unpack the mod without already owning the base game assets.