Oolite Bulletins

For information and discussion about Oolite.
It is currently Sun Jul 23, 2017 4:43 pm

All times are UTC




Post new topic  Reply to topic  [ 15 posts ] 
Author Message
PostPosted: Mon Jul 21, 2008 10:16 pm 
Offline
Intergalactic Spam Assassin
Intergalactic Spam Assassin
User avatar

Joined: Tue Dec 05, 2006 9:43 pm
Posts: 8501
Location: Newbury, UK
OK I'm clearly being a dumbass

http://aegidian.org/bb/viewtopic.php?t=4589

According to that thread Ahruman states:
Quote:
On other platforms, I’d suggest starting by reading the included Read Me file.
But I can't find a readme and I don't know how to use/start the oxp/debug - all I want to do is drop a ship I'm testing right in front of me as I launch from a station so I can get a good look at it.

Any help much appreciated.

_________________
Quote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here


Top
   
 Post subject:
PostPosted: Mon Jul 21, 2008 10:43 pm 
Online
Jedi Spam Assassin
Jedi Spam Assassin
User avatar

Joined: Thu Jul 12, 2007 10:54 pm
Posts: 5774
Location: Carter's Snort
Code:
{
   "daddyhoggy_test_ship" = (
       {
           conditions = (
               "status_string equal STATUS_LAUNCHING"
           ); 
           do = (
               "addSystemShips: daddyhoggy 1 1.0"
           ); 
       }
   );
} 
might do the trick as a script.plist. If I've not gucked the whole thing up – always a possibility – this should drop a ship called a daddyhoggy somewhere inside the aegis on launching. To perhaps increase your confidence, I took the code from the wiki...

_________________
Oofiction: Calliope: a Captain Hesperus adventure | Stranglehold: a Captain Hesperus adventure | Local Midnight in the Vacuum Bar | A Farewell to Arms, Legs, etc.: the Blaze O'Glory Story


Top
   
 Post subject:
PostPosted: Tue Jul 22, 2008 8:09 am 
Offline
Intergalactic Spam Assassin
Intergalactic Spam Assassin
User avatar

Joined: Tue Dec 05, 2006 9:43 pm
Posts: 8501
Location: Newbury, UK
Thanks disembodied - I'm not sure my ship will appear but it'll be nice to know it should - the problem I've got is that I've copied and modified the original worm to make my own version (i.e. the Lave Roover) but I thought I'd get clever and add some glows and stuff (not brave enough to try Shaders yet) - but while the worm stuff is obviously in the original xml style format the new glow stuff examples I've found are in the more readable format you've just given me and I'm not sure I've correctly converted between one type and the other or even if you can mix and match (I suspect not!)

_________________
Quote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here


Top
   
 Post subject:
PostPosted: Tue Jul 22, 2008 8:19 am 
Offline
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral

Joined: Wed Feb 28, 2007 7:54 am
Posts: 4878
DaddyHoggy: To use the debug OXP, you must have the debug console running. On Windows, this is distributed as a separate executable. As far as I can tell, there is no debug console port for Linux yet, although the Python source files are part of the console distribution on Berlios and in theory it can be set up and should work. Someone will have to do it first, though.

Alternatively, you can try what we had done with Ahruman when the debug console was being tested for the first time: One system capable of running the console on one side (Mac or Windows PC), your Linux system running Oolite with debug OXP on the other, connected via TCP/IP. You execute commands on the console computer and see the results on the Linux side.

If this is not feasible, then I guess for now Disembodied's solution should be the best that can be done for Linux.

Edit: In fact, there _is_ a readme in the console package and it states this:
Quote:
You can run the python code _as is_ on macs and linux systems, but you need to install the twisted-python library first - http://twistedmatrix.com/trac/wiki/Downloads
So, I guess you can go for it, after all.


Top
   
 Post subject:
PostPosted: Tue Jul 22, 2008 4:50 pm 
Offline
Grand Admiral Emeritus
Grand Admiral Emeritus
User avatar

