Page 1 of 1

The Debug Mode

PostPosted: Thu Aug 28, 2014 2:35 am
by Wahn
Just wanted to tell all newcomers that we do have a debug mode for easier evaluation of problems with NPCs and Events. You can enable/disable it with the command "npc debug"

Please do make sure all your NPCs and walk-in events are set to allow display of all relevant information. For NPCs, that is names and values of all Variables, for events please do include an identifying event name.

Code examples:

NPC:
Code: Select all
to say CarlDesc:
   if debugactive is 1:
      say "DEBUG -> HP: [hp of Carl], LEVEL: [level of Carl], LIBRARY ENTRY TURN: [CarlLibraryEntry] <- DEBUG[line break]";   


Event:
Code: Select all
instead of navigating Grey Abbey Library while (...):
   if location of player is not fasttravel:
      say "You can't navigate from here.";
      stop the action;
   if location of player is Grey Abbey Library:
      say "You're already here.";
      stop the action;
   if debugactive is 1:
      say "     DEBUG: FANG ATTACKS CARL - SEX WALK-IN - HP OF FANG: [hp of Fang], HP OF CARL: [hp of Carl], LEVEL OF CARL: [level of Carl][line break]";