How do I? .... (on Debug Console)

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

User avatar
Cholmondely
Archivist
Archivist
Posts: 5365
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

How do I? .... (on Debug Console)

Post by Cholmondely »

Summary of the gubbins beneath:

Awarding self another ship

player.replaceShip("lightspeeder-player")

Note for oxp ships: you need the ship .oxp to be loaded (FdL Lightspeeder) and it needs a "player" version to exist inside that .oxp!


Awarding self more dosh:

P.credits = 1000;


Awarding self equipment:

PS.awardEquipment("EQ_FUEL_INJECTION")
PS.awardEquipment("EQ_ADVANCED_COMPASS")



Awarding self a full tank of fuel:

PS.fuel = 7


Reduce energy right down (ie to simulate being attacked):

player.ship.energy=1


Immediate docking at main station

S.mainStation.dockPlayer()


Make the main station explode

system.mainStation.explode() (see link - interesting if you are docked at the time!)


Jumping to another system while docked inside a dockable ship:
Commander McLane wrote: Mon Jun 18, 2012 1:15 pm
  1. Start Oolite.
  2. Travel a little away from the planet.
  3. Spawn a carrier, like a Behemoth, close to your ship.
  4. Dock with it.
  5. Type in the debug console:

    Code: Select all

    PS.dockedStation.exitSystem(insert number of an adjacent system here).
  6. Launch.
  7. ???
  8. Profit. 8)

Display spinning model of ship

:test [ship_data_key]


Older: Display ship

Complex instructions here: Wiki page / Original Thread (2009)

*For a list of the technical definitions of equipment, ships etc, see Hiran's databases: Index of artefacts & https://app.box.com/s/e2yqje0xyj2a0brixd4t7a4ncb0zwqun

*Wiki debug console page


*Communication with other players - this is what Hiran has been using for his Oolite Communicator (MultiPlayer Proof Of Concept: Oolite Communicator & Brainstorming for a MultiUser OXP)

Note that some of this can be done by oxp without using the debug console: Long Range Scanner will allow you (1) to jump to whatever ship/station you like inside the current system & (2) allow you to leap around your current galaxy, jumping as many jumps as you like without using up any fuel.

_______________________________________________________________________________________________________________________________
_______________________________________________________________________________________________________________________________
Original first post:


Trying to get screen shots of Redspear's FdL Lightspeeder, and see what the various screens say about its capabilities.

*How in console to I change the system I am in? Move myself to Ceesxe for example?
*How in console do I award myself a FdL Lightspeeder?


Is there anywhere that I could have looked and found this information?
Last edited by Cholmondely on Sun Jan 22, 2023 12:48 am, edited 9 times in total.
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: How do I? .... (on Debug Console)

Post by phkb »

Cholmondely wrote: Fri Jun 04, 2021 1:04 pm
How in console do I award myself a FdL Lightspeeder?
The debug console can't change your ship. What you can do is show a test of a particular ship by entering this command:

Code: Select all

:test [ship_data_key]
And the colon at the start is important.
That will bring up that version of the ship and set it spinning.

To award yourself a particular ship you would have to edit your save file and change the ship data key in it to whatever ship you want to have. Be careful though. Make sure you take a backup of the save file before you play around.
Cholmondely wrote: Fri Jun 04, 2021 1:04 pm
How in console to I change the system I am in? Move myself to Ceesxe for example?
Again, not something the debug console can do for you. However, what I tend to do if I need to get somewhere in a hurry is:
1. Launch and set my destination.
2. Initiate a jump.
3. On arrival in the system, enter this command into the console: PS.fuel = 7
4. Repeat step 2 and 3 until you're in the target system
5. Enter this command into the console: S.mainStation.dockPlayer()
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: How do I? .... (on Debug Console)

Post by Cody »

If you're going to edit your save-file anyway, what I do if I need to get somewhere fast for testing purposes is give myself oodles of fuel.
Then it's multiple jumps without needing to refuel 'til you get to the system you want, and injectors all the way in-system.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
montana05
---- E L I T E ----
---- E L I T E ----
Posts: 1166
Joined: Mon May 30, 2016 3:54 am
Location: lurking in The Devils Triangle (G1)

Re: How do I? .... (on Debug Console)

Post by montana05 »

Cholmondely wrote: Fri Jun 04, 2021 1:04 pm
Trying to get screen shots of Redspear's FdL Lightspeeder, and see what the various screens say about its capabilities.
I
For simple screenshots and basic information you can use Gallary OXP.
Cholmondely wrote: Fri Jun 04, 2021 1:04 pm
*How in console do I award myself a FdL Lightspeeder?
In normal game you can use a simple script:


this.shipDockedWithStation = function(station)
{
player.replaceShip("GalTech_colonial_viper_mark_I_player");
}


I am using this trick to test-fly all player ships before publishing.
Scars remind us where we've been. They don't have to dictate where we're going.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: How do I? .... (on Debug Console)

Post by Cody »

Colonial Viper, eh? The local Viper jocks didn't take too kindly to me flying one on their patch!
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
montana05
---- E L I T E ----
---- E L I T E ----
Posts: 1166
Joined: Mon May 30, 2016 3:54 am
Location: lurking in The Devils Triangle (G1)

Re: How do I? .... (on Debug Console)

Post by montana05 »

Cody wrote: Sat Jun 05, 2021 12:00 am
Colonial Viper, eh? The local Viper jocks didn't take too kindly to me flying one on their patch!
Try my restore next time, a double front laser gives you some advantage. :wink:
Scars remind us where we've been. They don't have to dictate where we're going.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Re: How do I? .... (on Debug Console)