Joined: Sat Apr 02, 2005 2:43 pm
Posts: 6657
Location: Sweden
Detailed instructions for using the debug console under Ubuntu:
  • Put the Debug OXP in your OXP place.
  • Open Synaptic and install “python-twisted” and “python-tk”.
  • Extract the OoDebugConsole_Src.zip archive from the oolite-debug-console package.
  • Open a terminal, cd into the extractedOoDebugConsole_Src folder, and run “python DebugConsole.py”. (A window should appear, saying “waiting for connection…” with exceptionally badly-rendered text.)
  • Run Oolite. The text “Opened connection with Oolite version 1.71.2” should appear in the console. You can now enter JavaScript expressions. For instance, try “P” (short for “player”) or “P.credits = 500000”.
Currently, the debug console does not work with the trunk, even if you fiddle with requires.plist. I’m not certain why.

_________________
E-mail: jens@oolite.org


Top
   
 Post subject:
PostPosted: Tue Jul 22, 2008 4:55 pm 
Offline
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral

Joined: Wed Feb 28, 2007 7:54 am
Posts: 4878
Quote:
Currently, the debug console does not work with the trunk, even if you fiddle with requires.plist. I’m not certain why.
Is this problem Linux specific? I seem to have it working fine with trunk under Windows


Top
   
 Post subject:
PostPosted: Tue Jul 22, 2008 4:59 pm 
Offline
Grand Admiral Emeritus
Grand Admiral Emeritus
User avatar

Joined: Sat Apr 02, 2005 2:43 pm
Posts: 6657
Location: Sweden
Quote:
Quote:
Currently, the debug console does not work with the trunk, even if you fiddle with requires.plist. I’m not certain why.
Is this problem Linux specific? I seem to have it working fine with trunk under Windows
Dunno, I just noticed. The log gives me that most helpful of messages – “error: unknown error”.

_________________
E-mail: jens@oolite.org


Top
   
 Post subject:
PostPosted: Tue Jul 22, 2008 8:22 pm 
Offline
Intergalactic Spam Assassin
Intergalactic Spam Assassin
User avatar

Joined: Tue Dec 05, 2006 9:43 pm
Posts: 8501
Location: Newbury, UK
Thanks guys - As usual RL has got in the way - forgot I was going on holiday!

Will do precisely what Ahruman suggested as soon as I'm back,

_________________
Quote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here


Top
   
 Post subject:
PostPosted: Sun Sep 21, 2008 11:50 am 
Offline
Commodore
Commodore
User avatar

Joined: Tue Sep 02, 2008 2:01 pm
Posts: 815
Location: London, UK
The following change to OODebugTCPConsoleClient.m:readData gets it working with the oolite trunk (under Linux). There's probably a more elegant way to write the fix but it works for now. If the same fix works under MacOS perhaps this can go into the trunk.
Of course, the "if (length < 1)" test is superfluous now as well.

Also need to change the max version in the requires.plist of the OXP as well.
Code:
	//while ([_inStream hasBytesAvailable])
	length = [_inStream read:buffer maxLength:kBufferSize];
	while( length > 0 )
	{
		if (length < 1)
		{
			// Under GNUstep, but not OS X (currently), -hasBytesAvailable will return YES when the buffer is in fact empty.
			if ([_inStream streamStatus] == NSStreamStatusReading) break;
			
			[self breakConnectionWithBadStream:_inStream];
			return;
		}
		
		data = [NSData dataWithBytesNoCopy:buffer length:length freeWhenDone:NO];
		OOTCPStreamDecoderReceiveData(_decoder, data);
		length = [_inStream read:buffer maxLength:kBufferSize];
	}

_________________
The glass is twice as big as it needs to be.


Top
   
 Post subject:
PostPosted: Sun Feb 01, 2009 8:21 pm 
Offline
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
User avatar

