WAR Addon Review

Future of Libs, API, UI, addons...

This thread has been posted here:

Future of Libs, API, UI, addons... at warhammeralliance

[code]Hook, API, UI, addon... a schema for a WAR library set.

             LibHook (general lua library for function inheritance)
                                      |
                                      | static link
                                      |
LibCustomAPI (war-specific library for using LibHook against interface/default)

         LibCustomAPI      LibCustomCompatible*      LibCustomAPI   modded by
               |                     |                    |      \custom-only
(dynamic link) |       (static link) |                    |
               |                     |                    |
  =any CustomAPI-only addon=     =any other addon changing api functions=
  Changes the behavior of         for normal reasons. this is a way to
  the default API or, more        implement new behavior or different
  importantly, the classes        behavior from the default. the user installs
  (function tables), which        to get this new option or changed doodad.
  have no best practices for                       |
  doing without a Lib. Loaded                      | (conditional execution)
  by the user and affects all                      |
  other addons. Most likely         if LibCustomAPI is not detected, it will
  place to find a "skin" mod    use a small statically linked lib for code
  or "bugfix" mod, etc.         that simulates what should be done, without it.

    addon not using any of these libs are affected as follows:
    |
    |(happens ONLY on machines where LibCustomAPI is installed)
    |
    |>if not hooking the WAR api functions: not affected at all, not directly.
    |
    |>if hooking the api functions: will be disabled on first load, with user
    settings to attempt two other modes (besides disabled):
           * unsafe mode (enable and let it wreak havoc if it may)
   (user must find the setting "always run in unsafe mode" for state on reload)
           * compat mode (enable but take steps to keep it from breaking lib)
    (user will hopefully see no CTD's or broken CustomAPI stuff, although
     some stuff in the compat mode addon, especially if not cleanly coded,
     will possibly degrade or break...user may choose "this session only"
     or "all subsequent sessions" when first setting compat mode)[/code]

I would add that the LibCustomAPI can itself load as disabled, compat, or unsafe. It will always load disabled if there was not a clean exit by the interface. It will load in unsafe if the user hits a dialogue confirmation that both the lib and all other addons will now be running in unsafe mode. The lib must be run in safe mode to run any other addons in safe mode OR to disable any addons on load.

Personally I think that this or something like it is medium to high priority as a necessary lib for developers who want to hook the default API functions. I await all comments and suggestions.

http://code.google.com/u/peterkirby/

Loaded to code.google.com because it, unllike curseforge, allows projects with no files to be visible to the world. Viva vaporware!

  • Comments

Add Comment  

Add

You need to login or register to post.

Benefits of Registration

  • Interact with hundreds of thousands of other gamers on an open social network.
  • Post your stories, news, images, videos, and other content to share.
  • Create a network with your fellow gamers or join an existing one.
  • Gain reputation for everything you do.