Post by another_commander »

montana05 wrote: Fri Jun 04, 2021 11:30 pm
In normal game you can use a simple script:


this.shipDockedWithStation = function(station)
{
player.replaceShip("GalTech_colonial_viper_mark_I_player");
}
player.replaceShip("<use shipdata.plist key here>") will also work from the debug comsole, as long as you are docked and the replacement ship has a player role attached to it.
User avatar
montana05
---- E L I T E ----
---- E L I T E ----
Posts: 1166
Joined: Mon May 30, 2016 3:54 am
Location: lurking in The Devils Triangle (G1)

Re: How do I? .... (on Debug Console)

Post by montana05 »

another_commander wrote: Sat Jun 05, 2021 5:10 am
player.replaceShip("<use shipdata.plist key here>") will also work from the debug comsole, as long as you are docked and the replacement ship has a player role attached to it.
Thank you, I didn't know that this is possible.
Scars remind us where we've been. They don't have to dictate where we're going.
User avatar
Cholmondely
Archivist
Archivist
Posts: 5365
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: How do I? .... (on Debug Console)

Post by Cholmondely »

montana05 wrote: Sat Jun 05, 2021 10:50 am
another_commander wrote: Sat Jun 05, 2021 5:10 am
player.replaceShip("<use shipdata.plist key here>") will also work from the debug comsole, as long as you are docked and the replacement ship has a player role attached to it.
Thank you, I didn't know that this is possible.
I still don't know that it's possible.

Tried the following:
1)
> player.replaceShip("lightspeeder-player")


which elicited this response:
Exception: SyntaxError: syntax error
Active script: oolite-debug-console 1.90
oolite-debug-console.js, line 844:
}

2)
> > player.replaceShip("lightspeeder-player")

Exception: SyntaxError: syntax error
Active script: oolite-debug-console 1.90
oolite-debug-console.js, line 844:
}

3)
> > player.replaceShip("<Ship Fer-de-Lance Lightspeeder>")

Exception: SyntaxError: syntax error
Active script: oolite-debug-console 1.90
oolite-debug-console.js, line 844:
}

4)
> player.replaceShip("< lightspeeder-player>")
false

5)
> > player.replaceShip("<
Ship Fer-de-Lance Lightspeeder>")
Exception: SyntaxError: syntax error
Active script: oolite-debug-console 1.90
oolite-debug-console.js, line 844:
}



The formula looks jolly impressive. I just wish I knew what I was supposed to do with it!
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: How do I? .... (on Debug Console)

Post by phkb »

Cholmondely wrote: Wed Jun 16, 2021 8:25 pm
which elicited this response:
Exception: SyntaxError: syntax error
Active script: oolite-debug-console 1.90
oolite-debug-console.js, line 844:
}
That's very strange. I copied the command you entered (ie. player.replaceShip("lightspeeder-player")) into my debug console and it swapped the player ship just fine.

Can I suggest you re-download the Debug OXP and replace your current one? That might eliminate some possibilities, anyway.
User avatar
Cholmondely
Archivist
Archivist
Posts: 5365
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: How do I? .... (on Debug Console)

Post by Cholmondely »

phkb wrote: Wed Jun 16, 2021 8:56 pm
Cholmondely wrote: Wed Jun 16, 2021 8:25 pm
which elicited this response:
Exception: SyntaxError: syntax error
Active script: oolite-debug-console 1.90
oolite-debug-console.js, line 844:
}
That's very strange. I copied the command you entered (ie. player.replaceShip("lightspeeder-player")) into my debug console and it swapped the player ship just fine.

Can I suggest you re-download the Debug OXP and replace your current one? That might eliminate some possibilities, anyway.
Thanks. Tried it again, and this time without the ">" ... it finally worked! I can't pretend to understand what the ">" signs are supposed to do or mean, but they obviously possess some sort of syntactical importance!
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: How do I? .... (on Debug Console)

Post by phkb »

The ">" symbol is simply a marker, inserted by the console, to indicate what was user input, making it stand out from the rest of the output.
User avatar
Cholmondely
Archivist
Archivist
Posts: 5365
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: How do I? .... (on Debug Console)

Post by Cholmondely »

phkb wrote: Wed Jun 16, 2021 9:04 pm
The ">" symbol is simply a marker, inserted by the console, to indicate what was user input, making it stand out from the rest of the output.
Thanking you, Sir!
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: How do I? .... (on Debug Console)

Post by phkb »

You'll also find the symbol in general use in IT, especially whenever a command prompt is being referenced. It indicates "this is what you type in". A hold-over from pre-GUI days when everything was done through a command line.
User avatar
Cholmondely
Archivist
Archivist
Posts: 5365
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: How do I? .... (on Debug Console)

Post by Cholmondely »

Copied from elsewhere:

Jumping to another system while docked inside a dockable ship:
Commander McLane wrote: Mon Jun 18, 2012 1:15 pm
  1. Start Oolite.
  2. Travel a little away from the planet.
  3. Spawn a carrier, like a Behemoth, close to your ship.
  4. Dock with it.
  5. Type in the debug console:

    Code: Select all

    PS.dockedStation.exitSystem(insert number of an adjacent system here).
  6. Launch.
  7. ???
  8. Profit. 8)
Awarding self more dosh:

P.credits = 1000;

Awarding self equipment:

PS.awardEquipment("EQ_FUEL_INJECTION")
PS.awardEquipment("EQ_ADVANCED_COMPASS")


Awarding self a full tank of fuel:

PS.fuel = 7
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
Post Reply