Changes between Version 2 and Version 3 of Mod_Verification_Process
- Timestamp:
- Apr 5, 2023, 9:33:38 PM (13 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Mod_Verification_Process
v2 v3 1 1 == Introduction == 2 2 3 This page aims to describe the verification process mods undergo before being made readily available on [https://0ad.mod.io/ mod.io]. Because we allow download these modes by signing them, we have to ensure they are not broken, that they do not contain malicious code, whether they are indeed OOS compatible, and whether we are not needlessly stealing bandwith for big mods.3 This page aims to describe the verification process mods undergo before being made readily available on [https://0ad.mod.io/ mod.io]. We must ensure that these mods are not broken, that they are not malicious code, that they are indeed Out-Of-Sync (OOS) compatible, and that we are not needlessly stealing bandwidth for big mods. 4 4 5 5 == Steps == … … 7 7 === Mod is downloaded === 8 8 9 In general this step should go well, since that's [https://0ad.mod.io/ mod.io]'s responsibility.9 In general, this step should go well, since that's [https://0ad.mod.io/ mod.io]'s responsibility. 10 10 11 11 === Mod is extracted === … … 13 13 ==== Directory Structure ==== 14 14 15 We need to make sure that the mod as the correct directory structure. E.g. it should be as follows 15 Check that the directory structure is correct, see below for a proper example. 16 16 {{{ 17 17 └───sky_ships.zip 18 18 │ mod.json 19 19 │ readme.md 20 │21 20 ├───art 22 21 │ ├───actors 23 22 │ │ └───structures 24 23 │ │ argestesion.xml 25 │ │26 24 │ └───meshes 27 25 │ └───structural 28 26 │ argestesion.dae 29 │30 27 └───simulation 31 28 └───templates 32 29 └───structures 33 30 argestesion.xml 34 35 31 }}} 36 32 37 and not like this: 33 See below for a wrong example. This will not work, and the game will be confused. 38 34 {{{ 39 35 └───sky_ships.zip … … 41 37 │ mod.json 42 38 │ readme.md 43 │44 39 ├───art 45 40 │ ├───actors 46 41 │ │ └───structures 47 42 │ │ argestesion.xml 48 │ │49 43 │ └───meshes 50 44 │ └───structural 51 45 │ argestesion.dae 52 │53 46 └───simulation 54 47 └───templates … … 57 50 }}} 58 51 59 Else it will not work and the game will be confused. On Windowsit usually means you generated the zip from outside the folder instead of from inside the folder.52 On `Windows`, it usually means you generated the zip from outside the folder instead of from inside the folder. 60 53 61 54 ==== mod.json ==== 62 55 63 The `mod.json` file is an important part of the verification process. For the sake of the demonstration let's assume we have a mod called `Sky Ships` with a mod.io url `https://0ad.mod.io/sky-ships` and a directory structure like the correct one above.56 The `mod.json` file is an important part of the verification process. For the sake of the demonstration, let's assume we have a mod called `Sky Ships` with a mod.io url `https://0ad.mod.io/sky-ships` and a directory structure like the correct one above. 64 57 65 Now let's assume the `mod.json`file looks like this:58 Let's assume that the mod.json file looks like this: 66 59 67 60 {{{#!json … … 71 64 "label": "New stuff, new things, and new bugs", 72 65 "description": "New stuff, new things, and new bugs + more stuff", 73 "dependencies": [ 74 "0ad=0.0.25" 75 ] 66 "dependencies": ["0ad=0.0.25"] 76 67 } 77 68 }}} 78 69 79 A few things are wrong with this `mod.json` 70 A few things are wrong with this `mod.json`: 80 71 81 1. `"name"` should be the same as the `mod.io` url so in this case `sky-ships` and not `sky_ships 72 1. `"name"` should be the same as the `mod.io` url so in this case `sky-ships` and not `sky_ships` 82 73 2. `"label"` should be `Sky Ships` not `"New stuff, new things, and new bugs"` 83 74 75 {{{#!div style="padding:1px 1px 1px 10px; background: #DBEAF3; border-left: 5px solid #2980B9" 76 **NOTE**: If you want to be facetious, you'll notice that we reference the `0ad` mod, which is in a `public` folder. It should technically be `empires_ascendant` in an `empires_ascendant` folder. 77 }}} 84 78 85 **Note**: If you want to be facetious, you'll notice that we reference the `0ad` mod which is in a `public` folder. It should technically be `empires_ascendant` in an `empires_ascendant` folder. 79 ==== Out-Of-Sync (OOS) Compatibility ==== 86 80 87 ==== OOS Compatibility ==== 81 We introduced a new boolean flag with `Alpha XXV - Yaunā`, which can optionally be added to your `mod.json`. 82 {{{#!json 83 { 84 "ignoreInCompatibilityChecks": true, 85 } 86 }}} 87 As the name suggests, it allows avoiding compatibility checks when playing with other people. However, Wildfire Games must make sure it is safe, and it won't put other people out of sync. 88 88 89 Since A25 a new flag `"ignoreInCompatibilityChecks"` was introduced. As the name suggests it allows to avoid compatibility checks when playing with other people. However Wildfire Games must make sur it is safe and it won't put other people out of sync.89 To do so, one might try replaying a match with the mod on, try playing multiplayer, try to rejoin a game to make sure it doesn't affect simulation. If it does, mod will be rejected. 90 90 91 To do so one might try replaying a match with the mod on, try playing multiplayer, try to rejoin a game to make sure it doesn't affect simulation. If it does, mod will be rejected. 91 Mods that provide opportunities for cheating, for example automating unit production or providing access to information about the enemy that the player should not have access to, are also rejected. 92 - Related wiki article: [[SimulationRequirements#Cheatprevention|wiki/SimulationRequirements#Cheatprevention]] 92 93 93 94 ==== Analyzing files ==== … … 100 101 # -d is to generate a patch file 101 102 # -u is to ignore whitespace changes 102 $ git diff -du 103 $ git diff -du 103 104 }}} 104 105 105 106 If a new file contains `Engine.****` calls you need to make sure there is no foul play, it can also be for big random map scripts. 106 107 107 When checking big mods, it might be wiser to diff mods you already checked using the previous version as reference. Even if they have a git repository it's better to check locally, in case files were added manually.108 When checking big mods, it might be wiser to diff mods you already checked using the previous version as reference. Even if they have a git repository, it's better to check locally, in case files were added manually. 108 109 109 When having mods with lots of texture, it's good to suggest using the archive builder (to turn png/tga files into dds, dae files into psa or pmd and XML files to XMB) This will reduce the download size greatly and increase the performance. 110 For mods with a lot of textures, it is recommended to use the archive builder (to convert `png/tga` files to `dds`, `dae` files to `psa/pmd`, and `xml` files to `xmb`). This will greatly reduce the download size and increase performance. 111 - Related wiki article: [[Modding_Guide#Distributingyourmods|wiki/Modding_Guide#Distributingyourmods]] 110 112 113 ==== Signing ==== 111 114 112 ==== Signing ==== 113 114 Once the mod is deemed `safe` we use [https://github.com/jedisct1/minisign Minisign] to sign files. For security reasons only one person can sign mods because it's not good to share that private key around given that it works for an entire alpha. 115 Once the mod is deemed `safe` we use [https://github.com/jedisct1/minisign Minisign] to sign files. For security reasons, only one person can sign mods because it's not good to share that private key around, given that it works for an entire alpha. 115 116 116 117 ==== Adding Metadata ==== 117 118 118 Using the signature file we replace all newlines by `\n` an the tab of the third line by a `\t`.119 We then add curly braces, and we copy paste the `"depenencies"` tag from the `mod.json`. Then we add "minisigs": [""] around the signature ; and we put everythingthe metadata field of mod.io.119 Using the signature file, we replace all newlines by `\n` and the tab of the third line by a `\t`. 120 We then add curly braces, and we copy and paste the `dependencies` tag from the `mod.json`. Then we add "minisigs": [""] around the signature ; and we put everything in the metadata field of mod.io. 120 121 121 122 ==== Sending the signature ==== 122 123 123 Once all is done we send the signature for completeness or in case the person wants to share the mod through other means. 124 125 126 124 Once all is done, we send the signature for completeness or in case the person wants to share the mod through other means.