** Urgent GalCop Broadcast to all pilots **
Moderators: winston, another_commander
- Killer Wolf
- ---- E L I T E ----
- Posts: 2279
- Joined: Tue Jan 02, 2007 12:38 pm
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.
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.
- Smivs
- Retired Assassin
- Posts: 8408
- Joined: Tue Feb 09, 2010 11:31 am
- Location: Lost in space
- Contact:
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
@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.
-
- Quite Grand Sub-Admiral
- Posts: 6683
- Joined: Wed Feb 28, 2007 7:54 am
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.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
- Commander McLane
- ---- 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:
As I had assumed.Eric Walch wrote:Look at the wiki. You must do an explicit check for not being in "InterstellarSpace" before adding the ship.Killer Wolf wrote:they were never intended to be in WS, though i guess the script's "thisshipwillexitfromhyperspace" thingy will trigger that. :-/
I think this is the oldest bug that is around and most oxp-ers have made this bug in the past.
@ KW: The remedy is easy. Just insert one line of code, right here:
Code: Select all
this.shipWillExitWitchspace = function()
{
if (system.isInterstellarSpace) return;
- Killer Wolf
- ---- E L I T E ----
- Posts: 2279
- Joined: Tue Jan 02, 2007 12:38 pm
- Commander McLane
- ---- 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:
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).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?
- Arexack_Heretic
- 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:
- Killer Wolf
- ---- E L I T E ----
- Posts: 2279
- Joined: Tue Jan 02, 2007 12:38 pm
- maik
- 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 **
Finally added them to the [wiki]OXP List[/wiki].
- SandJ
- ---- 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 **
Installed this a couple of days ago - I like it. 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>
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
Dropbox referral link 2GB of free space online + 500 Mb for the referral: good for securing work-in-progress.
Dropbox referral link 2GB of free space online + 500 Mb for the referral: good for securing work-in-progress.
- Killer Wolf
- ---- E L I T E ----
- Posts: 2279
- Joined: Tue Jan 02, 2007 12:38 pm
Re: ** Urgent GalCop Broadcast to all pilots **
cheers, glad you like it
the Wasp behaviour is all down to Thargoid's rather evil AI.
the Wasp behaviour is all down to Thargoid's rather evil AI.
Re:
Yep. All interstellar space coordinates, regardless of intended format, are always treated as 'abs', since any other format would be 'slightly' meaningless.Commander McLane wrote: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).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?
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
- Commander McLane
- ---- 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 **
@ Kaks: Note that this particular exchange is already 1 1/2 years old. The thread was just revived from the dead.
- SandJ
- ---- 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 **
My apologies if I caused any confusion.Commander McLane wrote:The thread was just revived from the dead.
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
Dropbox referral link 2GB of free space online + 500 Mb for the referral: good for securing work-in-progress.
Dropbox referral link 2GB of free space online + 500 Mb for the referral: good for securing work-in-progress.