** Urgent GalCop Broadcast to all pilots **

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2279
Joined: Tue Jan 02, 2007 12:38 pm

Post by Killer Wolf »

Cheers Eric, but i avoid JS as much as i can cos i have no clue about it :-(
all the stuff in my OXPs have been kindly provided by the likes of yourself/Thargoid etc, or butchered amateurishly by myself and probably work only by sheer luck.
would any JS people be willing to do a series of very simple "idiots' guides" to JS? from simple syntax rules/examples, to say how to pass parameters, how to stack stuff in AI etc? i know there's a bunch of coded examples on the wiki, but sometimes i can't unerstand what the code's doing.
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Post by Smivs »

Request seconded. A few nice examples with explanations as to what the code is doing would be really useful, particularly if referenced to how Oolite works and uses JS.
@KW, you are not alone...there are probably many of us who would like to explore JS in more detail, but haven't got a clue where to start :(
Commander Smivs, the friendliest Gourd this side of Riedquat.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

Smivs wrote:
Request seconded. A few nice examples with explanations as to what the code is doing would be really useful, particularly if referenced to how Oolite works and uses JS.
@KW, you are not alone...there are probably many of us who would like to explore JS in more detail, but haven't got a clue where to start :(
I recommend having a look at the Scripts folder inside oolite.app in the core game installation. All native missions are there and you can see how Nova, Constrictor and friends are done. For basic tutorials, I would try googling for "beginners javascript tutorial". Most of what you'll find will be browser-based, but will definitely give you what you need to get started.
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

Eric Walch wrote:
Killer Wolf wrote:
they were never intended to be in WS, though i guess the script's "thisshipwillexitfromhyperspace" thingy will trigger that. :-/
Look at the wiki. You must do an explicit check for not being in "InterstellarSpace" before adding the ship.
I think this is the oldest bug that is around and most oxp-ers have made this bug in the past.
As I had assumed. :wink:

@ KW: The remedy is easy. Just insert one line of code, right here:

Code: Select all

this.shipWillExitWitchspace = function() 
{
    if (system.isInterstellarSpace) return;
What it does is: If the system you are entering happens to be interstellar space, it stops the action right there. So no nests are spawned.
User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2279
Joined: Tue Jan 02, 2007 12:38 pm

Post by Killer Wolf »

thanks bud, i'll get working on an update when i get a spare moment.

edit : actually, summat's just struck me : to position the Nest i used the "spu" format : now, given there's no "s" in Witchspace (or "p" for that matter), what's it using in the calculation?
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

Killer Wolf wrote:
edit : actually, summat's just struck me : to position the Nest i used the "spu" format : now, given there's no "s" in Witchspace (or "p" for that matter), what's it using in the calculation?
It used to be that in witchspace the coordinate systems were completely ignored. Where you spawn is the origin, and where you are facing is the z-direction, regardless of the coordinate-letter-code. Oh, and everything was in meters, because there are no radii of planetary bodies, or distances between them. Thus, the nest should be spawned very much where the player exits witchspace (the engine would place him a little away from the point in order to avoid an immediate collision).
User avatar
tonyhippy
Dangerous
Dangerous
Posts: 90
Joined: Mon Apr 19, 2010 8:23 pm
Location: UK
Contact:

Post by tonyhippy »

I quite like them turning up in witchspace myself.
User avatar
Arexack_Heretic
Dangerous Subversive Element
Dangerous Subversive Element
Posts: 1876
Joined: Tue Jun 07, 2005 7:32 pm
Location: [%H] = Earth surface, Lattitude 52°10'58.19"N, longtitude 4°30'0.25"E.
Contact:

Post by Arexack_Heretic »

Do they fire their lasers from the abdomen? :lol:
Riding the Rocket!
User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2279
Joined: Tue Jan 02, 2007 12:38 pm

Post by Killer Wolf »

yep, underslung "sting" that faces forward :-)
User avatar
maik
Wiki Wizard
Wiki Wizard
Posts: 2028
Joined: Wed Mar 10, 2010 12:30 pm
Location: Ljubljana, Slovenia (mainly industrial, feudal, TL12)

Re: ** Urgent GalCop Broadcast to all pilots **

Post by maik »

Finally added them to the [wiki]OXP List[/wiki].
User avatar
SandJ
---- E L I T E ----
---- E L I T E ----
Posts: 1048
Joined: Fri Nov 26, 2010 9:08 pm
Location: Help! I'm stranded down here on Earth!

Re: ** Urgent GalCop Broadcast to all pilots **

Post by SandJ »

Installed this a couple of days ago - I like it. Image It's sort of silly but valid in a sci-fi setting, it is fun, it is unobtrusive. I think it is a really good - albeit unusual - add-on. Thank you, Killer Wolf.

Spoilers in pale text follow - I suggest you install the OXP and go visit the nest before reading:

The way they attack was unexpected. I did not see it coming and I was dead within seconds - clever AI.

The first item for sale - genius! A genuine laugh-out-loud when I realised.

Once you've got the hang of how the swarms work, you can top up your kill count. <evil grin>
Flying a Cobra Mk I Cobbie 3 with nothing but Explorers Club.OXP and a beam laser 4 proper lasers for company :D
Dropbox referral link 2GB of free space online + 500 Mb for the referral: good for securing work-in-progress.
User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2279
Joined: Tue Jan 02, 2007 12:38 pm

Re: ** Urgent GalCop Broadcast to all pilots **

Post by Killer Wolf »

cheers, glad you like it :-)

the Wasp behaviour is all down to Thargoid's rather evil AI.
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Re:

Post by Kaks »

Commander McLane wrote:
Killer Wolf wrote:
edit : actually, summat's just struck me : to position the Nest i used the "spu" format : now, given there's no "s" in Witchspace (or "p" for that matter), what's it using in the calculation?
It used to be that in witchspace the coordinate systems were completely ignored. Where you spawn is the origin, and where you are facing is the z-direction, regardless of the coordinate-letter-code. Oh, and everything was in meters, because there are no radii of planetary bodies, or distances between them. Thus, the nest should be spawned very much where the player exits witchspace (the engine would place him a little away from the point in order to avoid an immediate collision).
Yep. All interstellar space coordinates, regardless of intended format, are always treated as 'abs', since any other format would be 'slightly' meaningless.
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: ** Urgent GalCop Broadcast to all pilots **

Post by Commander McLane »

@ Kaks: Note that this particular exchange is already 1 1/2 years old. The thread was just revived from the dead. :wink:
User avatar
SandJ
---- E L I T E ----
---- E L I T E ----
Posts: 1048
Joined: Fri Nov 26, 2010 9:08 pm
Location: Help! I'm stranded down here on Earth!

Re: ** Urgent GalCop Broadcast to all pilots **

Post by SandJ »

Commander McLane wrote:
The thread was just revived from the dead. :wink:
My apologies if I caused any confusion.

I was told off very early on for starting a new thread on an existing subject, and I understand it is the expectation and convention that comments on a .OXP should go in the thread in which the .OXP was announced.

Hence I thought it right that I should say "Spiffy add-on" in this thread, especially since it had been so quiet for so long.

(This convention of keeping on-topic into the relevant thread is most unusual; most fora complain of raising zombies when someone does that. I happen to think this forum is right, and all the others wrong, myself.)
Flying a Cobra Mk I Cobbie 3 with nothing but Explorers Club.OXP and a beam laser 4 proper lasers for company :D
Dropbox referral link 2GB of free space online + 500 Mb for the referral: good for securing work-in-progress.
Post Reply