Where do debug strings appear?
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
Where do debug strings appear?
Throughout the game scripts I can see debug_text tags.
I'm particularly interested in seeing the text output by the trade.performplayertraderun.xml script. debug_text tags in this script have a 'chance' value set to 0.
Are these strings supposed to be visible anywhere in-game, perhaps by toggling some value somewhere, or are they just logged to a file or something like that?
Thank you
I'm particularly interested in seeing the text output by the trade.performplayertraderun.xml script. debug_text tags in this script have a 'chance' value set to 0.
Are these strings supposed to be visible anywhere in-game, perhaps by toggling some value somewhere, or are they just logged to a file or something like that?
Thank you
Re: Where do debug strings appear?
Sadly, <debug_text> doesn't seem to work. The commonly used workaround is to use <show_help force="true" custom="'your text'" />.Swallen wrote:Throughout the game scripts I can see debug_text tags.
I'm particularly interested in seeing the text output by the trade.performplayertraderun.xml script. debug_text tags in this script have a 'chance' value set to 0.
Are these strings supposed to be visible anywhere in-game, perhaps by toggling some value somewhere, or are they just logged to a file or something like that?
Thank you
To get the output from the trade script you mentioned, you would need to create a patch file and replace the debug_text entries with show_help entries.
the following will show up in your logging:
the filter="error" part is because only error level messages show up. Remove the chance parameter, btw.
logging will end up in /documents/egosoft/x rebirth/<randomnumber>/rebirth.log
you can also see it ingame by binding a key to the debug screen
I'm using a free tailing too to see logging as it happens, like mTail
http://ophilipp.free.fr/op_tail.htm
Code: Select all
<debug_text text="'text here'" filter="error" />
logging will end up in /documents/egosoft/x rebirth/<randomnumber>/rebirth.log
you can also see it ingame by binding a key to the debug screen
I'm using a free tailing too to see logging as it happens, like mTail
http://ophilipp.free.fr/op_tail.htm
-- This code keeps amazing me...
Oh I see. Thanks.
Using the replace tag, is there a way to reference the values of the tag being replaced (so I can include them in the new tag)? Similarly to how captures work in regexp.
Better still, is there a way to select tags by tag name regardless of their path?
That way I could replace all debug_text tags with show_help ones, add the 'force' property and the 'custom' one, plugging in there the value from the selected tag.
Forgive my ignorance, but I've been reading the RFC 5261 and figured it would be faster if someone here knew.
EDIT: Just to clarify, I'm trying to figure out if there's an OK way to implement semi-detailed trade ships reports with the tools we have at the moment (no proper UI).
I know I'm being lazy here, but before starting coding conversations and whatnot I'd like to see what kind of info is available from the abundant debug output in the code.
Using the replace tag, is there a way to reference the values of the tag being replaced (so I can include them in the new tag)? Similarly to how captures work in regexp.
Better still, is there a way to select tags by tag name regardless of their path?
That way I could replace all debug_text tags with show_help ones, add the 'force' property and the 'custom' one, plugging in there the value from the selected tag.
Forgive my ignorance, but I've been reading the RFC 5261 and figured it would be faster if someone here knew.
EDIT: Just to clarify, I'm trying to figure out if there's an OK way to implement semi-detailed trade ships reports with the tools we have at the moment (no proper UI).
I know I'm being lazy here, but before starting coding conversations and whatnot I'd like to see what kind of info is available from the abundant debug output in the code.
no, you'll need to specify the complete path to the tag.
but... you can also just use a replace on the root element, en copy almost the entire file into it. That way you're overwriting the original script with your own (which is identical) and you can just alter the debug_texts
but... you can also just use a replace on the root element, en copy almost the entire file into it. That way you're overwriting the original script with your own (which is identical) and you can just alter the debug_texts
-- This code keeps amazing me...
felrasha wrote:no, you'll need to specify the complete path to the tag.
but... you can also just use a replace on the root element, en copy almost the entire file into it. That way you're overwriting the original script with your own (which is identical) and you can just alter the debug_texts
Only do this for debug reasons, it should be adopted as bad practice to do this in a released mod.
Yes, for that particular example it would be considered very bad practise to do that in a release build.
Unless you plan on completely rewriting broken code that won't work otherwise anyway (and which nobody else has already completely rewritten), you should avoid the above to prevent compatibility issues
Unless you plan on completely rewriting broken code that won't work otherwise anyway (and which nobody else has already completely rewritten), you should avoid the above to prevent compatibility issues
-- This code keeps amazing me...