Skip to content

Debugging

szapp edited this page Jul 19, 2019 · 2 revisions

Ninja provides limited but sufficient options for debugging. These are both relevant for developers creating and for players troubleshooting a patch.

Console

Ninja adds itself as command to the in-game default console. By typing Ninja into the console, version and build information of Ninja is displayed as well as a list of active patches in ascending order of their timestamps. Entering Ninja PatchName, for any of the active patches displays a short description of the patch. This description corresponds to the VDF header comment, as mentioned in VDF Header.

Logging

As mentioned in Other Mechanics, Ninja enables the zSpy if it is open at game start and sets its logging to level five if not already higher. The filter of the zSpy is required to be set to all events including information (not just warnings and errors).

Ninja itself logs the most significant of its actions with level five. More detailed information is available at level six or higher. All messages are indicated by the unique author-prefix "J:" as well as a message prefix "NINJA:". This allows setting the text filter specifically to show Ninja messages only.

At level five (and higher) Ninja logs the following events.

  • Ignored patches, order of loaded patches
  • Any type of injections made by a patch
  • Names of the parsed script files
  • Appended output units (incl. the number of blocks before and after)
  • Appended MDS files (incl. the number of new animations)
  • Basic operations of Ninja (initializing, cleaning up, etc.)

More detailed information is available at level six (and higher). However, the high amount of messages will increase starting time.

  • Each and every symbol that the patches overwrite
  • All output units that are added
  • Every attempt of Ninja to find matching source (SRC) files in patches
  • Every Daedalus function call initiated by Ninja, e.g. menu initializations

These messages allow pinpointing the exact action connected to a crash or malfunction.

Introduction
    Virtual Disk File System
    Formats
        Single File Formats
        Collected File Formats
    Limitations to Overcome
        Scripts
        Animations
        Output Units

Solution
    Implementation
    Patch Structure
        VDF File Tree
        VDF Header
    Patch Template
    Patch Validator
    Inter-Game Compatibility

Inject Changes
    Daedalus Scripts
        Overwriting Symbols
            Naming Conventions
            Preserved Symbols
        Initialization Functions
            Init_Global
            Menu Creation
        Ikarus and LeGo
            Initializing LeGo
            Modifications to LeGo
            PermMem and Handles
        Daedalus Hooks
        Inserting NPC
        Disallow Saving
        Helper Symbols
            NINJA_VERSION
            NINJA_MODNAME
            NINJA_PATCHES
            NINJA_ID_PATCHNAME
            NINJA_SYMBOLS_START
            NINJA_SYMBOLS…PATCHNAME
        Common Symbols
        Localization
    Animations and Armor
    Output Units

Other Mechanics
    Remove Invalid NPC
    Safety Checks in Externals
    Preserve Integer Variables
    Detect zSpy
    Incompatibility List for Mods

Technical Details

Applications and Examples
    Add New NPC
    Set AI Variables
    Add New Dialogs
    Add New Spells
    Add New World
    Translation Patch

Debugging
    Console
    Logging

Installation
    Requirements
    Instructions

Troubleshooting
    Is Ninja Active
    Is Patch Loaded
    Error Messages

Download

Checksums
    Setup
    In-Game

Changelog

Support this project  

Acknowledgements

Contact and Discussion

Clone this wiki locally