Page 1 of 1

JavaScript console: make ship available for purchase?

Posted: Wed Nov 11, 2009 6:47 pm
by Captain Berf
Is there a JavaScript command to make a ship available for purchase?

Also, to give player x number of credits:

credits : x

Is that correct? (I'm missing something, it does not work in the console)

[Seeing if there is a way to give the player a certain ship in order to preview texture. Is there an Oolite JavaScript cheatsheet?]

Is it no longer possible to create an account to edit the wiki?

Thanks,

Posted: Wed Nov 11, 2009 6:57 pm
by another_commander
For credits:

Code: Select all

player.credits = n
where n is the number you want.

For putting up ships for sale I don't remember having anything, but if you just want to preview a ship's texture you can just do this:
Launch in space and type in the console:

Code: Select all

:spawn shipRole
where shipRole is the role of the ship you want to spawn. You may have to add a distinctive role in the ship's roleset in order to be able to invoke it. Note the colon at the start of the line, it's needed.
If you want to make things even easier for studying your ship, instead of chasing it around trying to view it from a good angle, you can simply target it after it has been spawned and execute on the console:

Code: Select all

player.ship.target.setAI("dumbAI.plist")
This will stop it right where it is in space and start rotating it. You can approach from any angle you want and get as close as you like without it trying to get away from you.

Re: JavaScript console: make ship available for purchase?

Posted: Wed Nov 11, 2009 7:10 pm
by Kaks
Captain Berf wrote:
Is there an Oolite JavaScript cheatsheet?
Possibly not what you're after but:
http://wiki.alioth.net/index.php/Catego ... _scripting

& automatic accounts are suspended due to too much spamming. I if you pm winston he should be able to add you in when he gets the time, though?

Posted: Wed Nov 11, 2009 7:10 pm
by Captain Berf
Thanks.

I thought that using the external view of the player ship would stop the chasing, but parking the spawn is much easier.

[I've been making procedure lists of what I have learned re: skinning, but there is no option to create an account on the alioth wiki.]

Re: JavaScript console: make ship available for purchase?

Posted: Wed Nov 11, 2009 7:15 pm
by Captain Berf
Kaks wrote:
Captain Berf wrote:
Is there an Oolite JavaScript cheatsheet?
Possibly not what you're after but:
http://wiki.alioth.net/index.php/Catego ... _scripting

& automatic accounts are suspended do to too much spamming. I if you pm winston he should be able to add you in when he gets the time, though?
Oops simul-post.

I've been browsing that. I wondered if there was a 1 page summary. When your base-knowledge=0 and you don't know what you're looking for a clean summary can help.

Thanks

Posted: Wed Nov 11, 2009 8:51 pm
by Eric Walch
And when you have ships with subentities and are not sure about the exact position it needs, you can even play with them by using:

Code: Select all

player.ship.target.subEntities[0].position = [x, y, z]