Page 1 of 1

console log

Posted: Fri Jul 12, 2013 1:19 pm
by cieply
is there any way to dump console to a file from command line not by selecting text and copying?

i have started some changes in Lib/Widgets/ and game crashes, unfortunately console disappears as well so I don't know whats is happening and cannot solve it, it would be doable only if console was immediately written to a file but don't know how to do it.

``blade.exe -console'' is not a solution as I said above

Re: console log

Posted: Fri Jul 12, 2013 3:39 pm
by prospero
Try This: ...

c/p the enclosed file to the Lib folder to replace the existing file.

While the Debug mode is enabled this file will save the console readout to a Debug.txt file of the map you are playing to the map's folder.

Very useful. :D But don't forget to delete the debug files now and then as they get bigger and bigger. :P

If you get a total bail-out in the game then mostly it will not show any fault in the console. These CTDs are mostly triggered by graphic errors and
need a bit of detective work to track them down.

Re: console log

Posted: Tue Jul 16, 2013 2:14 pm
by cieply worked but console.log haven't helped much...

--- console.log ---
Executed PickInit.Init()
Done Trails.Init()
Creating tables for the bipeds...
tables created (0.578000068665 seconds)
Loading the Spider animation sets...
Found 2DMap
--- EOF console.log ---

and that's it, doesn't help a lot L(
will work on it


Posted: Tue Jul 16, 2013 2:16 pm
by cieply
i tried to change a little bit your code so it doesn't open and close output file every single line it writes
and can be opened with "wt" which would automatically accomplish removing old entries and not grow console.log to monstrous size
but well:
--- console:
G:\gamez\Blade of Darkness\bin
G:\gamez\Blade of Darkness\Maps\Casa
B_App::RunScriptFile() -> Error ejecutando
Start optimizing Astar...OK!
--- EOF console
and messagebox with "Player1 not declared in"
so it doesn't work, sorry I don't get python that well

--- cut Lib/ ---

Code: Select all

#import Bladex
import Console
import sys
#import os


class ConsoleOutput:
     if not dbg:

  def write(self,message):
    if message is None:
      if DEBUG_FILE:
#      	dbg=open("Debug.txt","at")
      	dbg.write (message)
#      	dbg.close()
      ## if DEBUG_FILE:

  def flush(self):

def InitConsole():
    if DEBUG_FILE:
    ## if DEBUG_FILE:
--- EOF cut Lib/ ---