Page 2 of 6

Re: [Test RELEASE:] Interstellar Tweak OXP

Posted: Wed Dec 07, 2011 3:44 pm
by Micha
It occurs to me that simply requesting a way to set a ship to be a hulk via JS would be the way forward, instead of doing all sorts of weird things in JS?

Obviously only after MNSR... :)

Re: [Test RELEASE:] Interstellar Tweak OXP

Posted: Wed Dec 07, 2011 9:52 pm
by UK_Eliter
Micha wrote:
It occurs to me that simply requesting a way to set a ship to be a hulk via JS would be the way forward, instead of doing all sorts of weird things in JS?

Obviously only after MNSR... :)
Micha: it needn't be that weird, it turns out. For, if you have the right shipdata in your 'plist', then - others have helped me to discover - all you need in JS is something like

Code: Select all

this.derelictShip = system.addShips("IST_derelict", 1, this.position, 4000);
which invokes a ship role defined in the shipdata. Still, it would be nice to be able to do without the shipdata (and thus without defining a whole load of derelict ships).

Also, I thought that the MNSR was, at present, not that 'M' (mythical). But maybe I'm naive!

Re: [Test RELEASE:] Interstellar Tweak OXP

Posted: Thu Dec 08, 2011 5:27 am
by Capt. Murphy
Micha wrote:
It occurs to me that simply requesting a way to set a ship to be a hulk via JS would be the way forward, instead of doing all sorts of weird things in JS?

Obviously only after MNSR... :)
Would it be worth just slightly expanding the scope of the abandonShip method so that ships both with and without escape pods are made derelict when it is called via JS. It currently does the job for ships with escape pods, but does nothing at all for ships without pods.

Maybe a rename - makeDerelict([abandonShip : Boolean]). If sent with a true flag the ship will be made derelict and if it has pods they will be launched, if false it will just convert the ship to derelict status. Keep the existing abandonShip method for backwards compatibility.

Re: [Test RELEASE:] Interstellar Tweak OXP

Posted: Thu Dec 08, 2011 2:35 pm
by CommonSenseOTB
Capt. Murphy wrote:
Micha wrote:
It occurs to me that simply requesting a way to set a ship to be a hulk via JS would be the way forward, instead of doing all sorts of weird things in JS?

Obviously only after MNSR... :)
Would it be worth just slightly expanding the scope of the abandonShip method so that ships both with and without escape pods are made derelict when it is called via JS. It currently does the job for ships with escape pods, but does nothing at all for ships without pods.

Maybe a rename - makeDerelict([abandonShip : Boolean]). If sent with a true flag the ship will be made derelict and if it has pods they will be launched, if false it will just convert the ship to derelict status. Keep the existing abandonShip method for backwards compatibility.
A derelict ship has no one on board, right? So, if no escape capsules are launched, someone must still be on board. How does it make sense to make a ship derelict that has not fired escape capsules? I must have missed something. :?
Perhaps instead maybe some kind of spawnDerelict command would be better and avoid the possibility of one shot super weapons that disable an npc ship and turn it into a derelict. At the moment one can change the AI of the npc anyway to simulate such a weapon so why the need for a dedicated command?

Re: [Test RELEASE:] Interstellar Tweak OXP

Posted: Thu Dec 08, 2011 3:28 pm
by JazHaz
CommonSenseOTB wrote:
A derelict ship has no one on board, right? So, if no escape capsules are launched, someone must still be on board. How does it make sense to make a ship derelict that has not fired escape capsules? I must have missed something. :?
The ship could be derelict if the crew has been killed? Their bodies might be on board, but the ship would be derelict still.

Re: [Test RELEASE:] Interstellar Tweak OXP

Posted: Thu Dec 08, 2011 6:54 pm
by Thargoid
The question would be also can you have ships without a crew aboard which aren't derelicts.

There are certain scenarios where you might want that (for example my Hired Guns escorts, they're actually crewless flying rocks so they don't mass-lock you). If this got handled wrongly then you could end up with an active ship that the game sees as a salvagable hulk.

But equally such a ship could then also never be made into a derelict if you did want to, for the same reason of not being flagged as crewed.

Re: [Test RELEASE:] Interstellar Tweak OXP

Posted: Fri Dec 09, 2011 5:08 am
by Capt. Murphy
CommonSenseOTB wrote:
A derelict ship has no one on board, right? So, if no escape capsules are launched, someone must still be on board. How does it make sense to make a ship derelict that has not fired escape capsules? I must have missed something. :?
Perhaps instead maybe some kind of spawnDerelict command would be better and avoid the possibility of one shot super weapons that disable an npc ship and turn it into a derelict. At the moment one can change the AI of the npc anyway to simulate such a weapon so why the need for a dedicated command?
It's just really for convenience for OXP makers who want pre-existing derelicts spawned without having to define lots of derelict versions of ship models in shipdata. But maybe system.addShipsAsDerelict with the same parameters as system.addShips would be a better option.

