Opened 8 years ago

Last modified 6 years ago

#4027 closed enhancement

Make mod installer — at Version 6

Reported by: sanderd17 Owned by:
Priority: Must Have Milestone: Alpha 23
Component: Core engine Keywords:
Cc: Patch:

Description (last modified by Vladislav Belov)

It should be possible to install mods by opening a mod file with 0ad:

  • The modder makes a file available for download, named something like modName.pyromod (which is just the zip generated by the archivebuilder, which includes the mod.json file)
  • The player downloads the file to his downloads
  • Then the player is able to open the file with 0ad/pyrogenesis
  • The game places the mod zip in a new (TODO maybe allow overwriting the same mod if it is a newer version) mod folder.

Note that during the last step we can add a platform specific workaround for mods on Windows, as once a mod is mounted reading the mod.json from the zip is not possible.

Change History (6)

comment:1 by sanderd17, 8 years ago

Description: modified (diff)

comment:2 by leper, 7 years ago

Component: UI & SimulationCore engine
Description: modified (diff)

comment:3 by Vladislav Belov, 7 years ago

So algorithm is that:

  1. Create a name.0admod/name.pyromod file (zipped archive f.e.).
  2. Assign .0admod/.pyromod extensions to the our program (so it could be pyrogenesis or not)
  3. An executing of this files should add mods to the game or open pyrogenesis with installed mods. (In the first case we don't even need the full pyrogenesis program, just a tool, in the second case, we shouldn't open new window, only update the currently opened).

in reply to:  3 ; comment:4 by leper, 7 years ago

Replying to vladislavbelov:

  1. Create a name.0admod/name.pyromod file (zipped archive f.e.).

.pyromod as this is a feature of the engine, and not of a mod. The creation is just renaming the archive generated by the archivebuilder to end with .pyromod, so it is just a valid .zip file the game can read.

  1. An executing of this files should add mods to the game or open pyrogenesis with installed mods. (In the first case we don't even need the full pyrogenesis program, just a tool, in the second case, we shouldn't open new window, only update the currently opened).

Add only. Starting it with the mods should be done via the mod selector. True, this could likely be done by a simple script, but keeping the functionality in the main game removes the need to duplicate locations for paths and similar. Installing is just moving the .pyromod file to a new folder in the user-writeable mod folder (not the user mod), and renaming it to .zip. Optionally (to work around that one Windows bug) it should also extract the mod.json file included in the .zip next to it.

in reply to:  4 comment:5 by Vladislav Belov, 7 years ago

Replying to leper:

Add only. Starting it with the mods should be done via the mod selector. True, this could likely be done by a simple script, but keeping the functionality in the main game removes the need to duplicate locations for paths and similar. Installing is just moving the .pyromod file to a new folder in the user-writeable mod folder (not the user mod), and renaming it to .zip. Optionally (to work around that one Windows bug) it should also extract the mod.json file included in the .zip next to it.

So adds only, not turn on? Then we need to add some cmdline arguments (i.e. --addmod path), use function like for autostart and close the game.

comment:6 by Vladislav Belov, 7 years ago

Description: modified (diff)

There is an easy way to associate the pyrogenesis with *.pyromod with NSIS: http://nsis.sourceforge.net/File_Association, but I'm not sure that easy too for all FM of WMs of *nix (usually a file manager uses the MIME type in /usr/share/applications or ~/.local/share/applications).

Last edited 7 years ago by Vladislav Belov (previous) (diff)
Note: See TracTickets for help on using tickets.