Addon control needs work?
Posted: Thu Nov 01, 2012 6:31 pm
I recently installed SVN (v 5757) to start updating two addons for beta 43. After running the program with a new character to make sure the install was OK, I enabled my tooltip addon (very simple) to make sure it was compatible with the SVN. My test character no longer appeared on the save character list with no explanation as to why. I then created a new character and it loaded and saved fine. I disabled my addon to start "debugging" it, but it was loaded again with my second test character. My first test character (still on disk) never reappeared on the load screen. Afterwards, I found out from the SVN development history that this is a new feature of the upcoming B43.
This kind of program behavior will most likely produce player frustration and complaints. It will also very much hurt addon development because it's not safe to try out addons. That is, if a player is in the middle of a game and an interesting addon comes out, it's either impossible to use the addon without starting a new game, or there is no going back once the addon is installed. I'm not sure why, exactly, this new feature has been added, besides an obvious concern about compatibility between the main game and various addons. Is there a concern about some kind of cheating that may be facilitated by players turning on and off addons during play? I think these issues need to be addressed before B43 is released.
Addressing compatibility and debugging control, I see the following priorities for this system:
Transparency:
Always list all save files and complete addon info in the save file summary at the load screen. Each save file in the list should either be shown as compatible or should list exactly why it is not. (Missing required addon, incompatible game version, etc.) It should, as a minimum, be possible for the player to be able to delete old/incompatible saved games from the game load screen. This is step towards enabling compatibility of save files from older game versions.
Flexibility:
Save files with no addons attached should always be loadable. That is, saving a character from an unmodified game should always be safe.
Most save files will not really require any specific addons and should be able to load without them. (My tooltip addon, for example, makes no changes to gameplay, and the game will run just as well with or without it.) It's probably safe enough just to warn the player of possible incompatibility issues whenever a game is loaded without its associated addons available. This is far better than just automatically throwing away a saved game and leaving the player to scratch his or her head in frustration.
Always load the addons attached to the save file unless they are disabled. If the addon profile (ie. the list of addons enabled) of a save file does not match the installed/enabled addons in the game, give the player the option to select/deselect each addon, with an appropriate warning if the addon profile is changed. Attach the addons as specified.
Allow any save file to be loaded in debug mode. This is required if an addon developer is trying to track down a bug in his software with a save file that uses addons he may not have.
Tracking:
Mark in the save file if the game previously used an addon that is no longer installed. For example:
save w/no addons --> game.__mod_info.addons[AddonName] == nil
save w/ addon attached --> game.__mod_info.addons[AddonName].ver == "vxx.xx"
save w/o previous addon --> game.__mod_info.addons[AddonName].ver == "disabled"
Print this "history" in the game log when loading a game, to help identify corrupted save files for debugging purposes. This will be most helpful in analyzing a saved game that is running without addons when a bug is reported but that had been run with (disabled or no longer installed) addons previously.
Some more involved options:
If previously attached addons are disabled for a game, do a thorough consistenty check of game variables to ensure stability. (Could most likely be limited to the variable space for an unmodified game, in which case a fairly straightforward routine could be developed, something like checking a table containing the allowed range of each variable.)
Possibly provide some more info to the init file that allows the addon developer to specify weather a saved game actually requires the addon or not and enforce this when loading a saved game. Most cosmetic addons can safely specify no requirement, while those expanding content (new classes, zones, etc.) would probably specify that they must be loaded with an associated saved game.
Edit: After testing a few more saves, the previously hidden save files are now visible in the load game screen. There may be a bug involved here, but at least I can see all of my saved games now. Anyone have any similar experience?
This kind of program behavior will most likely produce player frustration and complaints. It will also very much hurt addon development because it's not safe to try out addons. That is, if a player is in the middle of a game and an interesting addon comes out, it's either impossible to use the addon without starting a new game, or there is no going back once the addon is installed. I'm not sure why, exactly, this new feature has been added, besides an obvious concern about compatibility between the main game and various addons. Is there a concern about some kind of cheating that may be facilitated by players turning on and off addons during play? I think these issues need to be addressed before B43 is released.
Addressing compatibility and debugging control, I see the following priorities for this system:
Transparency:
Always list all save files and complete addon info in the save file summary at the load screen. Each save file in the list should either be shown as compatible or should list exactly why it is not. (Missing required addon, incompatible game version, etc.) It should, as a minimum, be possible for the player to be able to delete old/incompatible saved games from the game load screen. This is step towards enabling compatibility of save files from older game versions.
Flexibility:
Save files with no addons attached should always be loadable. That is, saving a character from an unmodified game should always be safe.
Most save files will not really require any specific addons and should be able to load without them. (My tooltip addon, for example, makes no changes to gameplay, and the game will run just as well with or without it.) It's probably safe enough just to warn the player of possible incompatibility issues whenever a game is loaded without its associated addons available. This is far better than just automatically throwing away a saved game and leaving the player to scratch his or her head in frustration.
Always load the addons attached to the save file unless they are disabled. If the addon profile (ie. the list of addons enabled) of a save file does not match the installed/enabled addons in the game, give the player the option to select/deselect each addon, with an appropriate warning if the addon profile is changed. Attach the addons as specified.
Allow any save file to be loaded in debug mode. This is required if an addon developer is trying to track down a bug in his software with a save file that uses addons he may not have.
Tracking:
Mark in the save file if the game previously used an addon that is no longer installed. For example:
save w/no addons --> game.__mod_info.addons[AddonName] == nil
save w/ addon attached --> game.__mod_info.addons[AddonName].ver == "vxx.xx"
save w/o previous addon --> game.__mod_info.addons[AddonName].ver == "disabled"
Print this "history" in the game log when loading a game, to help identify corrupted save files for debugging purposes. This will be most helpful in analyzing a saved game that is running without addons when a bug is reported but that had been run with (disabled or no longer installed) addons previously.
Some more involved options:
If previously attached addons are disabled for a game, do a thorough consistenty check of game variables to ensure stability. (Could most likely be limited to the variable space for an unmodified game, in which case a fairly straightforward routine could be developed, something like checking a table containing the allowed range of each variable.)
Possibly provide some more info to the init file that allows the addon developer to specify weather a saved game actually requires the addon or not and enforce this when loading a saved game. Most cosmetic addons can safely specify no requirement, while those expanding content (new classes, zones, etc.) would probably specify that they must be loaded with an associated saved game.
Edit: After testing a few more saves, the previously hidden save files are now visible in the load game screen. There may be a bug involved here, but at least I can see all of my saved games now. Anyone have any similar experience?