Debug code?

General discussion about anything related to Transcendence.
Post Reply
JonRobinson
Anarchist
Anarchist
Posts: 8
Joined: Tue Jun 03, 2014 10:31 pm

Bit of a noob with this game, sorry if this isn't the appropriate place to post this. However, I am having a problem. None of the debug console commands work for me (moreammo, restore, ua etc.) The only one so far that works is the original credits one (plyCredit gPlayer amount) amd I have a copy of something called DebugCode.xml in my extensions folder but I can't seem to make any of the console commands work other than that one. Everything else returns "unrecognized command" or some such.
User avatar
Atarlost
Fleet Admiral
Fleet Admiral
Posts: 2391
Joined: Tue Aug 26, 2008 12:02 am

Those commands do not exist unless they're defined in a module that is loaded on game start.
Literally is the new Figuratively
JonRobinson
Anarchist
Anarchist
Posts: 8
Joined: Tue Jun 03, 2014 10:31 pm

Anyway to get ahold of that kind of file? If not whatever. Second question though: is there a way to find the HEX unid of an item in your cargo hold? Like call.it from the console or something? I looked in the game save file but couldn't find it amd most of ut was unreadable.
TVR
Militia Commander
Militia Commander
Posts: 334
Joined: Sat Sep 08, 2012 3:26 am

Don't bother using the old debug extension, it has long been obsoleted by GODMod.

Instructions to retrieve the UNID of any item in Transcendence.

1) Click on or scroll to the item in the list
2) Press F9 to open the debug console
3) Type in the following:

Code: Select all

(itmGetType (scrGetItem gScreen))
4) Press return
5) A number should be printed in the debug console. This is the UNID in decimal notation.
6) Convert this number to hexadecimal notation using a decimal->hexadecimal converter.
7) Converted number is the UNID, minus the "0x" that appears before hexadecimal numbers.

If you have GODMod, in step 3, type this into the console instead:

Code: Select all

(dsf_DecToHex (itmGetType (scrGetItem gScreen)))
Fiction is reality, simplified for mass consumption.
PGP: 0x940707ED, 5DB8 4CB4 1EF5 E987 18A0 CD99 3554 3C13 9407 07ED
Bitcoin: 1LLDr7pnZDjXVT5mMDrkqRKkAPByPCQiXQ
JonRobinson
Anarchist
Anarchist
Posts: 8
Joined: Tue Jun 03, 2014 10:31 pm

Cool thanks. Any way to force hex output? I know I'm lazy but still it'd be convenient :D
JonRobinson
Anarchist
Anarchist
Posts: 8
Joined: Tue Jun 03, 2014 10:31 pm

Is there any way to tell what the hex unid is from the alpha version (e.g &itPlasmaCannon)
TVR
Militia Commander
Militia Commander
Posts: 334
Joined: Sat Sep 08, 2012 3:26 am

Not possible - Transcendence has no built-in hex output functions and &pointers; are discarded after the XML is loaded.
Fiction is reality, simplified for mass consumption.
PGP: 0x940707ED, 5DB8 4CB4 1EF5 E987 18A0 CD99 3554 3C13 9407 07ED
Bitcoin: 1LLDr7pnZDjXVT5mMDrkqRKkAPByPCQiXQ
User avatar
Song
Fleet Admiral
Fleet Admiral
Posts: 2828
Joined: Mon Aug 17, 2009 4:27 am

There's probably a way to do it with TransData (or just decompile the source and go through the resulting XML), but the game itself can't extract UNIDs, IIRC.
Mischievous local moderator. She/Her pronouns.
User avatar
pixelfck
Militia Captain
Militia Captain
Posts: 571
Joined: Tue Aug 11, 2009 8:47 pm
Location: Travelling around in Europe

Shrike wrote:There's probably a way to do it with TransData (or just decompile the source and go through the resulting XML), but the game itself can't extract UNIDs, IIRC.
As far as I know, the game's engine does not know about the &unid; entities; it uses the numbers instead.
In other words, it will be impossible to fetch the &unid; entities in-game, because they do no exist any more.

The &unid; entities are a convenience for the programmer/modder when scripting the game's content. After starting up the game, only the (hex) numbers (0x08001234, etc) are used.

Cheers,
Pixelfck
Image
Download the Black Market Expansion from Xelerus.de today!
My other mods at xelerus.de
Post Reply