Joined: Tue Apr 01, 2008 12:55 pm
Posts: 804
Location: A small ice asteroid, orbiting Oresrati in Galaxy 8 (a.k.a. northwest Armorica).
This is to confirm that using Debug.OXP 1.72 and following Ahruman's
instructions, the debug console is working properly for 1.72.2.
Furthermore, if max_version, in 'requires.plist', is changed (e.g. 1.73.99),
the debug console is also functional for trunk revision 2023.
Tested on Ubuntu 8.04 32bit and 64bit.

_________________
Xubuntu 14.04LTS / Windows 7 Home Premium
Intel Core 2 Quad Q9450 2.66GHz - 6GB DDR2 - Palit GeForce GTX 750 Ti StormX Dual (2048MB DDR5)
"Any sufficiently advanced information is indistinguishable from noise." [Newman, Lachmann, Moore]


Top
   
 Post subject:
PostPosted: Sun Feb 01, 2009 9:25 pm 
Offline
Intergalactic Spam Assassin
Intergalactic Spam Assassin
User avatar

Joined: Tue Dec 05, 2006 9:43 pm
Posts: 8501
Location: Newbury, UK
Excellent - I'll do Ahruman's fix and put debug.oxp back in my Addons folder then!

_________________
Quote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here


Top
   
PostPosted: Sat Jun 28, 2014 4:10 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Mon Apr 06, 2009 12:20 pm
Posts: 6178
Location: Aboard the Pitviper S.E. "Blackwidow"
* Deleted to avoid unnecessary humiliation *

_________________
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied


Last edited by Diziet Sma on Sat Jun 28, 2014 4:26 pm, edited 1 time in total.

Top
   
PostPosted: Sat Jun 28, 2014 4:16 pm 
Offline
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
User avatar

Joined: Fri Nov 11, 2011 6:19 pm
Posts: 4007
Quote:
I've made a DebugConsole.py file from the listing at https://github.com/OoliteProject/oolite ... Console.py and made it executable.
When you say "you made a DebugConsole.py file", what exactly do you mean? (If it wasn't using git to check it out, or using the "download zip" button on the right of https://github.com/OoliteProject/oolite-debug-console , then what did you do?)

I'm using exactly that file and it works fine here.

(Other thing to check - you say you're doing "python DebugConsole.py" - what happens if you just do "./DebugConsole.py"?)

_________________
OXPs: [EliteWiki] New Cargoes, [EliteWiki] Skilled NPCs, [EliteWiki] Curse of the Black Sunspot, and more


Top
   
PostPosted: Sat Jun 28, 2014 4:19 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Mon Apr 06, 2009 12:20 pm
Posts: 6178
Location: Aboard the Pitviper S.E. "Blackwidow"
Quote:
When you say "you made a DebugConsole.py file", what exactly do you mean? (If it wasn't using git to check it out, or using the "download zip" button on the right of https://github.com/OoliteProject/oolite-debug-console , then what did you do?)
Copy and pasted the listing into a text editor, saved it, made it executable.. nothing different than I've done many times with other listings.
Quote:
(Other thing to check - you say you're doing "python DebugConsole.py" - what happens if you just do "./DebugConsole.py"?)
Exactly the same error:
Code:
  File "./DebugConsole.py", line 149
    else:
       ^
SyntaxError: invalid syntax

_________________
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied


Top
   
PostPosted: Sat Jun 28, 2014 4:25 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Mon Apr 06, 2009 12:20 pm
Posts: 6178
Location: Aboard the Pitviper S.E. "Blackwidow"
Never mind.. I'm an idiot.

Totally didn't see the "Download zip" button. Downloaded the entire thing, ran that file and all is working correctly. Been so long since I used it, I'd forgotten there were other files necessary for it to work properly.

I'll just go crawl under a rock now.. :oops:

_________________
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 15 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 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

Search for:
cron
Powered by phpBB® Forum Software © phpBB Limited