#688: Mod loading patch!
---------------------------+------------------------------------------------
 Reporter:  Zarel          |              Owner:                  
     Type:  defect         |             Status:  new             
 Priority:  blocker        |          Milestone:  2.2.2           
Component:  Engine: other  |            Version:  svn/trunk       
 Keywords:  mods           |   Operating_system:  All/Non-Specific
Blockedby:                 |           Blocking:                  
---------------------------+------------------------------------------------
 Yep, it's finally here. Though the code is arguably a bit ugly, it's still
  mostly readable. The patch file is for trunk - I will backport it to 2.2
  before I commit it.

  "Blocker" priority because the command line simply shouldn't be the only
  way to load a mod.

  Fixes:
   * Fixed a possible buffer overflow when exactly `MAX_MODS` are loaded.
   * Fixed some magic numbers (someone used `100` when they meant
  `MAX_MODS`).

  Changes:
   * Specifying mods via the command line is simpler. Instead of: `--mod_mp
  ntw.wz` one can simply type `--mod ntw`. The command line is also more
  forgiving: `--mod ntw.mmod.wz` will load NTW Mod if it's in `mods/ntw/`,
  or in `mods/multiplay/ntw.wz`...
   * Mods can be named `modname.mmod.wz` and placed directly in `mods/`,
 and
  will be treated as a multiplayer mod. The same goes for `.cmod`
 (campaign)
  and `.gmod` (global). Mods in the `mods/` directory without one of these
  extensions will be treated as global mods.
   * The `autoload/` folder is back, and works as it did previously. Note
  that `mods/autoload/modname.mmod.wz` will not be loaded in campaigns, and
  vice versa.
   * The name of every mod loaded is stored in `multiplay_loaded_mods` (a
  null-terminated array of strings that maxes out at MAX_MODS). They should
  probably be sorted alphabetically, concatenated with a separator, and
 sent
  with the version string.
   * `MAX_MODS` lowered from 100 to 64. `MAX_MODS` controls the max number
  of each type of mod that can be specified with the command line, as well
  as the number of mods that will be counted in `multiplay_loaded_mods`
  (additional mods will still be loaded, but not counted).

-- 
Ticket URL: <http://developer.wz2100.net/ticket/688>
Warzone 2100 Trac <http://developer.wz2100.net/>
The Warzone 2100 Resurrection Project
_______________________________________________
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev

Reply via email to