Author Topic: Dedicated "Mods" folder, each mod can get its own folder to act as "data"  (Read 5433 times)

Offline Tarvis

  • Colonel
  • ****
  • Posts: 111
    • View Profile
Currently, all mods and such are just dumped right into the "data" folder. This makes it somewhat of a pain to uninstall unwanted mods, or to deal with file conflicts.

I think a good system (following most mod conventions) would be to have a dedicated mods folder, and each mod would get its own folder in it. That folder acts as the mod's own "data" folder, and would be loaded as such on runtime, where it's loaded into memory with the regular game "data" folder. This is how Source games (most notably Garrysmod) handles addons, which makes them easy to install and uninstall without having to pick through the base data folders to delete their individual files.

So for example, for Luke's Extra UFOs mod, they could go into "OpenXcom/Mods/Luke's Extra UFOs/" and that folder would contain the mod's MAPS, ROUTES, Ruleset, and TERRAIN folders. And it can also contain some kind of metadata file as well at its root.


Another small tweak that could be done is the ability to change the order of mods in the Mods screen, this would help resolve conflicts and allow the user to set which ones take precedence (mods lower down the list would overwrite any conflicts of files/ruleset info in mods/base game higher in the list, etc.)
« Last Edit: April 24, 2014, 01:54:29 am by Tarvis »

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
This is planned. :)

Offline Qpoter

  • Colonel
  • ****
  • Posts: 114
    • View Profile
The only thing I don't like about this is that I am going to have to do some massive uncluttering...

Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Another thing that can improve mods is add optional header for with mod description.
Using only file name isnt most elegant solution. Another bonus would be version number that could be remember by OpenXcom.
OX could require notation like https://semver.org/ to determine that new version of mod is compatible with older one.

Offline Tarvis

  • Colonel
  • ****
  • Posts: 111
    • View Profile
Yeah, Warboy already stated that that too is planned.

I think Name: and Description: will suffice, for now, at least for what's shown in-game
« Last Edit: April 30, 2014, 08:10:09 pm by Tarvis »

Offline winterheart

  • Colonel
  • ****
  • Posts: 180
  • Fellow Squaddie
    • View Profile
There should be at least URL, author, version and date of publication.

Offline kkmic

  • Commander
  • *****
  • Posts: 582
  • Undefined
    • View Profile
And a minimum required OXC version too.