Thargoid - you can giving 'flying rocks' a pilot (the escort contracts mother is a piloted 'flying rock') and keep them non-mass locking. The benefit being that the hired guns will then have some collision avoidance behaviour which they won't have at the minute.

Re: [Test RELEASE:] Interstellar Tweak OXP

Posted: Fri Dec 09, 2011 10:18 am
by UK_Eliter
Capt. Murphy wrote:
CommonSenseOTB wrote:
Thargoid - you can giving 'flying rocks' a pilot (the escort contracts mother is a piloted 'flying rock') and keep them non-mass locking. The benefit being that the hired guns will then have some collision avoidance behaviour which they won't have at the minute.
I have had escorts bump into me quite a bit! Also, 'twould be good were escorts to follow one when one misjumps (- I believe they don't do that at present). Or at least that makes sense - er, I think - if the idea is that they follow through your wormhole.

Re: [Test RELEASE:] Interstellar Tweak OXP

Posted: Fri Dec 09, 2011 3:42 pm
by CommonSenseOTB
UK_Eliter wrote:
Capt. Murphy wrote:
CommonSenseOTB wrote:
Thargoid - you can giving 'flying rocks' a pilot (the escort contracts mother is a piloted 'flying rock') and keep them non-mass locking. The benefit being that the hired guns will then have some collision avoidance behaviour which they won't have at the minute.
I have had escorts bump into me quite a bit! Also, 'twould be good were escorts to follow one when one misjumps (- I believe they don't do that at present). Or at least that makes sense - er, I think - if the idea is that they follow through your wormhole.
@UK Eliter, umm, I never wrote that. Proofread your quotes please.
@Capt. Murphy, system.addShipsAsDerelict sounds like the way to go.

Re: [Test RELEASE:] Interstellar Tweak OXP

Posted: Fri Dec 09, 2011 8:36 pm
by Okti
Looks like scripting requests thread will be busy after the new year. :D But if there is a way to do it with the current JS implementation I would prefer to do it now.

Re: [Test RELEASE:] Interstellar Tweak OXP

Posted: Sat Dec 10, 2011 12:05 am
by UK_Eliter
@CommonSenseOTB:
'@UK Eliter, umm, I never wrote that. Proofread your quotes please.'
Ah, yes: you didn't say that. Someone else - namely, Capt. Murphy - did. Sorry. I am still learning how the 'quote' function works, it seems. (I feel that it would help if we explicitly signed our posts. Still, the whole virtual-name-not-being-your-real-name makes things a bit complicated - in that it seems odd signing by my avatar. That in turn raises the question of why I don't sign by my actual name. . Anyway, sorry to have misquoted you.)

Re: [Test RELEASE:] Interstellar Tweak OXP

Posted: Sat Dec 10, 2011 12:17 am
by Wildeblood
UK_Eliter wrote:
That in turn raises the question of why I don't sign by my actual name.
Because until the internet came along, we didn't realize how many stalkers and nut-jobs there are in the world.

Re: [Test RELEASE:] Interstellar Tweak OXP

Posted: Sat Dec 10, 2011 12:23 am
by CommonSenseOTB
UK_Eliter wrote:
@CommonSenseOTB:
'@UK Eliter, umm, I never wrote that. Proofread your quotes please.'
Ah, yes: you didn't say that. Someone else - namely, Capt. Murphy - did. Sorry. I am still learning how the 'quote' function works, it seems. (I feel that it would help if we explicitly signed our posts. Still, the whole virtual-name-not-being-your-real-name makes things a bit complicated - in that it seems odd signing by my avatar. That in turn raises the question of why I don't sign by my actual name. .) Anyway, sorry to have misquoted you.)
@UK_Eliter: It's allright. Are you using the quote button? I find that it is easier to use the button and then cut away what you don't need, for me it's faster and reduces errors. :wink:

Re: [Test RELEASE:] Interstellar Tweak OXP

Posted: Sat Dec 10, 2011 12:55 am
by UK_Eliter
Wildeblood wrote:
UK_Eliter wrote:
That in turn raises the question of why I don't sign by my actual name.
Because until the internet came along, we didn't realize how many stalkers and nut-jobs there are in the world.
Ah yes, that will be it - largely, anyway.

Re: [Test RELEASE:] Interstellar Tweak OXP

Posted: Sat Dec 10, 2011 4:51 pm
by UK_Eliter
New version ready for testing! This one does much more (although the chance of anything being triggered is fairly low - you can change that, though).

URL: http://www.box.com/shared/moreq536ht