bugfix extensions

From Wiki

Sword of Moonlight Extension Library

Revision as of 06:54, 4 June 2015 by Holy (talk | contribs) (do_fix_ceiling_interactions)
Jump to: navigation, search


As of 1.1.1.7 some extensions in this section are switched on by default. Refer to #do_fix_any_vital.

Extensions in this section address software bugs that afflict games that use the original Sword of Moonlight debug and release game programs, som_db.exe and som_rt.exe. Projects are tested with som_db.exe. Games use som_rt.exe renamed GAME.exe. When using the Extension Library with a standalone game a BIN file in the EX folder takes the place of som_rt.exe. The BIN file is treated as if it is identical to the last version of som_rt.exe released by From Software.

Note: if the Bugfix section is absent from all of the INI files involved the new default behavior, as of around 1.1.1.5, is to fix every bug. However in practice some fixes may slip through the cracks, therefore it is still recommended that you include a Bugfix section along with #do_fix_any_trivial and #do_fix_any_nontrivial in your projects.

Tip: about 1 out of 10 bugs affecting the game program(s) are represented here in the form of extensions. It would be nice to have documentation for every single bug addressed, but it is probably already too late for that. Bugs are given consideration for extension on the basis of controversy, notoriety, complexity, performance concerns, and potential and or unknowable side effects.

do_fix_any_nontrivial

