View unanswered posts | View active topics It is currently Thu Apr 17, 2014 3:46 pm



Reply to topic  [ 20 posts ]  Go to page 1, 2  Next
Some debug help 
Author Message
Developer
Developer

Joined: Thu Jul 24, 2003 9:53 pm
Posts: 2145
Post Some debug help
http://www.neurohack.com/public/forums/DebugCode.xml

Take the file above and put it in your Extensions folder (you'll need to right-click on the link and select "Save As...")

Start a game in debug mode (/debug) switch and bring up the command windows (F9)

Now type in (notice the ' in front of shpOrder):

(help 'shpOrder)

You will get back a list of all Transcendence functions that start with the string "shpOrder"

For now, this works with all built-in Transcendence functions. It does not work with functions defined in script. It currently does not work with the built-in primitives (such as (list) and (count))

----

The only other function in that Extensions file is also fun. Try:

(testShipClass 'phobos)

Enjoy!


Tue Jul 31, 2007 7:53 pm
Profile WWW
Fleet Officer
Fleet Officer
User avatar

Joined: Sun Mar 05, 2006 8:21 am
Posts: 1026
Post 
Now that is just awesome! :D
Summoning a Phobos like that is just... awesome. Could be interesting to do so in Heretic.
Can we summon any other ships like that yet?


Tue Jul 31, 2007 9:17 pm
Profile
Fleet Officer
Fleet Officer
User avatar

Joined: Sun Mar 05, 2006 8:21 am
Posts: 1026
Post 
You can summon multiple ones, too!

Image


Tue Jul 31, 2007 9:28 pm
Profile
Developer
Developer

Joined: Thu Jul 24, 2003 9:53 pm
Posts: 2145
Post 
Yugimotomanager wrote:
Now that is just awesome! :D
Summoning a Phobos like that is just... awesome. Could be interesting to do so in Heretic.
Can we summon any other ships like that yet?


Cool! I'm glad you liked it!

You can actually summon any ship in the game. Just enter the ship-class name instead of 'phobos.


Tue Jul 31, 2007 10:51 pm
Profile WWW
Miner
Miner

Joined: Wed Jan 03, 2007 11:46 am
Posts: 33
Post 
Very Cool! :D

_________________
Hmm...


Wed Aug 01, 2007 9:13 pm
Profile
Miner
Miner
User avatar

Joined: Tue Jul 24, 2007 8:24 pm
Posts: 25
Post 
I liked trying this:
Code:
(for i 0 9 (testShipClass 'phobos))
:twisted:

I died quickly of course, but the net result was absolutely awesome!


Thu Aug 02, 2007 1:19 am
Profile
Commonwealth Pilot
Commonwealth Pilot

Joined: Mon Apr 23, 2007 4:41 am
Posts: 78
Location: Canton, MI/Redford, MI (Home/School)
Post 
Hmm...

Any way to tie the command to an item? Like using an item or docking? Or firing? Could get a noob in trouble. Godmod weapon, advertised as such, and every time it fires, a Phobos spawns. It would need a slow firing rate or you'd have godmodders PO'd that their comp locked up when about 100 Phobos started filling the screen. Ouch.

Teach them not to godmod. :twisted:

_________________
I never said I was sane.

I said I was perfectly insane.


Fri Aug 17, 2007 4:03 am
Profile
Militia Captain
Militia Captain

Joined: Sat Feb 02, 2008 7:22 pm
Posts: 717
Post 
Is there something similar for stations? I could really use it.

_________________
Need a place to stick files? Use Mediafire!


Wed Mar 26, 2008 12:44 pm
Profile
Militia Captain
Militia Captain

Joined: Sat Mar 11, 2006 5:25 pm
Posts: 994
Post 
its just like scripting I think:

try:

(sysCreateStation &CharonPirateOutpost; gPlayerShip)


Wed Mar 26, 2008 2:30 pm
Profile
Fleet Officer
Fleet Officer

Joined: Sat Oct 13, 2007 7:48 pm
Posts: 1259
Location: By the beach
Post 
George did you update the (help )? I was able to get my own functions to show up in the console with this now. Yay!


Thu Aug 14, 2008 8:25 pm
Profile
Fleet Officer
Fleet Officer
User avatar

Joined: Sun Mar 05, 2006 6:31 am
Posts: 1920
Post 
nope it always had that feature 8)

_________________
Crying is not a proper retort!


Thu Aug 14, 2008 8:47 pm
Profile
Militia Lieutenant
Militia Lieutenant
User avatar

Joined: Thu Aug 14, 2008 3:31 am
Posts: 218
Location: Near Paris, France
Post 
Hi all,


I'm trying to get things get into the bedug log. I can open the console and I have dbgOutput in my scripts, but nothing shows... Sorry for lack of precision...

_________________
@+

Benoît 'Mutos' ROBIN
Hoshikaze 2250 Project


Sat Aug 30, 2008 1:34 pm
Profile WWW
Fleet Admiral
Fleet Admiral
User avatar

Joined: Mon Oct 29, 2007 9:23 pm
Posts: 2237
Location: Decoding hieroglyphics on Tan-Ru-Dorem
Post 
If you want debug lines to show up in the console use dbgOutput.
If you want debug lines to show up the debug.log use dbgLog.

both of the functions accept a string after them so if you want to show up a variable, you have to convert it to a string.
To do that i normally use the function "cat" like this

(dbgLog (cat "My variable returns: " myVariable))


If you want more explanations please post in here:
http://www.neurohack.com/transcendence/ ... php?t=1811
This sticky topic is here to show the help extension made by George and not as a help to debug scripts. :)

_________________
Image
Tyrian Conversion Project
Battlestar Adventure Project
Weapons Extended 5
My Mods on Xelerus


Sat Aug 30, 2008 2:06 pm
Profile
Militia Lieutenant
Militia Lieutenant
User avatar

Joined: Thu Aug 14, 2008 3:31 am
Posts: 218
Location: Near Paris, France
Post 
Hi digdug, hi all,


Thanks digdug for the answer ! Sorry for the wrong posting place.

_________________
@+

Benoît 'Mutos' ROBIN
Hoshikaze 2250 Project


Sat Aug 30, 2008 3:36 pm
Profile WWW
Fleet Officer
Fleet Officer
User avatar

Joined: Sun Mar 05, 2006 6:31 am
Posts: 1920
Post 
dbglog and dbgOutput are a bit different than that digdug

It takes any amount of arguments and outputs them to the log file or console. The arguments can be lists numbers or strings. (I think it was changed in .99 as lists used to not work)

_________________
Crying is not a proper retort!


Sat Aug 30, 2008 6:47 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 20 posts ]  Go to page 1, 2  Next

Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.