Editing Mod Backwards Compatibility
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
As a mod developer, you have to make sure your mod stays backwards compatible with previous versions of itself. | As a mod developer, you have to make sure your mod stays backwards compatible with previous versions of itself. | ||
− | Whenever you click the ''Reload Code'' button, | + | Whenever you click the ''Reload Code'' button, WarLight loads the newest version of the code files and throws away the old ones. Because of this, a game may play the first half on one version of your mod, and the second half on a different version. You must take care to ensure your mod doesn't break games in that scenario. |
For example, if the first version of your mod has no configuration options (writes nothing to Mod.Settings), but then a later version adds a new setting, called '''Mod.Settings.Foo''', then games created with the first version of your mod will show '''Mod.Settings.Foo''' as '''nil'''. You must check for this before using the field and take the appropriate action to ensure the game continues working as player's expect. | For example, if the first version of your mod has no configuration options (writes nothing to Mod.Settings), but then a later version adds a new setting, called '''Mod.Settings.Foo''', then games created with the first version of your mod will show '''Mod.Settings.Foo''' as '''nil'''. You must check for this before using the field and take the appropriate action to ensure the game continues working as player's expect. |