Introduced around 1.0.0.1, this extension is equivalent to to setting all nontrivial Bugfix extensions. Nontrivial means the extensions come at some non-negligible performance overhead. Values are limited to binary statements.[#]

do_fix_any_trivial

Introduced around 1.0.0.1, this extension is equivalent to to setting all trivial Bugfix extensions. Trivial means the extensions is negligible or free in terms of performance overhead. Values are limited to binary statements.[#]

do_fix_any_vital

Introduced around 1.1.1.7, this extension is equivalent to to setting all vital Bugfix extensions. Vital means the extensions are switched on by default because the bugs they address are either crash prone, may interfere with extension, or resource intensive, eg. attempt to access 100 files or create and destroy a font resource every 15 or so milliseconds! You can switch these off if you want to experience the bugs for yourself. Values are limited to binary statements.[#]

do_fix_asynchronous_input

This fix was classified nontrivial prior to 1.1.1.7 (it's actually really trivial.)

Introduced around 1.1.1.6, this extension is classified a vital fix. It fixes a bug that can disable input when picking up items and saving the game at save points. Usually the bug just makes input very difficult. Sometimes the bug is barely if even noticeable. It is not well understood but it seems to depend on various timing factors which can depend on the game and the player's computer.

This fix also addresses a, likely unrelated yet very similar, bug affecting games with polling, or "always on", events where for each event the game will query the inputs (keyboard and game controller) and needlessly update the game to reflect the inputs an additional time. It is not known to what extent this behavior is detrimental to the game. However minimal (or not) it is easy to imagine how this can complicate extension. Extensions (should be robust, but) should not account for interaction with this bug. Values are limited to binary statements.[#]

Note: this extension is new and not exactly a precision fix. It just seems to work for everyone who has tried it so far. Regardless this fix is being considered for mandatory inclusion.

do_fix_asynchronous_sound

Introduced around 1.0.0.1, this extension is classified a nontrivial fix. It ensures sound effects are synchronized with the source of the sound. Values are limited to binary statements.[#]

do_fix_boxed_events

Introduced around 1.1.1.7, this extension is classified a trivial fix. Without this fix events associated with objects (ie. not items or NPCs) with a 3d box (ie. not a 2d cylinder) shape that are triggered by pressing the SPACE #keyboard key, or "Action" button, use the height of the box where the depth ought to be used. Values are limited to binary statements.[#]

do_fix_ceiling_interactions

Introduced around 1.2.0.6, this extension is classified a trivial fix. It adds ceilings to the list of things the player character is not permitted to pass through. Sword of Moonlight (2000) generally neglects to do this. Values are limited to binary statements.[#]

do_fix_clipping_item_display

Introduced around 1.0.0.1, this extension is classified a nontrivial fix. It ensures item geometry as displayed in menus does not intersect geometry that is part of the background in a non-picture menu. Values are limited to binary statements.[#]

do_fix_controller_configuration

Introduced around 1.0.0.1, this extension is classified a trivial fix. It maps the game controller settings in the game's INI file to correct values. Values are limited to binary statements.[#]

do_fix_damage_calculus

Introduced around 1.1.2.2, this extension is classified a trivial fix. It works around bugs and bug-like logical inconsistencies in the classical Sword of Moonlight damage calculus by instituting replacement default formulas for hit-point damage resolution and stat based bonuses to hit-point attack and defense ratings. Refer to #Damage. Values are limited to binary statements.[#]

do_fix_elapsed_time

Introduced around 1.0.0.1, this extension is classified a trivial fix. Prior to ver. 1.1.1.3 this extension hid all of the clocks in the menus from the player. After 1.1.1.3 a fully functional clock can be achieved by somehow adding a counter named "Ex" to the project (if need be, such a counter can be added by editing the SYS.DAT file) otherwise the clocks will be hidden. In fact 1.1.1.3 goes further and hides the clocks in the save/load menus. Values are limited to binary statements.[#]

do_fix_fov_in_memory

Introduced around 1.0.0.1, this extension is classified a trivial fix. It ensures the correct field of view values exist in memory. For example, without this fix, graphics may disappear mysteriously along the edges of the screen under some display resolutions -- it may also be necessary to enable #do_fov in order to achieve this effect. Values are limited to binary statements.[#]

Note: may not work as expected if #do_fov is not enabled. (do_fov is deprecated as of ver. 1.1.1.5)

do_fix_lifetime_of_gdi_objects

This fix was classified nontrivial prior to 1.1.1.7.

Formerly do_fix_graphics_device_interfacing up to 1.1.1.7 (it took some time to brainstorm the wording.)

Introduced around 1.0.0.1, this extension is classified a vital fix. For example, Sword of Moonlight instantiates a font in memory every time it redraws the screen. This can happen several times a second. This fix manages a pool of GDI resources which are reused wherever applicable and recycled as necessary. This should improve performance and conserve memory. Values are limited to binary statements.[#]

do_fix_lighting_dropout

Introduced around 1.0.0.1, this extension is classified a nontrivial fix. Normally object lighting is turned off if you change display settings in the game menu. This extension fixes that behavior indirectly by doing the equivalent of turning on #do_lights with the number of lamps set to 3. 3 is believed to be the maximum number of lamps Sword of Moonlight will apply to an object. Setting do_lights to yes will supersede this extension. Values are limited to binary statements.[#]

do_fix_out_of_range_config_values

Introduced around 1.0.0.1, this extension is classified a trivial fix. It clamps the possible values in the games INI file to suitable ranges and filters out impossible and or troublesome values. Values are limited to binary statements.[#]

do_fix_oversized_compass_needle

Introduced around 1.0.0.1, this extension is classified a nontrivial fix. Sometimes the compass needle is gigantic compared to the compass. This should correct that, hopefully without any side effects. Values are limited to binary statements.[#]

It is nontrivial because of a slight chance of side effects cropping up in menu elements if mistaken for the needle.

do_fix_slowdown_on_save_data_select

This fix was classified nontrivial prior to 1.1.1.7.

Introduced around 1.0.0.1, this extension is classified a vital fix... because it's more work not to fix and the fix is relatively simple. In Save/Load menus every time Sword of Moonlight redraws the screen (several times a second) it tries to open 99 files in your save folder. This is hard on any disk, however on a modern hard disk drive you may not notice. On any kind of external storage disk the game will grind to a crawl. The player may not even be able to get out of the game. This extension fixes this behavior. Values are limited to binary statements.[#]

do_fix_spelling_of_english_words

Introduced around 1.0.0.1, this extension is classified a trivial fix. Sword of Moonlight is/was a Japanese product first. Originally it contains some English words which are not always spelled correctly. This extension fixes these instances wherever applicable, so your game should appear more professional to players versed in English. Values are limited to binary statements.[#]

do_fix_widescreen_font_height

Introduced around 1.1.1.5, this extension is classified a trivial fix. For whatever reason the creators of Sword of Moonlight decided that the height of fonts should be proportional to the horizontal resolution. Circa 2000 we used more or less square CRT displays, so no one would have noticed the preposterousness of this decision and or oversight. CRTs turned out to be a 20th century thing. Nowadays displays are almost always widescreen; so this extension simply flips the formula around to accommodate any and all screens, and may or may not also entail additional adjustments such as the centering of text. It is recommended for readability sake. Values are limited to binary statements.[#]